Merge remote branch 'origin/master'
This commit is contained in:
25
js/replication.js
Normal file
25
js/replication.js
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||||
|
/**
|
||||||
|
* for server_replication.php
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#master_status_href').click(function() {
|
||||||
|
$('#replication_master_section').toggle();
|
||||||
|
});
|
||||||
|
$('#master_slaves_href').click(function() {
|
||||||
|
$('#replication_slaves_section').toggle();
|
||||||
|
});
|
||||||
|
$('#slave_status_href').click(function() {
|
||||||
|
$('#replication_slave_section').toggle();
|
||||||
|
});
|
||||||
|
$('#slave_control_href').click(function() {
|
||||||
|
$('#slave_control_gui').toggle();
|
||||||
|
});
|
||||||
|
$('#slave_errormanagement_href').click(function() {
|
||||||
|
$('#slave_errormanagement_gui').toggle();
|
||||||
|
});
|
||||||
|
$('#slave_synchronization_href').click(function() {
|
||||||
|
$('#slave_synchronization_gui').toggle();
|
||||||
|
});
|
||||||
|
});
|
@@ -2750,8 +2750,8 @@ function PMA_js_mootools_domready($code, $print=true)
|
|||||||
$out .= "\n" . '// ]]>' . "\n";
|
$out .= "\n" . '// ]]>' . "\n";
|
||||||
$out .= '</script>';
|
$out .= '</script>';
|
||||||
|
|
||||||
if ($print)
|
//if ($print)
|
||||||
echo $out;
|
// echo $out;
|
||||||
|
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
@@ -9,9 +9,6 @@ if (! defined('PHPMYADMIN')) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$jscode['master_replication'] = 'divShowHideFunc(\'master_status_href\', \'replication_master_section\');' . "\n"
|
|
||||||
. 'divShowHideFunc(\'master_slaves_href\', \'replication_slaves_section\');' . "\n";
|
|
||||||
|
|
||||||
// Add JS events to generate example my.cnf config lines
|
// Add JS events to generate example my.cnf config lines
|
||||||
$jscode['configure_master'] =
|
$jscode['configure_master'] =
|
||||||
'var c_output = "";' . "\n" .
|
'var c_output = "";' . "\n" .
|
||||||
@@ -53,14 +50,6 @@ $jscode['configure_master'] =
|
|||||||
' });' . "\n" .
|
' });' . "\n" .
|
||||||
'});' . "\n";
|
'});' . "\n";
|
||||||
|
|
||||||
$jscode['slave_control'] =
|
|
||||||
'divShowHideFunc(\'slave_status_href\', \'replication_slave_section\');' . "\n" .
|
|
||||||
'divShowHideFunc(\'slave_control_href\', \'slave_control_gui\');' . "\n" .
|
|
||||||
'divShowHideFunc(\'slave_errormanagement_href\',\'slave_errormanagement_gui\'); ' . "\n";
|
|
||||||
|
|
||||||
$jscode['slave_control_sync'] =
|
|
||||||
'divShowHideFunc(\'slave_synchronization_href\', \'slave_synchronization_gui\');' . "\n";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns code for selecting databases
|
* returns code for selecting databases
|
||||||
*
|
*
|
||||||
|
@@ -17,6 +17,7 @@ require_once './libraries/common.inc.php';
|
|||||||
$GLOBALS['js_include'][] = 'server_privileges.js';
|
$GLOBALS['js_include'][] = 'server_privileges.js';
|
||||||
$GLOBALS['js_include'][] = 'functions.js';
|
$GLOBALS['js_include'][] = 'functions.js';
|
||||||
$GLOBALS['js_include'][] = 'mootools-more.js';
|
$GLOBALS['js_include'][] = 'mootools-more.js';
|
||||||
|
$GLOBALS['js_include'][] = 'replication.js';
|
||||||
|
|
||||||
require './libraries/server_common.inc.php';
|
require './libraries/server_common.inc.php';
|
||||||
require './libraries/replication.inc.php';
|
require './libraries/replication.inc.php';
|
||||||
@@ -177,7 +178,6 @@ if (isset($_SESSION['replication']['sr_action_status']) && isset($_SESSION['repl
|
|||||||
|
|
||||||
if ($server_master_status) {
|
if ($server_master_status) {
|
||||||
if (! isset($GLOBALS['repl_clear_scr'])) {
|
if (! isset($GLOBALS['repl_clear_scr'])) {
|
||||||
echo PMA_js_mootools_domready($jscode['master_replication']);
|
|
||||||
echo '<fieldset>';
|
echo '<fieldset>';
|
||||||
echo '<legend>' . $GLOBALS['strReplicationMaster'] . '</legend>';
|
echo '<legend>' . $GLOBALS['strReplicationMaster'] . '</legend>';
|
||||||
echo $GLOBALS['strReplicationConfiguredMaster'];
|
echo $GLOBALS['strReplicationConfiguredMaster'];
|
||||||
@@ -249,7 +249,6 @@ if (! isset($GLOBALS['repl_clear_scr'])) {
|
|||||||
echo '<fieldset>';
|
echo '<fieldset>';
|
||||||
echo '<legend>' . $GLOBALS['strReplicationSlave'] . '</legend>';
|
echo '<legend>' . $GLOBALS['strReplicationSlave'] . '</legend>';
|
||||||
if ($server_slave_status) {
|
if ($server_slave_status) {
|
||||||
echo PMA_js_mootools_domready($jscode['slave_control']);
|
|
||||||
echo '<div id="slave_configuration_gui">';
|
echo '<div id="slave_configuration_gui">';
|
||||||
|
|
||||||
$_url_params = $GLOBALS['url_params'];
|
$_url_params = $GLOBALS['url_params'];
|
||||||
@@ -311,7 +310,6 @@ if (! isset($GLOBALS['repl_clear_scr'])) {
|
|||||||
echo ' <li><a href="#" id="slave_status_href">' . $GLOBALS['strReplicationSlaveSeeStatus'] . '</a></li>';
|
echo ' <li><a href="#" id="slave_status_href">' . $GLOBALS['strReplicationSlaveSeeStatus'] . '</a></li>';
|
||||||
echo PMA_replication_print_status_table('slave', true, false);
|
echo PMA_replication_print_status_table('slave', true, false);
|
||||||
if (isset($_SESSION['replication']['m_correct']) && $_SESSION['replication']['m_correct'] == true) {
|
if (isset($_SESSION['replication']['m_correct']) && $_SESSION['replication']['m_correct'] == true) {
|
||||||
echo PMA_js_mootools_domready($jscode['slave_control_sync']);
|
|
||||||
echo ' <li><a href="#" id="slave_synchronization_href">' . $GLOBALS['strReplicationSynchronize'] . '</a></li>';
|
echo ' <li><a href="#" id="slave_synchronization_href">' . $GLOBALS['strReplicationSynchronize'] . '</a></li>';
|
||||||
echo ' <div id="slave_synchronization_gui" style="display: none">';
|
echo ' <div id="slave_synchronization_gui" style="display: none">';
|
||||||
echo ' <form method="post" action="server_replication.php">';
|
echo ' <form method="post" action="server_replication.php">';
|
||||||
|
Reference in New Issue
Block a user