From a279c9abb3e39f0dd9fa4ce2a507a49f3695a13c Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 8 Mar 2018 09:43:18 +0100 Subject: [PATCH 1/3] luci-app-mwan3: remove notMonitored status information This case is not supported by mwan3 anymore Signed-off-by: Florian Eckert --- .../luasrc/view/mwan/overview_status_interface.htm | 3 --- 1 file changed, 3 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 86b5ac696b..c941ad2b46 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 @@ -20,9 +20,6 @@ XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface_ case 'online': state = '<%:Online (tracking active)%>'; break; - case 'notMonitored': - state = '<%:Online (tracking off)%>'; - break; case 'offline': state = '<%:Offline%>'; break; From 10e5171ea6e971ce882b8a2257f70699fdd26f8a Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 8 Mar 2018 11:03:19 +0100 Subject: [PATCH 2/3] luci-app-mwan3: add missing graphics boxes again Add css boxes for mwan3 status again Signed-off-by: Florian Eckert --- .../view/mwan/overview_status_interface.htm | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) 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 c941ad2b46..4ec0edf049 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,26 +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)%>'; + css = 'success'; break; case 'offline': state = '<%:Offline%>'; + css = 'danger'; break; default: state = '<%:Disabled%>'; + css = 'warning'; break; } + statusview += String.format( + '
', + css + ); statusview += String.format( '
Interface: %s
', iface ); statusview += String.format( - '
Status: %s


', + '
Status: %s
', state ); + statusview += '
' } statusDiv.innerHTML = statusview; } @@ -46,6 +55,17 @@ XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface_ ); //]]> + +
<%:MWAN Interfaces%>
From 2729f128c8571a6a79311c183f6b728c9161c1f0 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Fri, 23 Mar 2018 09:35:26 +0100 Subject: [PATCH 3/3] luci-theme-material: add missing css classes * Add missing css class danger * Add missing css class success * Update background color for css class warning Signed-off-by: Florian Eckert --- .../htdocs/luci-static/material/css/style.css | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/themes/luci-theme-material/htdocs/luci-static/material/css/style.css b/themes/luci-theme-material/htdocs/luci-static/material/css/style.css index 545c5fb3fa..57bbaf6afc 100755 --- a/themes/luci-theme-material/htdocs/luci-static/material/css/style.css +++ b/themes/luci-theme-material/htdocs/luci-static/material/css/style.css @@ -253,9 +253,19 @@ header > .container > .brand { vertical-align: text-bottom; } +.danger { + background-color: #FA8072 !important; + color: black; +} + .warning { - background-color: #FF7D60 !important; - color: #FFF; + background-color: #F0E68C !important; + color: black; +} + +.success { + background-color: #90EE90 !important; + color: black; } .errorbox, @@ -1546,4 +1556,4 @@ body.lang_pl.node-main-login .cbi-value-title { .cbi-value-field .cbi-input-select { min-width: 25rem; } -} \ No newline at end of file +}