Actions
Bug #14398
openONBATT Status Missing in apcupsd.widget.php
Status:
New
Priority:
Low
Assignee:
-
Category:
apcupsd
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Plus Target Version:
Affected Version:
Affected Plus Version:
23.01
Affected Architecture:
amd64
Description
Description:
The file apcupsd.widget.php is currently lacking the "ONBATT" status. Due to this, when the system is on battery, it erroneously displays "Unknown(ONBATT)".
- Switch to battery power while observing the APC UPSD Widget.
- The status will be displayed as "Unknown(ONBATT)".
Expected Result:
The status should correctly display "ONBATT" when on battery power.
Actual Result:
The status displays as "Unknown(ONBATT)".
Proposed Fix:
A possible fix would involve adding the "ONBATT" status to the mainstatarray on line 93 and including a case for "ONBATT" below line 114.
Line 93 (Current):
$mainstatarray = array("ONLINE", "ON-BATTERY", "OVERLOADED", "BATTERY-LOW", "LOWBATT", "REPLACE-BATTERY", "REPLACEBATT", "COMM-LOST", "COMMLOST", "NOBATT"); //Taken from apcupsd source
Line 93 (Proposed Fix):
$mainstatarray = array("ONLINE", "ON-BATTERY", "ONBATT", "OVERLOADED", "BATTERY-LOW", "LOWBATT", "REPLACE-BATTERY", "REPLACEBATT", "COMM-LOST", "COMMLOST", "NOBATT"); //Taken from apcupsd source
Line 114 (Current):
case "ON-BATTERY":
case "BATTERY-LOW":
case "LOWBATT":
case "NOBATT":
Line 114 (Proposed Fix):
case "ON-BATTERY":
case "ONBATT":
case "BATTERY-LOW":
case "LOWBATT":
case "NOBATT":
Updated by Jim Pingle over 1 year ago
- Project changed from pfSense Plus to pfSense Packages
- Category changed from Web Interface to apcupsd
- Release Notes deleted (
Default)
Actions