luci-mod-admin-full: fix initializing realtime graphs
authorJo-Philipp Wich <jo@mein.io>
Mon, 25 Jun 2018 07:19:59 +0000 (09:19 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 25 Jun 2018 07:19:59 +0000 (09:19 +0200)
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 <jo@mein.io>
modules/luci-mod-admin-full/luasrc/view/admin_status/bandwidth.htm
modules/luci-mod-admin-full/luasrc/view/admin_status/connections.htm
modules/luci-mod-admin-full/luasrc/view/admin_status/load.htm
modules/luci-mod-admin-full/luasrc/view/admin_status/wireless.htm

index db1d0b8883300996188552f19eeb43bd5c6136c5..f0ef5e7a2cbebdbe619e676f6b0dfddb346e64cf 100644 (file)
                                                label_tx_peak.innerHTML = bandwidth_label(data_tx_peak, true);
                                        }
                                );
+
+                               XHR.run();
                        }
                }, 1000
        );
index 30d93f78bcbde2bffdb21ce6b15c125e2547952e..ae8a6bb7cede7454a80865de1680f888eb147c66 100644 (file)
                                                label_otr_peak.innerHTML = Math.floor(data_otr_peak);
                                        }
                                );
+
+                               XHR.run();
                        }
                }, 1000
        );
index c8ada71569186c51b4cbf8258bb5718d02bee910..dc7d927de80431f2971f6aa2d85d3371fae9c734 100644 (file)
                                                label_15_peak.innerHTML = (data_15_peak / 100).toFixed(2);
                                        }
                                );
+
+                               XHR.run();
                        }
                }, 1000
        );
index 4211b264713185db516adb15c3085b3a22acb3d7..09b7965776ae1e36d1af02b93af7c4b1310533ab 100644 (file)
                                                label_rate_peak.innerHTML = rate_label(data_rate_peak);
                                        }
                                );
+
+                               XHR.run();
                        }
                }, 1000
        );