From ff55e7f6b5eb760c99f658eaab8267a4db7f0be3 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 25 Jun 2018 09:19:59 +0200 Subject: [PATCH] luci-mod-admin-full: fix initializing realtime graphs Commit 69782ccbc ("luci-base: xhr.js: defer starting poll queue") changed the way XHR poll queues are started which broke the timing on the realtime graph pages. Fix the problem by manually starting the poller after registering the request handlers. Signed-off-by: Jo-Philipp Wich --- .../luci-mod-admin-full/luasrc/view/admin_status/bandwidth.htm | 2 ++ .../luasrc/view/admin_status/connections.htm | 2 ++ modules/luci-mod-admin-full/luasrc/view/admin_status/load.htm | 2 ++ .../luci-mod-admin-full/luasrc/view/admin_status/wireless.htm | 2 ++ 4 files changed, 8 insertions(+) diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/bandwidth.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/bandwidth.htm index db1d0b888..f0ef5e7a2 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_status/bandwidth.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/bandwidth.htm @@ -258,6 +258,8 @@ label_tx_peak.innerHTML = bandwidth_label(data_tx_peak, true); } ); + + XHR.run(); } }, 1000 ); diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/connections.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/connections.htm index 30d93f78b..ae8a6bb7c 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_status/connections.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/connections.htm @@ -304,6 +304,8 @@ label_otr_peak.innerHTML = Math.floor(data_otr_peak); } ); + + XHR.run(); } }, 1000 ); diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/load.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/load.htm index c8ada7156..dc7d927de 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_status/load.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/load.htm @@ -237,6 +237,8 @@ label_15_peak.innerHTML = (data_15_peak / 100).toFixed(2); } ); + + XHR.run(); } }, 1000 ); diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/wireless.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/wireless.htm index 4211b2647..09b796577 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_status/wireless.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/wireless.htm @@ -308,6 +308,8 @@ label_rate_peak.innerHTML = rate_label(data_rate_peak); } ); + + XHR.run(); } }, 1000 ); -- 2.25.1