From 65180abd3ba622df3e5d9655dae7082f5d84e356 Mon Sep 17 00:00:00 2001 From: riley Date: Mon, 16 Oct 2023 18:54:31 -0400 Subject: [PATCH] Minor gui refactor --- luasrc/view/frigate/status.htm | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/luasrc/view/frigate/status.htm b/luasrc/view/frigate/status.htm index df39087..159631f 100644 --- a/luasrc/view/frigate/status.htm +++ b/luasrc/view/frigate/status.htm @@ -2,29 +2,21 @@ local util = require "luci.util" local container_status = util.trim(util.exec("/usr/libexec/apps/frigate/frigate.sh status")) local container_running = string.match(string.lower(container_status), "^up%W") +local port = util.trim(util.exec("/usr/libexec/apps/frigate/frigate.sh port")) -%>
<% if container_running then %> + <% + if port == "" then + port="5100" + end + -%> + <% else %> <% end %>
- -<% -if container_running then - local port = util.trim(util.exec("/usr/libexec/apps/frigate/frigate.sh port")) - if port == "" then - port="5100" - end --%> -
- -
- -
-
-<% end %>