From 08554da6ee7d5a8d053dd2c540f11766328f63a3 Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Sun, 14 Jan 2024 04:10:44 +0900
Subject: [PATCH] More Dashboard bottom optimizations
---
Monitor/Pages/Index.cshtml | 22 +-
Monitor/Pages/SettingsGeneral.cshtml | 6 +-
Monitor/Pages/StatusSummary.cshtml | 108 +++++----
Monitor/Pages/_get/DashboardBottom.cshtml | 94 +++++++-
Monitor/Pages/_get/DashboardBottom.cshtml.cs | 225 ++++++++++++-------
5 files changed, 290 insertions(+), 165 deletions(-)
diff --git a/Monitor/Pages/Index.cshtml b/Monitor/Pages/Index.cshtml
index 930214b..770f037 100644
--- a/Monitor/Pages/Index.cshtml
+++ b/Monitor/Pages/Index.cshtml
@@ -33,11 +33,6 @@
$("#baglist-refresh-icon").html('');
$("#buylist-refresh-icon").html('');
- // Add the page refresh code here
- setTimeout(function(){
- location.reload();
- }, 60 * 60 * 1000); // 60 minutes
-
// Clear exisitng interval to stop multiple attempts to load at the same time.
if (intervalDashboardTop != null)
{
@@ -69,13 +64,16 @@
var loadDashboardBottom = function () {
//destroy all d3 svg graph to avoid memory leak
- //$(".nvtooltip").remove();
- //$("svg > *").remove();
- //$("svg").remove();
- //nv.charts = {};
- //nv.graphs = [];
- //nv.logs = {};
- //nv.tooltip = {};
+ setTimeout(function()
+ {
+ $(".nvtooltip").remove();
+ $("svg > *").remove();
+ $("svg").remove();
+ nv.charts = {};
+ nv.graphs = [];
+ nv.logs = {};
+ nv.tooltip = {};
+ }, 10 * intervalDashboardBottom * 1000); // 10 times intervalDashboardBottom in milliseconds
// Clear exisitng interval to stop multiple attempts to load at the same time.
if (intervalDashboardBottom != null)
diff --git a/Monitor/Pages/SettingsGeneral.cshtml b/Monitor/Pages/SettingsGeneral.cshtml
index d460948..3b8434d 100644
--- a/Monitor/Pages/SettingsGeneral.cshtml
+++ b/Monitor/Pages/SettingsGeneral.cshtml
@@ -196,21 +196,21 @@