- Refactor index.ui to use Menu widget for navigation following proper CRUD pattern - Create session_messages.json CRUD definition for session messages management - Update all UI files to reference correct CRUD auto-generated endpoints: * index.ui: /hermes-web-cli/hermes_service_sessions/ * sessions.ui: /hermes-web-cli/active_sessions/ * services.ui: /hermes-web-cli/hermes_services/ * settings.ui, new_session.ui, edit_service.ui: updated service references * session_detail.ui, chat.ui, session_chat.ui: updated to use session_messages CRUD - Remove manual .dspy endpoint references in favor of standardized CRUD mechanism - Follow module-development-spec and CRUD usage best practices
102 lines
2.8 KiB
XML
102 lines
2.8 KiB
XML
{
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"width": "100%",
|
|
"height": "100%",
|
|
"padding": "20px"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {
|
|
"text": "Settings",
|
|
"fontSize": "24px",
|
|
"fontWeight": "bold",
|
|
"marginBottom": "20px",
|
|
"color": "#F8FAFC"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Form",
|
|
"id": "settings-form",
|
|
"options": {
|
|
"fields": [
|
|
{
|
|
"name": "default_service",
|
|
"label": "Default Service",
|
|
"uitype": "select",
|
|
"data_url": "/hermes-web-cli/hermes_services/"
|
|
},
|
|
{
|
|
"name": "auto_save_sessions",
|
|
"label": "Auto-save Sessions",
|
|
"uitype": "bool",
|
|
"default": true
|
|
},
|
|
{
|
|
"name": "session_timeout_minutes",
|
|
"label": "Session Timeout (minutes)",
|
|
"uitype": "int",
|
|
"default": 60
|
|
},
|
|
{
|
|
"name": "max_concurrent_sessions",
|
|
"label": "Max Concurrent Sessions",
|
|
"uitype": "int",
|
|
"default": 10
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "HBox",
|
|
"options": {
|
|
"width": "100%",
|
|
"height": "auto",
|
|
"marginTop": "20px",
|
|
"gap": "10px"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Button",
|
|
"options": {
|
|
"icon": "fa fa-save",
|
|
"backgroundColor": "#3B82F6",
|
|
"color": "#FFFFFF",
|
|
"border": "none",
|
|
"borderRadius": "6px",
|
|
"padding": "10px 20px",
|
|
"label": "Save Settings"
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "click",
|
|
"actiontype": "script",
|
|
"script": "const formData = bricks.app.get_widget('settings-form').get_data(); fetch('/hermes-web-cli/settings', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(formData) }).then(() => { alert('Settings saved successfully!'); });"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "Button",
|
|
"options": {
|
|
"backgroundColor": "#EF4444",
|
|
"color": "#FFFFFF",
|
|
"border": "none",
|
|
"borderRadius": "6px",
|
|
"padding": "10px 20px",
|
|
"label": "Reset to Defaults"
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "click",
|
|
"actiontype": "script",
|
|
"script": "if (confirm('Are you sure you want to reset all settings to defaults?')) { fetch('/hermes-web-cli/settings/reset', { method: 'POST' }).then(() => { bricks.app.get_widget('settings-form').load_data(); alert('Settings reset to defaults!'); }); }"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |