diff options
author | Andreas Brodmann <andreas.brodmann@gmail.com> | 2007-12-28 08:23:22 +0000 |
---|---|---|
committer | Andreas Brodmann <andreas.brodmann@gmail.com> | 2007-12-28 08:23:22 +0000 |
commit | 269ff2d1bf02a57311d0682b16e937ab5d44b347 (patch) | |
tree | 0095acb56c724037b4cafd930004f81e1c5577c7 /squid-controller.lua | |
parent | 4bbff2d10dbd88bb8781ada7c6e0549b51032018 (diff) | |
download | acf-squid-269ff2d1bf02a57311d0682b16e937ab5d44b347.tar.bz2 acf-squid-269ff2d1bf02a57311d0682b16e937ab5d44b347.tar.xz |
work in progress on controller and model
git-svn-id: svn://svn.alpinelinux.org/acf/squid/trunk@458 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'squid-controller.lua')
-rw-r--r-- | squid-controller.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/squid-controller.lua b/squid-controller.lua index 4d3ffa5..c37b05b 100644 --- a/squid-controller.lua +++ b/squid-controller.lua @@ -46,6 +46,25 @@ basic = function( self ) end end + if self.clientdata.cmd then + local cmd = self.clientdata.cmd + if cmd == "save" then + local newconfig = { proxyip = { value=self.clientdata.proxyip, type="text", label="" }, + proxyport = { value=self.clientdata.proxyport, type="text", label="" }, + filterip = { value=self.clientdata.filterip, type="text", label="" }, + filterport = { value=self.clientdata.filterport, type="text", label="" }, + filterregex = { value=self.clientdata.filterregex, type="text", label="" }, + safeports = { value=self.clientdata.safeports, type="text", label="" }, + sslports = { value=self.clientdata.sslports, type="text", label="" }, + accesslog = { value=self.clientdata.accesslog, type="select", label="", option={ "yes", "no" } }, + diskcache = { value=self.clientdata.diskcache, type="select", label="", option={ "yes", "no" } }, + authmethod = { value=self.clientdata.authmethod, type="text", label="" } + } + + self.model.update_basic_config( newconfig ) + end + end + service.status = self.model.get_status() service.config, service.error = self.model.get_basic_config() |