diff options
Diffstat (limited to 'openntpd-advanced-html.lsp')
-rw-r--r-- | openntpd-advanced-html.lsp | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/openntpd-advanced-html.lsp b/openntpd-advanced-html.lsp index 5cb8104..33f59e5 100644 --- a/openntpd-advanced-html.lsp +++ b/openntpd-advanced-html.lsp @@ -1,18 +1,15 @@ <? local view = ... ?> -<? ---[[ DEBUG INFORMATION -require("debugs") -io.write(debugs.variables(view)) ---]] -?> <h1>System time</h1> -<h2>MENU</h2> +<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><?= html.link{value = view.url .. "/", label="Home" } ?></dt> -<dd>Go back to start page</dd> +<dt>Start or stop process</dt> +<dd><form name="start" action="" method="POST"><input type=submit name="cmd" value="start" style="width:100px"></form><form name="stop" action="" method="POST"><input type=submit name="cmd" value="stop" style="width:100px"></form></dd> <h2>Details</h2> @@ -25,15 +22,22 @@ io.write(debugs.variables(view)) <dt>Last modified</dt> <dd><?= view.filecontent.filedetails.mtimelong ?></dd> -<? if (view.filecontent.errtxt) then ?> +<? if (view.statusinfo.errtxt) then ?> <dt>Error message</dt> -<dd class="error"><?= view.filecontent.errtxt ?></dd> +<dd class="error"><?= view.statusinfo.errtxt ?></dd> <? end ?> <h2>Content</h2> <form name="myform" action="" method="POST"> -<input name="name" type=hidden value="<?= view.filecontent.filedetails.name ?>" style="width:100%"> +<input name="name" type=hidden value="<?= view.filecontent.filedetails.longname ?>" style="width:100%"> <textarea name="modifications" style="width:100%;height:360px;"><?= view.filecontent.value ?></textarea> <input type="submit" name="cmd" value="update"></form> +<? +--[[ DEBUG INFORMATION +require("debugs") +io.write(debugs.variables(view)) +--]] +?> + |