/* vim: set expandtab sw=4 ts=4 sts=4: */ /** * Server Status Advisor * * @package PhpMyAdmin */ /** * Unbind all event handlers before tearing down a page */ AJAX.registerTeardown('server_status_advisor.js', function () { $('a[href="#openAdvisorInstructions"]').unbind('click'); $('#statustabs_advisor').html(''); $('#advisorDialog').remove(); $('#instructionsDialog').remove(); }); AJAX.registerOnload('server_status_advisor.js', function () { /**** Server config advisor ****/ var $dialog = $('
').attr('id', 'advisorDialog'); var $instructionsDialog = $('') .attr('id', 'instructionsDialog') .html($('#advisorInstructionsDialog').html()); $('a[href="#openAdvisorInstructions"]').click(function () { var dlgBtns = {}; dlgBtns[PMA_messages.strClose] = function () { $(this).dialog('close'); }; $instructionsDialog.dialog({ title: PMA_messages.strAdvisorSystem, width: 700, buttons: dlgBtns }); }); var $cnt = $('#statustabs_advisor'); var $tbody, $tr, str, even = true; data = $.parseJSON($('#advisorData').text()); $cnt.html(''); if (data.parse.errors.length > 0) { $cnt.append('Rules file not well formed, following errors were found:' + PMA_messages.strPerformanceIssues + '
'); $cnt.append('' + PMA_messages.strIssuse + ' | ' + PMA_messages.strRecommendation + ' |
---|
' + PMA_messages.strIssuse + ':
' + rule.issue + '
' + PMA_messages.strRecommendation + ':
' + rule.recommendation + '
' + PMA_messages.strJustification + ':
' + rule.justification + '
' + PMA_messages.strFormula + ':
' + rule.formula + '
' + PMA_messages.strTest + ':
' + rule.test + '