syntaxer run

git-svn-id: http://www.observium.org/svn/observer/trunk@3185 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2012-05-15 15:18:57 +00:00
parent 1f9eae3699
commit 4985943822
44 changed files with 65 additions and 97 deletions
-1
View File
@@ -52,7 +52,6 @@ echo('
$graph_array['width'] = "150";
$graph_array['bg'] = "FFFFFF00";
foreach ($graphs as $entry)
{
$graph_array['type'] = $entry['graph'];
+1 -1
View File
@@ -177,7 +177,7 @@ function generate_graph_popup($graph_array)
$graph_array['from'] = $config['time']['year'];
$content .= generate_graph_tag($graph_array);
$content .= "</div>";
$graph_array['from'] = $original_from;
$graph_array['link'] = generate_url($graph_array, array('page' => 'graphs', 'height' => NULL, 'width' => NULL, 'bg' => NULL));
@@ -22,7 +22,7 @@ if (is_file($rrd_filename))
$rrd_list[$i]['descr'] = $vars['descr'];
$rrd_list[$i]['ds'] = $ds;
$rrd_list[$i]['colour'] = $vars['colour'];
if(!empty($vars['areacolour'])) { $rrd_list[$i]['areacolour'] = $vars['areacolour']; }
if (!empty($vars['areacolour'])) { $rrd_list[$i]['areacolour'] = $vars['areacolour']; }
$i++;
}
} else {
@@ -21,7 +21,7 @@ if (is_file($rrd_filename))
$rrd_list[$i]['descr'] = $vars['descr'];
$rrd_list[$i]['ds'] = $ds;
$rrd_list[$i]['colour'] = $vars['colour'];
if(!empty($vars['areacolour'])) { $rrd_list[$i]['areacolour'] = $vars['areacolour']; }
if (!empty($vars['areacolour'])) { $rrd_list[$i]['areacolour'] = $vars['areacolour']; }
$i++;
}
} else {
@@ -2,6 +2,7 @@
include("memcached.inc.php");
include("includes/graphs/common.inc.php");
$device = device_by_id_cache($vars['id']);
include("includes/graphs/common.inc.php");
@@ -18,6 +18,4 @@ $unit_text = "Processes";
include("includes/graphs/generic_simplex.inc.php");
?>
@@ -18,6 +18,4 @@ $unit_text = "Processes";
include("includes/graphs/generic_simplex.inc.php");
?>
@@ -1,6 +1,5 @@
<?php
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/netstats-icmp.rrd";
$stats = array('icmpInMsgs' => '00cc00',
@@ -1,6 +1,5 @@
<?php
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/netstats-icmp.rrd";
$stats = array('icmpInSrcQuenchs' => array(),
@@ -1,6 +1,5 @@
<?php
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/netstats-ip.rrd";
$stats = array('ipForwDatagrams' => array(),
@@ -2,7 +2,6 @@
include("includes/graphs/common.inc.php");
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/netstats-ip.rrd";
$rrd_options .= " DEF:ipInDelivers=$rrd_filename:ipInDelivers:AVERAGE";
@@ -1,6 +1,5 @@
<?php
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/netstats-snmp.rrd";
$stats = array('snmpInTraps',
@@ -1,6 +1,5 @@
<?php
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/netstats-tcp.rrd";
$stats = array('tcpInSegs','tcpOutSegs','tcpActiveOpens','tcpPassiveOpens','tcpAttemptFails','tcpEstabResets','tcpRetransSegs');
@@ -1,6 +1,5 @@
<?php
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/netstats-udp.rrd";
$stats = array('udpInDatagrams','udpOutDatagrams','udpInErrors','udpNoPorts');
@@ -1,6 +1,5 @@
<?php
$file = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("screenos_sessions.rrd");
$rrd_list[0]['filename'] = $file;
@@ -2,7 +2,6 @@
include("includes/graphs/common.inc.php");
if ($_GET['width'] > "300") { $descr_len = "40"; } else { $descr_len = "22"; }
$rrd_options .= " -l 0 -E ";
@@ -2,7 +2,6 @@
include("includes/graphs/common.inc.php");
$rrd_options .= " -l 0 -E ";
$iter = "1";
@@ -4,7 +4,6 @@ $scale_min = "0";
include("includes/graphs/common.inc.php");
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/uptime.rrd";
$rrd_options .= " DEF:uptime=".$rrd_filename.":uptime:AVERAGE";
@@ -2,7 +2,6 @@
include("includes/graphs/common.inc.php");
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/vpdn-l2tp.rrd";
$stats = array('sessions');
@@ -2,7 +2,6 @@
include("includes/graphs/common.inc.php");
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/vpdn-l2tp.rrd";
$stats = array('tunnels');
@@ -2,7 +2,6 @@
include("includes/graphs/common.inc.php");
$rrd_options .= " -l 0 -E ";
$radio1 = $config['rrd_dir'] . "/".$device['hostname']."/wificlients-radio1.rrd";
@@ -96,7 +96,7 @@ if(!$nototal)
$rrd_options .= " CDEF:inbits=inoctets,8,*";
$rrd_options .= " CDEF:outbits=outoctets,8,*";
$rrd_options .= " CDEF:doutbits=doutoctets,8,*";
$rrd_options .= " VDEF:95thin=inbits,95,PERCENT";
$rrd_options .= " VDEF:95thout=outbits,95,PERCENT";
$rrd_options .= " VDEF:d95thout=doutbits,5,PERCENT";
@@ -110,10 +110,8 @@ if(!$nototal)
# $rrd_options .= " GPRINT:totin:AVERAGE:%6.2lf%s$units";
# $rrd_options .= " GPRINT:totin:MAX:%6.2lf%s$units\l";
}
$rrd_options .= $rrd_optionsb;
$rrd_options .= " HRULE:0#999999";
@@ -1,13 +1,10 @@
<?php
if($config['old_graphs'])
{
include("includes/graphs/old_generic_simplex.inc.php");
} else {
/// Draw generic bits graph
/// args: ds_in, ds_out, rrd_filename, bg, legend, from, to, width, height, inverse, percentile
@@ -19,7 +16,6 @@ $line_text = str_pad(truncate($line_text,12,''),12);
if ($multiplier)
{
$rrd_options .= " DEF:".$ds."_o=".$rrd_filename.":".$ds.":AVERAGE";
if($config['oldrrd']) {}
$rrd_options .= " DEF:".$ds."_max_o=".$rrd_filename.":".$ds.":MAX";
$rrd_options .= " DEF:".$ds."_min_o=".$rrd_filename.":".$ds.":MIN";
+1 -1
View File
@@ -2,7 +2,7 @@
if ($_SESSION['userlevel'] >= "5")
{
$auth = 1;
$auth = 1;
}
?>
-1
View File
@@ -51,7 +51,6 @@ $colours_out = 'blues';
$nototal = 1;
$ds_in = "INOCTETS";
$ds_out = "OUTOCTETS";
+3 -3
View File
@@ -41,7 +41,7 @@ $subtype = $graphtype['subtype'];
if (is_file($config['install_dir'] . "/html/includes/graphs/$type/$subtype.inc.php"))
{
if (isset($config['allow_unauth_graphs']) && $config['allow_unauth_graphs'])
if (isset($config['allow_unauth_graphs']) && $config['allow_unauth_graphs'])
{
$auth = "1"; ## hardcode auth for all with config function
}
@@ -52,8 +52,8 @@ if (is_file($config['install_dir'] . "/html/includes/graphs/$type/$subtype.inc.p
{
if (Net_IPv4::ipInNetwork($_SERVER['REMOTE_ADDR'], $range))
{
$auth = "1";
if($debug) { echo("matched $range"); }
$auth = "1";
if ($debug) { echo("matched $range"); }
break;
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
if(is_numeric($vars['plugin']))
if (is_numeric($vars['plugin']))
{
$mplug = dbFetchRow("SELECT * FROM `munin_plugins` AS M, `devices` AS D WHERE `mplug_id` = ? AND D.device_id = M.device_id ", array($vars['plugin']));
} else {
-1
View File
@@ -3,7 +3,6 @@
if(empty($graph_array['type'])) { $graph_array['type'] = $graph_type; }
if(empty($graph_array['device'])) { $graph_array['device'] = $device['device_id']; }
# FIXME not css alternating yet
if (!is_integer($g_i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }