mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
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:
parent
e2ce73d855
commit
35862b94a9
@ -301,15 +301,16 @@ define('pgadmin.dashboard', [
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (div) {
|
if (div) {
|
||||||
|
|
||||||
|
/* Clear all the interval functions of previous dashboards */
|
||||||
|
self.clearIntervalId();
|
||||||
|
|
||||||
if (itemData.connected || _.isUndefined(itemData.connected)) {
|
if (itemData.connected || _.isUndefined(itemData.connected)) {
|
||||||
// Avoid unnecessary reloads
|
// Avoid unnecessary reloads
|
||||||
if (url !== $(dashboardPanel).data('dashboard_url') || (
|
if (url !== $(dashboardPanel).data('dashboard_url') || (
|
||||||
url === $(dashboardPanel).data('dashboard_url') &&
|
url === $(dashboardPanel).data('dashboard_url') &&
|
||||||
$(dashboardPanel).data('server_status') == false)) {
|
$(dashboardPanel).data('server_status') == false)) {
|
||||||
$(div).empty();
|
$(div).empty();
|
||||||
/* Clear all the interval functions of previous dashboards */
|
|
||||||
self.clearIntervalId();
|
|
||||||
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: url,
|
url: url,
|
||||||
|
Loading…
Reference in New Issue
Block a user