diff options
author | jim-p <jimp@pfsense.org> | 2015-03-06 12:26:21 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2015-03-06 15:00:59 -0500 |
commit | 7ba5aeebefbb35993c359cb9855d571b2565d3ea (patch) | |
tree | 426bf04c8a06ae5ecaed190a1d011c4aef34bc37 | |
parent | c17478a64907b05aa465885b7d26ac39faacb596 (diff) | |
download | pfsense-7ba5aeebefbb35993c359cb9855d571b2565d3ea.zip pfsense-7ba5aeebefbb35993c359cb9855d571b2565d3ea.tar.gz |
Expand CARP demotion error, add button to reset demotion status.
-rw-r--r-- | usr/local/www/carp_status.php | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/usr/local/www/carp_status.php b/usr/local/www/carp_status.php index 517697c..25b31aa 100644 --- a/usr/local/www/carp_status.php +++ b/usr/local/www/carp_status.php @@ -112,7 +112,13 @@ if($_POST['disablecarp'] <> "") { } } -$carp_detected_problems = ((get_single_sysctl("net.inet.carp.demotion")) > 0); +$carp_detected_problems = get_single_sysctl("net.inet.carp.demotion"); + +if (!empty($_POST['resetdemotion'])) { + set_single_sysctl("net.inet.carp.demotion", "-{$carp_detected_problems}"); + sleep(1); + $carp_detected_problems = get_single_sysctl("net.inet.carp.demotion"); +} $pgtitle = array(gettext("Status"),gettext("CARP")); $shortcut_section = "carp"; @@ -125,8 +131,21 @@ include("head.inc"); <form action="carp_status.php" method="post"> <?php if ($savemsg) print_info_box($savemsg); ?> -<?PHP if ($carp_detected_problems) print_info_box(gettext("CARP has detected a problem and this unit has been demoted to BACKUP status.") . "<br />" . gettext("Check link status on all interfaces with configured CARP VIPs.")); ?> - +<?PHP if ($carp_detected_problems > 0) { + print_info_box( + gettext("CARP has detected a problem and this unit has been demoted to BACKUP status.") . "<br/>" . + gettext("Check the link status on all interfaces with configured CARP VIPs.") . "<br/>" . + gettext("Search the") . + " <a href=\"/diag_logs.php?filtertext=carp%3A+demoted+by\">" . + gettext("system log") . + "</a> " . + gettext("for CARP demotion-related events.") . "<br/>" . + "<input type=\"submit\" name=\"resetdemotion\" id=\"resetdemotion\" value=\"" . + gettext("Reset CARP Demotion Status") . + "\" />" + ); + +} ?> <div id="mainlevel"> <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="carp status"> @@ -199,6 +218,7 @@ include("head.inc"); $icon = "<img {$align} src=\"/themes/".$g['theme']."/images/icons/icon_log.gif\" alt=\"init\" />"; } else $icon = ""; + } } echo "<td class=\"listlr\" align=\"center\">" . convert_friendly_interface_to_friendly_descr($carp['interface']) . "@{$vhid} </td>"; echo "<td class=\"listlr\" align=\"center\">" . $ipaddress . " </td>"; |