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:47 -0500 |
commit | 0a4fbd990e6f529d32aed440fb9c806cd25ee06d (patch) | |
tree | ed9869b8ff7d945f54df3c21eb73c6e3343e41cb /usr/local | |
parent | 588d3cf606229474acf28920d4f66c415b896aa8 (diff) | |
download | pfsense-0a4fbd990e6f529d32aed440fb9c806cd25ee06d.zip pfsense-0a4fbd990e6f529d32aed440fb9c806cd25ee06d.tar.gz |
Expand CARP demotion error, add button to reset demotion status.
Diffstat (limited to 'usr/local')
-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 fc8de57..1faebf0 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"> @@ -195,6 +214,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>"; |