- Add human task dspy: human_complete, human_list, approval_approve, approval_reject - Add task_restart.dspy for restarting completed/failed tasks - Enhance task_detail.ui: inline human task forms, approval buttons, restart - New step_panel.ui: view/modify step artifacts with cascade rerun - Update task_list.ui: Tabular with search_form filter by pipeline/state - Update index.ui: embed task list Tabular inline - Update load_path.py: register new dspy/ui paths
114 lines
5.9 KiB
XML
114 lines
5.9 KiB
XML
{
|
|
"widgettype": "VBox",
|
|
"options": {"width": "100%", "height": "100%", "padding": "20px"},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "HBox",
|
|
"options": {"width": "100%", "justifyContent": "space-between", "alignItems": "center", "marginBottom": "16px"},
|
|
"subwidgets": [
|
|
{"widgettype": "Title", "options": {"text": "产线任务", "cfontsize": 24}},
|
|
{
|
|
"widgettype": "Button",
|
|
"options": {"label": "提交新任务", "icon": "plus"},
|
|
"binds": [{
|
|
"wid": "self", "event": "click", "actiontype": "urlwidget",
|
|
"target": "app.pipeline_task_content",
|
|
"options": {"url": "{{entire_url('task_submit.ui')}}"},
|
|
"mode": "replace"
|
|
}]
|
|
},
|
|
{"widgettype": "Filler"}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "VBox",
|
|
"id": "pipeline_task_content",
|
|
"options": {"width": "100%", "css": "filler"},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Tabular",
|
|
"id": "task_table",
|
|
"options": {
|
|
"width": "100%",
|
|
"height": "100%",
|
|
"css": "card",
|
|
"title": "任务中心",
|
|
"data_url": "{{entire_url('api/task_list.dspy')}}",
|
|
"data_method": "GET",
|
|
"page_rows": 20,
|
|
"toolbar": {
|
|
"tools": [
|
|
{"name": "refresh", "label": "刷新", "selected_row": false},
|
|
{"name": "view", "label": "查看详情", "selected_row": true}
|
|
]
|
|
},
|
|
"search_form": {
|
|
"fields": [
|
|
{"name": "pipeline_id", "label": "产线", "uitype": "str", "placeholder": "筛选产线ID"},
|
|
{"name": "state", "label": "状态", "uitype": "code", "data": [
|
|
{"value": "", "text": "全部"},
|
|
{"value": "submitted", "text": "已提交"},
|
|
{"value": "running", "text": "运行中"},
|
|
{"value": "waiting", "text": "等待人工"},
|
|
{"value": "completed", "text": "已完成"},
|
|
{"value": "failed", "text": "失败"},
|
|
{"value": "paused", "text": "已暂停"},
|
|
{"value": "cancelled", "text": "已取消"}
|
|
]}
|
|
]
|
|
},
|
|
"row_options": {
|
|
"browserfields": {
|
|
"exclouded": ["tenant_id", "owner_id", "params"],
|
|
"cwidths": {"id": 10, "title": 20, "pipeline_id": 10, "state": 8, "current_version": 6, "created_at": 11},
|
|
"alters": {
|
|
"state": {
|
|
"uitype": "code",
|
|
"data": [
|
|
{"value": "submitted", "text": "已提交"},
|
|
{"value": "running", "text": "运行中"},
|
|
{"value": "waiting", "text": "⚠等待人工"},
|
|
{"value": "completed", "text": "已完成"},
|
|
{"value": "failed", "text": "失败"},
|
|
{"value": "paused", "text": "已暂停"},
|
|
{"value": "cancelled", "text": "已取消"}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"fields": [
|
|
{"name": "id", "type": "str", "length": 32, "cwidth": 10, "uitype": "str", "label": "任务ID"},
|
|
{"name": "title", "type": "str", "length": 255, "cwidth": 20, "uitype": "str", "label": "标题"},
|
|
{"name": "pipeline_id", "type": "str", "length": 32, "cwidth": 10, "uitype": "str", "label": "产线"},
|
|
{"name": "state", "type": "str", "length": 20, "cwidth": 8, "uitype": "code", "label": "状态"},
|
|
{"name": "current_version", "type": "int", "cwidth": 6, "uitype": "int", "label": "版本"},
|
|
{"name": "created_at", "type": "datetime", "cwidth": 11, "uitype": "str", "label": "创建时间"}
|
|
]
|
|
}
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "refresh",
|
|
"actiontype": "method",
|
|
"target": "self",
|
|
"method": "render"
|
|
},
|
|
{
|
|
"wid": "self",
|
|
"event": "view",
|
|
"actiontype": "urlwidget",
|
|
"target": "app.pipeline_task_content",
|
|
"mode": "replace",
|
|
"options": {
|
|
"url": "{{entire_url('task_detail.ui')}}",
|
|
"params": {"task_id": "${id}$"}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|