@extends('layouts.app') @section('title', 'API 플로우 테스터') @section('content')
등록된 플로우가 없습니다
새 플로우를 생성하여 API 테스트를 시작하세요.
| # | 이름 | 카테고리 | 스텝 | 최근 실행 | 상태 | 생성일 | 액션 |
|---|---|---|---|---|---|---|---|
| {{ $flows->firstItem() + $loop->index }} |
{{ $flow->name }}
@if($flow->description)
{{ $flow->description }}
@endif
|
@if($flow->category) {{ $flow->category }} @else - @endif | {{ $flow->step_count }}개 | @if($latestRun) {{ $latestRun->created_at->diffForHumans() }} @else - @endif | @if($latestRun) {{ $latestRun->status_label }} @else 대기 @endif | {{ $flow->created_at->format('y.m.d') }} | |
플로우 스텝 ({{ count($steps) }}개)@if($latestRun) 최근 실행: {{ $latestRun->created_at->format('m/d H:i') }} @if($latestRun->duration_ms) ({{ number_format($latestRun->duration_ms / 1000, 2) }}초) @endif @endif
@foreach($steps as $idx => $step)
@php
// 메서드 배지 색상만 정의
$badgeColors = [
'GET' => '#3b82f6',
'POST' => '#10b981',
'PUT' => '#f59e0b',
'PATCH' => '#f97316',
'DELETE' => '#ef4444',
];
$method = strtoupper($step['method'] ?? 'GET');
$badgeColor = $badgeColors[$method] ?? '#6b7280';
$hasDeps = !empty($step['dependsOn']);
// 실행 결과 확인
$stepId = $step['id'] ?? '';
$result = $stepResults[$stepId] ?? null;
$isSkipped = $result && ($result['skipped'] ?? false);
$isSuccess = $result && !$isSkipped && ($result['success'] ?? false);
$isFailed = $result && !$isSkipped && !($result['success'] ?? true);
$isPending = !$result;
// 상태 기준 카드 스타일
if ($isPending) {
$cardBg = '#f9fafb';
$cardBorder = '#e5e7eb';
$numberBg = '#9ca3af';
$statusIcon = null;
} elseif ($isSkipped) {
$cardBg = '#fefce8'; // 연노랑
$cardBorder = '#facc15'; // 노랑
$numberBg = '#eab308';
$statusIcon = 'skip';
} elseif ($isSuccess) {
$cardBg = '#ecfdf5';
$cardBorder = '#10b981';
$numberBg = '#10b981';
$statusIcon = 'success';
} else {
$cardBg = '#fef2f2';
$cardBorder = '#ef4444';
$numberBg = '#ef4444';
$statusIcon = 'fail';
}
@endphp
{{-- 연결 화살표 --}}
@if($idx > 0)
{{-- 스텝 번호 --}}
@endforeach
{{ $idx + 1 }}
{{-- 상태 인디케이터 (성공/실패/스킵 시) --}}
@if($statusIcon)
@php
$iconBgColor = match($statusIcon) {
'success' => '#10b981',
'fail' => '#ef4444',
'skip' => '#eab308',
default => '#9ca3af'
};
@endphp
@if($statusIcon === 'success')
@elseif($statusIcon === 'skip')
{{-- Skip 아이콘: 화살표 우회 --}}
@else
@endif
@endif
{{-- 카드 본체 (상태 기준 색상) --}}
{{-- 메서드 배지 --}}
{{-- 툴팁 --}}
{{ $method }}
{{-- 스텝 이름 --}}
{{ $step['name'] ?? $step['id'] }}
{{-- 엔드포인트 --}}
{{-- 실행 결과 또는 의존성 --}}
@if($result)
@if($isSkipped)
스킵
@elseif($isSuccess)
성공
{{ $result['duration'] ?? 0 }}ms
@else
실패
{{ $result['duration'] ?? 0 }}ms
@endif
@elseif($hasDeps)
{{ implode(', ', $step['dependsOn']) }}
@endif
스텝이 없습니다.
@endif
|
|||||||