diff options
author | jim-p <jimp@pfsense.org> | 2017-03-24 11:35:20 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2017-03-24 11:35:20 -0400 |
commit | 52a3580a200c9f37f33c2985852e68fc65f3266a (patch) | |
tree | 5e169886bb02b83334d5b41584b4ab925e92b1bd /src/usr | |
parent | 2107f0a3ba4f6d5a04144c7c4207c017f33dd0f7 (diff) | |
download | pfsense-52a3580a200c9f37f33c2985852e68fc65f3266a.zip pfsense-52a3580a200c9f37f33c2985852e68fc65f3266a.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.php | 15 |
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 ba0c80a..84fa508 100644 --- a/src/usr/local/www/status_carp.php +++ b/src/usr/local/www/status_carp.php @@ -98,7 +98,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"); } @@ -144,18 +144,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' ); |