diff options
author | Ted Trask <ttrask01@yahoo.com> | 2013-10-17 19:07:53 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2013-10-17 19:07:53 +0000 |
commit | 2ece009273252437281c8cc0b84ba2ec49e5d07c (patch) | |
tree | 1c082ee4891a4717f2fea09f0df4a8946d9fdb41 /health-controller.lua | |
parent | 0537a242f9709271454252e7897a7709144a3b02 (diff) | |
download | acf-alpine-baselayout-2ece009273252437281c8cc0b84ba2ec49e5d07c.tar.bz2 acf-alpine-baselayout-2ece009273252437281c8cc0b84ba2ec49e5d07c.tar.xz |
Remove all calls to 'module' in preparation for move to Lua 5.2
Use mymodule parameter for module definition.
This was also helpful in revealing places where the code relied on the global environment.
Diffstat (limited to 'health-controller.lua')
-rw-r--r-- | health-controller.lua | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/health-controller.lua b/health-controller.lua index f5cc26c..68f895e 100644 --- a/health-controller.lua +++ b/health-controller.lua @@ -1,26 +1,26 @@ -module (..., package.seeall) +local mymodule = {} -default_action = "system" +mymodule.default_action = "system" -- Public methods -system = function (self ) +mymodule.system = function (self ) return self.model:get_system() end -storage = function (self ) +mymodule.storage = function (self ) return self.model:get_storage() end -network = function (self ) +mymodule.network = function (self ) return self.model:get_network() end -proc = function (self ) +mymodule.proc = function (self ) return self.model:get_proc() end -networkstats = function(self) +mymodule.networkstats = function(self) local retval = self.model.get_networkstats() if self.conf.viewtype == "html" then local intf = self:new("alpine-baselayout/interfaces") @@ -34,3 +34,5 @@ networkstats = function(self) end return retval end + +return mymodule |