mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02: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'];
|
$ignore = $_POST['ignore'];
|
||||||
$type = $_POST['type'];
|
$type = $_POST['type'];
|
||||||
$disabled = $_POST['disabled'];
|
$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);
|
$query = mysql_query($sql);
|
||||||
|
|
||||||
$rows_updated = mysql_affected_rows();
|
$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 style='float: left; font-size: 22px; font-weight: bold;'>Local AS : " . $device['bgpLocalAs'] . "</div>
|
||||||
</div>");
|
</div>");
|
||||||
|
|
||||||
|
print_optionbar_start();
|
||||||
echo("
|
echo("
|
||||||
<div style='margin:auto; text-align: center; margin-top: 0px; margin-bottom: 10px;'>
|
<div style='margin: auto; text-align: left; padding-left: 11px; clear: both; display:block; height:20px;'>
|
||||||
<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;'>
|
|
||||||
<a href='".$config['base_url']."/device/" . $_GET['id'] . "/bgp/'>No Graphs</a> |
|
<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/bgp_updates/'>Updates</a> | Prefixes:
|
||||||
<a href='".$config['base_url']."/device/" . $_GET['id'] . "/bgp/cbgp_prefixes/ipv4.unicast/'>IPv4</a> |
|
<a href='".$config['base_url']."/device/" . $_GET['id'] . "/bgp/cbgp_prefixes/ipv4.unicast/'>IPv4</a> |
|
||||||
@@ -23,15 +16,8 @@ echo("
|
|||||||
| Traffic:
|
| Traffic:
|
||||||
<a href='".$config['base_url']."/device/" . $_GET['id'] . "/bgp/macaccounting/'>Mac Accounting</a>
|
<a href='".$config['base_url']."/device/" . $_GET['id'] . "/bgp/macaccounting/'>Mac Accounting</a>
|
||||||
</div>
|
</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%>");
|
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=''>
|
<form id='edit' name='edit' method='post' action=''>
|
||||||
<input type=hidden name='editing' value='yes'>
|
<input type=hidden name='editing' value='yes'>
|
||||||
<table width='200' border='0'>
|
<table width='400' border='0'>
|
||||||
<tr>
|
<tr>
|
||||||
<td width='300'><div align='right'>Description</div></td>
|
<td><div align='right'>Description</div></td>
|
||||||
<td colspan='3'><input name='descr' size='32' value='$descr'></input></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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td align='right'>
|
||||||
Type
|
Type
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -58,12 +67,12 @@ echo("<table cellpadding=0 cellspacing=0><tr><td>
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width='300'><div align='right'>Disable</div></td>
|
<td><div align='right'>Disable</div></td>
|
||||||
<td width='300'><input name='disabled' type='checkbox' id='disabled' value='1'");
|
<td><input name='disabled' type='checkbox' id='disabled' value='1'");
|
||||||
if($device['disabled']) { echo("checked=checked"); }
|
if($device['disabled']) { echo("checked=checked"); }
|
||||||
echo("/></td>
|
echo("/></td>
|
||||||
<td width='300'><div align='right'>Ignore</div></td>
|
<td><div align='right'>Ignore</div></td>
|
||||||
<td width='300'><input name='ignore' type='checkbox' id='disable' value='1'");
|
<td><input name='ignore' type='checkbox' id='disable' value='1'");
|
||||||
if($device['ignore']) { echo("checked=checked"); }
|
if($device['ignore']) { echo("checked=checked"); }
|
||||||
echo("/></td>
|
echo("/></td>
|
||||||
</tr>");
|
</tr>");
|
||||||
@@ -76,9 +85,7 @@ echo("
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td width=50></td><td>");
|
<td width=50></td><td></td></tr></table>");
|
||||||
|
|
||||||
echo("</td></tr></table>");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user