From 0a5ff5fb964be0d5fcbd20a343883b808e37fb96 Mon Sep 17 00:00:00 2001 From: usmannasir Date: Sat, 24 May 2025 21:49:21 +0500 Subject: [PATCH] dashboard stats --- .../static/baseTemplate/custom-js/system-status.js | 7 +++++++ baseTemplate/templates/baseTemplate/homePage.html | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/baseTemplate/static/baseTemplate/custom-js/system-status.js b/baseTemplate/static/baseTemplate/custom-js/system-status.js index ce1572f20..5872209b3 100644 --- a/baseTemplate/static/baseTemplate/custom-js/system-status.js +++ b/baseTemplate/static/baseTemplate/custom-js/system-status.js @@ -1008,6 +1008,13 @@ app.controller('dashboardStatsController', function ($scope, $http, $timeout) { layout: { padding: 10 } } }); + window.trafficChart = trafficChart; + setTimeout(function() { + if (window.trafficChart) { + window.trafficChart.resize(); + window.trafficChart.update(); + } + }, 500); var diskCtx = document.getElementById('diskIOChart').getContext('2d'); diskIOChart = new Chart(diskCtx, { type: 'line', diff --git a/baseTemplate/templates/baseTemplate/homePage.html b/baseTemplate/templates/baseTemplate/homePage.html index 382591e86..33f88dda5 100755 --- a/baseTemplate/templates/baseTemplate/homePage.html +++ b/baseTemplate/templates/baseTemplate/homePage.html @@ -156,12 +156,6 @@ } }); }); - // Ensure traffic chart is visible and resized on load - setTimeout(function() { - if (window.trafficChart && typeof window.trafficChart.resize === 'function') { - window.trafficChart.resize(); - } - }, 700); });