From 5fcdd11797893d8a34b40cf66b4fcffa90784ae6 Mon Sep 17 00:00:00 2001 From: riley Date: Tue, 17 Oct 2023 14:19:58 -0400 Subject: [PATCH] minor GUI refactor --- luasrc/view/nodered/status.htm | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/luasrc/view/nodered/status.htm b/luasrc/view/nodered/status.htm index f6a8355..fb6f454 100644 --- a/luasrc/view/nodered/status.htm +++ b/luasrc/view/nodered/status.htm @@ -2,30 +2,21 @@ local util = require "luci.util" local container_status = util.trim(util.exec("/usr/libexec/apps/nodered/nodered.sh status")) local container_running = string.find(string.lower(container_status), "up") and string.find(string.lower(container_status), "(healthy)") +local port=util.trim(util.exec("/usr/libexec/apps/nodered/nodered.sh port")) -%>
-
<% if container_running then %> + <% + if port == "" then + port="1880" + end + -%> + <% else %> <% end %>
- -<% -if container_running then - local port=util.trim(util.exec("/usr/libexec/apps/nodered/nodered.sh port")) - if port == "" then - port="1880" - end --%> -
- -
- -
-
-<% end %>