mirror of
https://github.com/lxsang/antd-web-apps
synced 2025-07-26 10:39:46 +02:00
add remote building script support
This commit is contained in:
19
apps/controllers/ScriptController.lua
Normal file
19
apps/controllers/ScriptController.lua
Normal file
@ -0,0 +1,19 @@
|
||||
BaseController:subclass("ScriptController", {
|
||||
registry = {}
|
||||
})
|
||||
|
||||
function ScriptController:index( name )
|
||||
local path = WWW_ROOT..DIR_SEP.."assets"..DIR_SEP.."shs"..DIR_SEP..name..".sh"
|
||||
|
||||
if ulib.exists(path) then
|
||||
std.header("text/plain")
|
||||
std.f(path)
|
||||
else
|
||||
self:error("No script found")
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function ScriptController:actionnotfound(...)
|
||||
return self:index(table.unpack({...}))
|
||||
end
|
13
apps/controllers/WebVNCController.lua
Normal file
13
apps/controllers/WebVNCController.lua
Normal file
@ -0,0 +1,13 @@
|
||||
BaseController:subclass("WebVNCController", {
|
||||
registry = {}
|
||||
})
|
||||
|
||||
function WebVNCController:index( ... )
|
||||
self.template:set("args", "['WebVNC']")
|
||||
return true
|
||||
end
|
||||
|
||||
function WebVNCController:actionnotfound(...)
|
||||
self.template:setView("index")
|
||||
return self:index(table.unpack({...}))
|
||||
end
|
@ -1,13 +0,0 @@
|
||||
BaseController:subclass("WvncController", {
|
||||
registry = {}
|
||||
})
|
||||
|
||||
function WvncController:index( ... )
|
||||
self.template:set("args", "['WVNC', 'wss://localhost:9192/wvnc', '#canvas']")
|
||||
return true
|
||||
end
|
||||
|
||||
function WvncController:actionnotfound(...)
|
||||
self.template:setView("index")
|
||||
return self:index(table.unpack({...}))
|
||||
end
|
Reference in New Issue
Block a user