From acce06e54e66c5f59ff4f6ddd51ffeb60b67ece4 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Sat, 9 Jan 2010 17:37:51 +0000 Subject: [PATCH] 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 --- html/includes/edit-host.inc | 6 +++++- html/pages/device/bgp.inc.php | 20 +++----------------- html/pages/device/edit.inc.php | 29 ++++++++++++++++++----------- 3 files changed, 26 insertions(+), 29 deletions(-) diff --git a/html/includes/edit-host.inc b/html/includes/edit-host.inc index bf1304407..8f034f2bc 100644 --- a/html/includes/edit-host.inc +++ b/html/includes/edit-host.inc @@ -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(); diff --git a/html/pages/device/bgp.inc.php b/html/pages/device/bgp.inc.php index 87539e357..69504db52 100644 --- a/html/pages/device/bgp.inc.php +++ b/html/pages/device/bgp.inc.php @@ -5,16 +5,9 @@ echo("
Local AS : " . $device['bgpLocalAs'] . "
"); +print_optionbar_start(); echo(" -
- - - - - - -
-
+
No Graphs | Updates | Prefixes: IPv4 | @@ -23,15 +16,8 @@ echo(" | Traffic: Mac Accounting
-
- - - - - - -
"); +print_optionbar_end(); echo("
"); diff --git a/html/pages/device/edit.inc.php b/html/pages/device/edit.inc.php index c411ac32a..5a9f50bf0 100644 --- a/html/pages/device/edit.inc.php +++ b/html/pages/device/edit.inc.php @@ -38,13 +38,22 @@ echo("
- +
- - + + + + + + -
Description
Description
SNMP Community
+ +
+ Type @@ -58,12 +67,12 @@ echo(" - - + - - + "); @@ -76,9 +85,7 @@ echo(" -
Disable
Disable
Ignore
Ignore
"); - - echo("
"); +
"); }