You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- added support for new methods implemented in API client class version 1.1.33 for gateway stats (requires controller version 5.8.X and higher)
- general code cleanup
exit('The <b>PHP curl</b> module is not installed! Please correct this before you proceed!<br>');
33
+
exit('The <b>PHP curl</b> module is not installed! Please correct this before proceeding!<br>');
34
34
$curl_version = 'unavailable';
35
35
$openssl_version = 'unavailable';
36
36
}
@@ -219,18 +219,18 @@
219
219
* placed here so they can be overwritten by more "severe" error messages later on
220
220
*/
221
221
if ($action === '') {
222
-
$alert_message = '<div class="alert alert-info" role="alert">Please select a data collection/API endpoint from the dropdown menus' .
223
-
'<i class="fa fa-arrow-circle-up"></i></div>';
222
+
$alert_message = '<div class="alert alert-info" role="alert">Please select a data collection/API endpoint from the dropdown menus' .
223
+
'<i class="fa fa-arrow-circle-up"></i></div>';
224
224
}
225
225
226
226
if ($site_id === '' && isset($_SESSION['controller'])) {
227
-
$alert_message = '<div class="alert alert-info" role="alert">Please select a site from the Sites dropdown menu <i class="fa fa-arrow-circle-up">' .
228
-
'</i></div>';
227
+
$alert_message = '<div class="alert alert-info" role="alert">Please select a site from the Sites dropdown menu ' .
228
+
'<i class="fa fa-arrow-circle-up"></i></div>';
229
229
}
230
230
231
231
if (!isset($_SESSION['controller'])) {
232
-
$alert_message = '<div class="alert alert-info" role="alert">Please select a controller from the Controllers dropdown menu <i class="fa fa-arrow-circle-up">' .
233
-
'</i></div>';
232
+
$alert_message = '<div class="alert alert-info" role="alert">Please select a controller from the Controllers dropdown menu ' .
233
+
'<i class="fa fa-arrow-circle-up"></i></div>';
234
234
}
235
235
236
236
/**
@@ -310,6 +310,25 @@
310
310
$time_after_login = $time_1 - $time_start;
311
311
312
312
if (isset($unifidata)) {
313
+
/**
314
+
* array containing attributes to fetch for the gateway stats, overriding
315
+
* the default attributes
316
+
*/
317
+
$gateway_stats_attribs = [
318
+
'time',
319
+
'mem',
320
+
'cpu',
321
+
'loadavg_5',
322
+
'lan-rx_errors',
323
+
'lan-tx_errors',
324
+
'lan-rx_bytes',
325
+
'lan-tx_bytes',
326
+
'lan-rx_packets',
327
+
'lan-tx_packets',
328
+
'lan-rx_dropped',
329
+
'lan-tx_dropped'
330
+
];
331
+
313
332
/**
314
333
* select the required call to the UniFi Controller API based on the selected action
0 commit comments