Merge remote-tracking branch 'origin/master'
[phpmyadmin.git] / server_status_advisor.php
blob35ed40261b5f828dfe3fd667407f4d5e8080d078
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * displays the advisor feature
6 * @package PhpMyAdmin
7 */
9 use PhpMyAdmin\Message;
10 use PhpMyAdmin\Response;
11 use PhpMyAdmin\ServerStatusData;
13 require_once 'libraries/common.inc.php';
14 require_once 'libraries/server_status_advisor.lib.php';
15 require_once 'libraries/replication.inc.php';
16 require_once 'libraries/replication_gui.lib.php';
18 $serverStatusData = new ServerStatusData();
20 $response = Response::getInstance();
21 $scripts = $response->getHeader()->getScripts();
22 $scripts->addFile('server_status_advisor.js');
24 /**
25 * Output
27 $response->addHTML('<div>');
28 $response->addHTML($serverStatusData->getMenuHtml());
29 if ($serverStatusData->dataLoaded) {
30 $response->addHTML(PMA_getHtmlForAdvisor());
31 } else {
32 $response->addHTML(
33 Message::error(
34 __('Not enough privilege to view the advisor.')
35 )->getDisplay()
38 $response->addHTML('</div>');
40 exit;