Display message about missing master status
This commit is contained in:
parent
91bd2e84f5
commit
4588af77ac
|
@ -1,20 +1,24 @@
|
||||||
<?php
|
<?php
|
||||||
page_header(lang('Replication'));
|
page_header(lang('Replication'));
|
||||||
|
|
||||||
echo "<p><b>" . lang('Master status') . "</b>" . doc_link(array("sql" => "show-master-status.html")) . "\n";
|
echo "<h3>" . lang('Master status') . doc_link(array("sql" => "show-master-status.html")) . "</h3>\n";
|
||||||
$master_replication_status = replication_status("MASTER");
|
$master_replication_status = replication_status("MASTER");
|
||||||
echo "<table cellspacing='0'>\n";
|
if (!$master_replication_status) {
|
||||||
foreach ($master_replication_status[0] as $key => $val) {
|
echo "<p class='message'>" . lang('No rows.') . "\n";
|
||||||
echo "<tr>";
|
} else {
|
||||||
echo "<th>" . h($key);
|
echo "<table cellspacing='0'>\n";
|
||||||
echo "<td>" . nbsp($val);
|
foreach ($master_replication_status[0] as $key => $val) {
|
||||||
|
echo "<tr>";
|
||||||
|
echo "<th>" . h($key);
|
||||||
|
echo "<td>" . nbsp($val);
|
||||||
|
}
|
||||||
|
echo "</table>\n";
|
||||||
}
|
}
|
||||||
echo "</table>\n";
|
|
||||||
|
|
||||||
$slave_replication_status = replication_status("SLAVE");
|
$slave_replication_status = replication_status("SLAVE");
|
||||||
if (!empty($slave_replication_status)) {
|
if ($slave_replication_status) {
|
||||||
echo "<p><b>" . lang('Slave status') . "</b>" . doc_link(array("sql" => "show-slave-status.html")) . "\n";
|
echo "<h3>" . lang('Slave status') . doc_link(array("sql" => "show-slave-status.html")) . "</h3>\n";
|
||||||
foreach ($slave_replication_status as $slave) {
|
foreach ($slave_replication_status[0] as $slave) {
|
||||||
echo "<table cellspacing='0'>\n";
|
echo "<table cellspacing='0'>\n";
|
||||||
foreach ($slave as $key => $val) {
|
foreach ($slave as $key => $val) {
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
|
|
Loading…
Reference in a new issue