2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * displays the server status > processes list
9 require_once 'libraries/common.inc.php';
10 require_once 'libraries/server_common.inc.php';
11 require_once 'libraries/ServerStatusData.class.php';
12 require_once 'libraries/server_status_processes.lib.php';
18 $GLOBALS['replication_info'] = array();
19 $GLOBALS['replication_info']['master']['status'] = false;
20 $GLOBALS['replication_info']['slave']['status'] = false;
22 include_once 'libraries/replication.inc.php';
23 include_once 'libraries/replication_gui.lib.php';
26 $ServerStatusData = new PMA_ServerStatusData();
27 $response = PMA_Response
::getInstance();
30 * Kills a selected process
33 if ($response->isAjax() && !empty($_REQUEST['kill'])) {
34 $query = $GLOBALS['dbi']->getKillQuery((int)$_REQUEST['kill']);
35 if ($GLOBALS['dbi']->tryQuery($query)) {
36 $message = PMA_Message
::success(__('Thread %s was successfully killed.'));
37 $response->isSuccess(true);
39 $message = PMA_Message
::error(
41 'phpMyAdmin was unable to kill thread %s.'
42 . ' It probably has already been closed.'
45 $response->isSuccess(false);
47 $message->addParam($_REQUEST['kill']);
48 $response->addJSON('message', $message);
49 } elseif ($response->isAjax() && !empty($_REQUEST['refresh'])) {
50 // Only sends the process list table
51 $response->addHTML(PMA_getHtmlForServerProcessList());
54 $header = $response->getHeader();
55 $scripts = $header->getScripts();
56 $scripts->addFile('server_status_processes.js');
57 $response->addHTML('<div>');
58 $response->addHTML($ServerStatusData->getMenuHtml());
59 $response->addHTML(PMA_getHtmlForServerProcesses());
60 $response->addHTML('</div>');