From b476c5bf99db035511323daf1efe46ab85d825bb Mon Sep 17 00:00:00 2001 From: vitalisator Date: Thu, 14 Jan 2016 16:54:07 +0100 Subject: [PATCH 01/11] add STP Ports --- html/pages/device/stp.inc.php | 14 ++++--- includes/discovery/stp.inc.php | 67 +++++++++++++++++++++++++++++++++- includes/polling/stp.inc.php | 55 +++++++++++++++++++++++++++- 3 files changed, 129 insertions(+), 7 deletions(-) diff --git a/html/pages/device/stp.inc.php b/html/pages/device/stp.inc.php index 74a803b0b..52dda8028 100644 --- a/html/pages/device/stp.inc.php +++ b/html/pages/device/stp.inc.php @@ -15,7 +15,7 @@ if (!$vars['view']) { } $menu_options['basic'] = 'Basic'; -// $menu_options['details'] = 'Details'; +$menu_options['ports'] = 'Ports'; $sep = ''; foreach ($menu_options as $option => $text) { echo $sep; @@ -37,12 +37,16 @@ print_optionbar_end(); echo ''; -$i = '1'; - -foreach (dbFetchRows("SELECT * FROM `stp` WHERE `device_id` = ? ORDER BY 'stp_id'", array($device['device_id'])) as $stp) { +if ($vars['view'] == 'basic') { + //$i = '1'; + foreach (dbFetchRows("SELECT * FROM `stp` WHERE `device_id` = ? ORDER BY 'stp_id'", array($device['device_id'])) as $stp) { include 'includes/print-stp.inc.php'; + // $i++; + } +} - $i++; +if ($vars['view'] == 'ports') { + include 'includes/print-stp-ports.inc.php'; } echo '
'; diff --git a/includes/discovery/stp.inc.php b/includes/discovery/stp.inc.php index c6be49f56..6e85a8ff0 100644 --- a/includes/discovery/stp.inc.php +++ b/includes/discovery/stp.inc.php @@ -112,7 +112,72 @@ if ($stpprotocol == 'ieee8021d' || $stpprotocol == 'unknown') { log_event('STP removed', $device, 'stp'); echo '-'; } + + // STP port related stuff + foreach ($stp_raw as $port => $value){ + if ($port) { // $stp_raw[0] ist not port related so we skip this one + $stp_port = array( + 'priority' => $stp_raw[$port]['dot1dStpPortPriority'], + 'state' => $stp_raw[$port]['dot1dStpPortState'], + 'enable' => $stp_raw[$port]['dot1dStpPortEnable'], + 'pathCost' => $stp_raw[$port]['dot1dStpPortPathCost'], + 'designatedCost' => $stp_raw[$port]['dot1dStpPortDesignatedCost'], + 'designatedPort' => $stp_raw[$port]['dot1dStpPortDesignatedPort'], + 'forwardTransitions' => $stp_raw[$port]['dot1dStpPortForwardTransitions'] + ); + + // set device binding + $stp_port['device_id'] = $device['device_id']; + + // set port binding + $stp_port['port_id'] = dbFetchCell('SELECT port_id FROM `ports` WHERE `device_id` = ? AND `ifIndex` = ?', array($device['device_id'], $stp_raw[$port]['dot1dStpPort'])); + + $dr = str_replace(array(' ', ':', '-'), '', strtolower($stp_raw[$port]['dot1dStpPortDesignatedRoot'])); + $dr = substr($dr, -12); //remove first two octets + $stp_port['designatedRoot'] = $dr; + + $db = str_replace(array(' ', ':', '-'), '', strtolower($stp_raw[$port]['dot1dStpPortDesignatedBridge'])); + $db = substr($db, -12); //remove first two octets + $stp_port['designatedBridge'] = $db; + + if ($device['os'] == 'pbn') { + // It seems that PBN guys don't care about ieee 802.1d :-( + // So try to find the right port with some crazy conversations + $dp_value = dechex($stp_port['priority']); + $dp_value = $dp_value.'00'; + $dp_value = hexdec($dp_value); + if ($stp_raw[$port]['dot1dStpPortDesignatedPort']) { + $dp = $stp_raw[$port]['dot1dStpPortDesignatedPort'] - $dp_value; + $stp_port['designatedPort'] = $dp; + } + } + else { + // Port saved in format priority+port (ieee 802.1d-1998: clause 8.5.5.1) + $dp = substr($stp_raw[$port]['dot1dStpPortDesignatedPort'], -2); //discard the first octet (priority part) + $stp_port['designatedPort'] = hexdec($dp); + } + + d_echo($stp_port); + + // Write to db + if (!dbFetchCell('SELECT 1 FROM `ports_stp` WHERE `device_id` = ? AND `port_id` = ?', array($device['device_id'], $stp_port['port_id']))) { + dbInsert($stp_port,'ports_stp'); + echo '+'; + } + } + } + + // Delete STP ports from db if absent in SNMP query + $stp_port_db = dbFetchRows('SELECT * FROM `ports_stp` WHERE `device_id` = ?', array($device['device_id'])); + //d_echo($stp_port_db); + foreach($stp_port_db as $port => $value){ + $if_index = dbFetchCell('SELECT `ifIndex` FROM `ports` WHERE `device_id` = ? AND `port_id` = ?', array($device['device_id'], $value['port_id'])); + if ($if_index != $stp_raw[$if_index]['dot1dStpPort']){ + dbDelete('ports_stp', '`device_id` = ? AND `port_id` = ?', array($device['device_id'], $value['port_id'])); + echo '-'; + } + } } -unset($stp_raw, $stp, $stp_db); +unset($stp_raw, $stp, $stp_db, $stp_port, $stp_port_db); echo "\n"; diff --git a/includes/polling/stp.inc.php b/includes/polling/stp.inc.php index d9886a58c..a7003659c 100644 --- a/includes/polling/stp.inc.php +++ b/includes/polling/stp.inc.php @@ -39,6 +39,7 @@ if ($stpprotocol == 'ieee8021d' || $stpprotocol == 'unknown') { // read the 802.1D subtree $stp_raw = snmpwalk_cache_oid($device, 'dot1dStp', array(), 'RSTP-MIB'); + d_echo($stp_raw); $stp = array( 'protocolSpecification' => $stp_raw[0]['dot1dStpProtocolSpecification'], 'priority' => $stp_raw[0]['dot1dStpPriority'], @@ -121,7 +122,59 @@ if ($stpprotocol == 'ieee8021d' || $stpprotocol == 'unknown') { dbUpdate($stp,'stp','device_id = ?', array($device['device_id'])); echo '.'; } + + // STP port related stuff + foreach ($stp_raw as $port => $value){ + if ($port) { // $stp_raw[0] ist not port related so we skip this one + $stp_port = array( + 'priority' => $stp_raw[$port]['dot1dStpPortPriority'], + 'state' => $stp_raw[$port]['dot1dStpPortState'], + 'enable' => $stp_raw[$port]['dot1dStpPortEnable'], + 'pathCost' => $stp_raw[$port]['dot1dStpPortPathCost'], + 'designatedCost' => $stp_raw[$port]['dot1dStpPortDesignatedCost'], + 'designatedPort' => $stp_raw[$port]['dot1dStpPortDesignatedPort'], + 'forwardTransitions' => $stp_raw[$port]['dot1dStpPortForwardTransitions'] + ); + + // set device binding + $stp_port['device_id'] = $device['device_id']; + + // set port binding + $stp_port['port_id'] = dbFetchCell('SELECT port_id FROM `ports` WHERE `device_id` = ? AND `ifIndex` = ?', array($device['device_id'], $stp_raw[$port]['dot1dStpPort'])); + + $dr = str_replace(array(' ', ':', '-'), '', strtolower($stp_raw[$port]['dot1dStpPortDesignatedRoot'])); + $dr = substr($dr, -12); //remove first two octets + $stp_port['designatedRoot'] = $dr; + + $db = str_replace(array(' ', ':', '-'), '', strtolower($stp_raw[$port]['dot1dStpPortDesignatedBridge'])); + $db = substr($db, -12); //remove first two octets + $stp_port['designatedBridge'] = $db; + + if ($device['os'] == 'pbn') { + // It seems that PBN guys don't care about ieee 802.1d :-( + // So try to find the right port with some crazy conversations + $dp_value = dechex($stp_port['priority']); + $dp_value = $dp_value.'00'; + $dp_value = hexdec($dp_value); + if ($stp_raw[$port]['dot1dStpPortDesignatedPort']) { + $dp = $stp_raw[$port]['dot1dStpPortDesignatedPort'] - $dp_value; + $stp_port['designatedPort'] = $dp; + } + } + else { + // Port saved in format priority+port (ieee 802.1d-1998: clause 8.5.5.1) + $dp = substr($stp_raw[$port]['dot1dStpPortDesignatedPort'], -2); //discard the first octet (priority part) + $stp_port['designatedPort'] = hexdec($dp); + } + + //d_echo($stp_port); + + // Update db + dbUpdate($stp_port,'ports_stp','`device_id` = ? AND `port_id` = ?', array($device['device_id'], $stp_port['port_id'])); + echo '.'; + } + } } -unset($stp_raw, $stp, $stp_db); +unset($stp_raw, $stp, $stp_db, $stp_port); echo "\n"; From 0e2a9f59aac64245ce212389b7ead1a3938acfb7 Mon Sep 17 00:00:00 2001 From: vitalisator Date: Thu, 14 Jan 2016 17:33:25 +0100 Subject: [PATCH 02/11] add print-stp-ports --- html/includes/print-stp-ports.inc.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 html/includes/print-stp-ports.inc.php diff --git a/html/includes/print-stp-ports.inc.php b/html/includes/print-stp-ports.inc.php new file mode 100644 index 000000000..504a6af27 --- /dev/null +++ b/html/includes/print-stp-ports.inc.php @@ -0,0 +1,26 @@ +PortPriorityStateEnablePath costDesignated rootDesignated costDesignated bridgeDesignated portFwd trasitions'; +//SELECT ps.*, p.ifIndex FROM `ports_stp` ps JOIN `ports` p ON ps.port_id=p.port_id WHERE ps.device_id = 67 ORDER BY ps.port_id +foreach (dbFetchRows("SELECT * FROM `ports_stp` WHERE `device_id` = ? ORDER BY 'port_id'", array($device['device_id'])) as $stp_ports_db) { + + $stp_ports = [ + $stp_ports_db['port_id'], + $stp_ports_db['priority'], + $stp_ports_db['state'], + $stp_ports_db['enable'], + $stp_ports_db['pathCost'], + $stp_ports_db['designatedRoot'], + $stp_ports_db['designatedCost'], + $stp_ports_db['designatedBridge'], + $stp_ports_db['designatedPort'], + $stp_ports_db['forwardTransitions'] + ]; + echo ''; + + foreach ($stp_ports as $value) { + echo "$value"; + } + + echo ''; +} From 41d5d097ef65c2a1adaec19fa9c0c78e7a5bc08d Mon Sep 17 00:00:00 2001 From: vitalisator Date: Sun, 17 Jan 2016 18:05:13 +0100 Subject: [PATCH 03/11] add some html page formatting --- html/includes/print-stp-ports.inc.php | 48 +++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 7 deletions(-) diff --git a/html/includes/print-stp-ports.inc.php b/html/includes/print-stp-ports.inc.php index 504a6af27..665b946fb 100644 --- a/html/includes/print-stp-ports.inc.php +++ b/html/includes/print-stp-ports.inc.php @@ -1,22 +1,56 @@ "; +echo ' + + + + + + + + + + + '; -echo ''; -//SELECT ps.*, p.ifIndex FROM `ports_stp` ps JOIN `ports` p ON ps.port_id=p.port_id WHERE ps.device_id = 67 ORDER BY ps.port_id -foreach (dbFetchRows("SELECT * FROM `ports_stp` WHERE `device_id` = ? ORDER BY 'port_id'", array($device['device_id'])) as $stp_ports_db) { +switch ($vars["sort"]) { + case 'transitions': + $sort = "ps.forwardTransitions DESC"; + break; + default: + $sort = "ps.port_id ASC"; + break; +} +$i='1'; + +// FIXME Table sorting don't working, why? +//echo "$sort"; +foreach (dbFetchRows("SELECT `ps`.*, `p`.* FROM `ports_stp` `ps` JOIN `ports` `p` ON `ps`.`port_id`=`p`.`port_id` WHERE `ps`.`device_id` = ? ORDER BY ?", array($device['device_id'], $sort)) as $stp_ports_db) { + + $bridge_device = dbFetchRow("SELECT `devices`.*, `stp`.`device_id`, `stp`.`bridgeAddress` FROM `devices` JOIN `stp` ON `devices`.`device_id`=`stp`.`device_id` WHERE `stp`.`bridgeAddress` = ?", array($stp_ports_db['designatedBridge'])); + $root_device = dbFetchRow("SELECT `devices`.*, `stp`.`device_id`, `stp`.`bridgeAddress` FROM `devices` JOIN `stp` ON `devices`.`device_id`=`stp`.`device_id` WHERE `stp`.`bridgeAddress` = ?", array($stp_ports_db['designatedRoot'])); $stp_ports = [ - $stp_ports_db['port_id'], + generate_port_link($stp_ports_db, $stp_ports_db['ifName'])."
".$stp_ports_db['ifAlias'], $stp_ports_db['priority'], $stp_ports_db['state'], $stp_ports_db['enable'], $stp_ports_db['pathCost'], - $stp_ports_db['designatedRoot'], + //$stp_ports_db['designatedRoot'], + generate_device_link($root_device, $root_device['hostname'])."
".$stp_ports_db['designatedRoot'], $stp_ports_db['designatedCost'], - $stp_ports_db['designatedBridge'], + generate_device_link($bridge_device, $bridge_device['hostname'])."
".$stp_ports_db['designatedBridge'], $stp_ports_db['designatedPort'], $stp_ports_db['forwardTransitions'] ]; - echo ''; + $i++; + if (!is_integer($i / 2)) { + $row_colour = $list_colour_b; + } + else { + $row_colour = $list_colour_a; + } + echo ""; foreach ($stp_ports as $value) { echo ""; From 1eaf7d7aab6dc4c949c1fae6c92e6ff53c3829ea Mon Sep 17 00:00:00 2001 From: vitalisator Date: Sun, 17 Jan 2016 23:22:43 +0100 Subject: [PATCH 04/11] 1st try to make bootgrid table --- html/includes/print-stp-ports.inc.php | 74 ++++++++++++++------------- 1 file changed, 39 insertions(+), 35 deletions(-) diff --git a/html/includes/print-stp-ports.inc.php b/html/includes/print-stp-ports.inc.php index 665b946fb..83916b307 100644 --- a/html/includes/print-stp-ports.inc.php +++ b/html/includes/print-stp-ports.inc.php @@ -1,31 +1,23 @@
PortPriorityStateEnablePath costDesignated rootDesignated costDesignated bridgeDesignated portFwd trasitions
PortPriorityStateEnablePath costDesignated rootDesignated costDesignated bridgeDesignated portFwd trasitions
$value
"; +echo "
"; +echo "
"; +echo ''; echo ' - - - - - - - - - - + + + + + + + + + + '; +echo ''; +echo ''; -switch ($vars["sort"]) { - case 'transitions': - $sort = "ps.forwardTransitions DESC"; - break; - default: - $sort = "ps.port_id ASC"; - break; -} -$i='1'; - -// FIXME Table sorting don't working, why? -//echo "$sort"; -foreach (dbFetchRows("SELECT `ps`.*, `p`.* FROM `ports_stp` `ps` JOIN `ports` `p` ON `ps`.`port_id`=`p`.`port_id` WHERE `ps`.`device_id` = ? ORDER BY ?", array($device['device_id'], $sort)) as $stp_ports_db) { +foreach (dbFetchRows("SELECT `ps`.*, `p`.* FROM `ports_stp` `ps` JOIN `ports` `p` ON `ps`.`port_id`=`p`.`port_id` WHERE `ps`.`device_id` = ?", array($device['device_id'])) as $stp_ports_db) { $bridge_device = dbFetchRow("SELECT `devices`.*, `stp`.`device_id`, `stp`.`bridgeAddress` FROM `devices` JOIN `stp` ON `devices`.`device_id`=`stp`.`device_id` WHERE `stp`.`bridgeAddress` = ?", array($stp_ports_db['designatedBridge'])); $root_device = dbFetchRow("SELECT `devices`.*, `stp`.`device_id`, `stp`.`bridgeAddress` FROM `devices` JOIN `stp` ON `devices`.`device_id`=`stp`.`device_id` WHERE `stp`.`bridgeAddress` = ?", array($stp_ports_db['designatedRoot'])); @@ -36,25 +28,37 @@ foreach (dbFetchRows("SELECT `ps`.*, `p`.* FROM `ports_stp` `ps` JOIN `ports` `p $stp_ports_db['state'], $stp_ports_db['enable'], $stp_ports_db['pathCost'], - //$stp_ports_db['designatedRoot'], generate_device_link($root_device, $root_device['hostname'])."
".$stp_ports_db['designatedRoot'], $stp_ports_db['designatedCost'], generate_device_link($bridge_device, $bridge_device['hostname'])."
".$stp_ports_db['designatedBridge'], $stp_ports_db['designatedPort'], $stp_ports_db['forwardTransitions'] ]; - $i++; - if (!is_integer($i / 2)) { - $row_colour = $list_colour_b; - } - else { - $row_colour = $list_colour_a; - } - echo ""; - + + echo ""; foreach ($stp_ports as $value) { echo ""; } - echo ''; } +echo ''; +echo '
PortPriorityStateEnablePath costDesignated rootDesignated costDesignated bridgeDesignated portFwd trasitionsPortPriorityStateEnablePath costDesignated rootDesignated costDesignated bridgeDesignated portFwd trasitions
$value
'; +echo ''; +// FIXME make table with links and searcheable +// +?> + + From dc933184f0c6df97b44a2dcec123444d7854679f Mon Sep 17 00:00:00 2001 From: vitalisator Date: Sun, 24 Jan 2016 18:17:09 +0100 Subject: [PATCH 05/11] stp-ports bootgrid 1 --- html/includes/common/stp-ports.inc.php | 37 +++++++++++++++ html/includes/print-stp-ports.inc.php | 64 -------------------------- html/includes/table/stp-ports.inc.php | 55 ++++++++++++++++++++++ html/pages/device/stp.inc.php | 3 +- 4 files changed, 94 insertions(+), 65 deletions(-) create mode 100644 html/includes/common/stp-ports.inc.php delete mode 100644 html/includes/print-stp-ports.inc.php create mode 100644 html/includes/table/stp-ports.inc.php diff --git a/html/includes/common/stp-ports.inc.php b/html/includes/common/stp-ports.inc.php new file mode 100644 index 000000000..34b863952 --- /dev/null +++ b/html/includes/common/stp-ports.inc.php @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + +
PortPriorityStateEnablePath costDesignated rootDesignated costDesignated bridgeDesignated portFwd trasitions
+ + + +'; diff --git a/html/includes/print-stp-ports.inc.php b/html/includes/print-stp-ports.inc.php deleted file mode 100644 index 83916b307..000000000 --- a/html/includes/print-stp-ports.inc.php +++ /dev/null @@ -1,64 +0,0 @@ -"; -echo "
"; -echo ''; -echo ' - - - - - - - - - - - '; -echo ''; -echo ''; - -foreach (dbFetchRows("SELECT `ps`.*, `p`.* FROM `ports_stp` `ps` JOIN `ports` `p` ON `ps`.`port_id`=`p`.`port_id` WHERE `ps`.`device_id` = ?", array($device['device_id'])) as $stp_ports_db) { - - $bridge_device = dbFetchRow("SELECT `devices`.*, `stp`.`device_id`, `stp`.`bridgeAddress` FROM `devices` JOIN `stp` ON `devices`.`device_id`=`stp`.`device_id` WHERE `stp`.`bridgeAddress` = ?", array($stp_ports_db['designatedBridge'])); - $root_device = dbFetchRow("SELECT `devices`.*, `stp`.`device_id`, `stp`.`bridgeAddress` FROM `devices` JOIN `stp` ON `devices`.`device_id`=`stp`.`device_id` WHERE `stp`.`bridgeAddress` = ?", array($stp_ports_db['designatedRoot'])); - - $stp_ports = [ - generate_port_link($stp_ports_db, $stp_ports_db['ifName'])."
".$stp_ports_db['ifAlias'], - $stp_ports_db['priority'], - $stp_ports_db['state'], - $stp_ports_db['enable'], - $stp_ports_db['pathCost'], - generate_device_link($root_device, $root_device['hostname'])."
".$stp_ports_db['designatedRoot'], - $stp_ports_db['designatedCost'], - generate_device_link($bridge_device, $bridge_device['hostname'])."
".$stp_ports_db['designatedBridge'], - $stp_ports_db['designatedPort'], - $stp_ports_db['forwardTransitions'] - ]; - - echo ""; - foreach ($stp_ports as $value) { - echo ""; - } - echo ''; -} -echo ''; -echo '
PortPriorityStateEnablePath costDesignated rootDesignated costDesignated bridgeDesignated portFwd trasitions
$value
'; -echo ''; -// FIXME make table with links and searcheable -// -?> - - diff --git a/html/includes/table/stp-ports.inc.php b/html/includes/table/stp-ports.inc.php new file mode 100644 index 000000000..f3e31b5fb --- /dev/null +++ b/html/includes/table/stp-ports.inc.php @@ -0,0 +1,55 @@ + generate_port_link($stp_ports_db, $stp_ports_db['ifName'])."
".$stp_ports_db['ifAlias'], + 'priority' => $stp_ports_db['priority'], + 'state' => $stp_ports_db['state'], + 'enable' => $stp_ports_db['enable'], + 'pathCost' => $stp_ports_db['pathCost'], + 'designatedRoot' => generate_device_link($root_device, $root_device['hostname'])."
".$stp_ports_db['designatedRoot'], + 'designatedCost' => $stp_ports_db['designatedCost'], + 'designatedBridge' => generate_device_link($bridge_device, $bridge_device['hostname'])."
".$stp_ports_db['designatedBridge'], + 'designatedPort' => $stp_ports_db['designatedPort'], + 'forwardTransitions' => $stp_ports_db['forwardTransitions'] + ); +} + +$output = array( + 'current' => $current, + 'rowCount' => $rowCount, + 'rows' => $response, + 'total' => $total, +); +echo _json_encode($output); diff --git a/html/pages/device/stp.inc.php b/html/pages/device/stp.inc.php index 52dda8028..ad8733aa1 100644 --- a/html/pages/device/stp.inc.php +++ b/html/pages/device/stp.inc.php @@ -46,7 +46,8 @@ if ($vars['view'] == 'basic') { } if ($vars['view'] == 'ports') { - include 'includes/print-stp-ports.inc.php'; + include 'includes/common/stp-ports.inc.php'; + echo implode('',$common_output); } echo ''; From 1de495ac0f91ef792ad52306f029a445b6243bd0 Mon Sep 17 00:00:00 2001 From: vitalisator Date: Sun, 24 Jan 2016 18:39:30 +0100 Subject: [PATCH 06/11] rebase --- sql-schema/094.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sql-schema/094.sql diff --git a/sql-schema/094.sql b/sql-schema/094.sql new file mode 100644 index 000000000..f6a4af91e --- /dev/null +++ b/sql-schema/094.sql @@ -0,0 +1,3 @@ +CREATE TABLE IF NOT EXISTS `ports_stp` (`port_stp_id` int(11) NOT NULL,`device_id` int(11) NOT NULL,`port_id` int(11) NOT NULL,`priority` tinyint(3) unsigned NOT NULL,`state` varchar(11) NOT NULL,`enable` varchar(8) NOT NULL,`pathCost` int(10) unsigned NOT NULL,`designatedRoot` varchar(32) NOT NULL,`designatedCost` smallint(5) unsigned NOT NULL,`designatedBridge` varchar(32) NOT NULL,`designatedPort` mediumint(9) NOT NULL,`forwardTransitions` int(10) unsigned NOT NULL) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; +ALTER TABLE `ports_stp` ADD PRIMARY KEY (`port_stp_id`), ADD UNIQUE KEY `device_id` (`device_id`,`port_id`); +ALTER TABLE `ports_stp` MODIFY `port_stp_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1; From 60603520dfeaca4b6d2994766084a8437252144c Mon Sep 17 00:00:00 2001 From: Neil Lathwood Date: Tue, 26 Jan 2016 01:40:08 +0000 Subject: [PATCH 07/11] Updated stp branch --- html/includes/common/stp-ports.inc.php | 3 ++- html/includes/table/stp-ports.inc.php | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/html/includes/common/stp-ports.inc.php b/html/includes/common/stp-ports.inc.php index 34b863952..862b514d5 100644 --- a/html/includes/common/stp-ports.inc.php +++ b/html/includes/common/stp-ports.inc.php @@ -27,7 +27,8 @@ var grid = $("#stp-ports").bootgrid( { post: function () { return { - id: "stp-ports" + id: "stp-ports", + device_id: ' . $device['device_id'] . ', }; }, url: "ajax_table.php" diff --git a/html/includes/table/stp-ports.inc.php b/html/includes/table/stp-ports.inc.php index f3e31b5fb..3a2113b0b 100644 --- a/html/includes/table/stp-ports.inc.php +++ b/html/includes/table/stp-ports.inc.php @@ -1,8 +1,10 @@ Date: Thu, 28 Jan 2016 13:07:33 +0100 Subject: [PATCH 08/11] some bugfixing --- html/includes/common/stp-ports.inc.php | 7 ++++--- html/includes/print-stp.inc.php | 6 ++++-- html/includes/table/stp-ports.inc.php | 2 +- html/pages/device/stp.inc.php | 8 -------- sql-schema/095.sql | 3 +++ 5 files changed, 12 insertions(+), 14 deletions(-) create mode 100644 sql-schema/095.sql diff --git a/html/includes/common/stp-ports.inc.php b/html/includes/common/stp-ports.inc.php index 862b514d5..c77ab7603 100644 --- a/html/includes/common/stp-ports.inc.php +++ b/html/includes/common/stp-ports.inc.php @@ -2,7 +2,7 @@ $common_output[] = '
- +
@@ -14,16 +14,17 @@ $common_output[] = ' - + -
PortDesignated cost Designated bridge Designated portFwd trasitionsForward transitions
+