luci-app-mwan3: only request interfaces status
authorEtienne Champetier <[email protected]>
Mon, 30 Jun 2025 16:46:31 +0000 (12:46 -0400)
committerEtienne Champetier <[email protected]>
Mon, 14 Jul 2025 16:26:01 +0000 (12:26 -0400)
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 <[email protected]>
(cherry picked from commit c358b34a53b53fa4d6310452848643daf4a192fb)

applications/luci-app-mwan3/htdocs/luci-static/resources/view/mwan3/status/overview.js
applications/luci-app-mwan3/htdocs/luci-static/resources/view/status/include/90_mwan3.js

index a0261544d7b7c20c149cfd0b15a34850acf17319..a5ac63914ee12da89fd432df7d478945b8f651de 100644 (file)
@@ -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);
                        });
index c5b1cb4c0b139d9b346c537755281820c9f45cbb..12cc24b2f69a0e1e23239bb40518468b58d15d13 100644 (file)
@@ -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"),
                ]);
        },