diff options
| -rw-r--r-- | bgp-controller.lua | 7 | ||||
| -rw-r--r-- | bgp-details-html.lsp | 1 | ||||
| -rw-r--r-- | bgp-model.lua | 10 | ||||
| l--------- | bgp-startstop-html.lsp | 1 | ||||
| -rw-r--r-- | bgp-welcome-html.lsp | 1 | ||||
| -rw-r--r-- | ospf-controller.lua | 7 | ||||
| -rw-r--r-- | ospf-details-html.lsp | 1 | ||||
| -rw-r--r-- | ospf-model.lua | 10 | ||||
| l--------- | ospf-startstop-html.lsp | 1 | ||||
| -rw-r--r-- | ospf-welcome-html.lsp | 1 | ||||
| -rw-r--r-- | zebra-controller.lua | 7 | ||||
| -rw-r--r-- | zebra-details-html.lsp | 1 | ||||
| -rw-r--r-- | zebra-model.lua | 10 | ||||
| l--------- | zebra-startstop-html.lsp | 1 | ||||
| -rw-r--r-- | zebra-welcome-html.lsp | 1 | 
15 files changed, 27 insertions, 33 deletions
| diff --git a/bgp-controller.lua b/bgp-controller.lua index dfe27e2..15d7658 100644 --- a/bgp-controller.lua +++ b/bgp-controller.lua @@ -1,8 +1,5 @@  module(..., package.seeall) --- Load libraries -require("controllerfunctions") -  default_action = "status"  function status(self) @@ -14,10 +11,10 @@ function details(self)  end  function expert(self) -	return controllerfunctions.handle_form(self, self.model.getconfigfile, self.model.setconfigfile, self.clientdata, "Save", "Edit BGP Config", "BGP Configuration Saved") +	return self.handle_form(self, self.model.getconfigfile, self.model.setconfigfile, self.clientdata, "Save", "Edit BGP Config", "BGP Configuration Saved")  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 diff --git a/bgp-details-html.lsp b/bgp-details-html.lsp index 8f3283b..d8e1e0f 100644 --- a/bgp-details-html.lsp +++ b/bgp-details-html.lsp @@ -1,5 +1,4 @@  <% local data = ...  -require("viewfunctions")  %>  <H2>BGP routes</H2> diff --git a/bgp-model.lua b/bgp-model.lua index db6fb2c..53ba356 100644 --- a/bgp-model.lua +++ b/bgp-model.lua @@ -2,7 +2,7 @@ module(..., package.seeall)  -- Load libraries  require("modelfunctions") -require("format") +format = require("acf.format")  -- Set variables  local path="PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin " @@ -72,8 +72,12 @@ function setconfigfile(filedetails)  	return modelfunctions.setfiledetails(filedetails, {configfile})  end -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 getdetails() diff --git a/bgp-startstop-html.lsp b/bgp-startstop-html.lsp deleted file mode 120000 index 0ea2627..0000000 --- a/bgp-startstop-html.lsp +++ /dev/null @@ -1 +0,0 @@ -../startstop-html.lsp
\ No newline at end of file diff --git a/bgp-welcome-html.lsp b/bgp-welcome-html.lsp index 251c503..baf324a 100644 --- a/bgp-welcome-html.lsp +++ b/bgp-welcome-html.lsp @@ -1,5 +1,4 @@  <% local data, viewlibrary, page_info, session = ...  -require("viewfunctions")  %>  <% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("status") then diff --git a/ospf-controller.lua b/ospf-controller.lua index 23b8fe3..9cabb3b 100644 --- a/ospf-controller.lua +++ b/ospf-controller.lua @@ -1,8 +1,5 @@  module(..., package.seeall) --- Load libraries -require("controllerfunctions") -  default_action = "status"  function status(self) @@ -14,10 +11,10 @@ function details(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 expert(self) -	return controllerfunctions.handle_form(self, self.model.getconfigfile, self.model.setconfigfile, self.clientdata, "Save", "Edit OSPF Config", "OSPF Configuration Saved") +	return self.handle_form(self, self.model.getconfigfile, self.model.setconfigfile, self.clientdata, "Save", "Edit OSPF Config", "OSPF Configuration Saved")  end diff --git a/ospf-details-html.lsp b/ospf-details-html.lsp index 4458c03..5e31849 100644 --- a/ospf-details-html.lsp +++ b/ospf-details-html.lsp @@ -1,5 +1,4 @@  <% local data = ...  -require("viewfunctions")  %>  <H2>OSPF routes</H2> diff --git a/ospf-model.lua b/ospf-model.lua index 67ff868..55154f3 100644 --- a/ospf-model.lua +++ b/ospf-model.lua @@ -2,7 +2,7 @@ module(..., package.seeall)  -- Load libraries  require("modelfunctions") -require("format") +format = require("acf.format")  -- Set variables  local path="PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin " @@ -57,8 +57,12 @@ end  -- ################################################################################  -- 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/ospf-startstop-html.lsp b/ospf-startstop-html.lsp deleted file mode 120000 index 0ea2627..0000000 --- a/ospf-startstop-html.lsp +++ /dev/null @@ -1 +0,0 @@ -../startstop-html.lsp
\ No newline at end of file diff --git a/ospf-welcome-html.lsp b/ospf-welcome-html.lsp index 251c503..baf324a 100644 --- a/ospf-welcome-html.lsp +++ b/ospf-welcome-html.lsp @@ -1,5 +1,4 @@  <% local data, viewlibrary, page_info, session = ...  -require("viewfunctions")  %>  <% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("status") then diff --git a/zebra-controller.lua b/zebra-controller.lua index 6e6f7b3..9d723c7 100644 --- a/zebra-controller.lua +++ b/zebra-controller.lua @@ -1,8 +1,5 @@  module(..., package.seeall) --- Load libraries -require("controllerfunctions") -  default_action = "status"  function status(self) @@ -14,10 +11,10 @@ function details(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 expert(self) -	return controllerfunctions.handle_form(self, self.model.getconfigfile, self.model.setconfigfile, self.clientdata, "Save", "Edit Zebra Config", "Zebra Configuration Saved") +	return self.handle_form(self, self.model.getconfigfile, self.model.setconfigfile, self.clientdata, "Save", "Edit Zebra Config", "Zebra Configuration Saved")  end diff --git a/zebra-details-html.lsp b/zebra-details-html.lsp index 94b5655..84feb45 100644 --- a/zebra-details-html.lsp +++ b/zebra-details-html.lsp @@ -1,5 +1,4 @@  <% local data = ...  -require("viewfunctions")  %>  <H2>Zebra routes</H2> diff --git a/zebra-model.lua b/zebra-model.lua index de0edd4..f09b1a2 100644 --- a/zebra-model.lua +++ b/zebra-model.lua @@ -2,7 +2,7 @@ module(..., package.seeall)  -- Load libraries  require("modelfunctions") -require("format") +format = require("acf.format")  -- Set variables  local path="PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin " @@ -60,8 +60,12 @@ end  -- ################################################################################  -- 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/zebra-startstop-html.lsp b/zebra-startstop-html.lsp deleted file mode 120000 index 0ea2627..0000000 --- a/zebra-startstop-html.lsp +++ /dev/null @@ -1 +0,0 @@ -../startstop-html.lsp
\ No newline at end of file diff --git a/zebra-welcome-html.lsp b/zebra-welcome-html.lsp index 251c503..baf324a 100644 --- a/zebra-welcome-html.lsp +++ b/zebra-welcome-html.lsp @@ -1,5 +1,4 @@  <% local data, viewlibrary, page_info, session = ...  -require("viewfunctions")  %>  <% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("status") then | 
