1<?php
2
3/**
4 * Observium
5 *
6 *   This file is part of Observium.
7 *
8 * @package        observium
9 * @subpackage     webui
10 * @copyright  (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
11 *
12 */
13
14echo generate_box_open();
15
16echo '<table class="table table-hover  table-condensed  table-striped">';
17
18echo '<thead><tr>
19          <th></th>
20          <th></th>
21          <th>AP</th>
22          <th>Radio #</th>
23          <th>Radio Type</th>
24          <th>Channel</th>
25          <th>Tx Power</th>
26          <th>BSS Type</th>
27          <th>Protection</th>
28          <th>Status</th>
29          <th>Clients</th>
30        </tr></thead>';
31
32$i = "1";
33
34$radios = dbFetchRows("SELECT * FROM `wifi_radios` WHERE  `device_id` = ?  ORDER BY `radio_number` ASC", array($device['device_id']));
35
36foreach ($radios as $radio)
37{
38
39  switch ($radio['radio_type'])
40  {
41    case 'ieee802dot11a':
42      $radio['type'] = "802.11a";
43      break;
44    case 'ieee802dot11b':
45      $radio['type'] = "802.11b";
46      break;
47    case 'ieee802dot11g':
48      $radio['type'] = "802.11g";
49      break;
50    case 'ieee802dot11na':
51      $radio['type'] = "802.11n (5GHz)";
52      break;
53    case 'ieee802dot11ng':
54      $radio['type'] = "802.11n (2.4GHz)";
55      break;
56    case 'ieee802dot11ac':
57      $radio['type'] = "802.11ac";
58      break;
59    default:
60      $radio['type'] = "Unknown";
61      break;
62  }
63
64  echo '<tr class="' . $radio['row_class'] . '">
65         <td style="width: 1px; background-color: ' . $radio['table_tab_colour'] . '; margin: 0px; padding: 0px; width: 10px;"></td>
66         <td style="width: 1px;"></td>';
67
68  if ($radio['radio_ap'] == "0")
69  {
70    echo '<td><b>self</b></td>';
71  }
72  else
73  {
74    echo '<td><b>' . $radio['radio_ap'] . '</b></td>';
75  }
76  echo '<td><b>' . $radio['radio_number'] . '</b></td>';
77  echo '<td>' . $radio['type'] . '</td>';
78  echo '<td>' . $radio['radio_channel'] . '</td>';
79  echo '<td>' . $radio['radio_txpower'] . '</td>';
80  echo '<td>' . $radio['radio_bsstype'] . '</td>';
81  echo '<td>' . $radio['radio_protection'] . '</td>';
82  echo '<td>' . $radio['radio_status'] . '</td>';
83  echo '<td>' . $radio['radio_clients'] . '</td>';
84
85  echo('</tr>');
86
87  echo '<tr>';
88  echo '<td colspan="11">';
89
90  $graph_array['type']        = "wifiradio_bits";
91  $graph_array['id']          = $radio['wifi_radio_id'];
92  echo('<h3>Traffic</h4>');
93
94  print_graph_row($graph_array);
95
96  $graph_array['type']        = "wifiradio_frames";
97  $graph_array['id']          = $radio['wifi_radio_id'];
98  echo('<h3>Frames</h4>');
99
100  print_graph_row($graph_array);
101
102  $graph_array['type']        = "wifiradio_rxerrors";
103  $graph_array['id']          = $radio['wifi_radio_id'];
104  echo('<h3>Receive Errors</h4>');
105
106  print_graph_row($graph_array);
107
108  $graph_array['type']        = "wifiradio_clients";
109  $graph_array['id']          = $radio['wifi_radio_id'];
110  echo('<h3>Clients</h4>');
111
112  print_graph_row($graph_array);
113
114  echo '</td>';
115  echo '</tr>';
116
117}
118
119echo "</table>";
120
121echo generate_box_close();
122
123$pagetitle[] = "Radios";
124
125// EOF
126