mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
PHP 8 fixes (#12528)
* port related errors * more fixes * fix storage count * add tests for php8 * style * only need not empty * aix fixes.... * storage WIP * fix aix discovering hrstorage fix db test adding .gitkeep fix os modules when discovery only * fix aos processors wrong oid * fix mempool number casting * fix aos7 cpu * use + 0 cast instead of floatval() * more verbose error on invalid json * remove invalid data in json * actually fix the json * correct json error fix * cast_number() function fix aruba-instant and aos6 bugs exposed by new function, probably more... * fix a-f fix inadequate sort for component data * fix global port poll time * fix mempools precent 0, route count, ntp const * fix schleifenbauer liberal current usage * further number casting refinement * vrp * fix tests * fix arbos * warn cleanups adjust to :: change * fix ciena-sds * fix drac * fix dell-rpdu anddlink * fix and improve arubaos better error when getting an array in Processor * fix atenpdu, add missing arubaos files * aruba-instant to yaml apparently I didn't need to do this, the diff just looks really odd It did add ranged sub-index replacements * docker app, was completely wrong... fixed * fix sentry4 divide by 0... * fixed root issue, remove check * nicer cidr in ipv6 code * remove bogus enuxus battery bank skip_values * Fix InfluxDB tests * remove extra import * fix other style issues. * influx "style" fixes
This commit is contained in:
@@ -88,8 +88,8 @@ echo "</td><td width=120 onclick=\"location.href='" . generate_port_url($port) .
|
||||
if ($port['ifOperStatus'] == 'up') {
|
||||
$port['in_rate'] = ($port['ifInOctets_rate'] * 8);
|
||||
$port['out_rate'] = ($port['ifOutOctets_rate'] * 8);
|
||||
$in_perc = @round(($port['in_rate'] / $port['ifSpeed'] * 100));
|
||||
$out_perc = @round(($port['in_rate'] / $port['ifSpeed'] * 100));
|
||||
$in_perc = empty($port['ifSpeed']) ? 0 : round(($port['in_rate'] / $port['ifSpeed'] * 100));
|
||||
$out_perc = empty($port['ifSpeed']) ? 0 : round(($port['in_rate'] / $port['ifSpeed'] * 100));
|
||||
echo "<i class='fa fa-long-arrow-left fa-lg' style='color:green' aria-hidden='true'></i> <span style='color: " . percent_colour($in_perc) . "'>" . formatRates($port['in_rate']) . "<br />
|
||||
<i class='fa fa-long-arrow-right fa-lg' style='color:blue' aria-hidden='true'></i> <span style='color: " . percent_colour($out_perc) . "'>" . formatRates($port['out_rate']) . "<br />
|
||||
<i class='fa fa-long-arrow-left fa-lg' style='color:purple' aria-hidden='true'></i> " . format_bi($port['ifInUcastPkts_rate']) . "pps</span><br />
|
||||
@@ -184,6 +184,7 @@ echo '<td width=375 valign=top class="interface-desc">';
|
||||
|
||||
$neighborsCount = 0;
|
||||
$nbLinks = 0;
|
||||
$int_links = [];
|
||||
if (strpos($port['label'], 'oopback') === false && ! $graph_type) {
|
||||
foreach (dbFetchRows('SELECT * FROM `links` AS L, `ports` AS I, `devices` AS D WHERE L.local_port_id = ? AND L.remote_port_id = I.port_id AND I.device_id = D.device_id', [$if_id]) as $link) {
|
||||
$int_links[$link['port_id']] = $link['port_id'];
|
||||
|
Reference in New Issue
Block a user