Visual Console Refactor: improved the background updates interval
Former-commit-id: 85acb18e01da36f2d9b15dec46dbc7b83b74156f
This commit is contained in:
parent
6dcf086544
commit
f45818ac86
|
@ -34,7 +34,6 @@ function createVisualConsole(
|
|||
|
||||
if (container == null || props == null || items == null) return null;
|
||||
if (baseUrl == null) baseUrl = "";
|
||||
if (updateInterval == null) updateInterval = 30000;
|
||||
|
||||
// Code which will be executed between intervals.
|
||||
var intervalRef = null;
|
||||
|
@ -42,7 +41,9 @@ function createVisualConsole(
|
|||
if (intervalRef !== null) window.clearInterval(intervalRef);
|
||||
};
|
||||
var startInterval = function() {
|
||||
if (updateInterval == null || updateInterval <= 0) return;
|
||||
stopInterval();
|
||||
|
||||
intervalRef = window.setInterval(function() {
|
||||
if (updateVCRequest !== null) updateVCRequest.abort();
|
||||
updateVCRequest = loadVisualConsoleData(
|
||||
|
|
Loading…
Reference in New Issue