summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a50d1d7)
raw | patch | inline | side by side (parent: a50d1d7)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 13 Jun 2005 11:37:55 +0000 (11:37 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 13 Jun 2005 11:37:55 +0000 (11:37 +0000) |
include/functions.inc | patch | blob | history | |
plugins/admin/systems/class_terminalInfo.inc | patch | blob | history | |
plugins/admin/systems/info.tpl | patch | blob | history |
diff --git a/include/functions.inc b/include/functions.inc
index 4fc438f06114844ecf3882cdff85f6255704af03..4571a66431733870867c0344f57368a89303e65d 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
background-color:#000000;
padding:1px;\">
- <div style=\" border-style: solid;
- border-width: 0pt;
- width:".($width)."px;
+ <div style=\" width:".($width)."px;
background-color:#DDDDDD;
height:".($height)."px;\">
if($height >10){
- $str.= "<font style=\"font-size:".($height-2)."px;color:#FF5555;align:middle;padding-left:".((int)(($width*0.7)/2))."px;\">
+ $str.= "<font style=\"font-size:".($height-2)."px;color:#FF5555;align:middle;padding-left:".((int)(($width*0.4)))."px;\">
<b>".$percentage."%</b>
</font>";
}
diff --git a/plugins/admin/systems/class_terminalInfo.inc b/plugins/admin/systems/class_terminalInfo.inc
index a13ad989d320e4ebdd2be1341b169fcbf061639c..7316c3fb06494b84a2365b69e8989ce5d1965884 100644 (file)
$display= "";
$smarty->assign("staticAddress", "");
-
+
+
+ /* Prevent undefined variable .... */
+ $smarty->assign("load", progressbar(0,100,15));
+ $smarty->assign("mem", progressbar(0,100,15));
+ $smarty->assign("swap", progressbar(0,100,15));
+
/* Check if terminal is online */
$query= "fping -q -r 1 -t 500 ".$this->cn;
exec ($query, $dummy, $retval);
/* 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,20));
/* Get status for key processes */
$processes= @snmpwalk($host, $community, "UCD-SNMP-MIB::prNames");
index 002c9728b401df2d1a317c29a7279f5e3fd40a43..7deba94d2a4faa8b81e0cd7eb20d5f16f9fc7898 100644 (file)
<td><b>{t}Up since{/t}</b></td><td>{$uptime}</td>
</tr>
<tr>
- <td><b>{t}CPU load{/t}</b></td><td><img alt="" src="progress.php?x=100&y=16&p={$load}" align="middle"></td>
+ <td><b>{t}CPU load{/t}</b></td><td>{$load}</td>
</tr>
<tr>
- <td><b>{t}Memory usage{/t}</b></td><td><img alt="" src="progress.php?x=100&y=16&p={$mem}" align="middle"></td>
+ <td><b>{t}Memory usage{/t}</b></td><td>{$mem}</td>
</tr>
<tr>
- <td><b>{t}Swap usage{/t}</b></td><td><img alt="" src="progress.php?x=100&y=16&p={$swap}" align="middle"></td>
+ <td><b>{t}Swap usage{/t}</b></td><td>{$swap}</td>
</tr>
<tr>
<td colspan=2> </td>