diff options
author | Ted Trask <ttrask01@yahoo.com> | 2012-04-18 01:20:36 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2012-04-18 01:20:36 +0000 |
commit | 2e998a74933a039aa12bb9ce70f5a27d07bcc1cf (patch) | |
tree | f2ccbbe6fc490110ace2ac78b57f63f6d1220773 | |
parent | 99476b8cea8eefe835582d4609b53f9bfb44be7b (diff) | |
download | acf-iproute2-qos-2e998a74933a039aa12bb9ce70f5a27d07bcc1cf.tar.bz2 acf-iproute2-qos-2e998a74933a039aa12bb9ce70f5a27d07bcc1cf.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-- | qos-config-html.lsp | 4 | ||||
-rw-r--r-- | qos-controller.lua | 9 | ||||
-rw-r--r-- | qos-details-html.lsp | 4 | ||||
-rw-r--r-- | qos-model.lua | 12 |
4 files changed, 15 insertions, 14 deletions
diff --git a/qos-config-html.lsp b/qos-config-html.lsp index 31c965a..02f0d2a 100644 --- a/qos-config-html.lsp +++ b/qos-config-html.lsp @@ -1,10 +1,10 @@ <% local form, viewlibrary, page_info = ... -require("viewfunctions") +require("htmlviewfunctions") %> <H1><%= html.html_escape(form.label) %></H1> <% local order = {"DEV", "DEV_RATE", "INGRESS_ALG", "IFB_DEV", "INGRESS_RATE", "EGRESS_ALG", "EGRESS_RATE"} form.value.DEV.readonly = true - displayform(form, order, nil, page_info) + htmlviewfunctions.displayform(form, order, nil, page_info) %> diff --git a/qos-controller.lua b/qos-controller.lua index c3358e8..703061a 100644 --- a/qos-controller.lua +++ b/qos-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, function(action) return self.model.startstop_service(self.clientdata.init, action) end, self.clientdata) + return self.handle_form(self, self.model.get_startstop, self.model.startstop_service, self.clientdata) end function details(self) @@ -22,9 +19,9 @@ function enable(self) end function config(self) - return controllerfunctions.handle_form(self, function() return self.model.get_config(self.clientdata.DEV) end, self.model.update_config, self.clientdata, "Save", "Edit QOS Config", "Configuration Set") + return self.handle_form(self, function() return self.model.get_config(self.clientdata.DEV) end, self.model.update_config, self.clientdata, "Save", "Edit QOS Config", "Configuration Set") end function expert(self) - return controllerfunctions.handle_form(self, function() return self.model.get_filedetails(self.clientdata.interface) end, self.model.update_filedetails, self.clientdata, "Save", "Edit QOS Config", "Configuration Set") + return self.handle_form(self, function() return self.model.get_filedetails(self.clientdata.interface) end, self.model.update_filedetails, self.clientdata, "Save", "Edit QOS Config", "Configuration Set") end diff --git a/qos-details-html.lsp b/qos-details-html.lsp index d5516bc..156fa81 100644 --- a/qos-details-html.lsp +++ b/qos-details-html.lsp @@ -1,8 +1,8 @@ <% local data, viewlibrary, page_info, session = ... -require("viewfunctions") +require("htmlviewfunctions") %> -<% displaycommandresults({"enable","config","expert","startstop"}, session) %> +<% htmlviewfunctions.displaycommandresults({"enable","config","expert","startstop"}, session) %> <% viewlibrary.dispatch_component("status") %> diff --git a/qos-model.lua b/qos-model.lua index 81ba993..693ab5e 100644 --- a/qos-model.lua +++ b/qos-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 packagename = "iproute2-qos" @@ -52,8 +52,12 @@ end -- ################################################################################ -- PUBLIC FUNCTIONS -function startstop_service(processname, 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() |