From 3c86c6562ed870bb476349857ca59e4bb14947e2 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Tue, 27 Feb 2018 15:00:50 +0100 Subject: luci-app-mwan3: fix stack trace if no tacking_ip is set on interface add Signed-off-by: Florian Eckert --- applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'applications') diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua index 920dc6afb..4b1a070d1 100644 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua @@ -93,7 +93,7 @@ function configCheck() local trackingNumber = uci:get("mwan3", iface, "track_ip") overview[iface]["tracking"] = 0 - if #trackingNumber > 0 then + if trackingNumber and #trackingNumber > 0 then overview[iface]["tracking"] = #trackingNumber overview[iface]["reliability"] = false local reliabilityNumber = tonumber(uci:get("mwan3", iface, "reliability")) -- cgit v1.2.3 From a82e588c068c407b52c9d329375d22ef35c57bb5 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 1 Mar 2018 08:51:51 +0100 Subject: luci-app-mwan3: remove css styling from overview_status_interface page Signed-off-by: Florian Eckert --- .../luasrc/view/mwan/overview_status_interface.htm | 30 ---------------------- 1 file changed, 30 deletions(-) (limited to 'applications') 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 6dc3d1274..bb7aaca7b 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 @@ -56,33 +56,3 @@ XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface_ <%:MWAN Interface Live Status%>
<%:Loading%><%:Collecting data...%>
- - -- cgit v1.2.3 From 1ff26f380f5791d7ee08b7a98a62452c834bc81c Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 1 Mar 2018 08:52:06 +0100 Subject: luci-app-mwan3: remove css styling from status_interface page Signed-off-by: Florian Eckert --- .../luasrc/view/mwan/status_interface.htm | 31 ---------------------- 1 file changed, 31 deletions(-) (limited to 'applications') diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm b/applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm index 21e59a801..ae28df10e 100644 --- a/applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm +++ b/applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm @@ -77,35 +77,4 @@ - - <%+footer%> -- cgit v1.2.3 From deba02e0968e2026334d16606ca24032ec055a76 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 1 Mar 2018 08:53:17 +0100 Subject: luci-app-mwan3: fix source styling Signed-off-by: Florian Eckert --- .../luci-app-mwan3/luasrc/view/mwan/overview_status_interface.htm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'applications') 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 bb7aaca7b..d95cc8406 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 @@ -54,5 +54,7 @@ XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface_
<%:MWAN Interface Live Status%> -
<%:Loading%><%:Collecting data...%>
+
+ <%:Loading%><%:Collecting data...%> +
-- cgit v1.2.3 From a73687022d222e61573a11b6b43bc76d246a86c3 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 1 Mar 2018 08:56:43 +0100 Subject: luci-app-mwan3: remove duplicated code section Signed-off-by: Florian Eckert --- .../luasrc/view/mwan/status_interface.htm | 62 +--------------------- 1 file changed, 1 insertion(+), 61 deletions(-) (limited to 'applications') diff --git a/applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm b/applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm index ae28df10e..cb476967f 100644 --- a/applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm +++ b/applications/luci-app-mwan3/luasrc/view/mwan/status_interface.htm @@ -14,67 +14,7 @@ - -
-

<%:MWAN Status - Interface%>

- <%if not require("luci.sys").init.enabled("mwan3") then%> -
<%:INFO: MWAN not running%>
- <%end%> -
- <%:Collecting data...%> - - <%:Loading%> - -
-
+<%+mwan/overview_status_interface%> <%+footer%> -- cgit v1.2.3 From 5362f6970650d984b0e35d10232247f07d81892b Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 1 Mar 2018 08:58:36 +0100 Subject: luci-app-mwan3: Update header name in status pages Signed-off-by: Florian Eckert --- .../luci-app-mwan3/luasrc/view/mwan/overview_status_interface.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'applications') 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 d95cc8406..6df3b3f28 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 @@ -53,7 +53,7 @@ XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "status", "mwan", "interface_ //]]>
- <%:MWAN Interface Live Status%> + <%:MWAN Interfaces%>
<%:Loading%><%:Collecting data...%>
-- cgit v1.2.3 From dcb041e3965d6cb706094720975267a9d61f74c0 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 1 Mar 2018 10:36:03 +0100 Subject: luci-app-mwan3: remove css from javascript in overview_status_interface Signed-off-by: Florian Eckert --- .../luasrc/view/mwan/overview_status_interface.htm | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'applications') 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 6df3b3f28..86b5ac696 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,30 +15,27 @@ 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 = 'wanon'; break; case 'notMonitored': state = '<%:Online (tracking off)%>'; - css = 'wanon'; break; case 'offline': state = '<%:Offline%>'; - css = 'wanoff'; break; default: state = '<%:Disabled%>'; - css = 'wanoff'; break; } statusview += String.format( - '%s
%s
', - css, - iface, + '
Interface: %s
', + iface + ); + statusview += String.format( + '
Status: %s


', state ); } -- cgit v1.2.3