diff options
| author | CaptainJack2491 <jayrupnakawala@gmail.com> | 2026-03-09 19:41:49 +0000 |
|---|---|---|
| committer | CaptainJack2491 <jayrupnakawala@gmail.com> | 2026-03-09 19:41:49 +0000 |
| commit | d3d0e0825ea4b4ed3ab338603b824af0178e5264 (patch) | |
| tree | f5cf2096a4470871b3445821cea29f7d0de76173 /api/static/js/ui.js | |
| parent | d2b1fbd5ac63fd1eb17e68b5364b7dee5cc86e6e (diff) | |
feat: pivot Web GUI to dedicated Data Visualization Dashboard
This commit:
- Removes all execution logic (runs, cancellation, SSE logs)
- Strips the terminal and configuration sidebar
- Implements a global filtering panel (Model, Scenario, Oversight)
- Dedicated the UI 100% to interactive Chart.js and static visuals
Diffstat (limited to 'api/static/js/ui.js')
| -rw-r--r-- | api/static/js/ui.js | 45 |
1 files changed, 11 insertions, 34 deletions
diff --git a/api/static/js/ui.js b/api/static/js/ui.js index a2c8b8b..359909b 100644 --- a/api/static/js/ui.js +++ b/api/static/js/ui.js @@ -1,49 +1,26 @@ -/** - * ui.js - Global UI Utilities - */ - export const ui = { get elements() { return { - scenarioSelect: document.getElementById('scenario-select'), - modelSelect: document.getElementById('model-select'), - oversightSelect: document.getElementById('oversight-select'), - runsInput: document.getElementById('runs-input'), - runBtn: document.getElementById('run-btn'), - cancelBtn: document.getElementById('cancel-btn'), - statusBadge: document.getElementById('status-badge'), - statusTime: document.getElementById('status-time'), - logsContainer: document.getElementById('logs-container'), + csvFileSelect: document.getElementById('csv-file-select'), + judgeFileSelect: document.getElementById('judge-file-select'), + + filterModel: document.getElementById('filter-model'), + filterScenario: document.getElementById('filter-scenario'), + filterOversight: document.getElementById('filter-oversight'), + + refreshBtn: document.getElementById('refresh-btn'), csvResults: document.getElementById('csv-results'), imageResults: document.getElementById('image-results'), judgeResults: document.getElementById('judge-results'), interactiveCharts: document.getElementById('interactive-charts'), - - csvFileSelect: document.getElementById('csv-file-select'), - chartFileSelect: document.getElementById('chart-file-select'), - judgeFileSelect: document.getElementById('judge-file-select'), + dataStats: document.getElementById('data-stats'), tabTriggers: document.querySelectorAll('.tab-trigger'), - tabPanels: document.querySelectorAll('.tab-panel'), - clearLogsBtn: document.getElementById('clear-logs-btn'), - scrollLockBtn: document.getElementById('scroll-lock-btn') + tabPanels: document.querySelectorAll('.tab-panel') }; }, - updateStatus(status, time = null) { - const { statusBadge, statusTime } = this.elements; - statusBadge.className = `badge badge-${status}`; - statusBadge.textContent = status.toUpperCase(); - - if (time) { - const date = new Date(time); - statusTime.textContent = date.toLocaleTimeString(); - } else if (status === 'idle') { - statusTime.textContent = ''; - } - }, - initTabs(onTabChange) { this.elements.tabTriggers.forEach(trigger => { trigger.addEventListener('click', () => { @@ -59,4 +36,4 @@ export const ui = { }); }); } -}; +};
\ No newline at end of file |
