mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 16:04:35 +02:00
updates
git-svn-id: http://www.observium.org/svn/observer/trunk@436 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
+3
-3
@@ -4,11 +4,11 @@
|
||||
|
||||
$i = "1";
|
||||
|
||||
if($_GET['view'] == "alerts") {
|
||||
if($_GET['opta'] == "alerts") {
|
||||
$where = "AND B.bgpPeerAdminStatus = 'start' AND B.bgpPeerState != 'established'";
|
||||
} elseif ($_GET['view'] == "external") {
|
||||
} elseif ($_GET['opta'] == "external") {
|
||||
$where = "AND D.bgpLocalAs != B.bgpPeerRemoteAs";
|
||||
} elseif ($_GET['view'] == "internal") {
|
||||
} elseif ($_GET['opta'] == "internal") {
|
||||
$where = "AND D.bgpLocalAs = B.bgpPeerRemoteAs";
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,8 @@ echo("<li class=" . $select['graphs'] . ">
|
||||
</li>
|
||||
");
|
||||
|
||||
$health = mysql_result(mysql_query("select count(temp_id) from temperature WHERE temp_host = '" . $device['device_id'] . "'"), 0) +
|
||||
$health = mysql_result(mysql_query("select count(*) from storage WHERE host_id = '" . $device['device_id'] . "'"), 0) +
|
||||
mysql_result(mysql_query("select count(temp_id) from temperature WHERE temp_host = '" . $device['device_id'] . "'"), 0) +
|
||||
mysql_result(mysql_query("select count(*) from cempMemPool WHERE device_id = '" . $device['device_id'] . "'"), 0) +
|
||||
mysql_result(mysql_query("select count(*) from cpmCPU WHERE device_id = '" . $device['device_id'] . "'"), 0);
|
||||
|
||||
|
||||
+12
-6
@@ -2,10 +2,16 @@
|
||||
if($bg == "#ffffff") { $bg = "#e5e5e5"; } else { $bg="#ffffff"; }
|
||||
echo("<table cellpadding=7 cellspacing=0 class=devicetable width=100%>");
|
||||
|
||||
if($_GET['type']) {
|
||||
#if($_GET['type']) {
|
||||
|
||||
$type = $_GET['type'];
|
||||
$sql = "select * from interfaces as I, devices as D WHERE `ifAlias` like '$type: %' AND I.device_id = D.device_id ORDER BY I.ifAlias";
|
||||
$type_where = " (";
|
||||
foreach(split(",", $_GET['opta']) as $type) {
|
||||
$type_where .= " $or `ifAlias` like '$type: %' ";
|
||||
$or = "OR";
|
||||
}
|
||||
$type_where .= ") ";
|
||||
|
||||
$sql = "select * from interfaces as I, devices as D WHERE $type_where AND I.device_id = D.device_id ORDER BY I.ifAlias";
|
||||
$query = mysql_query($sql);
|
||||
while($interface = mysql_fetch_array($query)) {
|
||||
$if_list .= $seperator . $interface['interface_id'];
|
||||
@@ -14,7 +20,7 @@ if($_GET['type']) {
|
||||
unset($seperator);
|
||||
|
||||
echo("<tr bgcolor='$bg'>
|
||||
<td><span class=list-large>Total Graph for interfaces of type : ".$type."</span></td></tr>");
|
||||
<td><span class=list-large>Total Graph for interfaces of type : ".$_GET['opta']."</span></td></tr>");
|
||||
|
||||
echo("<tr bgcolor='$bg'><td>");
|
||||
$graph_type = "multi_bits";
|
||||
@@ -23,7 +29,7 @@ if($_GET['type']) {
|
||||
echo("</td></tr>");
|
||||
|
||||
|
||||
$sql = "select * from interfaces as I, devices as D WHERE `ifAlias` like '$type: %' AND I.device_id = D.device_id ORDER BY I.ifAlias";
|
||||
$sql = "select * from interfaces as I, devices as D WHERE $type_where AND I.device_id = D.device_id ORDER BY I.ifAlias";
|
||||
$query = mysql_query($sql);
|
||||
while($interface = mysql_fetch_array($query)) {
|
||||
$done = "yes";
|
||||
@@ -51,7 +57,7 @@ if(file_exists($config['rrd_dir'] . "/" . $interface['hostname'] . "/" . $interf
|
||||
}
|
||||
echo("</td></tr>");
|
||||
}
|
||||
}
|
||||
#}
|
||||
|
||||
echo("</table>");
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
|
||||
echo("<tr valign=top bgcolor='$bg_colour'>");
|
||||
|
||||
echo("<td width=200 class=list-large>" . $vrf['vrf_name'] . "</td>");
|
||||
echo("<td width=200 class=list-large><a href='vrf/".$vrf['mplsVpnVrfRouteDistinguisher']."/'>" . $vrf['vrf_name'] . "</a></td>");
|
||||
echo("<td width=100 class=box-desc>" . $vrf['mplsVpnVrfRouteDistinguisher'] . "</td>");
|
||||
|
||||
echo("<td width=200 class=box-desc>" . $vrf['mplsVpnVrfDescription'] . "</td>");
|
||||
|
||||
Reference in New Issue
Block a user