summaryrefslogtreecommitdiffstats
path: root/syslog-controller.lua
blob: 5bd65c43c993a24345b6f3672aea552c44a0023b (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
module(..., package.seeall)
require("controllerfunctions")

default_action = "loginfo"

function loginfo(self)
	return self.model.getlogging()
end

function config(self)
	return controllerfunctions.handle_form(self, self.model.getconfig, self.model.updateconfig, 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", "Configuration Set")
end

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

function status(self)
	status = self.model.getstatus()
	version = self.model.getversion()
	return cfe({ type="group", value={status=status, version=version} })
end