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 %>