summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2021-05-06 12:17:56 +0200
committerGitHub <noreply@github.com>2021-05-06 12:17:56 +0200
commitd18b087b8a2869f37538f59de3313a23e536f8c6 (patch)
treef9c501e114c7bdb05dc2cddd670c3c168e002e77
parent85e9ee31239c4e912613005f4c222f13c34e9a36 (diff)
parent6fa40fffcaa6015633e1e7426ff1f0bae61597c9 (diff)
Merge pull request #5031 from TDT-AG/pr/20200503-luci-app-mwan3
luci-app-mwan3: update status page for no tracked interfaces
-rw-r--r--applications/luci-app-mwan3/luasrc/view/mwan/overview_status_interface.htm24
1 files changed, 19 insertions, 5 deletions
diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/overview_status_interface.htm b/applications/luci-app-mwan3/luasrc/view/mwan/overview_status_interface.htm
index 468aa12b41..b3210ee137 100644
--- a/applications/luci-app-mwan3/luasrc/view/mwan/overview_status_interface.htm
+++ b/applications/luci-app-mwan3/luasrc/view/mwan/overview_status_interface.htm
@@ -33,7 +33,7 @@ XHR.poll(-1, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface
case 'online':
state = '<%:Online%>';
time = String.format(
- '<div><strong>Uptime:&nbsp;</strong>%s</div>',
+ '<div><strong><%:Uptime%>:&nbsp;</strong>%s</div>',
secondsToString(status.interfaces[iface].online)
);
css = 'success';
@@ -41,11 +41,25 @@ XHR.poll(-1, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface
case 'offline':
state = '<%:Offline%>';
time = String.format(
- '<div><strong>Downtime:&nbsp;</strong>%s</div>',
+ '<div><strong><%:Downtime%>:&nbsp;</strong>%s</div>',
secondsToString(status.interfaces[iface].offline)
);
css = 'danger';
break;
+ case 'notracking':
+ state = '<%:No Tracking%>';
+ if ((status.interfaces[iface].uptime) > 0) {
+ time = String.format(
+ '<div><strong><%:Uptime%>:&nbsp;</strong>%s</div>',
+ secondsToString(status.interfaces[iface].uptime)
+ );
+ css = 'success';
+ }
+ else {
+ time = '<div>&nbsp;</div>'
+ css = 'warning';
+ }
+ break;
default:
state = '<%:Disabled%>';
time = '<div>&nbsp;</div>'
@@ -57,11 +71,11 @@ XHR.poll(-1, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface
css
);
statusview += String.format(
- '<div><strong>Interface:&nbsp;</strong>%s</div>',
+ '<div><strong><%:Interface%>:&nbsp;</strong>%s</div>',
iface
);
statusview += String.format(
- '<div><strong>Status:&nbsp;</strong>%s</div>',
+ '<div><strong><%:Status%>:&nbsp;</strong>%s</div>',
state
);
if (time)
@@ -85,7 +99,7 @@ XHR.poll(-1, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface
display: inline-block;
margin: 1rem;
padding: 1rem;
- width: 10rem;
+ width: 15rem;
float: left;
line-height: 125%;
}