aboutsummaryrefslogtreecommitdiffstats
path: root/packages/nut/status_nut.php
diff options
context:
space:
mode:
authorRyan Wagoner <rsw686@pfsense.org>2007-02-15 21:33:18 +0000
committerRyan Wagoner <rsw686@pfsense.org>2007-02-15 21:33:18 +0000
commit0a9e659904416a199a9a831e83af54700a5308db (patch)
treed2ede53398e3f09cbf65f39d61f1b291ceeaef96 /packages/nut/status_nut.php
parentab8da3d74a9a2b066045d371f239da47eae11656 (diff)
downloadpfsense-packages-0a9e659904416a199a9a831e83af54700a5308db.tar.gz
pfsense-packages-0a9e659904416a199a9a831e83af54700a5308db.tar.bz2
pfsense-packages-0a9e659904416a199a9a831e83af54700a5308db.zip
-added support for powercom ups and some others
-added support for unknown status condition
Diffstat (limited to 'packages/nut/status_nut.php')
-rw-r--r--packages/nut/status_nut.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/nut/status_nut.php b/packages/nut/status_nut.php
index c5afcdfe..8410406e 100644
--- a/packages/nut/status_nut.php
+++ b/packages/nut/status_nut.php
@@ -64,10 +64,10 @@ include("head.inc");
<table width="100%" class="tabcont" cellspacing="0" cellpadding="6">
<?php
if($nut_config['monitor'] == 'local') {
- print("<tr><td class=\"vncellreq\">Monitoring:</td><td class=\"vtable\">Local UPS</td><tr>\n");
+ print("<tr><td width=\"100px\" class=\"vncellreq\">Monitoring:</td><td class=\"vtable\">Local UPS</td><tr>\n");
$handle = popen("upsc {$nut_config['name']}@localhost","r");
} elseif($nut_config['monitor'] == 'remote') {
- print("<tr><td class=\"vncellreq\">Monitoring:</td><td class=\"vtable\">Remote UPS</td><tr>\n");
+ print("<tr><td width=\"100px\" class=\"vncellreq\">Monitoring:</td><td class=\"vtable\">Remote UPS</td><tr>\n");
$handle = popen("upsc {$nut_config['remotename']}@{$nut_config['remoteaddr']}","r");
}
@@ -85,7 +85,7 @@ include("head.inc");
print("<tr><td class=\"vncellreq\">Model:</td><td class=\"vtable\">{$ups['ups.model']}</td><tr>\n");
- print('<tr><td width="100px" class="vncellreq">Status:</td><td class="vtable">');
+ print('<tr><td class="vncellreq">Status:</td><td class="vtable">');
$status = explode(' ',$ups['ups.status']);
foreach($status as $condition) {
switch ($condition) {
@@ -98,6 +98,9 @@ include("head.inc");
case LB:
print('Battery Low ');
break;
+ default:
+ print("{$condition} ");
+ break;
}
}
print("</td><tr>\n");