Spaces:
Running
Running
| {% extends "base.html" %} | |
| {% block title %}部署状态 - HuggingFace Space 部署器{% endblock %} | |
| {% block content %} | |
| <div class="max-w-2xl mx-auto"> | |
| <!-- Header --> | |
| <div class="text-center mb-8"> | |
| <h1 class="text-3xl font-bold mb-4"> | |
| <i data-lucide="activity" class="w-8 h-8 inline mr-2"></i> | |
| 部署状态监控 | |
| </h1> | |
| <p class="text-base-content/70">任务 ID: <code class="bg-base-300 px-2 py-1 rounded">{{ task_id }}</code></p> | |
| </div> | |
| <!-- Deployment Status Card --> | |
| <div class="card bg-base-100 shadow-2xl border border-base-300 fade-in max-w-4xl mx-auto"> | |
| <div class="card-body"> | |
| <h2 class="card-title text-2xl mb-6 flex items-center"> | |
| <i data-lucide="activity" class="w-6 h-6 mr-2"></i> | |
| <span data-i18n="status.title">Deployment Status</span> | |
| </h2> | |
| <!-- Task Info --> | |
| <div class="bg-base-200 rounded-lg p-4 mb-6"> | |
| <div class="flex items-center justify-between"> | |
| <span class="text-sm font-semibold" data-i18n="status.taskId">Task ID</span> | |
| <div class="flex items-center gap-2"> | |
| <code class="text-xs bg-base-300 px-2 py-1 rounded" id="task-id">{{ task_id }}</code> | |
| <button | |
| onclick="copyToClipboard('{{ task_id }}')" | |
| class="btn btn-ghost btn-xs" | |
| data-i18n-title="status.copy" | |
| title="Copy" | |
| > | |
| <i data-lucide="copy" class="w-3 h-3"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Status Container with fixed min-height to prevent jumping --> | |
| <div id="status-container" class="min-h-[400px] relative transition-all duration-300"> | |
| <!-- Initial loading state --> | |
| <div class="status-content absolute inset-0 flex items-center justify-center"> | |
| <div class="flex flex-col items-center justify-center py-8"> | |
| <div class="loading loading-spinner loading-lg text-primary mb-4"></div> | |
| <h3 class="text-xl font-semibold mb-2" data-i18n="status.initializing">Initializing...</h3> | |
| <p class="text-base-content/70" data-i18n="status.preparing">Preparing your Space...</p> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Auto-refresh indicator --> | |
| <div id="refresh-indicator" class="mt-6 text-center transition-opacity duration-300"> | |
| <p class="text-xs text-base-content/50"> | |
| <i data-lucide="refresh-cw" class="w-3 h-3 inline mr-1 animate-spin"></i> | |
| <span data-i18n="status.autoRefresh">Auto-refresh every 2s</span> | |
| </p> | |
| </div> | |
| <!-- Action Buttons --> | |
| <div class="divider mt-8"></div> | |
| <div class="flex gap-4 justify-center"> | |
| <a href="/" class="btn btn-ghost"> | |
| <i data-lucide="arrow-left" class="w-4 h-4 mr-2"></i> | |
| <span data-i18n="status.newDeploy">New Deploy</span> | |
| </a> | |
| <button | |
| onclick="window.location.reload()" | |
| class="btn btn-ghost" | |
| > | |
| <i data-lucide="refresh-cw" class="w-4 h-4 mr-2"></i> | |
| <span data-i18n="status.refresh">Refresh</span> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Help --> | |
| <div class="alert alert-info mt-8"> | |
| <i data-lucide="help-circle" class="w-5 h-5"></i> | |
| <div> | |
| <h3 class="font-bold">关于部署过程</h3> | |
| <div class="text-sm mt-2"> | |
| <p>• <strong>PENDING:</strong> 任务已创建,等待开始处理</p> | |
| <p>• <strong>IN_PROGRESS:</strong> 正在克隆代码并部署到 HuggingFace Spaces</p> | |
| <p>• <strong>SUCCESS:</strong> 部署成功,您的应用已上线</p> | |
| <p>• <strong>FAILED:</strong> 部署失败,请检查错误信息</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <style> | |
| /* Smooth transitions for status updates */ | |
| .status-content { | |
| transition: opacity 0.3s ease-in-out; | |
| } | |
| .status-content.fade-out { | |
| opacity: 0; | |
| } | |
| .status-content.fade-in { | |
| opacity: 1; | |
| } | |
| /* Prevent layout shifts */ | |
| #status-container { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| } | |
| /* Progress steps animation */ | |
| .steps .step { | |
| transition: all 0.3s ease; | |
| } | |
| </style> | |
| <script> | |
| </script> | |
| {% endblock %} |