Translated using Weblate (Portuguese)
[phpmyadmin.git] / server_status_processes.php
bloba4807ecb320a0092d09c2cf2172fa34ae89b0f22
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * displays the server status > processes list
6 * @package PhpMyAdmin
7 */
8 declare(strict_types=1);
10 use PhpMyAdmin\Controllers\Server\Status\ProcessesController;
11 use PhpMyAdmin\Response;
12 use PhpMyAdmin\Server\Status\Data;
14 if (! defined('ROOT_PATH')) {
15 define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
18 require_once ROOT_PATH . 'libraries/common.inc.php';
19 require_once ROOT_PATH . 'libraries/server_common.inc.php';
20 require_once ROOT_PATH . 'libraries/replication.inc.php';
22 $response = Response::getInstance();
24 $controller = new ProcessesController(
25 $response,
26 $GLOBALS['dbi'],
27 new Data()
30 if ($response->isAjax() && ! empty($_POST['kill'])) {
31 $response->addJSON($controller->kill([
32 'kill' => $_POST['kill'],
33 ]));
34 } elseif ($response->isAjax() && ! empty($_POST['refresh'])) {
35 $response->addHTML($controller->refresh([
36 'showExecuting' => $_POST['showExecuting'] ?? null,
37 'full' => $_POST['full'] ?? null,
38 'column_name' => $_POST['column_name'] ?? null,
39 'order_by_field' => $_POST['order_by_field'] ?? null,
40 'sort_order' => $_POST['sort_order'] ?? null,
41 ]));
42 } else {
43 $header = $response->getHeader();
44 $scripts = $header->getScripts();
45 $scripts->addFile('server_status_processes.js');
47 $response->addHTML($controller->index([
48 'showExecuting' => $_POST['showExecuting'] ?? null,
49 'full' => $_POST['full'] ?? null,
50 'column_name' => $_POST['column_name'] ?? null,
51 'order_by_field' => $_POST['order_by_field'] ?? null,
52 'sort_order' => $_POST['sort_order'] ?? null,
53 ]));