Big fix for kill button and autoRefresh button on server_status_processes.php page.
Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
This commit is contained in:
parent
b7ee22a203
commit
84d0e8045b
@ -51,11 +51,11 @@ class ProcessList {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
killProcessHandler (event) {
|
||||
killProcessHandler (event, elementRef) {
|
||||
event.preventDefault();
|
||||
var url = $(this).attr('href');
|
||||
var url = $(elementRef).attr('href');
|
||||
// Get row element of the process to be killed.
|
||||
var $tr = $(this).closest('tr');
|
||||
var $tr = $(elementRef).closest('tr');
|
||||
$.getJSON(url, function (data) {
|
||||
// Check if process was killed or not.
|
||||
if (data.hasOwnProperty('success') && data.success) {
|
||||
@ -104,7 +104,7 @@ class ProcessList {
|
||||
this.refresh,
|
||||
interval
|
||||
);
|
||||
});
|
||||
}.bind(this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -8,11 +8,9 @@ import processList from './classes/Server/ProcessList';
|
||||
export function onload1 () {
|
||||
processList.init();
|
||||
// Bind event handler for kill_process
|
||||
$('#tableprocesslist').on(
|
||||
'click',
|
||||
'a.kill_process',
|
||||
processList.killProcessHandler
|
||||
);
|
||||
$('#tableprocesslist').on('click', 'a.kill_process', function (event) {
|
||||
processList.killProcessHandler(event, this);
|
||||
});
|
||||
// Bind event handler for toggling refresh of process list
|
||||
$('a#toggleRefresh').on('click', function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user