diff options
author | Mika Havela <mika.havela@gmail.com> | 2008-05-06 15:11:55 +0000 |
---|---|---|
committer | Mika Havela <mika.havela@gmail.com> | 2008-05-06 15:11:55 +0000 |
commit | 210f1c930825f872aa6003f37a8908a63c2c91f5 (patch) | |
tree | 81fb2cc025a43173c17a5732053f208514810797 /dansguardian-general-html.lsp | |
parent | 236a2b6bf29167ace2fbca2273f3c9b246387b17 (diff) | |
download | acf-dansguardian-210f1c930825f872aa6003f37a8908a63c2c91f5.tar.bz2 acf-dansguardian-210f1c930825f872aa6003f37a8908a63c2c91f5.tar.xz |
Changing buttons to be cfe's (coming from controller) rather than created by the view-file.
Reorganized the view-files so they look a bit more like other ACF's.
git-svn-id: svn://svn.alpinelinux.org/acf/dansguardian/trunk@1108 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'dansguardian-general-html.lsp')
-rw-r--r-- | dansguardian-general-html.lsp | 88 |
1 files changed, 59 insertions, 29 deletions
diff --git a/dansguardian-general-html.lsp b/dansguardian-general-html.lsp index 10ea6b7..2a4ca5c 100644 --- a/dansguardian-general-html.lsp +++ b/dansguardian-general-html.lsp @@ -1,4 +1,5 @@ <? +require("viewfunctions") local form = ... local data = form.option local service = form.service @@ -6,7 +7,7 @@ local srv1fill = "" local srv2fill = "disabled" - if form.info.status.value == "running" then + if form.info.status.value == "Enabled" then srv1fill = "disabled" srv2fill = "" end @@ -18,7 +19,24 @@ end ?> -<h1>Content Filter</h1> + +<? +--[[ 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.info +local tags = { "status", "version", "autostart", } +displayinfo(myform,tags,"viewonly") +?> +</DL> + <h2>General Information</h2> <p> DansGuardian is web content filtering software. It works as a web proxy, @@ -31,52 +49,64 @@ generally not necessary. DansGuardian must be used in combination with a This page defines the basic network configuration settings for DansGuardian. </p> -<h2>Status</h2> -<dl><dt>Program version</dt><dd><? io.write( form.info.version.value ) ?></dd></dl> -<dl><dt>Process status</dt><dd><? io.write( form.info.status.value ) ?></dd></dl> -<dl><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 applied until you restart the service.</dd></dl> -<form action="" method="POST"> -<dl><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></dl> -</form> - -<p> -<pre class="attention"><? io.write( service.message ) ?></pre> -</p> <form action="" method="POST"> -<h2>Configuration</h2> -<p><pre class=error><? io.write( service.cfgerr ) ?></pre></p> +<h1>Configuration</h1> +<h2>General</h2> <p> These parameters define the interface and port that Dansguardian uses to accept connections. </p> -<dl><dt>filterip</dt><dd><input class="text" type="text" name="filterip" value="<? io.write( config.filterip.value ) ?>" ></dd></dl> -<dl><dt>filterport</dt><dd><input class="text" type="text" name="filterport" value="<? io.write( config.filterport.value ) ?>" ></dd></dl> +<dl> +<dt>filterip</dt><dd><input class="text" type="text" name="filterip" value="<? io.write( config.filterip.value ) ?>" ></dd> +<dt>filterport</dt><dd><input class="text" type="text" name="filterport" value="<? io.write( config.filterport.value ) ?>" ></dd> +</dl> -<h3>Proxy service</h3> +<h2>Proxy service</h2> <p> These parameters define the ip address and port that Dansguardian should forward requests on to. </p> -<dl><dt>proxyip</dt><dd><input class="text" type="text" name="proxyip" value="<? io.write( config.proxyip.value ) ?>"></dd></dl> -<dl><dt>proxyport</dt><dd><input class="text" type="text" name="proxyport" value="<? io.write( config.proxyport.value ) ?>"></dd></dl> +<dl> +<dt>proxyip</dt><dd><input class="text" type="text" name="proxyip" value="<? io.write( config.proxyip.value ) ?>"></dd> +<dt>proxyport</dt><dd><input class="text" type="text" name="proxyport" value="<? io.write( config.proxyport.value ) ?>"></dd> +</dl> -<h3>Filter Actions</h3> +<h2>Filter Actions</h2> <p> These parameters define how sensitive the filter is, and where to redirect requests if the content filter determines that the content is inappropriate. The "naughtynesslimit" is more sensitive the lower it is set. The author recommends 50 for "young children", 100 for "older children" and 160 for "young adults". </p> -<dl><dt>accessdeniedaddress</dt><dd><input class="text" type="text" name="accessdeniedaddress" value="<? io.write( config.accessdeniedaddress.value ) ?>"></dd></dl> -<dl><dt>naughtynesslimit</dt><dd><input class="text" type="text" name="naughtynesslimit" value="<? io.write( config.naughtynesslimit.value ) ?>"></dd></dl> +<dl> +<dt>accessdeniedaddress</dt><dd><input class="text" type="text" name="accessdeniedaddress" value="<? io.write( config.accessdeniedaddress.value ) ?>"></dd> +<dt>naughtynesslimit</dt><dd><input class="text" type="text" name="naughtynesslimit" value="<? io.write( config.naughtynesslimit.value ) ?>"></dd> +</dl> <h2>Save Changes</h2> -<dl><dt>Save the above changes?</dt><dd><input class="submit" type="submit" name="cmd" value="save"></dd></dl> +<dl> +<? +local myform = form.service +local tags = { "cmdsave", } +displayinfo(myform,tags) +?> +<? if (service) and (service.cfgerr) and (#service.cfgerr > 0) then ?> +<DT>Config status</DT><DD class="error"><? io.write(service.cfgerr ) ?></DD> +<? end ?> +<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> +</dl> + </form> +<h1>MANAGEMENT</h1> +<form action="" method="POST"> +<dl> +<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 ) ?>> +<? if (service.message) and (service.message.descr) and (#service.message.descr > 0) then ?><pre><? io.write( service.message.descr ) ?></pre><? end ?></dd> +</dl> +</form> |