From 3fac013088ba4ded1ffb0515a5305f1f3b04a0d5 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Fri, 7 Feb 2025 21:33:55 -0500 Subject: [PATCH] added diag content --- app.py | 4 +++- static/app.js | 2 ++ templates/index.html | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 30b09d8..42f7115 100644 --- a/app.py +++ b/app.py @@ -163,8 +163,10 @@ def get_diagnostics(): config = load_config() diagnostics = {} for device in config['devices']: - if device['device_id']: + if device.get('device_id'): + logger.debug(f"Fetching diagnostics for device: {device['name']}") diagnostics[device['name']] = run_diagnostics(device) + logger.debug(f"Returning diagnostics: {diagnostics}") return jsonify(diagnostics) # Application entry point diff --git a/static/app.js b/static/app.js index 0dd2539..5bf26e3 100644 --- a/static/app.js +++ b/static/app.js @@ -31,9 +31,11 @@ function updateSystemMetrics() { //Metric updates like interfaces, power, and health function updateDiagnostics() { + console.log('Updating diagnostics...'); fetch('/api/diagnostics') .then(response => response.json()) .then(data => { + console.log('Received diagnostic data:', data); const diagnosticsPanel = document.querySelector('.diagnostics-content'); diagnosticsPanel.innerHTML = ''; diff --git a/templates/index.html b/templates/index.html index 1e25a17..b44c4cf 100644 --- a/templates/index.html +++ b/templates/index.html @@ -33,7 +33,7 @@

Interface Status

-
+

System Health