Files
sam-manage/resources/views/dev-tools/api-explorer/partials/history-drawer.blade.php
hskwon a62337ef5c feat: [API Explorer] Phase 1 완성 - 히스토리 로드, 밸리데이션, 유니코드 처리
- 히스토리 로드 기능 구현 (loadFromHistory, fillFormFromHistory)
- 클라이언트 사이드 필수값 밸리데이션 추가
- 응답 본문 \xXX UTF-8 바이트 시퀀스 디코딩 (PHP 스택트레이스 한글 깨짐 해결)
- sidebar에 data-operation-id 속성 추가
- history-drawer 함수 연결 수정
- Flow Tester 변수 바인딩 개선
- 마이그레이션 파일 통합 정리
2025-12-18 15:42:01 +09:00

35 lines
1.9 KiB
PHP

@if($histories->isEmpty())
<div class="text-center text-gray-400 py-8">
<svg class="w-8 h-8 mx-auto mb-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
<p class="text-sm">히스토리가 없습니다</p>
</div>
@else
<div class="divide-y divide-gray-100">
@foreach($histories as $history)
<div class="p-3 hover:bg-gray-50 cursor-pointer" onclick="loadFromHistory({{ $history->id }})">
<div class="flex items-center justify-between mb-1">
<div class="flex items-center gap-2">
<span class="method-badge method-{{ strtolower($history->method) }}">
{{ $history->method }}
</span>
<span class="status-{{ $history->response_status >= 200 && $history->response_status < 300 ? '2xx' : ($history->response_status >= 400 && $history->response_status < 500 ? '4xx' : ($history->response_status >= 500 ? '5xx' : '3xx')) }} font-semibold text-sm">
{{ $history->response_status }}
</span>
</div>
<span class="text-xs text-gray-400">{{ $history->duration_ms }}ms</span>
</div>
<div class="text-sm text-gray-700 truncate" title="{{ $history->endpoint }}">
{{ $history->endpoint }}
</div>
<div class="flex items-center justify-between mt-1">
<span class="text-xs text-gray-400">{{ $history->environment }}</span>
<span class="text-xs text-gray-400">{{ $history->created_at->diffForHumans() }}</span>
</div>
</div>
@endforeach
</div>
@endif