mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
allow editing of community on device tab, fix yellow border on bgp page
git-svn-id: http://www.observium.org/svn/observer/trunk@639 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -4,8 +4,12 @@
|
||||
$ignore = $_POST['ignore'];
|
||||
$type = $_POST['type'];
|
||||
$disabled = $_POST['disabled'];
|
||||
$community = $_POST['community'];
|
||||
$snmpver = $_POST['snmpver'];
|
||||
|
||||
$sql = "UPDATE `devices` SET `purpose` = '$descr', `type` = '$type', `ignore` = '$ignore', `disabled` = '$disabled' WHERE `device_id` = '$_GET[id]'";
|
||||
#FIXME needs more sanity checking!
|
||||
$sql = "UPDATE `devices` SET `purpose` = '" . mysql_escape_string($descr) . "', `community` = '" . mysql_escape_string($community) . "', `type` = '$type'";
|
||||
$sql .= ", `snmpver` = '" . mysql_escape_string($snmpver) . "', `ignore` = '$ignore', `disabled` = '$disabled' WHERE `device_id` = '$_GET[id]'";
|
||||
$query = mysql_query($sql);
|
||||
|
||||
$rows_updated = mysql_affected_rows();
|
||||
|
@@ -5,16 +5,9 @@ echo("
|
||||
<div style='float: left; font-size: 22px; font-weight: bold;'>Local AS : " . $device['bgpLocalAs'] . "</div>
|
||||
</div>");
|
||||
|
||||
print_optionbar_start();
|
||||
echo("
|
||||
<div style='margin:auto; text-align: center; margin-top: 0px; margin-bottom: 10px;'>
|
||||
<b class='rounded'>
|
||||
<b class='rounded1'></b>
|
||||
<b class='rounded2'></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;'>
|
||||
<div style='margin: auto; text-align: left; padding-left: 11px; clear: both; display:block; height:20px;'>
|
||||
<a href='".$config['base_url']."/device/" . $_GET['id'] . "/bgp/'>No Graphs</a> |
|
||||
<a href='".$config['base_url']."/device/" . $_GET['id'] . "/bgp/bgp_updates/'>Updates</a> | Prefixes:
|
||||
<a href='".$config['base_url']."/device/" . $_GET['id'] . "/bgp/cbgp_prefixes/ipv4.unicast/'>IPv4</a> |
|
||||
@@ -23,15 +16,8 @@ echo("
|
||||
| Traffic:
|
||||
<a href='".$config['base_url']."/device/" . $_GET['id'] . "/bgp/macaccounting/'>Mac Accounting</a>
|
||||
</div>
|
||||
</div>
|
||||
<b class='rounded'>
|
||||
<b class='rounded5'></b>
|
||||
<b class='rounded4'></b>
|
||||
<b class='rounded3'></b>
|
||||
<b class='rounded2'></b>
|
||||
<b class='rounded1'></b></b>
|
||||
</div>
|
||||
");
|
||||
print_optionbar_end();
|
||||
|
||||
echo("<div style='margin: 5px;'><table border=0 cellspacing=0 cellpadding=5 width=100%>");
|
||||
|
||||
|
@@ -38,13 +38,22 @@ echo("<table cellpadding=0 cellspacing=0><tr><td>
|
||||
|
||||
<form id='edit' name='edit' method='post' action=''>
|
||||
<input type=hidden name='editing' value='yes'>
|
||||
<table width='200' border='0'>
|
||||
<table width='400' border='0'>
|
||||
<tr>
|
||||
<td width='300'><div align='right'>Description</div></td>
|
||||
<td colspan='3'><input name='descr' size='32' value='$descr'></input></td>
|
||||
<td><div align='right'>Description</div></td>
|
||||
<td colspan='3'><input name='descr' size='32' value='" . $device['purpose'] . "'></input></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width='300'><div align='right'>SNMP Community</div></td>
|
||||
<td colspan='3'><input name='community' size='20' value='" . $device['community'] . "'></input>
|
||||
<select name='snmpver'>
|
||||
<option value='v1'>v1</option>
|
||||
<option value='v2c'" . ($device['snmpver'] == 'v2c' ? 'selected=selected' : '') . ">v2c</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<td align='right'>
|
||||
Type
|
||||
</td>
|
||||
<td>
|
||||
@@ -58,12 +67,12 @@ echo("<table cellpadding=0 cellspacing=0><tr><td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width='300'><div align='right'>Disable</div></td>
|
||||
<td width='300'><input name='disabled' type='checkbox' id='disabled' value='1'");
|
||||
<td><div align='right'>Disable</div></td>
|
||||
<td><input name='disabled' type='checkbox' id='disabled' value='1'");
|
||||
if($device['disabled']) { echo("checked=checked"); }
|
||||
echo("/></td>
|
||||
<td width='300'><div align='right'>Ignore</div></td>
|
||||
<td width='300'><input name='ignore' type='checkbox' id='disable' value='1'");
|
||||
<td><div align='right'>Ignore</div></td>
|
||||
<td><input name='ignore' type='checkbox' id='disable' value='1'");
|
||||
if($device['ignore']) { echo("checked=checked"); }
|
||||
echo("/></td>
|
||||
</tr>");
|
||||
@@ -76,9 +85,7 @@ echo("
|
||||
</form>
|
||||
|
||||
</td>
|
||||
<td width=50></td><td>");
|
||||
|
||||
echo("</td></tr></table>");
|
||||
<td width=50></td><td></td></tr></table>");
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user