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 @@
";
+echo "";
+echo "
";
+echo '';
echo '
- | Port |
- Priority |
- State |
- Enable |
- Path cost |
- Designated root |
- Designated cost |
- Designated bridge |
- Designated port |
- Fwd trasitions |
+ Port |
+ Priority |
+ State |
+ Enable |
+ Path cost |
+ Designated root |
+ Designated cost |
+ Designated bridge |
+ Designated port |
+ Fwd trasitions |
';
+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 "| $value | ";
}
-
echo '
';
}
+echo '';
+echo '
';
+echo '
';
+// FIXME make table with links and searcheable
+//
+?>
+
+