mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Use Log facility when Laravel is booted. Update init.php so we can easily boot Laravel for CLI scripts. (and just Eloquent, but that may go away) Move all debug setup into set_debug() function and use that across all scripts. Log Laravel database queries. Send debug output to librenms log file when enabling debug in the webui. Allow for colorized Log CLI output. (currently will leave % tags in log file output) ** Needs testing and perhaps tweaking still. DO NOT DELETE THIS TEXT #### Please note > Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting. - [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/) #### Testers If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
91 lines
4.1 KiB
PHP
91 lines
4.1 KiB
PHP
<?php
|
|
|
|
if ($int_colour) {
|
|
$row_colour = $int_colour;
|
|
} else {
|
|
if (!is_integer($i / 2)) {
|
|
$row_colour = $config['list_colour']['even'];
|
|
} else {
|
|
$row_colour = $config['list_colour']['odd'];
|
|
}
|
|
}
|
|
|
|
|
|
$text = $ap['name'].' '.$ap['type'];
|
|
$ap['text'] = $text;
|
|
|
|
echo "<tr style=\"background-color: $row_colour;\" valign=top onmouseover=\"this.style.backgroundColor='{$config['list_colour']['highlight']}';\" onmouseout=\"this.style.backgroundColor='$row_colour';\" onclick=\"location.href='".generate_ap_url($ap)."/'\" style='cursor: pointer;'>
|
|
<td valign=top width=350>";
|
|
echo ' <span class=list-large> '.generate_ap_link($ap, " $text </span><br />");
|
|
echo '<span class=interface-desc>';
|
|
echo "$break".$ap['mac_addr'].'<br>'.$ap['type'].' - channel '.$ap['channel'];
|
|
echo "<br />txpow $ap[txpow]";
|
|
echo '</span>';
|
|
echo '</td><td width=100>';
|
|
|
|
|
|
echo '</td><td width=150>';
|
|
$ap['graph_type'] = 'accesspoints_numasoclients';
|
|
echo generate_ap_link($ap, "<img src='graph.php?type=$ap[graph_type]&id=".$ap['accesspoint_id'].'&from='.$config['time']['day'].'&to='.$config['time']['now'].'&width=100&height=20&legend=no&bg='.str_replace('#', '', $row_colour)."'>");
|
|
echo "<br>\n";
|
|
$ap['graph_type'] = 'accesspoints_radioutil';
|
|
echo generate_ap_link($ap, "<img src='graph.php?type=$ap[graph_type]&id=".$ap['accesspoint_id'].'&from='.$config['time']['day'].'&to='.$config['time']['now'].'&width=100&height=20&legend=no&bg='.str_replace('#', '', $row_colour)."'>");
|
|
echo "<br>\n";
|
|
$ap['graph_type'] = 'accesspoints_interference';
|
|
echo generate_ap_link($ap, "<img src='graph.php?type=$ap[graph_type]&id=".$ap['accesspoint_id'].'&from='.$config['time']['day'].'&to='.$config['time']['now'].'&width=100&height=20&legend=no&bg='.str_replace('#', '', $row_colour)."'>");
|
|
echo "<br>\n";
|
|
|
|
echo '</td><td width=120>';
|
|
|
|
echo "<i class='fa fa-wifi fa-lg icon-theme' aria-hidden='true'></i> ".format_bi($ap['numasoclients']).' Clients<br />';
|
|
echo "<i class='fa fa-wifi fa-lg icon-theme' aria-hidden='true'></i> ".format_bi($ap['radioutil']).' % busy<br />';
|
|
echo "<i class='fa fa-wifi fa-lg icon-theme' aria-hidden='true'></i> ".format_bi($ap['interference']).' interference index<br />';
|
|
|
|
echo '</td></tr>';
|
|
|
|
|
|
|
|
if ($vars['tab'] == 'accesspoint') {
|
|
$graph_type = 'accesspoints_numasoclients';
|
|
echo "<tr style='background-color: $row_colour; padding: 0px;'><td colspan=7>";
|
|
echo "<div class='graphhead'>Associated Clients</div>";
|
|
include 'includes/print-accesspoint-graphs.inc.php';
|
|
echo '</td></tr>';
|
|
|
|
$graph_type = 'accesspoints_interference';
|
|
echo "<tr style='background-color: $row_colour; padding: 0px;'><td colspan=7>";
|
|
echo "<div class='graphhead'>Interference</div>";
|
|
include 'includes/print-accesspoint-graphs.inc.php';
|
|
echo '</td></tr>';
|
|
|
|
$graph_type = 'accesspoints_channel';
|
|
echo "<tr style='background-color: $row_colour; padding: 0px;'><td colspan=7>";
|
|
echo "<div class='graphhead'>Channel</div>";
|
|
include 'includes/print-accesspoint-graphs.inc.php';
|
|
echo '</td></tr>';
|
|
|
|
$graph_type = 'accesspoints_txpow';
|
|
echo "<tr style='background-color: $row_colour; padding: 0px;'><td colspan=7>";
|
|
echo "<div class='graphhead'>Transmit Power</div>";
|
|
include 'includes/print-accesspoint-graphs.inc.php';
|
|
echo '</td></tr>';
|
|
|
|
$graph_type = 'accesspoints_radioutil';
|
|
echo "<tr style='background-color: $row_colour; padding: 0px;'><td colspan=7>";
|
|
echo "<div class='graphhead'>Radio Utilization</div>";
|
|
include 'includes/print-accesspoint-graphs.inc.php';
|
|
echo '</td></tr>';
|
|
|
|
$graph_type = 'accesspoints_nummonclients';
|
|
echo "<tr style='background-color: $row_colour; padding: 0px;'><td colspan=7>";
|
|
echo "<div class='graphhead'>Monitored Clients</div>";
|
|
include 'includes/print-accesspoint-graphs.inc.php';
|
|
echo '</td></tr>';
|
|
|
|
$graph_type = 'accesspoints_nummonbssid';
|
|
echo "<tr style='background-color: $row_colour; padding: 0px;'><td colspan=7>";
|
|
echo "<div class='graphhead'>Number of monitored BSSIDs</div>";
|
|
include 'includes/print-accesspoint-graphs.inc.php';
|
|
echo '</td></tr>';
|
|
}//end if
|