From: Etienne Champetier Date: Mon, 30 Jun 2025 16:46:31 +0000 (-0400) Subject: luci-app-mwan3: only request interfaces status X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=7d29c7882468df23fb013e839d34be5955d0e753;p=project%2Fluci.git luci-app-mwan3: only request interfaces status Before mwan3 rpcd plugin optimisations, same change in prometheus-node-exporter-lua changed request time from 1.9s to 1.3s. Signed-off-by: Etienne Champetier (cherry picked from commit c358b34a53b53fa4d6310452848643daf4a192fb) --- diff --git a/applications/luci-app-mwan3/htdocs/luci-static/resources/view/mwan3/status/overview.js b/applications/luci-app-mwan3/htdocs/luci-static/resources/view/mwan3/status/overview.js index a0261544d7..a5ac63914e 100644 --- a/applications/luci-app-mwan3/htdocs/luci-static/resources/view/mwan3/status/overview.js +++ b/applications/luci-app-mwan3/htdocs/luci-static/resources/view/mwan3/status/overview.js @@ -6,6 +6,7 @@ const callMwan3Status = rpc.declare({ object: 'mwan3', method: 'status', + params: ['section'], expect: { }, }); @@ -76,13 +77,13 @@ function renderMwan3Status(status) { return view.extend({ load: function() { return Promise.all([ - callMwan3Status(), + callMwan3Status("interfaces"), ]); }, render: function (data) { poll.add(function() { - return callMwan3Status().then(function(result) { + return callMwan3Status("interfaces").then(function(result) { var view = document.getElementById('mwan3-service-status'); view.innerHTML = renderMwan3Status(result); }); diff --git a/applications/luci-app-mwan3/htdocs/luci-static/resources/view/status/include/90_mwan3.js b/applications/luci-app-mwan3/htdocs/luci-static/resources/view/status/include/90_mwan3.js index c5b1cb4c0b..12cc24b2f6 100644 --- a/applications/luci-app-mwan3/htdocs/luci-static/resources/view/status/include/90_mwan3.js +++ b/applications/luci-app-mwan3/htdocs/luci-static/resources/view/status/include/90_mwan3.js @@ -5,6 +5,7 @@ const callMwan3Status = rpc.declare({ object: 'mwan3', method: 'status', + params: ['section'], expect: { }, }); @@ -19,7 +20,7 @@ return baseclass.extend({ load: function() { return Promise.all([ - callMwan3Status(), + callMwan3Status("interfaces"), ]); },