Translated using Weblate (Russian)
[phpmyadmin.git] / server_status_queries.php
blobb0d7fc066eba676dea995e2786c28b9719c5e9dd
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 /**
5 * Displays query statistics for the server
7 * @package PhpMyAdmin
8 */
10 use PhpMyAdmin\Response;
11 use PhpMyAdmin\Message;
12 use PhpMyAdmin\ServerStatusData;
14 require_once 'libraries/common.inc.php';
15 require_once 'libraries/server_common.inc.php';
16 require_once 'libraries/server_status_queries.lib.php';
17 require_once 'libraries/replication.inc.php';
18 require_once 'libraries/replication_gui.lib.php';
20 $serverStatusData = new ServerStatusData();
22 $response = Response::getInstance();
23 $header = $response->getHeader();
24 $scripts = $header->getScripts();
26 // for charting
27 $scripts->addFile('chart.js');
28 $scripts->addFile('vendor/jqplot/jquery.jqplot.js');
29 $scripts->addFile('vendor/jqplot/plugins/jqplot.pieRenderer.js');
30 $scripts->addFile('vendor/jqplot/plugins/jqplot.highlighter.js');
31 $scripts->addFile('vendor/jqplot/plugins/jqplot.enhancedPieLegendRenderer.js');
32 $scripts->addFile('vendor/jquery/jquery.tablesorter.js');
33 $scripts->addFile('server_status_sorter.js');
34 $scripts->addFile('server_status_queries.js');
36 // Add the html content to the response
37 $response->addHTML('<div>');
38 $response->addHTML($serverStatusData->getMenuHtml());
39 if ($serverStatusData->dataLoaded) {
40 $response->addHTML(PMA_getHtmlForQueryStatistics($serverStatusData));
41 } else {
42 $response->addHTML(
43 Message::error(
44 __('Not enough privilege to view query statistics.')
45 )->getDisplay()
48 $response->addHTML('</div>');
49 exit;