From e3d01131067856d61d6bbedaa0a889921e82b529 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 19 Sep 2013 20:53:18 -0400 Subject: [PATCH] reduce system info refreshing from dashboard --- dashboard-ui/scripts/site.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 5639a1ca7f..624ac77642 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1159,7 +1159,7 @@ $(function () { footerHtml += ''; $(document.body).append(footerHtml); - + $(window).on("beforeunload", function () { // Close the connection gracefully when possible @@ -1188,7 +1188,6 @@ $(document).on('pagebeforeshow', ".page", function () { Dashboard.ensureHeader(page); Dashboard.ensurePageTitle(page); - Dashboard.refreshSystemInfoFromServer(); } else { @@ -1204,9 +1203,10 @@ $(document).on('pagebeforeshow', ".page", function () { Dashboard.ensureHeader(page, user); Dashboard.ensurePageTitle(page); }); - - Dashboard.refreshSystemInfoFromServer(); } + if (!ApiClient.isWebSocketOpen()) { + Dashboard.refreshSystemInfoFromServer(); + } });