Backend: - cockpit_chat.dspy: real LLM calls via llm table config, Hermes-style context (system prompt + project/iteration + history), auto model selection (multimodal if files, text otherwise) - cockpit_model_options.dspy: returns active models with capabilities - llm table: added capabilities column (text/vision/multimodal) Frontend: - inputed script: no page reload, updates agent bubble with LLM reply - stats_row refreshed on success, error shown in bubble DB: - sd_agent_settings table for per-user agent preferences
304 lines
6.8 KiB
XML
304 lines
6.8 KiB
XML
|
|
{
|
|
"widgettype":"VBox",
|
|
"options":{"cheight":40,"width":"100%"},
|
|
"subwidgets":[{
|
|
"id":"sd_test_cases_tbl",
|
|
"widgettype":"Tabular",
|
|
"options":{
|
|
"width":"100%",
|
|
"height":"100%",
|
|
|
|
|
|
"title":"测试用例表",
|
|
|
|
|
|
|
|
|
|
"css":"card",
|
|
|
|
|
|
"editable":{
|
|
|
|
"new_data_url":"{{entire_url('add_sd_test_cases.dspy')}}",
|
|
|
|
|
|
"delete_data_url":"{{entire_url('delete_sd_test_cases.dspy')}}",
|
|
|
|
|
|
"update_data_url":"{{entire_url('update_sd_test_cases.dspy')}}"
|
|
|
|
},
|
|
|
|
|
|
"data_url":"{{entire_url('./get_sd_test_cases.dspy')}}",
|
|
|
|
"data_method":"GET",
|
|
"data_params":{{json.dumps(params_kw, indent=4, ensure_ascii=False)}},
|
|
"row_options":{
|
|
|
|
|
|
|
|
"browserfields": {
|
|
"alters": {
|
|
"plan_id": {
|
|
"uitype": "code",
|
|
"dataurl": "{{entire_url('../api/get_test_plan_options.dspy')}}",
|
|
"valueField": "plan_id",
|
|
"textField": "plan_id_text"
|
|
},
|
|
"case_type": {
|
|
"uitype": "code",
|
|
"dataurl": "{{entire_url('../api/get_search_case_type.dspy')}}",
|
|
"valueField": "value",
|
|
"textField": "text"
|
|
},
|
|
"status": {
|
|
"uitype": "code",
|
|
"dataurl": "{{entire_url('../api/get_search_case_status.dspy')}}",
|
|
"valueField": "value",
|
|
"textField": "text"
|
|
},
|
|
"priority": {
|
|
"uitype": "code",
|
|
"dataurl": "{{entire_url('../api/get_search_priority.dspy')}}",
|
|
"valueField": "value",
|
|
"textField": "text"
|
|
}
|
|
}
|
|
},
|
|
|
|
|
|
"editexclouded":[
|
|
"id",
|
|
"actual_result",
|
|
"executed_by",
|
|
"executed_at",
|
|
"duration_ms",
|
|
"created_at"
|
|
],
|
|
|
|
"fields":[
|
|
{
|
|
"name": "id",
|
|
"title": "主键ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no",
|
|
"cwidth": 18,
|
|
"uitype": "str",
|
|
"datatype": "str",
|
|
"label": "主键ID"
|
|
},
|
|
{
|
|
"name": "plan_id",
|
|
"title": "方案ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no",
|
|
"label": "方案ID",
|
|
"uitype": "code",
|
|
"valueField": "plan_id",
|
|
"textField": "plan_id_text",
|
|
"params": {
|
|
"dbname": "{{'sage'}}",
|
|
"table": "sd_test_plans",
|
|
"tblvalue": "id",
|
|
"tbltext": "plan_name",
|
|
"valueField": "plan_id",
|
|
"textField": "plan_id_text"
|
|
},
|
|
"dataurl": "{{entire_url('../api/get_test_plan_options.dspy')}}"
|
|
},
|
|
{
|
|
"name": "case_name",
|
|
"title": "用例名称",
|
|
"type": "str",
|
|
"length": 200,
|
|
"nullable": "no",
|
|
"cwidth": 18,
|
|
"uitype": "str",
|
|
"datatype": "str",
|
|
"label": "用例名称"
|
|
},
|
|
{
|
|
"name": "case_type",
|
|
"title": "用例类型",
|
|
"type": "str",
|
|
"length": 20,
|
|
"nullable": "no",
|
|
"label": "用例类型",
|
|
"uitype": "code",
|
|
"valueField": "value",
|
|
"textField": "text",
|
|
"params": {
|
|
"dbname": "{{'sage'}}",
|
|
"table": "appcodes_kv",
|
|
"tblvalue": "k",
|
|
"tbltext": "v",
|
|
"valueField": "value",
|
|
"textField": "text",
|
|
"cond": "parentid='sd_test_case_type'"
|
|
},
|
|
"dataurl": "{{entire_url('../api/get_search_case_type.dspy')}}"
|
|
},
|
|
{
|
|
"name": "priority",
|
|
"title": "优先级",
|
|
"type": "str",
|
|
"length": 10,
|
|
"nullable": "no",
|
|
"default": "'P2'",
|
|
"label": "优先级",
|
|
"uitype": "code",
|
|
"valueField": "value",
|
|
"textField": "text",
|
|
"params": {
|
|
"dbname": "{{'sage'}}",
|
|
"table": "appcodes_kv",
|
|
"tblvalue": "k",
|
|
"tbltext": "v",
|
|
"valueField": "value",
|
|
"textField": "text",
|
|
"cond": "parentid='sd_priority'"
|
|
},
|
|
"dataurl": "{{entire_url('../api/get_search_priority.dspy')}}"
|
|
},
|
|
{
|
|
"name": "precondition",
|
|
"title": "前置条件",
|
|
"type": "text",
|
|
"length": 0,
|
|
"uitype": "text",
|
|
"datatype": "text",
|
|
"label": "前置条件"
|
|
},
|
|
{
|
|
"name": "steps",
|
|
"title": "测试步骤(JSON数组)",
|
|
"type": "text",
|
|
"length": 0,
|
|
"uitype": "text",
|
|
"datatype": "text",
|
|
"label": "测试步骤(JSON数组)"
|
|
},
|
|
{
|
|
"name": "expected_result",
|
|
"title": "预期结果",
|
|
"type": "text",
|
|
"length": 0,
|
|
"uitype": "text",
|
|
"datatype": "text",
|
|
"label": "预期结果"
|
|
},
|
|
{
|
|
"name": "actual_result",
|
|
"title": "实际结果",
|
|
"type": "text",
|
|
"length": 0,
|
|
"uitype": "text",
|
|
"datatype": "text",
|
|
"label": "实际结果"
|
|
},
|
|
{
|
|
"name": "status",
|
|
"title": "用例状态",
|
|
"type": "str",
|
|
"length": 20,
|
|
"nullable": "no",
|
|
"default": "'pending'",
|
|
"label": "用例状态",
|
|
"uitype": "code",
|
|
"valueField": "value",
|
|
"textField": "text",
|
|
"params": {
|
|
"dbname": "{{'sage'}}",
|
|
"table": "appcodes_kv",
|
|
"tblvalue": "k",
|
|
"tbltext": "v",
|
|
"valueField": "value",
|
|
"textField": "text",
|
|
"cond": "parentid='sd_test_case_status'"
|
|
},
|
|
"dataurl": "{{entire_url('../api/get_search_case_status.dspy')}}"
|
|
},
|
|
{
|
|
"name": "executed_by",
|
|
"title": "执行人",
|
|
"type": "str",
|
|
"length": 32,
|
|
"cwidth": 18,
|
|
"uitype": "str",
|
|
"datatype": "str",
|
|
"label": "执行人"
|
|
},
|
|
{
|
|
"name": "executed_at",
|
|
"title": "执行时间",
|
|
"type": "timestamp",
|
|
"length": 0,
|
|
"uitype": "str",
|
|
"datatype": "timestamp",
|
|
"label": "执行时间"
|
|
},
|
|
{
|
|
"name": "duration_ms",
|
|
"title": "执行耗时(毫秒)",
|
|
"type": "int",
|
|
"length": 0,
|
|
"uitype": "int",
|
|
"datatype": "int",
|
|
"label": "执行耗时(毫秒)"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"title": "创建时间",
|
|
"type": "timestamp",
|
|
"nullable": "no",
|
|
"length": 0,
|
|
"uitype": "str",
|
|
"datatype": "timestamp",
|
|
"label": "创建时间"
|
|
}
|
|
]
|
|
},
|
|
|
|
|
|
|
|
"data_filter":{
|
|
"AND": [
|
|
{
|
|
"field": "plan_id",
|
|
"op": "=",
|
|
"var": "plan_input"
|
|
},
|
|
{
|
|
"field": "case_type",
|
|
"op": "=",
|
|
"var": "type_input"
|
|
},
|
|
{
|
|
"field": "status",
|
|
"op": "=",
|
|
"var": "status_input"
|
|
},
|
|
{
|
|
"field": "priority",
|
|
"op": "=",
|
|
"var": "priority_input"
|
|
}
|
|
]
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
"page_rows":160,
|
|
"cache_limit":5
|
|
}
|
|
|
|
,"binds":[]
|
|
|
|
}]
|
|
} |