mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 00:25:06 +02:00
add new IronWare (Brocade/Foundry) OS type. rename temp/fan/voltage_host to device_id
git-svn-id: http://www.observium.org/svn/observer/trunk@830 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
|
||||
echo("<div style='font-family: courier, serif; margin: 10px';><strong>" . $device['sysDescr'] . "</strong></div>");
|
||||
|
||||
$uptime = @mysql_result(mysql_query("SELECT `attrib_value` FROM `devices_attribs` WHERE `device_id` = '" . $device['device_id'] . "' AND `attrib_type` = 'uptime'"), 0);
|
||||
# $uptime = @mysql_result(mysql_query("SELECT `attrib_value` FROM `devices_attribs` WHERE `device_id` = '" . $device['device_id'] . "' AND `attrib_type` = 'uptime'"), 0);
|
||||
$uptime = $device['uptime'];
|
||||
|
||||
|
||||
if(is_file("images/devices/" . $device['hardware'] . ".gif")) {
|
||||
$dev_img = "<div style='float: left;'><img src='images/devices/" . $device['hardware'] . ".gif' align=absmiddle></img></div>";
|
||||
|
||||
@@ -5,7 +5,7 @@ include("common.inc.php");
|
||||
$rrd_options .= " -l 0 -E ";
|
||||
|
||||
$iter = "1";
|
||||
$sql = mysql_query("SELECT * FROM temperature where temp_host = '$device_id'");
|
||||
$sql = mysql_query("SELECT * FROM temperature where device_id = '$device_id'");
|
||||
$rrd_options .= " COMMENT:' Cur Min Max\\n'";
|
||||
while($temperature = mysql_fetch_array($sql))
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ include("common.inc.php");
|
||||
|
||||
$fanspeed = mysql_fetch_array(mysql_query("SELECT * FROM fanspeed where fan_id = '".mres($_GET['id'])."'"));
|
||||
|
||||
$hostname = mysql_result(mysql_query("SELECT hostname FROM devices WHERE device_id = '" . $fanspeed['fan_host'] . "'"),0);
|
||||
$hostname = mysql_result(mysql_query("SELECT hostname FROM devices WHERE device_id = '" . $fanspeed['device_id'] . "'"),0);
|
||||
|
||||
$fanspeed['fan_descr_fixed'] = substr(str_pad($fanspeed['fan_descr'], 28),0,28);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ include("common.inc.php");
|
||||
$sql = mysql_query("SELECT * FROM temperature where temp_id = '$temp'");
|
||||
$temperature = mysql_fetch_array(mysql_query("SELECT * FROM temperature where temp_id = '".mres($_GET['id'])."'"));
|
||||
|
||||
$hostname = mysql_result(mysql_query("SELECT hostname FROM devices WHERE device_id = '" . $temperature['temp_host'] . "'"),0);
|
||||
$hostname = mysql_result(mysql_query("SELECT hostname FROM devices WHERE device_id = '" . $temperature['device_id'] . "'"),0);
|
||||
|
||||
$temperature['temp_descr_fixed'] = substr(str_pad($temperature['temp_descr'], 28),0,28);
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ include("common.inc.php");
|
||||
|
||||
$voltage = mysql_fetch_array(mysql_query("SELECT * FROM voltage where volt_id = '".mres($_GET['id'])."'"));
|
||||
|
||||
$hostname = mysql_result(mysql_query("SELECT hostname FROM devices WHERE device_id = '" . $voltage['volt_host'] . "'"),0);
|
||||
$hostname = mysql_result(mysql_query("SELECT hostname FROM devices WHERE device_id = '" . $voltage['device_id'] . "'"),0);
|
||||
|
||||
$voltage['volt_descr_fixed'] = substr(str_pad($voltage['volt_descr'], 28),0,28);
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
} else { $mac = ""; }
|
||||
|
||||
echo("<tr style=\"background-color: $row_colour; padding: 5px;\" valign=top onmouseover=\"this.style.backgroundColor='$list_highlight';\" onmouseout=\"this.style.backgroundColor='$row_colour';\" onclick=\"location.href='/device/".$device['device_id']."/interface/".$interface['interface_id']."/'\" style='cursor: hand;'>
|
||||
<td valign=top width=300>");
|
||||
<td valign=top width=350>");
|
||||
|
||||
echo(" <span class=list-large>
|
||||
" . generateiflink($interface, $interface['ifIndex'] . ". ".$interface['label']) . " $error_img $mac
|
||||
@@ -66,10 +66,10 @@
|
||||
$interface['out_rate'] = $interface['ifOutOctets_rate'] * 8;
|
||||
$in_perc = @round($interface['in_rate']/$interface['ifSpeed']*100);
|
||||
$out_perc = @round($interface['in_rate']/$interface['ifSpeed']*100);
|
||||
echo("<img src='images/16/arrow_left.png' align=absmiddle> <span style='color: " . percent_colour($in_perc) . "'>" .
|
||||
formatRates($interface['in_rate']) . "<br />".format_bi($interface['ifInUcastPkts_rate'])."pps</span><br />");
|
||||
echo("<img align=absmiddle src='images/16/arrow_out.png'> <span style='color: " . percent_colour($out_perc) . "'>" .
|
||||
formatRates($interface['out_rate']) . "<br />".format_bi($interface['ifOutUcastPkts_rate'])."pps</span>");
|
||||
echo("<img src='images/16/arrow_left.png' align=absmiddle> <span style='color: " . percent_colour($in_perc) . "'>".formatRates($interface['in_rate'])."<br />
|
||||
<img align=absmiddle src='images/16/arrow_out.png'> <span style='color: " . percent_colour($out_perc) . "'>".formatRates($interface['out_rate']) . "<br />
|
||||
<img src='images/icons/arrow_pps_in.png' align=absmiddle> ".format_bi($interface['ifInUcastPkts_rate'])."pps</span><br />
|
||||
<img src='images/icons/arrow_pps_out.png' align=absmiddle> ".format_bi($interface['ifOutUcastPkts_rate'])."pps</span>");
|
||||
}
|
||||
|
||||
echo("</td><td width=75>");
|
||||
|
||||
Reference in New Issue
Block a user