2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Displays a list of server status variables
9 use PhpMyAdmin\Response
;
10 use PhpMyAdmin\Message
;
11 use PhpMyAdmin\ServerStatusData
;
13 require_once 'libraries/common.inc.php';
14 require_once 'libraries/server_common.inc.php';
15 require_once 'libraries/server_status_variables.lib.php';
16 require_once 'libraries/replication.inc.php';
17 require_once 'libraries/replication_gui.lib.php';
20 * flush status variables if requested
22 if (isset($_REQUEST['flush'])) {
23 $_flush_commands = array(
29 if (in_array($_REQUEST['flush'], $_flush_commands)) {
30 $GLOBALS['dbi']->query('FLUSH ' . $_REQUEST['flush'] . ';');
32 unset($_flush_commands);
35 $serverStatusData = new ServerStatusData();
37 $response = Response
::getInstance();
38 $header = $response->getHeader();
39 $scripts = $header->getScripts();
40 $scripts->addFile('server_status_variables.js');
41 $scripts->addFile('vendor/jquery/jquery.tablesorter.js');
42 $scripts->addFile('server_status_sorter.js');
44 $response->addHTML('<div>');
45 $response->addHTML($serverStatusData->getMenuHtml());
46 if ($serverStatusData->dataLoaded
) {
47 $response->addHTML(PMA_getHtmlForFilter($serverStatusData));
48 $response->addHTML(PMA_getHtmlForLinkSuggestions($serverStatusData));
49 $response->addHTML(PMA_getHtmlForVariablesList($serverStatusData));
53 __('Not enough privilege to view status variables.')
57 $response->addHTML('</div>');