summaryrefslogtreecommitdiffstats
path: root/vlc-status-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'vlc-status-html.lsp')
-rw-r--r--vlc-status-html.lsp36
1 files changed, 36 insertions, 0 deletions
diff --git a/vlc-status-html.lsp b/vlc-status-html.lsp
new file mode 100644
index 0000000..5518c04
--- /dev/null
+++ b/vlc-status-html.lsp
@@ -0,0 +1,36 @@
+<% local data, viewlibrary, page_info, session = ...
+require("viewfunctions")
+%>
+
+<% displaycommandresults({"install","edit"}, session) %>
+<% displaycommandresults({"startstop"}, session) %>
+
+<H1>System Info</H1>
+<DL>
+<%
+displayitem(data.value.status)
+
+displayitem(data.value.version)
+if data.value.version and data.value.version.errtxt and viewlibrary.check_permission("apk-tools/apk/install") then
+%>
+ <DT>Install package</DT>
+ <DD><form action="<%= html.html_escape(page_info.script .. "/apk-tools/apk/install") %>" method="POST">
+ <input type='hidden' name='package' value='<%= html.html_escape(data.value.version.name) %>'>
+ <input class='submit' type='submit' value='Install'></form></DD>
+<%
+end
+
+displayitem(data.value.autostart)
+if not (data.value.version and data.value.version.errtxt) and data.value.autostart and data.value.autostart.errtxt and viewlibrary.check_permission("alpine-baselayout/rc/edit") then
+%>
+ <DT>Enable autostart</DT>
+ <DD><form action="<%= html.html_escape(page_info.script .. "/alpine-baselayout/rc/edit") %>" method="POST">
+ <input type='hidden' name='servicename' value='<%= html.html_escape(data.value.autostart.name) %>'>
+ <input type='hidden' name='redir' value='<%= html.html_escape(page_info.orig_action) %>'>
+ <input class='submit' type='submit' value='Enable'></form></DD>
+<% end %>
+</DL>
+
+<% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("startstop") then
+ viewlibrary.dispatch_component("startstop")
+end %>