From b124ec292c55514d22c0fc4a9f8a09ef48165548 Mon Sep 17 00:00:00 2001 From: stopyz <stopyz@gmail.com> Date: Sun, 25 Jun 2023 17:40:36 +0200 Subject: [PATCH] Dashboard App for ACF --- app/acf-util/welcome-html.lsp | 4 ++-- app/alpine-baselayout/health-model.lua | 2 +- css/dashboard-main/footer.css | 8 -------- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/app/acf-util/welcome-html.lsp b/app/acf-util/welcome-html.lsp index e364811..965b3f1 100644 --- a/app/acf-util/welcome-html.lsp +++ b/app/acf-util/welcome-html.lsp @@ -41,7 +41,7 @@ end end -- GET DIST VERSION CHANGES - local check_verchanges = string.match(sys.value.alpineposts.value, "%W+("..actual_distver..")%W+") + local check_verchanges = string.match(sys.value.alpineposts.value, "((("..actual_distver..").+%$)-released.html)") -- FORMAT UPTIME local up_time = math.floor(string.match(sys.value.uptime.value, "[%d]+")) @@ -145,7 +145,7 @@ end <span class="data-title">OS : </span> <%= chkres %> <span class="check-version"> - - <!--<a class="version-link" href="https://www.alpinelinux.org/posts/Alpine-<%= actual_distver %>-released.html" target="_blank"> --> + - <!--<a class="version-link" href="https://www.alpinelinux.org/posts/Alpine-<%= actual_distver %>-released.html" target="_blank">--> Last Release : <%= actual_distver %> </span><!--</a>--><br> <span class="data-title">ACF Version : </span><%= sys.value.luaver.value %> diff --git a/app/alpine-baselayout/health-model.lua b/app/alpine-baselayout/health-model.lua index 9f3491a..8a6ce3e 100644 --- a/app/alpine-baselayout/health-model.lua +++ b/app/alpine-baselayout/health-model.lua @@ -75,7 +75,7 @@ mymodule.get_system = function (self) system.version = cfe({ value=indexver or fs.read_file("/etc/alpine-release") or "Unknown", label="Version" }) system.alpineluaver = cfe({ value=string.match(querycmd("cat /usr/share/acf/www/cgi-bin/acf"), "lua%d.%d") or "Unknown", label="Alpine Lua Version" }) system.luaver = cfe({ value=string.match(querycmd((system.alpineluaver.value) .. " -v"), "Lua%s%d.%d.%d") or "Unknown", label="Lua Version" }) - system.ACFserver = cfe({ value=querycmd("lighttpd -v"), label="ACF Server Version" }) + system.ACFserver = cfe({ value=querycmd("lighttpd -v") or "unknow", label="ACF Server" }) system.timezone = cfe({ value=date.what_tz(), label="Time Zone" }) system.uname = cfe({ value=querycmd("uname -a"), label="UName" }) system.memory = cfe({ value=querycmd("free"), label="Memory usage" }) diff --git a/css/dashboard-main/footer.css b/css/dashboard-main/footer.css index 04659b8..f469ea5 100644 --- a/css/dashboard-main/footer.css +++ b/css/dashboard-main/footer.css @@ -16,12 +16,4 @@ #footer a { color: #939393 !important; -} - -.data-title.data-footer.data-version { - font-weight: 600; - float: right; - margin: auto 1rem; - font-size: 0.5rem; - text-transform: capitalize; } \ No newline at end of file -- GitLab