diff --git a/.cspell/custom-dictionary-workspace.txt b/.cspell/custom-dictionary-workspace.txt index 217577ac0..bb34a7c60 100644 --- a/.cspell/custom-dictionary-workspace.txt +++ b/.cspell/custom-dictionary-workspace.txt @@ -181,6 +181,7 @@ kwargs kwhb labelcolor labelnames +larr linebreak linestyle loadml diff --git a/apps/predbat/web.py b/apps/predbat/web.py index ab080a2d2..f5ec59a37 100644 --- a/apps/predbat/web.py +++ b/apps/predbat/web.py @@ -73,7 +73,7 @@ from predbat import THIS_VERSION from component_base import ComponentBase from config import APPS_SCHEMA -from web_metrics_dashboard import get_metrics_dashboard_css, get_metrics_dashboard_body, FALLBACK_HTML +from web_metrics_dashboard import get_metrics_dashboard_css, get_metrics_dashboard_body from predbat_metrics import metrics_handler, metrics_json_handler, metrics, PROMETHEUS_AVAILABLE ROOT_YAML_KEY = "pred_bat" @@ -4448,7 +4448,17 @@ async def html_metrics_dashboard(self, request): self.default_page = "./metrics_dashboard" if not PROMETHEUS_AVAILABLE: - return web.Response(text=FALLBACK_HTML, content_type="text/html") + text = self.get_header("Predbat Metrics", refresh=0) + text += "
\n" + text += """prometheus_client is not installed.
Install it with: pip install prometheus_client