diff options
author | Reinis Detlavs <reinis.detlavs@zabbix.com> | 2022-07-07 13:11:24 +0300 |
---|---|---|
committer | Miks Kronkalns <miks.kronkalns@zabbix.com> | 2022-07-07 13:11:24 +0300 |
commit | ca93a4af06b4c8b83c61f35b716ef42f463f7840 (patch) | |
tree | 9166d13b992a41f60339df5e0052ceaa87affcfc | |
parent | 3b212dcbe1708045226b20bcd3aee3b0d553b2ed (diff) | |
parent | 780ae5344546231def09bf5ac348177739a4fe57 (diff) |
..F....... [ZBX-20629] fixed auto refreshing for graphs on Monitoring -> Hosts page
* commit '780ae5344546231def09bf5ac348177739a4fe57':
..F....... [ZBX-20629] fixed unnecessary refresh few seconds after initial graph load
..F....... [ZBX-20629] fixed changelog formatting
..F....... [ZBX-20629] language correction
..F....... [ZBX-20629] fixed not auto refreshing graphs on 6.0.0
-rw-r--r-- | ChangeLog.d/bugfix/ZBX-20629 | 1 | ||||
-rw-r--r-- | ui/app/views/js/monitoring.charts.view.js.php | 28 |
2 files changed, 2 insertions, 27 deletions
diff --git a/ChangeLog.d/bugfix/ZBX-20629 b/ChangeLog.d/bugfix/ZBX-20629 new file mode 100644 index 00000000000..47c672034aa --- /dev/null +++ b/ChangeLog.d/bugfix/ZBX-20629 @@ -0,0 +1 @@ +..F....... [ZBX-20629] fixed auto refreshing for graphs on Monitoring -> Hosts page (rdetlavs) diff --git a/ui/app/views/js/monitoring.charts.view.js.php b/ui/app/views/js/monitoring.charts.view.js.php index 878143611a6..7e1ec9d4b96 100644 --- a/ui/app/views/js/monitoring.charts.view.js.php +++ b/ui/app/views/js/monitoring.charts.view.js.php @@ -61,7 +61,7 @@ this._app = new ChartList( $('#charts'), this._data.timeline, this._data.config, this._container); this._app.setCharts(this._data.charts); - this._app.onResize(); + this._app.refresh(); this._resize_observer = new ResizeObserver(this._app.onResize.bind(this._app)); this._resize_observer.observe(this._container); @@ -246,27 +246,6 @@ }; /** - * Start or pause timeout based Chart refresh. - * - * @param {number} seconds Seconds to wait before reschedule. Zero seconds will pause schedule. - * @param {number} delay_loading (optional) Add "loading indicator" only when request exceeds delay. - */ - Chart.prototype.scheduleRefresh = function(seconds, delay_loading) { - if (this._timeoutid) { - clearTimeout(this._timeoutid); - } - - if (!seconds) { - return; - } - - this.refresh(delay_loading) - .finally(_ => { - this._timeoutid = setTimeout(() => this.scheduleRefresh(seconds, 0), seconds * 1000); - }); - }; - - /** * @param {jQuery} $el A container where charts are maintained. * @param {object} timeline Time control object. * @param {object} config @@ -372,10 +351,6 @@ clearTimeout(this._timeoutid); } - for (const chart of this.charts) { - chart.scheduleRefresh(0); - } - this.updateListAndCharts(delay_loading) .finally(_ => { if (refresh_interval) { @@ -430,7 +405,6 @@ if (this._prev_width === undefined) { this._prev_width = width; - this.updateCharts(); return; } |