diff options
author | Florian Eckert <fe@dev.tdt.de> | 2021-05-06 12:17:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-06 12:17:56 +0200 |
commit | d18b087b8a2869f37538f59de3313a23e536f8c6 (patch) | |
tree | f9c501e114c7bdb05dc2cddd670c3c168e002e77 | |
parent | 85e9ee31239c4e912613005f4c222f13c34e9a36 (diff) | |
parent | 6fa40fffcaa6015633e1e7426ff1f0bae61597c9 (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.htm | 24 |
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: </strong>%s</div>', + '<div><strong><%:Uptime%>: </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: </strong>%s</div>', + '<div><strong><%:Downtime%>: </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%>: </strong>%s</div>', + secondsToString(status.interfaces[iface].uptime) + ); + css = 'success'; + } + else { + time = '<div> </div>' + css = 'warning'; + } + break; default: state = '<%:Disabled%>'; time = '<div> </div>' @@ -57,11 +71,11 @@ XHR.poll(-1, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface css ); statusview += String.format( - '<div><strong>Interface: </strong>%s</div>', + '<div><strong><%:Interface%>: </strong>%s</div>', iface ); statusview += String.format( - '<div><strong>Status: </strong>%s</div>', + '<div><strong><%:Status%>: </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%; } |