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