1 | <?php |
||
2 | |||
3 | use LibreNMS\Config; |
||
4 | |||
5 | if ($int_colour) { |
||
6 | $row_colour = $int_colour; |
||
7 | } else { |
||
8 | if (! is_integer($i / 2)) { |
||
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
9 | $row_colour = Config::get('list_colour.even'); |
||
10 | } else { |
||
11 | $row_colour = Config::get('list_colour.odd'); |
||
12 | } |
||
13 | } |
||
14 | |||
15 | $text = $ap['name'] . ' (' . $ap['type'] . ')'; |
||
16 | $ap['text'] = $text; |
||
17 | |||
18 | 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;'> |
||
19 | <td valign=top width=350>"; |
||
20 | echo ' <span class=list-large> ' . generate_ap_link($ap, " $text </span><br />"); |
||
21 | echo '<span class=interface-desc>'; |
||
22 | echo "$break" . $ap['mac_addr'] . '<br>' . $ap['type'] . ' - channel ' . $ap['channel']; |
||
23 | echo "<br />txpow $ap[txpow]"; |
||
24 | echo '</span>'; |
||
25 | echo '</td><td width=100>'; |
||
26 | |||
27 | echo '</td><td width=150>'; |
||
28 | $ap['graph_type'] = 'accesspoints_numasoclients'; |
||
29 | echo generate_ap_link($ap, "<img src='graph.php?type=$ap[graph_type]&id=" . $ap['accesspoint_id'] . '&from=' . Config::get('time.day') . '&to=' . Config::get('time.now') . '&width=100&height=20&legend=no&bg=' . str_replace('#', '', $row_colour) . "'>"); |
||
30 | echo "<br>\n"; |
||
31 | $ap['graph_type'] = 'accesspoints_radioutil'; |
||
32 | echo generate_ap_link($ap, "<img src='graph.php?type=$ap[graph_type]&id=" . $ap['accesspoint_id'] . '&from=' . Config::get('time.day') . '&to=' . Config::get('time.now') . '&width=100&height=20&legend=no&bg=' . str_replace('#', '', $row_colour) . "'>"); |
||
33 | echo "<br>\n"; |
||
34 | $ap['graph_type'] = 'accesspoints_interference'; |
||
35 | echo generate_ap_link($ap, "<img src='graph.php?type=$ap[graph_type]&id=" . $ap['accesspoint_id'] . '&from=' . Config::get('time.day') . '&to=' . Config::get('time.now') . '&width=100&height=20&legend=no&bg=' . str_replace('#', '', $row_colour) . "'>"); |
||
36 | echo "<br>\n"; |
||
37 | |||
38 | echo '</td><td width=120>'; |
||
39 | |||
40 | echo "<i class='fa fa-wifi fa-lg icon-theme' aria-hidden='true'></i> " . \LibreNMS\Util\Number::formatBi($ap['numasoclients'], 2, 3, '') . ' Clients<br />'; |
||
41 | echo "<i class='fa fa-wifi fa-lg icon-theme' aria-hidden='true'></i> " . \LibreNMS\Util\Number::formatBi($ap['radioutil'], 2, 3, '') . ' % busy<br />'; |
||
42 | echo "<i class='fa fa-wifi fa-lg icon-theme' aria-hidden='true'></i> " . \LibreNMS\Util\Number::formatBi($ap['interference'], 2, 3, '') . ' interference index<br />'; |
||
43 | |||
44 | echo '</td></tr>'; |
||
45 | |||
46 | if ($vars['ap'] > 0) { // We have a selected AP, let's show details |
||
47 | $graph_type = 'accesspoints_numasoclients'; |
||
48 | echo "<tr style='background-color: $row_colour; padding: 0px;'><td colspan=7>"; |
||
49 | echo "<div class='graphhead'>Associated Clients</div>"; |
||
50 | include 'includes/html/print-accesspoint-graphs.inc.php'; |
||
51 | echo '</td></tr>'; |
||
52 | |||
53 | $graph_type = 'accesspoints_interference'; |
||
54 | echo "<tr style='background-color: $row_colour; padding: 0px;'><td colspan=7>"; |
||
55 | echo "<div class='graphhead'>Interference</div>"; |
||
56 | include 'includes/html/print-accesspoint-graphs.inc.php'; |
||
57 | echo '</td></tr>'; |
||
58 | |||
59 | $graph_type = 'accesspoints_channel'; |
||
60 | echo "<tr style='background-color: $row_colour; padding: 0px;'><td colspan=7>"; |
||
61 | echo "<div class='graphhead'>Channel</div>"; |
||
62 | include 'includes/html/print-accesspoint-graphs.inc.php'; |
||
63 | echo '</td></tr>'; |
||
64 | |||
65 | $graph_type = 'accesspoints_txpow'; |
||
66 | echo "<tr style='background-color: $row_colour; padding: 0px;'><td colspan=7>"; |
||
67 | echo "<div class='graphhead'>Transmit Power</div>"; |
||
68 | include 'includes/html/print-accesspoint-graphs.inc.php'; |
||
69 | echo '</td></tr>'; |
||
70 | |||
71 | $graph_type = 'accesspoints_radioutil'; |
||
72 | echo "<tr style='background-color: $row_colour; padding: 0px;'><td colspan=7>"; |
||
73 | echo "<div class='graphhead'>Radio Utilization</div>"; |
||
74 | include 'includes/html/print-accesspoint-graphs.inc.php'; |
||
75 | echo '</td></tr>'; |
||
76 | |||
77 | $graph_type = 'accesspoints_nummonclients'; |
||
78 | echo "<tr style='background-color: $row_colour; padding: 0px;'><td colspan=7>"; |
||
79 | echo "<div class='graphhead'>Monitored Clients</div>"; |
||
80 | include 'includes/html/print-accesspoint-graphs.inc.php'; |
||
81 | echo '</td></tr>'; |
||
82 | |||
83 | $graph_type = 'accesspoints_nummonbssid'; |
||
84 | echo "<tr style='background-color: $row_colour; padding: 0px;'><td colspan=7>"; |
||
85 | echo "<div class='graphhead'>Number of monitored BSSIDs</div>"; |
||
86 | include 'includes/html/print-accesspoint-graphs.inc.php'; |
||
87 | echo '</td></tr>'; |
||
88 | }//end if |
||
89 |