summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2017-03-24 11:35:20 -0400
committerjim-p <jimp@pfsense.org>2017-03-24 11:36:18 -0400
commit01dc83959c67b1ffab97a6f77a4e7820f81c7ad9 (patch)
tree20003c08b67cca45eda7ff7ea491a0e6bae2dffa /src/usr
parent72040e44f5ffd0b559b1592eabde8d0b41d6a8ec (diff)
downloadpfsense-01dc83959c67b1ffab97a6f77a4e7820f81c7ad9.zip
pfsense-01dc83959c67b1ffab97a6f77a4e7820f81c7ad9.tar.gz
Show the button to reset CARP demotion status even when the value is negative, and change the reset code to accommodate. Also fixup text in that dialog. Fixes #7424
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/local/www/status_carp.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/usr/local/www/status_carp.php b/src/usr/local/www/status_carp.php
index 1141a26..888b556 100644
--- a/src/usr/local/www/status_carp.php
+++ b/src/usr/local/www/status_carp.php
@@ -130,7 +130,7 @@ if ($_POST['disablecarp'] != "") {
$carp_detected_problems = get_single_sysctl("net.inet.carp.demotion");
if (!empty($_POST['resetdemotion'])) {
- set_single_sysctl("net.inet.carp.demotion", "-{$carp_detected_problems}");
+ set_single_sysctl("net.inet.carp.demotion", 0 - $carp_detected_problems);
sleep(1);
$carp_detected_problems = get_single_sysctl("net.inet.carp.demotion");
}
@@ -172,18 +172,17 @@ if ($carpcount == 0) {
}
// Sadly this needs to be here so that it is inside the form
- if ($carp_detected_problems > 0) {
+ if ($carp_detected_problems != 0) {
print_info_box(
- gettext("CARP has detected a problem and this unit has been demoted to BACKUP status.") .
+ gettext("CARP has detected a problem and this unit has a non-zero demotion status.") .
"<br/>" .
- gettext("Check the link status on all interfaces with configured CARP VIPs.") .
- "<br/>" .
- sprintf(gettext('Search the %1$sSystem Log%2$s for CARP demotion-related events.'), "<a href=\"/status_logs.php?filtertext=carp%3A+demoted+by\">", "</a>") .
+ gettext("Check the link status on all interfaces configured with CARP VIPs and ") .
+ sprintf(gettext('search the %1$sSystem Log%2$s for CARP demotion-related events.'), "<a href=\"/status_logs.php?filtertext=carp%3A+demoted+by\">", "</a>") .
"<br/><br/>" .
'<button type="submit" class="btn btn-warning" name="resetdemotion" id="resetdemotion" value="' .
- gettext("Reset CARP Demotion Status.") .
+ gettext("Reset CARP Demotion Status") .
'"><i class="fa fa-undo icon-embed-btn"></i>' .
- gettext("Reset CARP Demotion Status.") .
+ gettext("Reset CARP Demotion Status") .
'</button>',
'danger'
);
OpenPOWER on IntegriCloud