blob: a6f18b2d4082316e25287c24ac10507dbfc13fc6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
module (..., package.seeall)
--[[
local list_redir = function (self)
self.conf.action = "system"
self.conf.type = "redir"
error (self.conf)
end
mvc={}
mvc.on_load = function(self, parent)
if (self.worker[self.conf.action] == nil ) or ( self.conf.action == "init" ) then
self.worker[self.conf.action] = list_redir(self)
end
end
--]]
mvc={}
mvc.on_load = function(self, parent)
--self.worker[self.conf.default_action] = "system"
self.conf.default_action = "system"
end
-- Public methods
system = function (self )
return ({system = self.model:get_system(), url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} )
end
storage = function (self )
return ({storage = self.model:get_storage(), url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} )
end
network = function (self )
return ({network = self.model:get_network(), url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} )
end
modules = function (self )
return ({modules = self.model:get_modules(), url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} )
end
proc = function (self )
return ({proc = self.model:get_proc(), url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} )
end
|