summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2018-03-23 16:59:42 +0200
committerGitHub <noreply@github.com>2018-03-23 16:59:42 +0200
commit92408aaf17115b1c0b373c9e669211af6f56aeb4 (patch)
tree750a6b96ffe38cfdee6113dff2c3c78778d6748a /applications
parent84b3ba46f8779f39f69b2646b5f071183a21020c (diff)
parent2729f128c8571a6a79311c183f6b728c9161c1f0 (diff)
Merge pull request #1696 from TDT-AG/pr/20180323-luci-app-mwan3-add-boxes-again
luci-app-mwan3: add boxes again and update css in luci-theme-material
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-app-mwan3/luasrc/view/mwan/overview_status_interface.htm25
1 files changed, 21 insertions, 4 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 86b5ac696..4ec0edf04 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
@@ -15,29 +15,35 @@ XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface_
for ( var iface in status.interfaces)
{
var state = '';
+ var css = ''
switch (status.interfaces[iface].status)
{
case 'online':
state = '<%:Online (tracking active)%>';
- break;
- case 'notMonitored':
- state = '<%:Online (tracking off)%>';
+ css = 'success';
break;
case 'offline':
state = '<%:Offline%>';
+ css = 'danger';
break;
default:
state = '<%:Disabled%>';
+ css = 'warning';
break;
}
statusview += String.format(
+ '<div class="alert-message %s">',
+ css
+ );
+ statusview += String.format(
'<div><strong>Interface: </strong>%s</div>',
iface
);
statusview += String.format(
- '<div><strong>Status: </strong>%s</div></br></br>',
+ '<div><strong>Status: </strong>%s</div>',
state
);
+ statusview += '</div>'
}
statusDiv.innerHTML = statusview;
}
@@ -49,6 +55,17 @@ XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface_
);
//]]></script>
+<style type="text/css">
+ #mwan_status_text > div {
+ display: inline-block;
+ margin: 1rem;
+ padding: 1rem;
+ width: 10rem;
+ float: left;
+ line-height: 125%;
+ }
+</style>
+
<fieldset id="interface_field" class="cbi-section">
<legend><%:MWAN Interfaces%></legend>
<div id="mwan_status_text">