mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
some bugfixing
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
$common_output[] = '
|
||||
<div class="table-responsive">
|
||||
<table id="stp-ports" class="table table-condensed table-hover table-striped">
|
||||
<table id="stp-ports" class="table table-condensed table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-column-id="port">Port</th>
|
||||
@@ -14,16 +14,17 @@ $common_output[] = '
|
||||
<th data-column-id="designatedCost">Designated cost</th>
|
||||
<th data-column-id="designatedBridge">Designated bridge</th>
|
||||
<th data-column-id="designatedPort">Designated port</th>
|
||||
<th data-column-id="forwardTransitions">Fwd trasitions</th>
|
||||
<th data-column-id="forwardTransitions">Forward transitions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<table>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
var grid = $("#stp-ports").bootgrid( {
|
||||
ajax: true,
|
||||
templates: {search: ""},
|
||||
post: function ()
|
||||
{
|
||||
return {
|
||||
|
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
echo '<table class="table table-condensed table-striped table-hover">';
|
||||
$stp_raw = dbFetchRow('SELECT * FROM `stp` WHERE `device_id` = ?', array($device['device_id']));
|
||||
$stp = array (
|
||||
'Root bridge' => ($stp_raw['rootBridge'] == 1) ? 'Yes' : 'No',
|
||||
@@ -22,8 +23,9 @@ $stp = array (
|
||||
foreach (array_keys($stp) as $key) {
|
||||
echo "
|
||||
<tr>
|
||||
<td width=280 class=list-large>$key</td>
|
||||
<td class=box-desc>$stp[$key]</td>
|
||||
<td>$key</td>
|
||||
<td>$stp[$key]</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
echo '</table>';
|
||||
|
@@ -6,7 +6,7 @@ $param[] = $device_id;
|
||||
|
||||
$sql = " FROM `ports_stp` `ps` JOIN `ports` `p` ON `ps`.`port_id`=`p`.`port_id` WHERE `ps`.`device_id` = ?";
|
||||
|
||||
$count_sql = "SELECT COUNT(ports_stp_id) $sql";
|
||||
$count_sql = "SELECT COUNT(*) $sql";
|
||||
$total = dbFetchCell($count_sql, $param);
|
||||
if (empty($total)) {
|
||||
$total = 0;
|
||||
|
Reference in New Issue
Block a user