diff options
author | Andreas Brodmann <andreas.brodmann@gmail.com> | 2008-01-18 12:56:48 +0000 |
---|---|---|
committer | Andreas Brodmann <andreas.brodmann@gmail.com> | 2008-01-18 12:56:48 +0000 |
commit | c5a014a279363bb066baaec0a7185c5b40e2183a (patch) | |
tree | 6dae2e83c1bc2e252288e00380ef0e1439c64863 | |
parent | abf901adbd90b466d73f3ed464ed3024a8e0bde0 (diff) | |
download | acf-squid-c5a014a279363bb066baaec0a7185c5b40e2183a.tar.bz2 acf-squid-c5a014a279363bb066baaec0a7185c5b40e2183a.tar.xz |
updates to squid-advanced-html.lsp / squid-controller.lua
git-svn-id: svn://svn.alpinelinux.org/acf/squid/trunk@621 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r-- | squid-advanced-html.lsp | 25 | ||||
-rw-r--r-- | squid-controller.lua | 5 |
2 files changed, 18 insertions, 12 deletions
diff --git a/squid-advanced-html.lsp b/squid-advanced-html.lsp index 5366eac..328680e 100644 --- a/squid-advanced-html.lsp +++ b/squid-advanced-html.lsp @@ -14,18 +14,24 @@ <h1>Web Proxy Configuration</h1> <p> <dl> -<dt> - <div class="attention">WARNING:</div><br> +<dt>Warning</dt> +<dd class="attention"> Modifying the web proxy configuration file is generally not necessary. You must be familiar with the configuration file before proceeding. -</dt> +</dd> </dl> </p> +<p></p> <h2>Status</h2> <form action="" method="POST"> <dl> -<dt>squid is: <? io.write( service.status ) ?> </dt> +<dt>Program version</dt><dd><? io.write( form.info.version.value ) ?></dd> +<dt>Process status</dt><dd><? io.write( form.info.status.value ) ?></dd> +<dt>Process information</dt><dd>This process runs as a service. When you make and save changes, +the configuration files for the service are changed. However, the changes will not be +<i>applied</i> until you restart the service.</dd> +<dt>Daemon control</dt> <dd><input class="submit" type="submit" name="srvcmd" value="start" <? io.write( srv1fill ) ?>> <input class="submit" type="submit" name="srvcmd" value="stop" <? io.write( srv2fill ) ?>> <input class="submit" type="submit" name="srvcmd" value="restart" <? io.write( srv2fill ) ?>></dd> @@ -36,16 +42,13 @@ <pre class="attention"><? io.write( service.message ) ?></pre> </p> -<p> -This process runs as a service. When you make and save changes, the configuration -files for the service are changed. However, the changes will not be <i>applied</i> -until you restart the service. -</p> - <h2>Configuration</h2> <form action="" method="POST"> <textarea name="config"><? io.write( service.config ) ?></textarea> - +<p></p> <h3>Save Changes</h3> +<dl> <dt>Save the contents of the box above</dt><dd><input class="submit" type="submit" name="cmd" value="save"></dd> +</dl> +<p></p> </form> diff --git a/squid-controller.lua b/squid-controller.lua index 1c093db..87babbb 100644 --- a/squid-controller.lua +++ b/squid-controller.lua @@ -149,6 +149,8 @@ end advanced = function( self ) + local info = { status = { value = "stopped" }, version = { value = self.model.get_squid_version() }, srvctrl = { value = srvctrl} }; + local option = { script = ENV["SCRIPT_NAME"], prefix = self.conf.prefix, controller = self.conf.controller, @@ -171,9 +173,10 @@ advanced = function( self ) end service.status = self.model.get_status() + info.status.value = service.status service.config = self.model.get_adv_config() - return ( cfe ({ option = option, service = service }) ) + return ( cfe ({ option = option, service = service, info = info }) ) end digest = function( self ) |