mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
GUI - Fix the detailed access point view (#12543)
* Fix the detailed access point view * Removing unused old tab file
This commit is contained in:
@@ -804,7 +804,7 @@ function generate_ap_link($args, $text = null, $type = null)
|
||||
|
||||
function generate_ap_url($ap, $vars = [])
|
||||
{
|
||||
return generate_url(['page' => 'device', 'device' => $ap['device_id'], 'tab' => 'accesspoint', 'ap' => $ap['accesspoint_id']], $vars);
|
||||
return generate_url(['page' => 'device', 'device' => $ap['device_id'], 'tab' => 'accesspoints', 'ap' => $ap['accesspoint_id']], $vars);
|
||||
}//end generate_ap_url()
|
||||
|
||||
// Find all the files in the given directory that match the pattern
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
echo "<div style='margin: 0px;'><table border=0 cellspacing=0 cellpadding=5 width=100%>";
|
||||
|
||||
$i = '1';
|
||||
|
||||
$ap = dbFetchRow("SELECT * FROM `access_points` WHERE `device_id` = ? AND `accesspoint_id` = ? AND `deleted` = '0' ORDER BY `name`,`radio_number` ASC", [$device['device_id'], $vars['ap']]);
|
||||
|
||||
echo "<div class=ifcell style='margin: 0px;'><table width=100% cellpadding=10 cellspacing=0>";
|
||||
|
||||
require 'includes/html/print-accesspoint.inc.php';
|
||||
|
||||
echo '</table></div>';
|
||||
@@ -4,7 +4,11 @@ echo "<div style='margin: 0px;'><table border=0 cellspacing=0 cellpadding=5 widt
|
||||
|
||||
$i = '1';
|
||||
|
||||
$aps = dbFetchRows("SELECT * FROM `access_points` WHERE `device_id` = ? AND `deleted` = '0' ORDER BY `name`,`radio_number` ASC", [$device['device_id']]);
|
||||
if ($vars['ap'] > 0) { //We have a selected AP
|
||||
$aps = dbFetchRows("SELECT * FROM `access_points` WHERE `device_id` = ? AND `accesspoint_id` = ? AND `deleted` = '0' ORDER BY `name`,`radio_number` ASC", [$device['device_id'], $vars['ap']]);
|
||||
} else {
|
||||
$aps = dbFetchRows("SELECT * FROM `access_points` WHERE `device_id` = ? AND `deleted` = '0' ORDER BY `name`,`radio_number` ASC", [$device['device_id']]);
|
||||
}
|
||||
echo "<div style='margin: 0px;'><table border=0 cellspacing=0 cellpadding=5 width=100%>";
|
||||
foreach ($aps as $ap) {
|
||||
include 'includes/html/print-accesspoint.inc.php';
|
||||
|
||||
@@ -12,7 +12,7 @@ if ($int_colour) {
|
||||
}
|
||||
}
|
||||
|
||||
$text = $ap['name'] . ' ' . $ap['type'];
|
||||
$text = $ap['name'] . ' (' . $ap['type'] . ')';
|
||||
$ap['text'] = $text;
|
||||
|
||||
echo "<tr style=\"background-color: $row_colour;\" valign=top onmouseover=\"this.style.backgroundColor='" . Config::get('list_colour.highlight') . "';\" onmouseout=\"this.style.backgroundColor='$row_colour';\" onclick=\"location.href='" . generate_ap_url($ap) . "/'\" style='cursor: pointer;'>
|
||||
@@ -43,7 +43,7 @@ echo "<i class='fa fa-wifi fa-lg icon-theme' aria-hidden='true'></i> " . format_
|
||||
|
||||
echo '</td></tr>';
|
||||
|
||||
if ($vars['tab'] == 'accesspoint') {
|
||||
if ($vars['ap'] > 0) { // We have a selected AP, let's show details
|
||||
$graph_type = 'accesspoints_numasoclients';
|
||||
echo "<tr style='background-color: $row_colour; padding: 0px;'><td colspan=7>";
|
||||
echo "<div class='graphhead'>Associated Clients</div>";
|
||||
|
||||
Reference in New Issue
Block a user