summaryrefslogtreecommitdiffstats
path: root/squid-basic-html.lsp
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2008-05-05 15:44:37 +0000
committerMika Havela <mika.havela@gmail.com>2008-05-05 15:44:37 +0000
commit1b8bad95d1204e4f3f90bfe4f212870d09c44918 (patch)
tree67fc5130f8dae4d489876f444ad682e7cffe6eca /squid-basic-html.lsp
parentea937c7c3628041c298289c3859a95a63ba09f47 (diff)
downloadacf-squid-1b8bad95d1204e4f3f90bfe4f212870d09c44918.tar.bz2
acf-squid-1b8bad95d1204e4f3f90bfe4f212870d09c44918.tar.xz
Moved around the information on the view-files to reflect the same layout as other ACF's.
Added information on autostart sequence. Fetch programversion the same way as other acf's do (apk_version -v). git-svn-id: svn://svn.alpinelinux.org/acf/squid/trunk@1102 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'squid-basic-html.lsp')
-rw-r--r--squid-basic-html.lsp80
1 files changed, 43 insertions, 37 deletions
diff --git a/squid-basic-html.lsp b/squid-basic-html.lsp
index e92c3cd..ab96ea8 100644
--- a/squid-basic-html.lsp
+++ b/squid-basic-html.lsp
@@ -1,4 +1,6 @@
<?
+require("viewfunctions")
+
local form = ...
local data = form.option
local service = form.service
@@ -18,7 +20,16 @@
end
?>
-<h1>Web Proxy</h1>
+
+<H1>SYSTEM INFO</H1>
+<DL>
+<?
+local myform = form.info
+local tags = { "status", "version", "autostart", }
+displayinfo(myform,tags,"viewonly")
+?>
+</DL>
+
<H2>General information</H2>
<p>
Squid is a web proxy server. It makes web requests in behalf of the client, and
@@ -28,39 +39,20 @@ web surfing faster. Squid can also forward its requests on to a content filter,
such as DansGuardian.</p>
<p>This page determines the general operational settings for squid.</p><p></p>
-<h2>Status</h2>
+<h1>Configuration</h1>
<form action="" method="POST">
-<dl>
-<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>
-</dl>
-<p class="error"><? io.write( service.message ) ?></p>
-</form>
-
-<p></p>
+<h2>Primary Listener service</h2>
+<p>These parameters define the interface and port that the web proxy uses to accept connections.</p>
-<h2>Configuration</h2>
-<form action="" method="POST">
<dl>
-<DT>Config status</DT><DD class="error"><? io.write(service.error ) ?></DD>
+<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>
-<p></p>
-<h3>Primary Listener service</h3>
-<p>These parameters define the interface and port that the web proxy uses to accept connections.</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>
-
-<p></p>
-<h3>Filter Service</h3>
+<h2>Filter Service</h2>
<p>These parameters define the ip address and port that the web proxy forwards requests to.
This is typically the address that DansGuardian (Web Content Filter) is listening on.
If you want this web proxy to handle retrieving the content, then leave these blank.</p>
@@ -74,8 +66,7 @@ It is safe to leave this at the default settings.</p>
<dt>FilterRegex</dt><dd><input class="text" type="text" name="filterregex" value="<? io.write( config.filterregex.value ) ?>"></dd>
</dl>
-<p></p>
-<h3>Access Logs</h3>
+<h2>Access Logs</h2>
<p>This determines if the visited sites are logged or not.</p>
<dl>
<dt>Log visited sites</dt>
@@ -83,8 +74,7 @@ It is safe to leave this at the default settings.</p>
<input type="radio" name="accesslog" value="yes"<? ifthen( config.accesslog.value, "yes", " checked" ); ?>> Use access log</dd>
</dl>
-<p></p>
-<h3>Disk Cache Parameters</h3>
+<h2>Disk Cache Parameters</h2>
<p>This determines if the disk is used for caching. This can speed up web surfing when many clients are accessing the Internet,
but it requires a local hard disk.</p>
@@ -94,22 +84,38 @@ but it requires a local hard disk.</p>
<input class="radio" type="radio" name="diskcache" value="yes"<? ifthen( config.diskcache.value, "yes", " checked" ); ?>>Yes</dd>
</dl>
-<p></p>
-<h3>Allowed Ports</h3>
+<h2>Allowed Ports</h2>
<p>Web servers typically run on port 80; SSL (https) servers typically run on port 443. Some web
servers run on other ports as well. These fields list all ports and port ranges that are considered
"safe" for the web proxy to handle.</p>
-
<p>It is safe to leave these values at their default values.</p>
<dl>
-<dt>Safe_ports</dt><dd><input class="text" type="text" name="safeports" value="<? io.write( config.safeports.value ) ?>></dd>
+<dt>Safe_ports</dt><dd><input class="text" type="text" name="safeports" value="<? io.write( config.safeports.value ) ?>"></dd>
<dt>SSL_ports</dt><dd><input class="text" type="text" name="sslports" value="<? io.write( config.sslports.value ) ?>"></dd>
</dl>
-<p></p>
<h2>Save changes</h2>
<dl>
<DT>Save above changes</DT><DD><input class="submit" type="submit" name="cmd" value="save"></DD>
+<? if #service.error > 0 then ?>
+<DT>Config status</DT><DD class="error"><? io.write(service.error ) ?></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 > 0 then ?><pre><? io.write( service.message ) ?></pre><? end ?></dd>
+</dl>
+</form>
+