module(..., package.seeall) -- Load libraries require("controllerfunctions") default_action = "status" function status(self) return self.model.getstatus() end function config(self) return controllerfunctions.handle_form(self, self.model.read_config, self.model.update_config, self.clientdata, "Save", "Edit Config", "Configuration Saved") end function startstop(self) return controllerfunctions.handle_startstop(self, 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 Config", "Configuration Saved") end function listrrd(self) local configfiles = self.model.getrrdlist() local config = {} return cfe({ type="list", value=configfiles, label="RoundRobinDatabase (rrd) files" }) end