Commit 0fa65090 authored by Ted Trask's avatar Ted Trask

Started work on updating for acf-core-0.15

Removed controllerfunctions library (still needs more work and corresponding work in model)
Updated startstop functionality and deleted view
Updated for viewfunctions to htmlviewfunctions and modified require statements for acf libraries
parent 352c44b6
module(..., package.seeall)
-- Load libraries
require("controllerfunctions")
default_action = "status"
function status(self)
......@@ -10,7 +7,7 @@ function status(self)
end
function startstop(self)
return controllerfunctions.handle_startstop(self, self.model.startstop_service, self.clientdata)
return self.handle_form(self, self.model.get_startstop, self.model.startstop_service, self.clientdata)
end
function listfiles(self)
......@@ -18,7 +15,7 @@ function listfiles(self)
end
function expert(self)
return controllerfunctions.handle_form(self, function() return self.model.getfiledetails(self.clientdata.filename) end, self.model.updatefiledetails, self.clientdata, "Save", "Edit Lighttpd File", "File Saved")
return self.handle_form(self, function() return self.model.getfiledetails(self.clientdata.filename) end, self.model.updatefiledetails, self.clientdata, "Save", "Edit Lighttpd File", "File Saved")
end
function logfile(self)
......
<% local data, viewlibrary, page_info, session = ...
require("viewfunctions")
require("htmlviewfunctions")
%>
<% displaycommandresults({"expert"}, session) %>
<% htmlviewfunctions.displaycommandresults({"expert"}, session) %>
<% if viewlibrary and viewlibrary.dispatch_component then
viewlibrary.dispatch_component("status")
......
<% local data, viewlibrary = ...
require("viewfunctions")
%>
<% if viewlibrary and viewlibrary.dispatch_component then
......
......@@ -2,8 +2,8 @@ module(..., package.seeall)
-- Load libraries
require("modelfunctions")
require("fs")
require("format")
fs = require("acf.fs")
format = require("acf.format")
-- Set variables
local processname = "lighttpd"
......@@ -18,8 +18,12 @@ local path = "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
-- ################################################################################
-- PUBLIC FUNCTIONS
function startstop_service(action)
return modelfunctions.startstop_service(processname, action)
function get_startstop(clientdata)
return modelfunctions.get_startstop(processname)
end
function startstop_service(startstop, action)
return modelfunctions.startstop_service(startstop, action)
end
function getstatus()
......
../startstop-html.lsp
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment