summaryrefslogtreecommitdiffstats
path: root/ipsectools-controller.lua
blob: 3ce18961a482da2e4b2178770d5ae36f67b35ebb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
module(..., package.seeall)

-- Load libraries
require("controllerfunctions")

-- ################################################################################
-- LOCAL FUNCTIONS

-- ################################################################################
-- PUBLIC FUNCTIONS

default_action = "status"

function status(self)
	return self.model.getstatus()
end

function startstop(self)
	return controllerfunctions.handle_startstop(self, self.model.startstop_service, self.model.getstatus, self.clientdata)
end

function details(self)
	return self.model.getstatusdetails()
end

function editracoon (self)
	return controllerfunctions.handle_form(self, self.model.get_racoonfiledetails, self.model.update_racoonfiledetails, self.clientdata, "Save", "Edit Racoon Config", "Configuration Set")
end

function editipsec (self)
	return controllerfunctions.handle_form(self, self.model.get_ipsecfiledetails, self.model.update_ipsecfiledetails, self.clientdata, "Save", "Edit IPSec Config", "Configuration Set")
end