summaryrefslogtreecommitdiffstats
path: root/gnats-expert-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'gnats-expert-html.lsp')
-rw-r--r--gnats-expert-html.lsp52
1 files changed, 52 insertions, 0 deletions
diff --git a/gnats-expert-html.lsp b/gnats-expert-html.lsp
new file mode 100644
index 0000000..da4ac15
--- /dev/null
+++ b/gnats-expert-html.lsp
@@ -0,0 +1,52 @@
+<? local form = ...
+require("viewfunctions")
+?>
+<?
+--[[ DEBUG INFORMATION
+io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>")
+io.write(html.cfe_unpack(form))
+io.write("</span>")
+--]]
+?>
+
+
+<H1>SYSTEM INFO</H1>
+<DL>
+<?
+local myform = form.status
+local tags = { "status", "version", "autostart", }
+displayinfo(myform,tags,"viewonly")
+?>
+</DL>
+
+<h1>CONFIGURATION</h1>
+<h2>Expert config</h2>
+<h3>List of files</h3>
+<DL>
+<TABLE>
+<?
+local myform = form.status.configfiles
+for k,v in pairs(myform.option) do
+?>
+ <TR>
+ <TD style="padding-right:20px;white-space:nowrap;"><?= html.link{value = "edit?name=" .. v , label=v } ?></TD>
+ </TR>
+<? end ?>
+</TABLE>
+</DL>
+
+
+<form action="<?= form.option.script .. "/" .. form.option.prefix ..
+ form.option.controller .. "/" .. form.option.action ..
+ (form.option.extra or "") ?>" method="POST">
+<?
+-- Management buttons
+local myform = form.management
+local tags = { "start", "stop", "restart" }
+if (myform) then
+ io.write("<H1>MANAGEMENT</H1>\n<DL>")
+ displaymanagement(myform,tags)
+ io.write("</DL>")
+end
+?>
+</form>