diff options
Diffstat (limited to 'openntpd-expert-html.lsp')
-rw-r--r-- | openntpd-expert-html.lsp | 83 |
1 files changed, 35 insertions, 48 deletions
diff --git a/openntpd-expert-html.lsp b/openntpd-expert-html.lsp index c74b30d..4ccce68 100644 --- a/openntpd-expert-html.lsp +++ b/openntpd-expert-html.lsp @@ -1,17 +1,18 @@ <? local view = ... ?> -<? ---[[ DEBUG INFORMATION -require("debugs") -io.write(debugs.variables(view)) ---]] -?> -<h1>CONFIGURATION</h1> +<h1>SYSTEM INFO</h1> + +<dl> +<dt>Program status +<dd><? if (view.status.enabled) then io.write('Enabled') else io.write('Disabled') end ?></dd> +</dl> -<H2>Enable/Disable</H2> -<DT>Change status for this program</DT> -<DD><input class="radio" type="radio" name="enabled" value="2" <? if (view.status.enabled) then io.write('checked') end ?> >Enable -<input class="radio" type="radio" name="enabled" value="3" <? if not (view.status.enabled) then io.write('checked') end ?> >Disable</DD> +<dl> +<dt>Program version</dt> +<dd><?= view.status.version ?></dd> +</dl> + +<h1>CONFIGURATION</h1> <H2>Expert config</H2> @@ -24,7 +25,7 @@ io.write(debugs.variables(view)) <dd><?= view.file.details.size ?></dd> <dt>Last modified</dt> -<dd><?= view.file.details.mtimelong ?></dd> +<dd><?= view.file.details.mtime ?></dd> <h3>File content</h3> @@ -35,43 +36,29 @@ io.write(debugs.variables(view)) <H2>Save and apply above settings</H2> <DT>Apply settings</DT> <DD><input class="submit" type="submit" value="Apply"/></DD> -</form> - -<? --[[ ?> - -<h1>System time</h1> - -<h2>SYSTEM INFO</h2> - -<dt>Process status</dt> -<dd><? io.write(view.statusinfo.status) ?><? if (view.startstop.status) then io.write(" (" .. view.startstop.status .. ")") end ?></dd> - -<dt>Start or stop process</dt> -<dd><form name="start" action="" method="POST"><input type=submit name="cmd" class="submit" value="start"></form><form name="stop" action="" method="POST"><input type=submit name="cmd" class="submit" value="stop"></form></dd> - -<h2>Details</h2> -<dt>File name</dt> -<dd><?= view.filecontent.filedetails.longname ?></dd> - -<dt>File size</dt> -<dd><?= view.filecontent.filedetails.size ?></dd> - -<dt>Last modified</dt> -<dd><?= view.filecontent.filedetails.mtimelong ?></dd> - -<? if (view.statusinfo.errtxt) then ?> -<dt>Error message</dt> -<dd class="error"><?= view.statusinfo.errtxt ?></dd> +<H1>MANAGEMENT</H1> + +<dl> +<dt>Program controll-panel</dt> +<dd><form name="cmd" action="" method="POST"> +<input type=submit class="submit" name="cmd" value="start"> +<input type=submit class="submit" name="cmd" value="stop"> +<input type=submit class="submit" name="cmd" value="restart"> +</form></dd> +</dl> + +<? if (view.startstop) and (view.startstop.cmdresult) then ?> +<dl> +<dt>Previous action result</dt> +<dd><pre><?= view.startstop.cmdresult?></pre></dd> +</dl> <? end ?> -<h2>Content</h2> -<form name="myform" action="" method="POST"> -<input name="name" type=hidden value="<?= view.filecontent.filedetails.longname ?>"> -<textarea name="modifications"><?= view.filecontent.value ?></textarea> - -<input type="submit" name="cmd" class="submit" value="update"></form> - -<? --]] ?> - +<? +--[[ DEBUG INFORMATION +require("debugs") +io.write(debugs.variables(view)) +--]] +?> |