summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2009-01-07 21:58:23 +0000
committerTed Trask <ttrask01@yahoo.com>2009-01-07 21:58:23 +0000
commit2c426875d6306883433e8b336aa3b9852a22bfe0 (patch)
treeceb693b90faaaa854931b5975be3685e7888ad22
parentaef4c4ae706483964aaa7569dff7fb9458552ab8 (diff)
downloadacf-chrony-2c426875d6306883433e8b336aa3b9852a22bfe0.tar.bz2
acf-chrony-2c426875d6306883433e8b336aa3b9852a22bfe0.tar.xz
Modified chrony to add online/offline buttons to startstop. part 2
git-svn-id: svn://svn.alpinelinux.org/acf/chrony/trunk@1670 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r--chrony-startstop-html.lsp28
1 files changed, 28 insertions, 0 deletions
diff --git a/chrony-startstop-html.lsp b/chrony-startstop-html.lsp
new file mode 100644
index 0000000..2dafac5
--- /dev/null
+++ b/chrony-startstop-html.lsp
@@ -0,0 +1,28 @@
+<% local data, viewlibrary, page_info = ... %>
+
+<H1>Management</H1>
+<DL>
+<form action="<%= page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action %>" method="POST">
+<DT>Program control-panel</DT>
+<DD>
+<input class="submit" type="submit" name="action" value="Start" <% if data.value.status.value== "Running" then io.write("disabled") end %>>
+<input class="submit" type="submit" name="action" value="Stop" <% if data.value.status.value== "Stopped" then io.write("disabled") end %>>
+<input class="submit" type="submit" name="action" value="Restart" <% if data.value.status.value== "Stopped" then io.write("disabled") end %>>
+</DD>
+<DT>Connection control</DT>
+<DD>
+<input class="submit" type="submit" name="action" value="Online" <% if data.value.status.value== "Stopped" then io.write("disabled") end %>>
+<input class="submit" type="submit" name="action" value="Offline" <% if data.value.status.value== "Stopped" then io.write("disabled") end %>>
+</DD>
+</form>
+
+<% if data.value.result then %>
+<DT>Previous action result</DT>
+<DD>
+<% if data.value.result.value ~= "" then %>
+<P CLASS='descr'><%= string.gsub(data.value.result.value, "\n", "<BR>") %></P>
+<% end if data.value.result.errtxt then %>
+<P CLASS='error'><%= string.gsub(data.value.result.errtxt, "\n", "<BR>") %></P>
+<% end end %>
+</DD>
+</DL>