Fix unit tests
[phpmyadmin.git] / server_status_advisor.php
blob01f08070aba166d3814af2cd54fc1a96d147db1e
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\Server\Status\Advisor;
12 use PhpMyAdmin\Server\Status\Data;
14 require_once 'libraries/common.inc.php';
15 require_once 'libraries/replication.inc.php';
17 $serverStatusData = new Data();
19 $response = Response::getInstance();
20 $scripts = $response->getHeader()->getScripts();
21 $scripts->addFile('server_status_advisor.js');
23 /**
24 * Output
26 $response->addHTML('<div>');
27 $response->addHTML($serverStatusData->getMenuHtml());
28 if ($serverStatusData->dataLoaded) {
29 $response->addHTML(Advisor::getHtml());
30 } else {
31 $response->addHTML(
32 Message::error(
33 __('Not enough privilege to view the advisor.')
34 )->getDisplay()
37 $response->addHTML('</div>');
39 exit;