Code

simple error fixed
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 13 Jun 2005 11:50:58 +0000 (11:50 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 13 Jun 2005 11:50:58 +0000 (11:50 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@695 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_terminalInfo.inc

index ab32135f8dd27370177f1964d2db3a6672087ca0..724b985d2c94bb3037414ddf35a6c7c665d9ed31 100644 (file)
@@ -77,9 +77,9 @@ class terminfo extends plugin
  
 
       /* Prevent undefined variable .... */ 
-      $smarty->assign("load", progressbar(0,100,15));
-      $smarty->assign("mem", progressbar(0,100,15));
-      $smarty->assign("swap", progressbar(0,100,15));
+      $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;
@@ -100,7 +100,8 @@ class terminfo extends plugin
           $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);
@@ -108,7 +109,7 @@ class terminfo extends plugin
           $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", porgressbar(0,100,15,true));
           }
 
           /* Get system uptime */
@@ -119,7 +120,7 @@ class terminfo extends plugin
           $sysload= @snmpget($host, $community, "UCD-SNMP-MIB::laLoad.2");
           $sysload= preg_replace('/^.*[=:] ([0-9.]+)$/', '\\1', $sysload);
           
-          $smarty->assign("load", progressbar($sysload*100,100,20));
+          $smarty->assign("load", progressbar($sysload*100,100,20,true));
 
           /* Get status for key processes */
           $processes= @snmpwalk($host, $community, "UCD-SNMP-MIB::prNames");
@@ -162,7 +163,7 @@ class terminfo extends plugin
           $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>".progressbar($usage,100;16,true)."</td></tr>\n";
+          $partitions.= "<tr><td><b>$device</b></td><td>".progressbar($usage,100,16,true)."</td></tr>\n";
         }
         $smarty->assign("partitions", $partitions);
       } else {