summaryrefslogtreecommitdiffstats
path: root/chrony-controller.lua
blob: 487069087d034f98af678c5124fa8d39ff2ddb86 (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
module(..., package.seeall)

require("controllerfunctions")

default_action = "status"

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

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

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

function config(self)
	return controllerfunctions.handle_form(self, self.model.get_config, self.model.update_config, self.clientdata, "Save", "Edit Config", "Configuration Set")
end

function expert(self)
	return controllerfunctions.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit Config File", "Configuration Set")
end