Globally reduce copyright headers
[project/luci.git] / modules / luci-mod-admin-full / luasrc / model / cbi / admin_status / processes.lua
1 -- Copyright 2008 Steven Barth <steven@midlink.org>
2 -- Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
3 -- Licensed to the public under the Apache License 2.0.
4
5 f = SimpleForm("processes", translate("Processes"), translate("This list gives an overview over currently running system processes and their status."))
6 f.reset = false
7 f.submit = false
8
9 t = f:section(Table, luci.sys.process.list())
10 t:option(DummyValue, "PID", translate("PID"))
11 t:option(DummyValue, "USER", translate("Owner"))
12 t:option(DummyValue, "COMMAND", translate("Command"))
13 t:option(DummyValue, "%CPU", translate("CPU usage (%)"))
14 t:option(DummyValue, "%MEM", translate("Memory usage (%)"))
15
16 hup = t:option(Button, "_hup", translate("Hang Up"))
17 hup.inputstyle = "reload"
18 function hup.write(self, section)
19         null, self.tag_error[section] = luci.sys.process.signal(section, 1)
20 end
21
22 term = t:option(Button, "_term", translate("Terminate"))
23 term.inputstyle = "remove"
24 function term.write(self, section)
25         null, self.tag_error[section] = luci.sys.process.signal(section, 15)
26 end
27
28 kill = t:option(Button, "_kill", translate("Kill"))
29 kill.inputstyle = "reset"
30 function kill.write(self, section)
31         null, self.tag_error[section] = luci.sys.process.signal(section, 9)
32 end
33
34 return f