Translated using Weblate (Bulgarian)
[phpmyadmin.git] / server_status_processes.php
blob2ddd7490e580dbbeb3b8a0c52ac3bc04db179a20
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\DatabaseInterface;
12 use PhpMyAdmin\Response;
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 /** @var Response $response */
23 $response = $containerBuilder->get(Response::class);
25 /** @var DatabaseInterface $dbi */
26 $dbi = $containerBuilder->get(DatabaseInterface::class);
28 /** @var ProcessesController $controller */
29 $controller = $containerBuilder->get(ProcessesController::class);
31 if ($response->isAjax() && ! empty($_POST['kill'])) {
32 $response->addJSON($controller->kill([
33 'kill' => $_POST['kill'],
34 ]));
35 } elseif ($response->isAjax() && ! empty($_POST['refresh'])) {
36 $response->addHTML($controller->refresh([
37 'showExecuting' => $_POST['showExecuting'] ?? null,
38 'full' => $_POST['full'] ?? null,
39 'column_name' => $_POST['column_name'] ?? null,
40 'order_by_field' => $_POST['order_by_field'] ?? null,
41 'sort_order' => $_POST['sort_order'] ?? null,
42 ]));
43 } else {
44 $header = $response->getHeader();
45 $scripts = $header->getScripts();
46 $scripts->addFile('server/status/processes.js');
48 $response->addHTML($controller->index([
49 'showExecuting' => $_POST['showExecuting'] ?? null,
50 'full' => $_POST['full'] ?? null,
51 'column_name' => $_POST['column_name'] ?? null,
52 'order_by_field' => $_POST['order_by_field'] ?? null,
53 'sort_order' => $_POST['sort_order'] ?? null,
54 ]));