summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2008-05-07 15:11:42 +0000
committerMika Havela <mika.havela@gmail.com>2008-05-07 15:11:42 +0000
commit0e19fe4313b6ddd0e349fc627d7aa763a1a788d5 (patch)
tree153b8c40491c6ba6fadb783eb3e73b8828eab1ba
parent064e8596773fef919fdd159788d1b69fd9df13e2 (diff)
downloadacf-squid-0e19fe4313b6ddd0e349fc627d7aa763a1a788d5.tar.bz2
acf-squid-0e19fe4313b6ddd0e349fc627d7aa763a1a788d5.tar.xz
Adding a status-tab and moving some information there (from the other pages).
git-svn-id: svn://svn.alpinelinux.org/acf/squid/trunk@1110 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r--squid-authentication-html.lsp12
-rw-r--r--squid-basic-html.lsp10
-rw-r--r--squid-controller.lua23
-rw-r--r--squid-status-html.lsp30
-rw-r--r--squid.menu3
-rw-r--r--squid.roles4
6 files changed, 56 insertions, 26 deletions
diff --git a/squid-authentication-html.lsp b/squid-authentication-html.lsp
index 621d4c9..a9e9280 100644
--- a/squid-authentication-html.lsp
+++ b/squid-authentication-html.lsp
@@ -30,18 +30,6 @@ 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
-inspecting the returned and optionally caches that content so that the next time
-a client request is made, the content can be served from local disk. This can make
-web surfing faster. Squid can also forward its requests on to a content filter,
-such as DansGuardian.
-</p>
-<p>
-This page lets you modify the authentication scheme of squid.
-</p>
-
<h1>Configuration</h1>
<h2>Authentication Scheme</h2>
<form action="" method="POST">
diff --git a/squid-basic-html.lsp b/squid-basic-html.lsp
index e084ddb..c1dacd9 100644
--- a/squid-basic-html.lsp
+++ b/squid-basic-html.lsp
@@ -30,16 +30,6 @@ 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
-inspecting the returned and optionally caches that content so that the next time
-a client request is made, the content can be served from local disk. This can make
-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>
-
-
<h1>Configuration</h1>
<form action="" method="POST">
<h2>Primary Listener service</h2>
diff --git a/squid-controller.lua b/squid-controller.lua
index b1f5cd1..a4b049c 100644
--- a/squid-controller.lua
+++ b/squid-controller.lua
@@ -2,7 +2,7 @@
module (..., package.seeall)
-default_action = "basic"
+default_action = "status"
dep = function( self )
@@ -20,6 +20,25 @@ dep = function( self )
return
end
+status = function( self )
+
+ local info = {
+ status=self.model.get_status(),
+ version = self.model.get_squid_version(),
+ autostart = self.model.get_autostart(),
+ srvctrl = { value = srvctrl}
+ }
+
+ local option = { script = ENV["SCRIPT_NAME"],
+ prefix = self.conf.prefix,
+ controller = self.conf.controller,
+ action = self.conf.action,
+ extra = ""
+ }
+
+ return ( cfe ({ option = option, info = info }) )
+end
+
basic = function( self )
local service = {}
@@ -208,3 +227,5 @@ saccess = function( self )
return ( cfe ({ option = option, service = service }) )
end
+
+
diff --git a/squid-status-html.lsp b/squid-status-html.lsp
new file mode 100644
index 0000000..806318f
--- /dev/null
+++ b/squid-status-html.lsp
@@ -0,0 +1,30 @@
+<? local form = ...
+require("viewfunctions")
+?>
+
+<?
+--[[ 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>
+Squid is a web proxy server. It makes web requests in behalf of the client, and
+inspecting the returned and optionally caches that content so that the next time
+a client request is made, the content can be served from local disk. This can make
+web surfing faster. Squid can also forward its requests on to a content filter,
+such as DansGuardian.</p>
+
+
diff --git a/squid.menu b/squid.menu
index 7493b53..359f8db 100644
--- a/squid.menu
+++ b/squid.menu
@@ -1,7 +1,8 @@
# Prefix and controller are already known at this point
# Cat Group Tab Action
+Applications 10Web_Proxy Status status
Applications 10Web_Proxy Basic basic
-Applications 10Web_Proxy Advanced advanced
+Applications 10Web_Proxy Advanced advanced
Applications 10Web_Proxy Authentication authentication
Applications 10Web_Proxy Auth_Digest digest
Applications 10Web_Proxy Special_Access saccess
diff --git a/squid.roles b/squid.roles
index 2a8df4c..93d6b33 100644
--- a/squid.roles
+++ b/squid.roles
@@ -1,2 +1,2 @@
-READ=squid:basic
-UPDATE=squid:dep,squid:authentication,squid:advanced,squid:digest,squid:saccess
+READ=squid:status
+UPDATE=squid:basic,squid:dep,squid:authentication,squid:advanced,squid:digest,squid:saccess