mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
more memcached
git-svn-id: http://www.observium.org/svn/observer/trunk@3114 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -25,12 +25,23 @@ echo('<tr class=tablehead>
|
||||
|
||||
foreach (dbFetchRows($sql, $param) as $sensor)
|
||||
{
|
||||
|
||||
if ($config['memcached']['enable'])
|
||||
{
|
||||
$sensor['sensor_current'] = $memcache->get('sensor-'.$sensor['sensor_id'].'-value');
|
||||
}
|
||||
|
||||
if(empty($sensor['sensor_current']))
|
||||
{
|
||||
$sensor['sensor_current'] = "NaN";
|
||||
} else {
|
||||
if ($sensor['sensor_current'] >= $sensor['sensor_limit']) { $alert = '<img src="images/16/flag_red.png" alt="alert" />'; } else { $alert = ""; }
|
||||
}
|
||||
|
||||
$weekly_sensor = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$week&to=$now&width=500&height=150";
|
||||
$sensor_popup = "<a href=\"graphs/id=" . $sensor['sensor_id'] . "/type=".$graph_type."/\" onmouseover=\"return overlib('<img src=\'$weekly_sensor\'>', LEFT);\" onmouseout=\"return nd();\">
|
||||
" . $sensor['sensor_descr'] . "</a>";
|
||||
|
||||
if ($sensor['sensor_current'] >= $sensor['sensor_limit']) { $alert = '<img src="images/16/flag_red.png" alt="alert" />'; } else { $alert = ""; }
|
||||
|
||||
$sensor_day = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$day&to=$now&width=300&height=100";
|
||||
$sensor_week = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$week&to=$now&width=300&height=100";
|
||||
$sensor_month = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$month&to=$now&width=300&height=100";
|
||||
|
Reference in New Issue
Block a user