diff --git a/internal/web/ui/templates/task.html b/internal/web/ui/templates/task.html index c573a8c..303dcfd 100644 --- a/internal/web/ui/templates/task.html +++ b/internal/web/ui/templates/task.html @@ -6,7 +6,7 @@
-

任务详情

+

任务概览

任务标识
@@ -33,7 +33,7 @@
-

设备结果表

+

设备结果

@@ -67,7 +67,7 @@
-

实时进度

+

执行进度

任务执行过程中会持续推送每台设备的状态变化。
diff --git a/internal/web/ui_test.go b/internal/web/ui_test.go index 3ccc294..2ee04da 100644 --- a/internal/web/ui_test.go +++ b/internal/web/ui_test.go @@ -2171,3 +2171,18 @@ func TestUI_DeviceWorkspaceContainsSingleDeviceOperations(t *testing.T) { } } } + +func TestUI_TaskDetailPresentsExecutionSections(t *testing.T) { + ui := newTestUI(t) + task, err := ui.tasks.CreateTask("config_apply", []string{"edge-01"}, map[string]any{"config": map[string]any{}}) + if err != nil { + t.Fatalf("create task: %v", err) + } + + html := renderPage(t, ui, "/ui/tasks/"+task.ID) + for _, text := range []string{"任务概览", "执行进度", "设备结果"} { + if !strings.Contains(html, text) { + t.Fatalf("expected task detail section %q in html: %s", text, html) + } + } +}