Add Deck dashboard with Athena telemetry history

This commit is contained in:
Mikei386
2026-09-29 22:31:03 +02:00
parent be40869712
commit aaf9f570e9
19 changed files with 1073 additions and 25 deletions
+12
View File
@@ -23,6 +23,7 @@ class Tests(unittest.TestCase):
self.url=f'http://127.0.0.1:{self.server.server_port}'
def tearDown(self):
self.server.shutdown()
self.server.dashboard.close()
self.server.endpoint.close()
self.server.server_close()
self.thread.join()
@@ -36,6 +37,17 @@ class Tests(unittest.TestCase):
self.assertEqual(state['endpoint']['state'],'stopped')
with self.assertRaises(urllib.error.HTTPError) as exc:self.request('demo')
self.assertEqual(exc.exception.code,404);exc.exception.close()
def test_dashboard_routes_are_authenticated_and_read_only(self):
state=self.request('dashboard')
self.assertIn('gpus',state)
self.assertIn('llama_runtime',state)
history=self.request('dashboard/history?range=24h')
self.assertEqual(history['range'],'24h')
self.assertIn('token_totals',history)
self.assertIn('backups',self.request('dashboard/backups'))
with self.assertRaises(urllib.error.HTTPError) as exc:
urllib.request.urlopen(self.url+'/api/v1/dashboard')
self.assertEqual(exc.exception.code,401);exc.exception.close()
def test_profile_and_download_routes(self):
from pathlib import Path
target=Path(self.state.name)/'models'/('a'*64);target.mkdir(parents=True)