mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
add print-stp-ports
This commit is contained in:
26
html/includes/print-stp-ports.inc.php
Normal file
26
html/includes/print-stp-ports.inc.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
echo '<tr bgcolor="#ffffff"><th>Port</th><th>Priority</th><th>State</th><th>Enable</th><th>Path cost</th><th>Designated root</th><th>Designated cost</th><th>Designated bridge</th><th>Designated port</th><th>Fwd trasitions</th></tr>';
|
||||
//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 '<tr>';
|
||||
|
||||
foreach ($stp_ports as $value) {
|
||||
echo "<td>$value</td>";
|
||||
}
|
||||
|
||||
echo '</tr>';
|
||||
}
|
Reference in New Issue
Block a user