Translated using Weblate (Korean)
[phpmyadmin.git] / server_status_queries.php
blob99a83b7f05e9abc60c880085467535455413d81e
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 require_once 'libraries/common.inc.php';
11 require_once 'libraries/server_common.inc.php';
12 require_once 'libraries/ServerStatusData.class.php';
13 require_once 'libraries/server_status_queries.lib.php';
15 if (PMA_DRIZZLE) {
16 $GLOBALS['replication_info'] = array();
17 $GLOBALS['replication_info']['master']['status'] = false;
18 $GLOBALS['replication_info']['slave']['status'] = false;
19 } else {
20 include_once 'libraries/replication.inc.php';
21 include_once 'libraries/replication_gui.lib.php';
24 $serverStatusData = new PMA_ServerStatusData();
26 $response = PMA_Response::getInstance();
27 $header = $response->getHeader();
28 $scripts = $header->getScripts();
29 $scripts->addFile('server_status_queries.js');
31 /* < IE 9 doesn't support canvas natively */
32 if (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER < 9) {
33 $scripts->addFile('jqplot/excanvas.js');
36 // for charting
37 $scripts->addFile('jqplot/jquery.jqplot.js');
38 $scripts->addFile('jqplot/plugins/jqplot.pieRenderer.js');
39 $scripts->addFile('jqplot/plugins/jqplot.canvasTextRenderer.js');
40 $scripts->addFile('jqplot/plugins/jqplot.canvasAxisLabelRenderer.js');
41 $scripts->addFile('jqplot/plugins/jqplot.dateAxisRenderer.js');
42 $scripts->addFile('jqplot/plugins/jqplot.highlighter.js');
43 $scripts->addFile('jqplot/plugins/jqplot.cursor.js');
44 $scripts->addFile('jquery/jquery.tablesorter.js');
45 $scripts->addFile('server_status_sorter.js');
47 // Add the html content to the response
48 $response->addHTML('<div>');
49 $response->addHTML($serverStatusData->getMenuHtml());
50 if ($serverStatusData->dataLoaded) {
51 $response->addHTML(PMA_getHtmlForQueryStatistics($serverStatusData));
52 } else {
53 $response->addHTML(
54 PMA_Message::error(
55 __('Not enough privilege to view query statistics.')
56 )->getDisplay()
59 $response->addHTML('</div>');
60 exit;