summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtinydns-config-html.lsp6
-rw-r--r--tinydns-listfiles-html.lsp2
-rw-r--r--tinydns-status-html.lsp13
3 files changed, 12 insertions, 9 deletions
diff --git a/tinydns-config-html.lsp b/tinydns-config-html.lsp
index d02ed37..bcbe58a 100755
--- a/tinydns-config-html.lsp
+++ b/tinydns-config-html.lsp
@@ -2,8 +2,6 @@
require("viewfunctions")
%>
-<% displaycommandresults({"startstop"}, session) %>
-
<% if viewlibrary and viewlibrary.dispatch_component then
viewlibrary.dispatch_component("status")
end %>
@@ -13,7 +11,3 @@ end %>
form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action
displayform(form)
%>
-
-<% if viewlibrary and viewlibrary.dispatch_component then
- viewlibrary.dispatch_component("startstop")
-end %>
diff --git a/tinydns-listfiles-html.lsp b/tinydns-listfiles-html.lsp
index eab386f..a2ce083 100644
--- a/tinydns-listfiles-html.lsp
+++ b/tinydns-listfiles-html.lsp
@@ -3,7 +3,7 @@ require("viewfunctions")
%>
<% displaycommandresults({"delete", "edit", "editfile"}, session) %>
-<% displaycommandresults({"newfile"}, session, true) %>
+<% displaycommandresults({"newfile", "startstop"}, session, true) %>
<h1>Configuration</h1>
<h2>Edit/View existing Domains</h2>
diff --git a/tinydns-status-html.lsp b/tinydns-status-html.lsp
index 49274e9..aae23b9 100644
--- a/tinydns-status-html.lsp
+++ b/tinydns-status-html.lsp
@@ -3,6 +3,7 @@ require("viewfunctions")
%>
<% displaycommandresults({"install","edit"}, session) %>
+<% displaycommandresults({"startstop"}, session) %>
<H1>System Info</H1>
<DL>
@@ -12,14 +13,18 @@ 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
%>
- <a href="<%= html.html_escape(page_info.script .. "/apk-tools/apk/install?package="..data.value.version.name) %>">Install</a>
+ <DT>Install package</DT>
+ <DD><form action="<%= html.html_escape(page_info.script .. "/apk-tools/apk/install?package="..data.value.version.name) %>" method="POST">
+ <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
%>
- <a href="<%= html.html_escape(page_info.script .. "/alpine-baselayout/rc/edit?servicename="..data.value.autostart.name.."&redir=".. page_info.orig_action) %>">Schedule autostart</a>
+ <DT>Enable autostart</DT>
+ <DD><form action="<%= html.html_escape(page_info.script .. "/alpine-baselayout/rc/edit?servicename="..data.value.autostart.name.."&redir=".. page_info.orig_action) %>" method="POST">
+ <input class='submit' type='submit' value='Enable'></form></DD>
<%
end
@@ -27,3 +32,7 @@ displayitem(data.value.configdir)
displayitem(data.value.listen)
%>
</DL>
+
+<% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("startstop") then
+ viewlibrary.dispatch_component("startstop")
+end %>