{ "widgettype": "VBox", "options": {"cheight": 40, "width": "100%"}, "subwidgets": [{ "id": "secret_toolbar", "widgettype": "HBox", "options": {"cheight": 2, "gap": "8px", "alignItems": "center"}, "subwidgets": [{ "widgettype": "Button", "id": "btn_new_secret", "options": {"label": "🔑 新增凭据", "css": "primary", "i18n": true}, "binds": [{"wid": "self", "event": "click", "actiontype": "script", "target": "self", "script": "var r=await fetch('{{entire_url('./new_secret_popup.dspy')}}?op=form');var d=await r.json();if(d){bricks.widgetBuild(d,bricks.app);}"}] }, { "widgettype": "Text", "options": {"text": "值永不显示(密文存储);改值请删除后重存。", "i18n": true, "cfontsize": 0.85} }] }, { "id": "my_secrets_tbl", "widgettype": "Tabular", "options": { "width": "100%", "height": "62%", "title": "我的凭据", "css": "card", "editable": { "delete_data_url": "{{entire_url('./delete_user_secret.dspy')}}", "update_data_url": "{{entire_url('./update_user_secret.dspy')}}" }, "data_url": "{{entire_url('./get_user_secrets.dspy')}}", "data_method": "GET", "data_params": {{json.dumps(params_kw, indent=4, ensure_ascii=False)}}, "row_options": { "editexclouded": ["id", "prefix_hint", "length_hint", "use_count", "source", "owner", "created_at", "updated_at", "secret_type"], "fields": [ {"name": "id", "title": "ID", "type": "str", "length": 32, "cwidth": 0, "uitype": "str", "datatype": "str", "label": "ID"}, {"name": "name", "title": "名称", "type": "str", "length": 64, "cwidth": 16, "uitype": "str", "datatype": "str", "label": "名称"}, {"name": "secret_type", "title": "类型", "type": "str", "length": 32, "cwidth": 10, "uitype": "str", "datatype": "str", "label": "类型"}, {"name": "label", "title": "标签", "type": "str", "length": 128, "cwidth": 14, "uitype": "str", "datatype": "str", "label": "标签"}, {"name": "remark", "title": "备注", "type": "str", "length": 255, "cwidth": 20, "uitype": "str", "datatype": "str", "label": "备注"}, {"name": "status", "title": "状态", "type": "str", "length": 16, "cwidth": 8, "uitype": "code", "datatype": "str", "label": "状态", "valueField": "value", "textField": "text", "options": [{"value": "active", "text": "启用"}, {"value": "disabled", "text": "停用"}]}, {"name": "prefix_hint", "title": "前缀", "type": "str", "length": 8, "cwidth": 8, "uitype": "str", "datatype": "str", "label": "前缀(前4字符)"}, {"name": "length_hint", "title": "长度", "type": "int", "cwidth": 6, "uitype": "str", "datatype": "int", "label": "长度"}, {"name": "use_count", "title": "用过", "type": "int", "cwidth": 6, "uitype": "str", "datatype": "int", "label": "使用次数"}, {"name": "source", "title": "来源", "type": "str", "length": 32, "cwidth": 10, "uitype": "str", "datatype": "str", "label": "来源"}, {"name": "owner", "title": "归属", "type": "str", "length": 8, "cwidth": 8, "uitype": "str", "datatype": "str", "label": "归属"}, {"name": "created_at", "title": "创建", "type": "str", "length": 19, "cwidth": 14, "uitype": "str", "datatype": "str", "label": "创建时间"}, {"name": "updated_at", "title": "更新", "type": "str", "length": 19, "cwidth": 14, "uitype": "str", "datatype": "str", "label": "更新时间"} ] } } }, { "id": "secret_help_text", "widgettype": "Text", "options": { "otext": "值永不显示(密文存储)。新增需填名称+值;值不可修改,改值请删除后重存。会话中引用:占位符 @@sec:名称@@;命令中引用:$PIPELINE_SEC_名称。停用后不再注入执行环境。", "text": "值永不显示(密文存储)。新增需填名称+值;值不可修改,改值请删除后重存。会话中引用:占位符 @@sec:名称@@;命令中引用:$PIPELINE_SEC_名称。停用后不再注入执行环境。", "i18n": true, "cfontsize": 0.9 } }, { "id": "my_secret_audit_tbl", "widgettype": "Tabular", "options": { "width": "100%", "height": "30%", "title": "操作审计", "css": "card", "data_url": "{{entire_url('./get_secret_audit.dspy')}}", "data_method": "GET", "data_params": {{json.dumps(params_kw, indent=4, ensure_ascii=False)}}, "row_options": { "editexclouded": ["action", "detail", "who", "created_at"], "fields": [ {"name": "created_at", "title": "时间", "type": "str", "length": 19, "cwidth": 16, "uitype": "str", "datatype": "str", "label": "时间"}, {"name": "action", "title": "操作", "type": "str", "length": 32, "cwidth": 16, "uitype": "str", "datatype": "str", "label": "操作"}, {"name": "detail", "title": "详情", "type": "str", "length": 120, "cwidth": 40, "uitype": "str", "datatype": "str", "label": "详情"}, {"name": "who", "title": "操作者", "type": "str", "length": 32, "cwidth": 16, "uitype": "str", "datatype": "str", "label": "操作者"} ] } } }] }