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();
22 $response = PMA_Response
::getInstance();
23 $scripts = $response->getHeader()->getScripts();
24 $scripts->addFile('server_status_advisor.js');
29 $response->addHTML('<div>');
30 $response->addHTML($ServerStatusData->getMenuHtml());
31 $response->addHTML(PMA_getAdvisorHtml());
32 $response->addHTML('</div>');
37 * Returns html with Advisor
41 function PMA_getAdvisorHtml()
43 $output = '<a href="#openAdvisorInstructions">';
44 $output .= PMA_Util
::getIcon('b_help.png', __('Instructions'));
46 $output .= '<div id="statustabs_advisor"></div>';
47 $output .= '<div id="advisorInstructionsDialog" style="display:none;">';
50 'The Advisor system can provide recommendations '
51 . 'on server variables by analyzing the server status variables.'
56 'Do note however that this system provides recommendations '
57 . 'based on simple calculations and by rule of thumb which may '
58 . 'not necessarily apply to your system.'
63 'Prior to changing any of the configuration, be sure to know '
64 . 'what you are changing (by reading the documentation) and how '
65 . 'to undo the change. Wrong tuning can have a very negative '
66 . 'effect on performance.'
71 'The best way to tune your system would be to change only one '
72 . 'setting at a time, observe or benchmark your database, and undo '
73 . 'the change if there was no clearly measurable improvement.'
77 $output .= '<div id="advisorData" style="display:none;">';
78 $advisor = new Advisor();
79 $output .= htmlspecialchars(