summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2012-04-18 01:28:19 +0000
committerTed Trask <ttrask01@yahoo.com>2012-04-18 01:28:19 +0000
commitcd0087e685168f3afba0047dd89561a42edeb550 (patch)
treee4d351297debd6deb48ada91836eb86bc23ad7ad
parent3d3c2c1f444b5d6ef34b1311a7f186e5c5ebd45a (diff)
downloadacf-mdadm-cd0087e685168f3afba0047dd89561a42edeb550.tar.bz2
acf-mdadm-cd0087e685168f3afba0047dd89561a42edeb550.tar.xz
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
-rw-r--r--mdadm-controller.lua7
-rw-r--r--mdadm-details-html.lsp4
-rw-r--r--mdadm-model.lua12
l---------mdadm-startstop-html.lsp1
4 files changed, 12 insertions, 12 deletions
diff --git a/mdadm-controller.lua b/mdadm-controller.lua
index 3e3d1ff..88e6de3 100644
--- a/mdadm-controller.lua
+++ b/mdadm-controller.lua
@@ -1,8 +1,5 @@
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 details(self)
@@ -18,5 +15,5 @@ function details(self)
end
function expert(self)
- return controllerfunctions.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit MDADM Config", "Configuration Set")
+ return self.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit MDADM Config", "Configuration Set")
end
diff --git a/mdadm-details-html.lsp b/mdadm-details-html.lsp
index 8f1363e..ae142cd 100644
--- a/mdadm-details-html.lsp
+++ b/mdadm-details-html.lsp
@@ -1,5 +1,5 @@
<% local data, viewlibrary = ...
-require("viewfunctions")
+require("htmlviewfunctions")
%>
<% viewlibrary.dispatch_component("status") %>
@@ -7,6 +7,6 @@ require("viewfunctions")
<H2><%= html.html_escape(data.label) %></H2>
<DL>
<%
-displayitem(data)
+htmlviewfunctions.displayitem(data)
%>
</DL>
diff --git a/mdadm-model.lua b/mdadm-model.lua
index 0a156ec..401914b 100644
--- a/mdadm-model.lua
+++ b/mdadm-model.lua
@@ -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 configfile = "/etc/mdadm.conf"
@@ -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()
diff --git a/mdadm-startstop-html.lsp b/mdadm-startstop-html.lsp
deleted file mode 120000
index 0ea2627..0000000
--- a/mdadm-startstop-html.lsp
+++ /dev/null
@@ -1 +0,0 @@
-../startstop-html.lsp \ No newline at end of file