We need to remove the interval callbacks for retrieving the statistics

for the charts on dashboard every time the URL changed (not - just when
connection to the server was alive).
This commit is contained in:
Ashesh Vashi 2018-07-26 22:44:31 +05:30
parent e2ce73d855
commit 35862b94a9

View File

@ -301,15 +301,16 @@ define('pgadmin.dashboard', [
);
if (div) {
/* Clear all the interval functions of previous dashboards */
self.clearIntervalId();
if (itemData.connected || _.isUndefined(itemData.connected)) {
// Avoid unnecessary reloads
if (url !== $(dashboardPanel).data('dashboard_url') || (
url === $(dashboardPanel).data('dashboard_url') &&
$(dashboardPanel).data('server_status') == false)) {
$(div).empty();
/* Clear all the interval functions of previous dashboards */
self.clearIntervalId();
$.ajax({
url: url,