Spaces:
Running
Running
Commit ·
832f069
1
Parent(s): 84fb786
Fix dashboard paths for /dashboard reverse proxy
Browse files
dashboard/static/dashboard.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
/**
|
| 2 |
* GridMind-RL Dashboard — Premium Chart.js real-time visualization
|
| 3 |
-
* Polls /api/state every 500ms and updates all charts + KPIs.
|
| 4 |
*/
|
| 5 |
|
| 6 |
'use strict';
|
|
@@ -10,7 +10,7 @@ const POLL_MS = 500;
|
|
| 10 |
const EPISODE_STEPS = 96; // 24h × 4 steps/h (15-min)
|
| 11 |
const HISTORY_LEN = EPISODE_STEPS;
|
| 12 |
const CURVE_POINTS = 24; // hourly downsample (EpisodeSteps/4)
|
| 13 |
-
const API_BASE = '/api';
|
| 14 |
const TASK_NAMES = {
|
| 15 |
1: 'Task 1 — Cost Minimization (Easy)',
|
| 16 |
2: 'Task 2 — Temperature Management (Medium)',
|
|
|
|
| 1 |
/**
|
| 2 |
* GridMind-RL Dashboard — Premium Chart.js real-time visualization
|
| 3 |
+
* Polls /dashboard/api/state every 500ms and updates all charts + KPIs.
|
| 4 |
*/
|
| 5 |
|
| 6 |
'use strict';
|
|
|
|
| 10 |
const EPISODE_STEPS = 96; // 24h × 4 steps/h (15-min)
|
| 11 |
const HISTORY_LEN = EPISODE_STEPS;
|
| 12 |
const CURVE_POINTS = 24; // hourly downsample (EpisodeSteps/4)
|
| 13 |
+
const API_BASE = '/dashboard/api';
|
| 14 |
const TASK_NAMES = {
|
| 15 |
1: 'Task 1 — Cost Minimization (Easy)',
|
| 16 |
2: 'Task 2 — Temperature Management (Medium)',
|
dashboard/static/index.html
CHANGED
|
@@ -1035,7 +1035,7 @@
|
|
| 1035 |
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/></svg>
|
| 1036 |
Grade Episode
|
| 1037 |
</button>
|
| 1038 |
-
<button class="btn" onclick="window.open('/api/replay')">
|
| 1039 |
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
|
| 1040 |
Export Replay
|
| 1041 |
</button>
|
|
@@ -1047,10 +1047,10 @@
|
|
| 1047 |
|
| 1048 |
<footer>
|
| 1049 |
GridMind-RL · OpenEnv-compliant RL environment for industrial demand response ·
|
| 1050 |
-
<a href="/api/health" target="_blank">API Health</a> ·
|
| 1051 |
-
<a href="/api/metrics" target="_blank">Metrics</a>
|
| 1052 |
</footer>
|
| 1053 |
|
| 1054 |
-
<script src="/static/dashboard.js"></script>
|
| 1055 |
</body>
|
| 1056 |
</html>
|
|
|
|
| 1035 |
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/></svg>
|
| 1036 |
Grade Episode
|
| 1037 |
</button>
|
| 1038 |
+
<button class="btn" onclick="window.open('/dashboard/api/replay')">
|
| 1039 |
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
|
| 1040 |
Export Replay
|
| 1041 |
</button>
|
|
|
|
| 1047 |
|
| 1048 |
<footer>
|
| 1049 |
GridMind-RL · OpenEnv-compliant RL environment for industrial demand response ·
|
| 1050 |
+
<a href="/dashboard/api/health" target="_blank">API Health</a> ·
|
| 1051 |
+
<a href="/dashboard/api/metrics" target="_blank">Metrics</a>
|
| 1052 |
</footer>
|
| 1053 |
|
| 1054 |
+
<script src="/dashboard/static/dashboard.js"></script>
|
| 1055 |
</body>
|
| 1056 |
</html>
|