diff options
author | Ted Trask <ttrask01@yahoo.com> | 2009-07-10 10:35:21 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2009-07-10 10:35:21 +0000 |
commit | 6b961ce2c357c605a9643af00ce2ccd658bf3f7a (patch) | |
tree | 860b187112547870d042769677f4de66c25ea810 /gnats-controller.lua | |
parent | a013e49aab5d4292662f85d1a6794823dcc2ff49 (diff) | |
download | acf-gnats-master.tar.bz2 acf-gnats-master.tar.xz |
The previous version is obsolete, pointing only to dev.alpinelinux.org server, which is no longer in use
Rewrite started, but still incomplete
Diffstat (limited to 'gnats-controller.lua')
-rw-r--r-- | gnats-controller.lua | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/gnats-controller.lua b/gnats-controller.lua index 7668866..c82ccdc 100644 --- a/gnats-controller.lua +++ b/gnats-controller.lua @@ -1,6 +1,7 @@ module(..., package.seeall) -- Load libraries +require("controllerfunctions") require("format") -- Set variables @@ -100,13 +101,32 @@ local descr = { -- ################################################################################ -- PUBLIC FUNCTIONS -default_action = "query" +default_action = "status" function status(self) - return { status=self.model.getstatus() } + return self.model.getstatus() +end + +function listdatabases(self) + return self.model.list_databases() +end + +function listdatabasefiles(self) + return self.model.list_database_files(self.clientdata.database) +end + +function editdatabsefile(self) + return controllerfunctions.handle_form(self, function() return self.model.read_database_file(self.clientdata.filename) end, self.model.update_database_file, self.clientdata, "Save", "Edit File", "File Saved") +end + +function listconfigfiles(self) + return self.model.list_config_files() +end + +function editconfigfile(self) + return controllerfunctions.handle_form(self, function() return self.model.read_config_file(self.clientdata.filename) end, self.model.update_config_file, self.clientdata, "Save", "Edit File", "File Saved") end ----[[ function expert(self) local url = self.conf.script .. self.conf.prefix .. self.conf.controller |