2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * displays the advisor feature
9 require_once 'libraries/common.inc.php';
10 require_once 'libraries/Advisor.class.php';
11 require_once 'libraries/ServerStatusData.class.php';
13 $server_master_status = false;
14 $server_slave_status = false;
16 include_once 'libraries/replication.inc.php';
17 include_once 'libraries/replication_gui.lib.php';
20 $ServerStatusData = new PMA_ServerStatusData('server_status_advisor.php');
22 $response = PMA_Response
::getInstance();
23 $scripts = $response->getHeader()->getScripts();
24 $scripts->addFile('server_status_advisor.js');
27 $output .= $ServerStatusData->getMenuHtml();
28 $output .= '<a href="#openAdvisorInstructions">';
29 $output .= PMA_Util
::getIcon('b_help.png', __('Instructions'));
31 $output .= '<div id="statustabs_advisor"></div>';
32 $output .= '<div id="advisorInstructionsDialog" style="display:none;">';
35 'The Advisor system can provide recommendations '
36 . 'on server variables by analyzing the server status variables.'
41 'Do note however that this system provides recommendations '
42 . 'based on simple calculations and by rule of thumb which may '
43 . 'not necessarily apply to your system.'
48 'Prior to changing any of the configuration, be sure to know '
49 . 'what you are changing (by reading the documentation) and how '
50 . 'to undo the change. Wrong tuning can have a very negative '
51 . 'effect on performance.'
56 'The best way to tune your system would be to change only one '
57 . 'setting at a time, observe or benchmark your database, and undo '
58 . 'the change if there was no clearly measurable improvement.'
62 $output .= '<div id="advisorData" style="display:none;">';
63 $advisor = new Advisor();
64 $output .= htmlspecialchars(
72 $response->addHTML($output);