}
updateWidgets(data);
},
+ complete: function () { $("#refresh").removeAttr("disabled").removeClass("disabled"); },
errorMessage: "Cannot receive throughput data",
errorOnceId: "alerted_graph_",
data: {type:type}
rspamd.destroyTable("history");
}
},
+ complete: function () { $("#refresh").removeAttr("disabled").removeClass("disabled"); },
errorMessage: "Cannot receive history",
});
};
var tab_id = id;
if ($(id).attr("disabled")) return;
var navBarControls = $("#selSrv, #navBar li, #navBar a, #navBar button");
- navBarControls.attr("disabled", true).addClass("disabled", true);
+ if (id !== "#autoRefresh") navBarControls.attr("disabled", true).addClass("disabled", true);
stopTimers();
if (!refreshInterval) return;
timer_id[timer] = Visibility.every(refreshInterval, function () {
countdown(refreshInterval);
+ if ($("#refresh").attr("disabled")) return;
+ $("#refresh").attr("disabled", true).addClass("disabled", true);
callback();
});
}
}
setTimeout(function () {
+ // Do not enable Refresh button until AJAX requests to all neighbours are finished
+ if (tab_id === "#history_nav") navBarControls = $(navBarControls).not("#refresh");
+
navBarControls.removeAttr("disabled").removeClass("disabled");
}, (id === "#autoRefresh") ? 0 : 1000);
}
});
}, promises.length ? 100 : 0);
},
+ complete: function () { $("#refresh").removeAttr("disabled").removeClass("disabled"); },
errorMessage: "Cannot receive stats data",
errorOnceId: "alerted_stats_",
server: "All SERVERS"