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@454 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
BIN
html/images/no-48.png
Normal file
BIN
html/images/no-48.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
32
html/includes/error-no-perm.inc.php
Normal file
32
html/includes/error-no-perm.inc.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
echo("<div style='margin:auto; text-align: center; margin-top: 20px; max-width:420px'>
|
||||
<b class='rounded'>
|
||||
<b class='rounded1'><b></b></b>
|
||||
<b class='rounded2'><b></b></b>
|
||||
<b class='rounded3'></b>
|
||||
<b class='rounded4'></b>
|
||||
<b class='rounded5'></b></b>
|
||||
<div class='roundedfg' style='padding-left:10px;'>
|
||||
<div style='margin: auto; width:350px; padding:5px;'>
|
||||
<table><tr>
|
||||
<td><img src='images/no-48.png' valign=absmiddle></td>
|
||||
<td width=10></td>
|
||||
<td>
|
||||
<span style='color: #990000; font-weight: bold;'>
|
||||
<span style='font-size: 16px;'>Error:</span>
|
||||
<span style='font-size: 12px;'>You have insufficent permissions to view this page.</span>
|
||||
</span>
|
||||
</td>
|
||||
</tr></table>
|
||||
</div>
|
||||
</div>
|
||||
<b class='rounded'>
|
||||
<b class='rounded5'></b>
|
||||
<b class='unded4'></b>
|
||||
<b class='rounded3'></b>
|
||||
<b class='rounded2'><b></b></b>
|
||||
<b class='rounded1'><b></b></b></b>
|
||||
</div>");
|
||||
|
||||
?>
|
@@ -132,7 +132,7 @@ if($config['enable_pseudowires']) { echo("<li><a href='vrfs/'><img src='images/1
|
||||
|
||||
?>
|
||||
<li><a href='ipv4/'><img src='images/16/email_link.png' border=0 align=absmiddle> IPv4 Search</a></li>
|
||||
<li><a href='ipv4/'><img src='images/16/email_link.png' border=0 align=absmiddle> IPv6 Search</a></li>
|
||||
<li><a href='ipv6/'><img src='images/16/email_link.png' border=0 align=absmiddle> IPv6 Search</a></li>
|
||||
|
||||
<?php
|
||||
|
||||
|
@@ -66,15 +66,6 @@ echo("<table width=100%><tr><td valign=top width=33%>");
|
||||
// Display devices this users has access to
|
||||
echo("<h3>Device Access</h3>");
|
||||
|
||||
$device_perm_data = mysql_query("SELECT * from devices_perms as P, devices as D WHERE `user_id` = '" . $_GET['user_id'] . "' AND D.device_id = P.device_id");
|
||||
while($device_perm = mysql_fetch_array($device_perm_data)) {
|
||||
echo($device_perm['hostname'] . " <a href='?page=edituser&action=deldevperm&user_id=" . $_GET['user_id'] . "&device_id=" . $device_perm['device_id'] . "'><img src='images/16/cross.png' align=absmiddle border=0></a><br />");
|
||||
$access_list[] = $device_perm['device_id'];
|
||||
$permdone = "yes";
|
||||
}
|
||||
|
||||
if(!$permdone) { echo("None Configured"); }
|
||||
|
||||
// Display devices this user doesn't have access to
|
||||
echo("<h4>Grant access to new device</h4>");
|
||||
echo("<form method='get' action=''>
|
||||
@@ -93,6 +84,17 @@ echo("<table width=100%><tr><td valign=top width=33%>");
|
||||
}
|
||||
|
||||
echo("</select> <input type='submit' name='Submit' value='Add'></form>");
|
||||
|
||||
|
||||
$device_perm_data = mysql_query("SELECT * from devices_perms as P, devices as D WHERE `user_id` = '" . $_GET['user_id'] . "' AND D.device_id = P.device_id");
|
||||
while($device_perm = mysql_fetch_array($device_perm_data)) {
|
||||
echo($device_perm['hostname'] . " <a href='?page=edituser&action=deldevperm&user_id=" . $_GET['user_id'] . "&device_id=" . $device_perm['device_id'] . "'><img src='images/16/cross.png' align=absmiddle border=0></a><br />");
|
||||
$access_list[] = $device_perm['device_id'];
|
||||
$permdone = "yes";
|
||||
}
|
||||
|
||||
if(!$permdone) { echo("None Configured"); }
|
||||
|
||||
echo("</td><td valign=top width=33%>");
|
||||
echo("<h3>Interface Access</h3>");
|
||||
|
||||
|
@@ -1,7 +1,17 @@
|
||||
<table cellpadding=2 cellspacing=0 class=devicetable width=100%>
|
||||
<tr bgcolor='#eeeeee' style='padding: 3px;'>
|
||||
<div style='margin:auto; text-align: center; margin-top: 0px; margin-bottom: 10px;'>
|
||||
<b class='rounded'>
|
||||
<b class='rounded1'><b></b></b>
|
||||
<b class='rounded2'><b></b></b>
|
||||
<b class='rounded3'></b>
|
||||
<b class='rounded4'></b>
|
||||
<b class='rounded5'></b></b>
|
||||
<div class='roundedfg' style='padding: 0px 5px;'>
|
||||
<div style='margin: auto; text-align: left; padding: 5px 5px; padding-left: 10px; clear: both; display:block;'>
|
||||
|
||||
<table cellpadding=0 cellspacing=0 class=devicetable width=100%>
|
||||
<tr>
|
||||
<form method='post' action=''>
|
||||
<td width='200' style="padding: 10px;">
|
||||
<td width='200' style="padding: 1px;">
|
||||
<select name='device_id' id='device_id'>
|
||||
<option value=''>All Devices</option>
|
||||
<?php
|
||||
@@ -14,7 +24,7 @@
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
<td width='200' style="padding: 10px;">
|
||||
<td width='200' style="padding: 1px;">
|
||||
<select name='interface' id='interface'>
|
||||
<option value=''>All Interfaces</option>
|
||||
<option value='Loopback%' <?php if($_POST['interface'] == "Loopback%"){ echo("selected");} ?> >Loopbacks</option>
|
||||
@@ -28,9 +38,19 @@
|
||||
<input style="align:right;" type=submit value=Search></div>
|
||||
</td>
|
||||
</form>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<b class='rounded'>
|
||||
<b class='rounded5'></b>
|
||||
<b class='rounded4'></b>
|
||||
<b class='rounded3'></b>
|
||||
<b class='rounded2'><b></b></b>
|
||||
<b class='rounded1'><b></b></b></b>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
@@ -1,7 +1,16 @@
|
||||
<table cellpadding=2 cellspacing=0 class=devicetable width=100%>
|
||||
<tr bgcolor='#eeeeee' style='padding: 3px;'>
|
||||
<div style='margin:auto; text-align: center; margin-top: 0px; margin-bottom: 10px;'>
|
||||
<b class='rounded'>
|
||||
<b class='rounded1'><b></b></b>
|
||||
<b class='rounded2'><b></b></b>
|
||||
<b class='rounded3'></b>
|
||||
<b class='rounded4'></b>
|
||||
<b class='rounded5'></b></b>
|
||||
<div class='roundedfg' style='padding: 0px 5px;'>
|
||||
<div style='margin: auto; text-align: left; padding: 5px 5px; padding-left: 10px; clear: both; display:block;'>
|
||||
<table cellpadding=0 cellspacing=0 class=devicetable width=100%>
|
||||
<tr>
|
||||
<form method='post' action=''>
|
||||
<td width='200' style="padding: 10px;">
|
||||
<td width='200'>
|
||||
<select name='device_id' id='device_id'>
|
||||
<option value=''>All Devices</option>
|
||||
<?php
|
||||
@@ -14,7 +23,7 @@
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
<td width='200' style="padding: 10px;">
|
||||
<td width='200'>
|
||||
<select name='interface' id='interface'>
|
||||
<option value=''>All Interfaces</option>
|
||||
<option value='Loopback%' <?php if($_POST['interface'] == "Loopback%"){ echo("selected");} ?> >Loopbacks</option>
|
||||
@@ -32,6 +41,17 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<b class='rounded'>
|
||||
<b class='rounded5'></b>
|
||||
<b class='rounded4'></b>
|
||||
<b class='rounded3'></b>
|
||||
<b class='rounded2'><b></b></b>
|
||||
<b class='rounded1'><b></b></b></b>
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
echo("<table width=100%>");
|
||||
|
@@ -9,20 +9,24 @@ while($pw_a = mysql_fetch_array($query)) {
|
||||
$i = 0;
|
||||
while ($i < count($linkdone)) {
|
||||
$thislink = $pw_a['device_id'] . $pw_a['interface_id'];
|
||||
if ($linkdone[$i] == $thislink) { $dupe = "yes"; }
|
||||
if ($linkdone[$i] == $thislink) { $skip = "yes"; }
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
if($dupe) {
|
||||
unset($dupe);
|
||||
} else {
|
||||
if($bg == "#ffffff") { $bg = "#e5e5e5"; } else { $bg="#ffffff"; }
|
||||
$pw_b = mysql_fetch_array(mysql_query("SELECT * from `devices` AS D, `interfaces` AS I, `pseudowires` AS P WHERE D.device_id = '".$pw_a['peer_device_id']."' AND
|
||||
$pw_b = mysql_fetch_array(mysql_query("SELECT * from `devices` AS D, `interfaces` AS I, `pseudowires` AS P WHERE D.device_id = '".$pw_a['peer_device_id']."' AND
|
||||
D.device_id = I.device_id AND
|
||||
P.cpwVcID = '".$pw_a['cpwVcID']."' AND
|
||||
P.interface_id = I.interface_id"));
|
||||
|
||||
if(!interfacepermitted($pw_a['interface_id'])) { $skip = "yes"; }
|
||||
if(!interfacepermitted($pw_b['interface_id'])) { $skip = "yes"; }
|
||||
|
||||
|
||||
if($skip) {
|
||||
unset($skip);
|
||||
} else {
|
||||
if($bg == "#ffffff") { $bg = "#e5e5e5"; } else { $bg="#ffffff"; }
|
||||
|
||||
echo("<tr style=\"background-color: $bg;\"><td rowspan=2 style='font-size:18px; padding:4px;'>".$pw_a['cpwVcID']."</td><td>".generatedevicelink($pw_a)."</td><td>".generateiflink($pw_a)."</td>
|
||||
<td rowspan=2> => </td>
|
||||
<td>".generatedevicelink($pw_b)."</td><td>".generateiflink($pw_b)."</td></tr>");
|
||||
|
@@ -1,13 +1,32 @@
|
||||
<?php
|
||||
|
||||
if($_SESSION['userlevel'] >= '5') {
|
||||
|
||||
echo("
|
||||
<div style='background-color: ".$list_colour_b."; margin: auto; margin-bottom: 5px; text-align: left; padding: 7px; padding-left: 11px; clear: both; display:block; height:20px;'>
|
||||
<div style='margin:auto; text-align: center; margin-top: 0px; margin-bottom: 10px;'>
|
||||
<b class='rounded'>
|
||||
<b class='rounded1'><b></b></b>
|
||||
<b class='rounded2'><b></b></b>
|
||||
<b class='rounded3'></b>
|
||||
<b class='rounded4'></b>
|
||||
<b class='rounded5'></b></b>
|
||||
<div class='roundedfg' style='padding: 0px 5px;'>
|
||||
<div style='margin: auto; text-align: left; padding: 2px 5px; padding-left: 11px; clear: both; display:block; height:20px;'>
|
||||
<a href='".$config['base_url']. "/vrfs/'>Basic</a> | Graphs :
|
||||
<a href='".$config['base_url']. "/vrfs/bits/'>Bits</a> |
|
||||
<a href='".$config['base_url']. "/vrfs/pkts/'>Packets</a> |
|
||||
<a href='".$config['base_url']. "/vrfs/nupkts/'>NU Packets</a> |
|
||||
<a href='".$config['base_url']. "/vrfs/errors/'>Errors</a>
|
||||
</div> ");
|
||||
</div>
|
||||
</div>
|
||||
<b class='rounded'>
|
||||
<b class='rounded5'></b>
|
||||
<b class='rounded4'></b>
|
||||
<b class='rounded3'></b>
|
||||
<b class='rounded2'><b></b></b>
|
||||
<b class='rounded1'><b></b></b></b>
|
||||
</div>
|
||||
");
|
||||
|
||||
|
||||
echo("<div style='margin: 5px;'><table border=0 cellspacing=0 cellpadding=5 width=100%>");
|
||||
@@ -16,45 +35,38 @@ echo("
|
||||
while($vrf = mysql_fetch_array($vrf_query)) {
|
||||
|
||||
if(!is_integer($i/2)) { $bg_colour = $list_colour_a; } else { $bg_colour = $list_colour_b; }
|
||||
|
||||
echo("<tr valign=top bgcolor='$bg_colour'>");
|
||||
|
||||
echo("<td width=240><a class=list-large href='vrf/".$vrf['mplsVpnVrfRouteDistinguisher']."/'>" . $vrf['vrf_name'] . "</a><br /><span class=box-desc>" . $vrf['mplsVpnVrfDescription'] . "</span></td>");
|
||||
echo("<td width=100 class=box-desc>" . $vrf['mplsVpnVrfRouteDistinguisher'] . "</td>");
|
||||
|
||||
# echo("<td width=200 class=box-desc>" . $vrf['mplsVpnVrfDescription'] . "</td>");
|
||||
|
||||
#echo("<td width=200 class=box-desc>" . $vrf['mplsVpnVrfDescription'] . "</td>");
|
||||
echo("<td><table border=0 cellspacing=0 cellpadding=5 width=100%>");
|
||||
|
||||
$devices = mysql_query("SELECT * FROM `vrfs` AS V, `devices` AS D WHERE `mplsVpnVrfRouteDistinguisher` = '".$vrf['mplsVpnVrfRouteDistinguisher']."' AND D.device_id = V.device_id");
|
||||
$x=1;
|
||||
while($device = mysql_fetch_array($devices)) {
|
||||
|
||||
if(!is_integer($i/2)) {
|
||||
if(!is_integer($x/2)) { $dev_colour = $list_colour_a_a; } else { $dev_colour = $list_colour_a_b; }
|
||||
} else {
|
||||
if(!is_integer($x/2)) { $dev_colour = $list_colour_b_b; } else { $dev_colour = $list_colour_b_a; }
|
||||
}
|
||||
echo("<tr bgcolor='$dev_colour'><td width=150>".generatedevicelink($device));
|
||||
echo("<tr bgcolor='$dev_colour'><td width=150>".generatedevicelink($device, shorthost($device['hostname'])));
|
||||
if($device['vrf_name'] != $vrf['vrf_name']) { echo("<a href='#' onmouseover=\" return overlib('Expected Name : ".$vrf['vrf_name']."<br />Configured : ".$device['vrf_name']."', CAPTION, '<span class=list-large>VRF Inconsistency</span>' ,FGCOLOR,'#e5e5e5', BGCOLOR, '#c0c0c0', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#050505');\" onmouseout=\"return nd();\"> <img align=absmiddle src=images/16/exclamation.png></a>"); }
|
||||
echo("</td><td>");
|
||||
$interfaces = mysql_query("SELECT * FROM `interfaces` WHERE `ifVrf` = '".$device['vrf_id']."' and device_id = '".$device['device_id']."'");
|
||||
unset($seperator);
|
||||
while($port = mysql_fetch_array($interfaces)) {
|
||||
|
||||
if($_GET['opta']) {
|
||||
$graph_type = $_GET['opta'];
|
||||
include("includes/print-port-thumbs.inc.php");
|
||||
|
||||
} else {
|
||||
|
||||
$port = array_merge ($device, $port);
|
||||
echo($seperator.generateiflink($port,makeshortif($port['ifDescr'])));
|
||||
$seperator = ", ";
|
||||
}
|
||||
if($_GET['opta']) {
|
||||
$graph_type = $_GET['opta'];
|
||||
include("includes/print-port-thumbs.inc.php");
|
||||
} else {
|
||||
$port = array_merge ($device, $port);
|
||||
echo($seperator.generateiflink($port,makeshortif($port['ifDescr'])));
|
||||
$seperator = ", ";
|
||||
}
|
||||
}
|
||||
echo("</td></tr>");
|
||||
$x++;
|
||||
}
|
||||
} // End While
|
||||
|
||||
echo("</table></td>");
|
||||
|
||||
@@ -63,5 +75,11 @@ echo("
|
||||
}
|
||||
echo("</table></div>");
|
||||
|
||||
} else {
|
||||
|
||||
include("includes/error-no-perm.inc.php");
|
||||
|
||||
} ## End Permission if
|
||||
|
||||
?>
|
||||
|
||||
|
Reference in New Issue
Block a user