diff --git a/plugins/admin/systems/class_terminalInfo.inc b/plugins/admin/systems/class_terminalInfo.inc
index cb96d63aba093c7bd2beb09e58ae95373060b5ef..7c378d679a2a5e1eed114500247b4a3f5c7c8e5d 100644 (file)
var $cn= "";
/* attribute list for save action */
+ var $ignore_account= TRUE;
var $attributes= array("cn", "gotoMode", "gotoTerminalPath", "gotoFloppyEnable",
"gotoCdromEnable", "ghInventoryNumber",
"gotoSwapServer", "gotoSyslogServer", "gotoNtpServer",
{
/* Do we represent a valid terminal? */
if (!$this->is_account && $this->parent == NULL){
- echo "<img src=\"images/stop.png\" align=center> <b>".
+ echo "<img alt=\"\" src=\"images/stop.png\" align=middle> <b>".
_("This 'dn' has no terminal features.")."</b>";
return;
}
$smarty= get_smarty();
$display= "";
+ $smarty->assign("staticAddress", "");
+
+
+ /* Prevent undefined variable .... */
+ $smarty->assign("load", progressbar(0,100,15,true));
+ $smarty->assign("mem", progressbar(0,100,15,true));
+ $smarty->assign("swap", progressbar(0,100,15,true));
+
/* Check if terminal is online */
$query= "fping -q -r 1 -t 500 ".$this->cn;
exec ($query, $dummy, $retval);
$MemTotal= @snmpget($host, $community, "UCD-SNMP-MIB::memory.memTotalReal.0");
$MemTotal= preg_replace('/^.*[=:] ([0-9.]+)$/', '\\1', $MemTotal);
if ($MemTotal != 0){
- $smarty->assign("mem", (int)(($MemTotal - $MemFree)*100/$MemTotal));
+ $smarty->assign("mem",progressbar( (int)(($MemTotal - $MemFree)*100/$MemTotal),100,15,true));
+ ;
}
$SwapFree= @snmpget($host, $community, "UCD-SNMP-MIB::memory.memAvailSwap.0");
$SwapFree= preg_replace('/^.*[=:] ([0-9.]+)$/', '\\1', $SwapFree);
$SwapTotal= preg_replace('/^.*[=:] ([0-9.]+)$/', '\\1', $SwapTotal);
if ($SwapTotal != 0){
#$smarty->assign("swap", (int)(($SwapTotal - $SwapFree)*100/$SwapTotal));
- $smarty->assign("swap", 0);
+ $smarty->assign("swap", progressbar(0,100,15,true));
}
/* Get system uptime */
/* Get system load */
$sysload= @snmpget($host, $community, "UCD-SNMP-MIB::laLoad.2");
$sysload= preg_replace('/^.*[=:] ([0-9.]+)$/', '\\1', $sysload);
- $smarty->assign("load", $sysload*100);
+
+ $smarty->assign("load", progressbar($sysload*100,100,15,true));
/* Get status for key processes */
$processes= @snmpwalk($host, $community, "UCD-SNMP-MIB::prNames");
$device= preg_replace('/^STRING: */', '', $device);
$usage= @snmpget($host, $community, "UCD-SNMP-MIB::dskPercent.$n");
$usage= preg_replace('/^INTEGER: */', '', $usage);
- $partitions.= "<tr><td><b>$device</b></td><td><img src=\"progress.php?x=100&y=16&p=$usage\" align=\"center\"></td></tr>\n";
+ $partitions.= "<tr><td><b>$device</b></td><td>".progressbar($usage,100,16,true)."</td></tr>\n";
}
$smarty->assign("partitions", $partitions);
} else {