Restore bottom performance history graphs
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user