server_status_advisor.php 862 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * displays the advisor feature
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. use PhpMyAdmin\Message;
  9. use PhpMyAdmin\Response;
  10. use PhpMyAdmin\Server\Status\Advisor;
  11. use PhpMyAdmin\Server\Status\Data;
  12. require_once 'libraries/common.inc.php';
  13. require_once 'libraries/replication.inc.php';
  14. $serverStatusData = new Data();
  15. $response = Response::getInstance();
  16. $scripts = $response->getHeader()->getScripts();
  17. $scripts->addFile('server_status_advisor.js');
  18. /**
  19. * Output
  20. */
  21. $response->addHTML('<div>');
  22. $response->addHTML($serverStatusData->getMenuHtml());
  23. if ($serverStatusData->dataLoaded) {
  24. $response->addHTML(Advisor::getHtml());
  25. } else {
  26. $response->addHTML(
  27. Message::error(
  28. __('Not enough privilege to view the advisor.')
  29. )->getDisplay()
  30. );
  31. }
  32. $response->addHTML('</div>');
  33. exit;