luci-app-banIP: sync with release 1.5.3-3
authorDirk Brenken <[email protected]>
Fri, 7 Mar 2025 12:28:54 +0000 (13:28 +0100)
committerDirk Brenken <[email protected]>
Fri, 7 Mar 2025 12:30:22 +0000 (13:30 +0100)
Signed-off-by: Dirk Brenken <[email protected]>
(cherry picked from commit 1c4b8dc494c26420a5e3b1473c1711ea7a8562d0)

applications/luci-app-banip/htdocs/luci-static/resources/view/banip/overview.js

index 2455c0220c5bb24049ac17704949d461bedcee85..f2aa300f1dddd644a53cf4c972bd059d935d7e03 100644 (file)
@@ -43,7 +43,7 @@ return view.extend({
                /*
                        poll runtime information
                */
-               let buttons, rtRes, infStat, infVer, infElements, infFeeds, infDevices, infUplink, infSystem, nftInfos, runInfos, infFlags, last_run
+               let buttons, rtRes, infStat, infVer, infElements, infFeeds, infDevices, infUplink, infSys, infNft, infRun, infFlags, infLast
 
                pollData: poll.add(function () {
                        return L.resolveDefault(fs.stat('/var/run/banip.lock')).then(function (stat) {
@@ -90,7 +90,7 @@ return view.extend({
                                                                } else if (rtRes[i].match(/^\s+\+\slast_run\s+\:\s+(.*)$/)) {
                                                                        rtRes.lastRun = rtRes[i].match(/^\s+\+\slast_run\s+\:\s+(.*)$/)[1];
                                                                } else if (rtRes[i].match(/^\s+\+\ssystem_info\s+\:\s+(.*)$/)) {
-                                                                       rtRes.systemInfo = rtRes[i].match(/^\s+\+\ssystem_info\s+\:\s+(.*)$/)[1];
+                                                                       rtRes.sysInfo = rtRes[i].match(/^\s+\+\ssystem_info\s+\:\s+(.*)$/)[1];
                                                                }
                                                        }
                                                }
@@ -119,21 +119,25 @@ return view.extend({
                                                        if (infUplink) {
                                                                infUplink.textContent = rtRes.activeUplink || '-';
                                                        }
-                                                       nftInfos = document.getElementById('nft');
-                                                       if (nftInfos) {
-                                                               nftInfos.textContent = rtRes.nftInfo || '-';
+                                                       infNft = document.getElementById('nft');
+                                                       if (infNft) {
+                                                               infNft.textContent = rtRes.nftInfo || '-';
                                                        }
-                                                       runInfos = document.getElementById('run');
-                                                       if (runInfos) {
-                                                               runInfos.textContent = rtRes.runInfo || '-';
+                                                       infRun = document.getElementById('run');
+                                                       if (infRun) {
+                                                               infRun.textContent = rtRes.runInfo || '-';
                                                        }
                                                        infFlags = document.getElementById('flags');
                                                        if (infFlags) {
                                                                infFlags.textContent = rtRes.runFlags || '-';
                                                        }
-                                                       last_run = document.getElementById('last');
-                                                       if (last_run) {
-                                                               last_run.textContent = rtRes.lastRun || '-';
+                                                       infLast = document.getElementById('last');
+                                                       if (infLast) {
+                                                               infLast.textContent = rtRes.lastRun || '-';
+                                                       }
+                                                       infSys = document.getElementById('sys');
+                                                       if (infSys) {
+                                                               infSys.textContent = rtRes.sysInfo || '-';
                                                        }
                                                }
                                        } else {
@@ -197,6 +201,10 @@ return view.extend({
                                        E('label', { 'class': 'cbi-value-title', 'style': 'margin-bottom:-5px;padding-top:0rem;' }, _('Last Run')),
                                        E('div', { 'class': 'cbi-value-field', 'id': 'last', 'style': 'margin-bottom:-5px;color:#37c;' }, '-')
                                ]),
+                               E('div', { 'class': 'cbi-value' }, [
+                                       E('label', { 'class': 'cbi-value-title', 'style': 'margin-bottom:-5px;padding-top:0rem;' }, _('System Info')),
+                                       E('div', { 'class': 'cbi-value-field', 'id': 'sys', 'style': 'margin-bottom:-5px;color:#37c;' }, '-')
+                               ])
                        ]);
                }, o, this);
                this.pollData;