}, {
key: 'pid',
format: function(v, n) {
- return $('<button />')
- .attr('disabled', !allow_signals)
- .addClass('cbi-button')
- .addClass('cbi-button-reload')
- .text(L.tr('Hang Up'))
- .click(function() { L.system.sendSignal(v, 1).then(status) });
- }
- }, {
- key: 'pid',
- format: function(v, n) {
- return $('<button />')
- .attr('disabled', !allow_signals)
- .addClass('cbi-button')
- .addClass('cbi-button-remove')
- .text(L.tr('Terminate'))
- .click(function() { L.system.sendSignal(v, 15).then(status) });
- }
- }, {
- key: 'pid',
- format: function(v, n) {
- return $('<button />')
- .attr('disabled', !allow_signals)
- .addClass('cbi-button')
- .addClass('cbi-button-reset')
- .text(L.tr('Kill'))
- .click(function() { L.system.sendSignal(v, 9).then(status); });
+ return $('<div />')
+ .addClass('btn-group')
+ .append($('<button />')
+ .addClass('btn btn-primary btn-sm dropdown-toggle')
+ .attr('data-toggle', 'dropdown')
+ .text(L.tr('Signal…')))
+ .append($('<ul />')
+ .addClass('dropdown-menu pull-right')
+ .append($('<li />')
+ .append($('<a />')
+ .attr('href', '#')
+ .html('%s (<code>%s</code>)'.format(L.trc('UNIX signal', 'Reload'), 'HUP'))
+ .click(function(ev) { L.system.sendSignal(v, 1).then(status); ev.preventDefault(); })))
+ .append($('<li />')
+ .append($('<a />')
+ .attr('href', '#')
+ .html('%s (<code>%s</code>)'.format(L.trc('UNIX signal', 'Terminate'), 'TERM'))
+ .click(function(ev) { L.system.sendSignal(v, 15).then(status); ev.preventDefault(); })))
+ .append($('<li />')
+ .append($('<a />')
+ .attr('href', '#')
+ .html('%s (<code>%s</code>)'.format(L.trc('UNIX signal', 'Kill immediately'), 'KILL'))
+ .click(function(ev) { L.system.sendSignal(v, 9).then(status); ev.preventDefault(); }))))
}
} ]
});