hermes-web-cli/wwwroot/services.ui
yumoqing 526151b901 feat(hermes-web-cli): redesign index.ui with complete user interaction features
- Replace service-only management interface with full AI agent dashboard
- Implement modern dark theme UI using UI/UX Pro Max design principles
- Add comprehensive navigation with sidebar and main content area
- Create complete page suite: new_session, sessions, services, session_chat, settings
- Integrate all user interaction functions into unified interface
- Follow bricks-framework best practices and production-ready standards
2026-04-21 17:16:13 +08:00

96 lines
2.8 KiB
XML

{
"widgettype": "VBox",
"options": {
"width": "100%",
"height": "100%",
"style": {
"padding": "20px"
}
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "Hermes Services",
"fontSize": "24px",
"fontWeight": "bold",
"style": {
"marginBottom": "24px",
"color": "#F8FAFC"
}
}
},
{
"widgettype": "DataViewer",
"options": {
"data_url": "/hermes-web-cli/services",
"page_rows": 20,
"row_options": {
"fields": [
{
"name": "name",
"label": "Service Name",
"uitype": "str"
},
{
"name": "service_url",
"label": "Service URL",
"uitype": "str"
},
{
"name": "description",
"label": "Description",
"uitype": "str"
},
{
"name": "status",
"label": "Status",
"uitype": "str"
},
{
"name": "created_at",
"label": "Created At",
"uitype": "date"
}
]
},
"editable": {
"add_icon": "fa fa-plus",
"update_icon": "fa fa-edit",
"delete_icon": "fa fa-trash",
"new_data_url": "/hermes-web-cli/services",
"update_data_url": "/hermes-web-cli/services/{id}",
"delete_data_url": "/hermes-web-cli/services/{id}"
},
"toolbar": {
"tools": [
{
"name": "test_connection",
"text": "Test Connection",
"icon": "fa fa-plug"
},
{
"name": "view_sessions",
"text": "View Sessions",
"icon": "fa fa-list"
}
]
}
},
"binds": [
{
"wid": "self",
"event": "test_connection",
"actiontype": "script",
"script": "const selectedRow = event.params; if (selectedRow) { fetch(`/hermes-web-cli/services/${selectedRow.id}/test`).then(resp => resp.json()).then(data => { if (data.success) { bricks.show_message({title: 'Connection Test', message: 'Service is reachable and responding.'}); } else { bricks.show_error({title: 'Connection Failed', message: data.message || 'Unable to connect to service.'}); } }); }"
},
{
"wid": "self",
"event": "view_sessions",
"actiontype": "script",
"script": "const selectedRow = event.params; if (selectedRow) { const url = `{{entire_url('service_sessions.ui')}}?service_id=${selectedRow.id}`; bricks.app.load_widget(url, 'main-content', 'replace'); }"
}
]
}
]
}