{{define "tasks"}}

创建任务

当前仅支持 config_apply
类型
设备ID(逗号分隔)
payload_json(JSON)

任务列表

{{range .Tasks}} {{end}}
任务ID类型状态设备数
{{.ID}} {{.Type}} {{if eq .Status "success"}}成功 {{else if eq .Status "failed"}}失败 {{else if eq .Status "running"}}执行中 {{else}}待执行{{end}} {{len .DeviceIDs}}

提示

也可以在 接口调试 里直接调用 /api/tasks,并用 SSE 订阅 /api/tasks/{id}/events
{{end}}