summaryrefslogtreecommitdiffstats
path: root/squid-controller.lua
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 /squid-controller.lua
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
Diffstat (limited to 'squid-controller.lua')
-rw-r--r--squid-controller.lua23
1 files changed, 22 insertions, 1 deletions
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
+
+