mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	updates
git-svn-id: http://www.observium.org/svn/observer/trunk@436 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
		@@ -17,6 +17,11 @@ RewriteRule ^devices/(.+)/ ?page=devices&type=$1
 | 
			
		||||
 | 
			
		||||
RewriteRule ^interfaces/(.+)/ ?page=interfaces&type=$1
 | 
			
		||||
 | 
			
		||||
RewriteRule ^vrf/(.+)/(.+)/(.+)/ ?page=vrf&id=$1&opta=$2&optb=$3
 | 
			
		||||
RewriteRule ^vrf/(.+)/(.+)/ ?page=vrf&id=$1&opta=$2
 | 
			
		||||
RewriteRule ^vrf/(.+)/ ?page=vrf&id=$1
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
RewriteRule ^bill/([0-9]+) ?page=bills&bill=$1
 | 
			
		||||
 | 
			
		||||
RewriteRule ^device/([0-9]+)/([a-z]+)/(.+)/(.+)/ ?page=device&id=$1§ion=$2&opta=$3&optb=$4
 | 
			
		||||
@@ -26,5 +31,5 @@ RewriteRule ^device/([0-9]+) ?page=device&id=$1
 | 
			
		||||
 | 
			
		||||
RewriteRule ^([a-z]+)/$ ?page=$1
 | 
			
		||||
 | 
			
		||||
RewriteRule ^([a-z]+)/([a-z]+)/$ ?page=$1&view=$2
 | 
			
		||||
RewriteRule ^([a-z]+)/(.+)/$ ?page=$1&opta=$2
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -11,10 +11,10 @@
 | 
			
		||||
   $image = getImage($device['device_id']);
 | 
			
		||||
 | 
			
		||||
   echo("
 | 
			
		||||
            <tr >
 | 
			
		||||
            <tr bgcolor=$device_colour>
 | 
			
		||||
             <td width='40' align=center valign=middle>$image</td>
 | 
			
		||||
             <td valign=middle><span style='font-weight: bold; font-size: 20px;'>" . generatedevicelink($device) . "</span>
 | 
			
		||||
             <br />" . $device['purpose'] . "</td>
 | 
			
		||||
             <br />" . $device['location'] . "</td>
 | 
			
		||||
             <td></td>
 | 
			
		||||
           </tr>");
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -12,6 +12,7 @@
 | 
			
		||||
#  $ifHardType = $interface['ifHardType'];
 | 
			
		||||
  
 | 
			
		||||
  if($bg == "#e5e5e5") { $bg = "#ffffff"; } else { $bg="#e5e5e5"; }
 | 
			
		||||
  if($int_colour) { $bg = $int_colour; }
 | 
			
		||||
 | 
			
		||||
  if($interface['in_errors'] > 0 || $interface['out_errors'] > 0) { 
 | 
			
		||||
    $error_img = generateiflink($interface,"<img src='images/16/chart_curve_error.png' alt='Interface Errors' border=0>",errors); 
 | 
			
		||||
 
 | 
			
		||||
@@ -134,10 +134,11 @@ if($config['enable_pseudowires']) { echo("<li><a href='vrfs/'><img src='images/1
 | 
			
		||||
if($_SESSION['userlevel'] >= '5') {
 | 
			
		||||
  echo("<li><hr width=140 /></li>");
 | 
			
		||||
  if($config['int_customers']) { echo("<li><a href='customers/'><img src='images/16/group_link.png' border=0 align=absmiddle> Customers</a></li>"); $ifbreak = 1;}
 | 
			
		||||
  if($config['int_l2tp']) { echo("<li><a href='?page=iftype&type=l2tp'><img src='images/16/user.png'border=0 align=absmiddle> L2TP</a></li>"); $ifbreak = 1; }
 | 
			
		||||
  if($config['int_transit']) { echo("<li><a href='?page=iftype&type=transit'><img src='images/16/world_link.png' border=0 align=absmiddle> Transit</a></li>");  $ifbreak = 1; }
 | 
			
		||||
  if($config['int_peering']) { echo("<li><a href='?page=iftype&type=peering'><img src='images/16/bug_link.png' border=0 align=absmiddle> Peering</a></li>"); $ifbreak = 1; }
 | 
			
		||||
  if($config['int_core']) { echo("<li><a href='?page=iftype&type=core'><img src='images/16/brick_link.png' border=0 align=absmiddle> Core</a></li>"); $ifbreak = 1;}
 | 
			
		||||
  if($config['int_l2tp']) { echo("<li><a href='iftype/l2tp/'><img src='images/16/user.png'border=0 align=absmiddle> L2TP</a></li>"); $ifbreak = 1; }
 | 
			
		||||
  if($config['int_transit']) { echo("<li><a href='iftype/transit/'><img src='images/16/lorry_link.png' border=0 align=absmiddle> Transit</a></li>");  $ifbreak = 1; }
 | 
			
		||||
  if($config['int_peering']) { echo("<li><a href='iftype/peering/'><img src='images/16/bug_link.png' border=0 align=absmiddle> Peering</a></li>"); $ifbreak = 1; }
 | 
			
		||||
  if($config['int_peering'] && $config['int_transit']) { echo("<li><a href='iftype/peering,transit/'><img src='images/16/world_link.png' border=0 align=absmiddle> Peer + Transit</a></li>"); $ifbreak = 1; }
 | 
			
		||||
  if($config['int_core']) { echo("<li><a href='iftype/core/'><img src='images/16/brick_link.png' border=0 align=absmiddle> Core</a></li>"); $ifbreak = 1;}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if($ifbreak) { echo("<li><hr width=140 /></li>"); }
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@ if(is_integer($i/2)) { $bg_colour = $list_colour_a; } else { $bg_colour = $list_
 | 
			
		||||
 | 
			
		||||
echo("<tr bgcolor='$bg_colour'>");
 | 
			
		||||
 | 
			
		||||
echo("<td  class=list-large> " . $vrf['vrf_name'] . "</td>");
 | 
			
		||||
echo("<td  class=list-large><a href='vrf/".$vrf['mplsVpnVrfRouteDistinguisher']."/'>" . $vrf['vrf_name'] . "</a></td>");
 | 
			
		||||
echo("<td class=box-desc>" . $vrf['mplsVpnVrfDescription'] . "</td>");
 | 
			
		||||
echo("<td class=box-desc>" . $vrf['mplsVpnVrfRouteDistinguisher'] . "</td>");
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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>");
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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