Translated using Weblate (Slovenian)
[phpmyadmin.git] / server_status_queries.php
blobbe539fb2d6292a69d1eef38a428d7b49ab4635c0
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 PMA\libraries\Message;
11 use PMA\libraries\ServerStatusData;
13 require_once 'libraries/common.inc.php';
14 require_once 'libraries/server_common.inc.php';
15 require_once 'libraries/server_status_queries.lib.php';
16 require_once 'libraries/replication.inc.php';
17 require_once 'libraries/replication_gui.lib.php';
19 $serverStatusData = new ServerStatusData();
21 $response = PMA\libraries\Response::getInstance();
22 $header = $response->getHeader();
23 $scripts = $header->getScripts();
24 $scripts->addFile('server_status_queries.js');
26 // for charting
27 $scripts->addFile('chart.js');
28 $scripts->addFile('jqplot/jquery.jqplot.js');
29 $scripts->addFile('jqplot/plugins/jqplot.pieRenderer.js');
30 $scripts->addFile('jqplot/plugins/jqplot.highlighter.js');
31 $scripts->addFile('jquery/jquery.tablesorter.js');
32 $scripts->addFile('server_status_sorter.js');
34 // Add the html content to the response
35 $response->addHTML('<div>');
36 $response->addHTML($serverStatusData->getMenuHtml());
37 if ($serverStatusData->dataLoaded) {
38 $response->addHTML(PMA_getHtmlForQueryStatistics($serverStatusData));
39 } else {
40 $response->addHTML(
41 Message::error(
42 __('Not enough privilege to view query statistics.')
43 )->getDisplay()
46 $response->addHTML('</div>');
47 exit;