Restore bottom performance history graphs

This commit is contained in:
Hermes Agent
2026-08-29 10:31:10 +10:00
parent e1f0589c3c
commit f914dd0eca
6 changed files with 105 additions and 7 deletions
+10
View File
@@ -1,5 +1,6 @@
import threading
import unittest
from pathlib import Path
from unittest.mock import patch
from dashboard import plugin_api as api
@@ -219,6 +220,15 @@ class ValidationHarnessTests(unittest.TestCase):
self.assertEqual(len(created), 1)
self.assertEqual(created[0].history, [])
def test_dashboard_restores_complete_bottom_performance_graph_set(self):
bundle = Path(__file__).parents[1].joinpath("dashboard", "dist", "index.js").read_text(encoding="utf-8")
for label in ("CPU usage", "CPU load", "System memory", "GPU usage", "GPU VRAM", "Disk usage", "Swap usage", "Ollama model weights", "Resident models"):
self.assertIn('title: "' + label + '"', bundle)
self.assertIn("function PerformanceGraphs", bundle)
self.assertIn("ollama-operations-section", bundle)
self.assertIn("historical performance graphs are shown in Operations / Performance below", bundle)
self.assertIn("setInterval(pollRuntime, 1000)", bundle)
if __name__ == "__main__":
unittest.main()