From 10e5171ea6e971ce882b8a2257f70699fdd26f8a Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 8 Mar 2018 11:03:19 +0100 Subject: [PATCH] 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 c941ad2b4..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,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%>
-- 2.25.1