2 title: L.tr('Processes'),
3 description: L.tr('This list gives an overview over currently running system processes and their status.'),
5 var allow_signals = this.options.acls.status;
6 return L.system.getProcessList().then(function(list) {
7 var procTable = new L.ui.table({
12 caption: L.tr('Owner'),
15 caption: L.tr('Command'),
18 caption: L.tr('CPU usage (%)'),
22 caption: L.tr('Memory usage (%)'),
27 format: function(v, n) {
29 .addClass('btn-group')
30 .append($('<button />')
31 .addClass('btn btn-primary btn-sm dropdown-toggle')
32 .attr('data-toggle', 'dropdown')
33 .text(L.tr('Signal…')))
35 .addClass('dropdown-menu pull-right')
39 .html('%s (<code>%s</code>)'.format(L.trc('UNIX signal', 'Reload'), 'HUP'))
40 .click(function(ev) { L.system.sendSignal(v, 1).then(status); ev.preventDefault(); })))
44 .html('%s (<code>%s</code>)'.format(L.trc('UNIX signal', 'Terminate'), 'TERM'))
45 .click(function(ev) { L.system.sendSignal(v, 15).then(status); ev.preventDefault(); })))
49 .html('%s (<code>%s</code>)'.format(L.trc('UNIX signal', 'Kill immediately'), 'KILL'))
50 .click(function(ev) { L.system.sendSignal(v, 9).then(status); ev.preventDefault(); }))))
56 procTable.insertInto('#process_table');