mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-03 08:01:38 +02:00
syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@3218 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -343,10 +343,9 @@ function print_percentage_bar($width, $height, $percent, $left_text, $left_colou
|
||||
|
||||
function generate_entity_link($type, $entity, $text = NULL, $graph_type=NULL)
|
||||
{
|
||||
global $config;
|
||||
global $entity_cache;
|
||||
global $config, $entity_cache;
|
||||
|
||||
if(is_numeric($entity))
|
||||
if (is_numeric($entity))
|
||||
{
|
||||
$entity = get_entity_by_id_cache($type, $entity);
|
||||
}
|
||||
@@ -357,7 +356,7 @@ function generate_entity_link($type, $entity, $text = NULL, $graph_type=NULL)
|
||||
$link = generate_port_link($entity, $text, $graph_type);
|
||||
break;
|
||||
case "storage":
|
||||
if(empty($text)) { $text = $entity['storage_descr']; }
|
||||
if (empty($text)) { $text = $entity['storage_descr']; }
|
||||
$link = generate_link($text, array('page' => 'device', 'device' => $entity['device_id'], 'tab' => 'health', 'metric' => 'storage'));
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -308,7 +308,6 @@ if (device_permitted($vars['device']) || $check_device == $vars['device'])
|
||||
</li>');
|
||||
}
|
||||
|
||||
|
||||
if ($_SESSION['userlevel'] >= "7")
|
||||
{
|
||||
if (!is_array($config['rancid_configs'])) { $config['rancid_configs'] = array($config['rancid_configs']); }
|
||||
|
||||
@@ -85,7 +85,6 @@ foreach ($glo_conditions as $type => $subtypes)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo('</table>');
|
||||
|
||||
?>
|
||||
|
||||
+1
-1
@@ -170,7 +170,7 @@ function port_by_id_cache($port_id)
|
||||
function table_from_entity_type($type)
|
||||
{
|
||||
/// Fuck you, english pluralisation.
|
||||
if($type == "storage")
|
||||
if ($type == "storage")
|
||||
{
|
||||
return $type;
|
||||
} else {
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
#SNMPv2-SMI::enterprises.8741.2.1.1.3.0 = STRING: "SonicOS Enhanced 5.6.0.11-61o"
|
||||
#SNMPv2-SMI::enterprises.8741.2.1.1.4.0 = STRING: "5.0.2.11"
|
||||
|
||||
$hardware=trim(snmp_get($device, ".1.3.6.1.4.1.8741.2.1.1.1.0", "-OQv", "", ""),'" ');
|
||||
$serial=trim(snmp_get($device, ".1.3.6.1.4.1.8741.2.1.1.2.0", "-OQv", "", ""),'" ');
|
||||
$fwversion=trim(snmp_get($device, ".1.3.6.1.4.1.8741.2.1.1.3.0", "-OQv", "", ""),'" ');
|
||||
$romversion=trim(snmp_get($device, ".1.3.6.1.4.1.8741.2.1.1.4.0", "-OQv", "", ""),'" ');
|
||||
$version="(Firmware $fwversion / Rom $romversion)";
|
||||
$hardware = trim(snmp_get($device, ".1.3.6.1.4.1.8741.2.1.1.1.0", "-OQv", "", ""),'" ');
|
||||
$serial = trim(snmp_get($device, ".1.3.6.1.4.1.8741.2.1.1.2.0", "-OQv", "", ""),'" ');
|
||||
$fwversion = trim(snmp_get($device, ".1.3.6.1.4.1.8741.2.1.1.3.0", "-OQv", "", ""),'" ');
|
||||
$romversion = trim(snmp_get($device, ".1.3.6.1.4.1.8741.2.1.1.4.0", "-OQv", "", ""),'" ');
|
||||
$version = "(Firmware $fwversion / ROM $romversion)";
|
||||
|
||||
?>
|
||||
|
||||
@@ -324,7 +324,7 @@ foreach ($ports as $port)
|
||||
$port['stats']['ifOutBits_rate'] = round($port['stats']['ifOutOctets_rate'] * 8);
|
||||
|
||||
// If we have a valid ifSpeed we should populate the stats for checking.
|
||||
if(is_numeric($this_port['ifSpeed']))
|
||||
if (is_numeric($this_port['ifSpeed']))
|
||||
{
|
||||
$port['stats']['ifInBits_perc'] = round($port['stats']['ifInBits_rate'] / $this_port['ifSpeed'] * 100);
|
||||
$port['stats']['ifOutBits_perc'] = round($port['stats']['ifOutBits_rate'] / $this_port['ifSpeed'] * 100);
|
||||
|
||||
@@ -62,6 +62,7 @@ if ($device['os_group'] == "unix")
|
||||
if (file_exists("includes/polling/unix-agent/$key.inc.php"))
|
||||
{
|
||||
if ($debug) { echo("Including: unix-agent/$key.inc.php"); }
|
||||
|
||||
include("unix-agent/$key.inc.php");
|
||||
}
|
||||
}
|
||||
@@ -71,6 +72,7 @@ if ($device['os_group'] == "unix")
|
||||
if (file_exists("includes/polling/applications/$key.inc.php"))
|
||||
{
|
||||
if ($debug) { echo("Including: applications/$key.inc.php"); }
|
||||
|
||||
include("applications/$key.inc.php");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user