2 /* vim: set expandtab sw=4 ts=4 sts=4: */
5 * Displays query statistics for the server
10 use PMA\libraries\Response
;
11 use PMA\libraries\Message
;
12 use PMA\libraries\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();
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');
33 $scripts->addFile('server_status_queries.js');
35 // Add the html content to the response
36 $response->addHTML('<div>');
37 $response->addHTML($serverStatusData->getMenuHtml());
38 if ($serverStatusData->dataLoaded
) {
39 $response->addHTML(PMA_getHtmlForQueryStatistics($serverStatusData));
43 __('Not enough privilege to view query statistics.')
47 $response->addHTML('</div>');