- Task 模型增加 CreatedAt/CompletedAt,DB 读取和快照同步 - 总览页最近任务显示时间,限制5条,增加"更多 →"链接 - 任务中心增加创建时间/完成时间列 - 管控台"保存并下发"按钮:修改功能或视频源后才激活 - 下发前弹出变更摘要确认对话框 - 下发后回到管控台并显示任务ID
36 lines
1.1 KiB
HTML
36 lines
1.1 KiB
HTML
{{define "tasks"}}
|
|
<div class="card">
|
|
<h2>执行历史</h2>
|
|
<div class="table-wrap" style="margin-top:10px">
|
|
<table>
|
|
<thead>
|
|
<tr><th>任务</th><th>类型</th><th>设备数</th><th>状态</th><th>创建时间</th><th>完成时间</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .Tasks}}
|
|
<tr>
|
|
<td>
|
|
<div><a class="mono" href="/ui/tasks/{{.ID}}">{{shortID .ID}}</a></div>
|
|
<div class="muted small">{{taskActionLabel .Type}}</div>
|
|
</td>
|
|
<td>
|
|
<span class="{{taskGroupClass .Type}}">{{taskGroupLabel .Type}}</span>
|
|
</td>
|
|
<td>{{len .DeviceIDs}} 台</td>
|
|
<td>
|
|
<span class="{{taskStatusClass .Status}}">{{taskStatusLabel .Status}}</span>
|
|
</td>
|
|
<td class="muted small">{{.CreatedAt}}</td>
|
|
<td class="muted small">{{.CompletedAt}}</td>
|
|
</tr>
|
|
{{else}}
|
|
<tr>
|
|
<td colspan="4" class="muted">还没有批量任务。从设备页选择设备后发起操作,这里会展示执行记录。</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{{end}}
|