kill a whole bunch of trailing spaces

git-svn-id: http://www.observium.org/svn/observer/trunk@2516 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2011-09-20 09:55:11 +00:00
parent 9b270dd1e5
commit d864ce234f
103 changed files with 326 additions and 331 deletions
@@ -61,6 +61,6 @@ $rrd_options .= 'GPRINT:i:MAX:"%6.2lf %s\n" ';
$rrd_options .= 'AREA:j#FF4105FF:"Idle ":STACK ';
$rrd_options .= 'GPRINT:j:LAST:"%6.2lf %s" ';
$rrd_options .= 'GPRINT:j:AVERAGE:"%6.2lf %s" ';
$rrd_options .= 'GPRINT:j:MAX:"%6.2lf %s\n"';
$rrd_options .= 'GPRINT:j:MAX:"%6.2lf %s\n"';
?>
@@ -9,7 +9,7 @@ if (is_file($mysql_rrd))
$rrd_filename = $mysql_rrd;
}
$rrd_options .= ' -b 1024 ';
$rrd_options .= ' -b 1024 ';
$rrd_options .= ' DEF:a='.$rrd_filename.':BRd:AVERAGE ';
$rrd_options .= ' DEF:b='.$rrd_filename.':BSt:AVERAGE ';
$rrd_options .= ' CDEF:c=a,-1,* ';
+1 -1
View File
@@ -23,7 +23,7 @@ if ($_GET['bg']) { $rrd_options .= " -c CANVAS#" . mres($_GET['bg']) . " "; }
#$rrd_options .= " -c BACK#FFFFFF";
if ($height < "99") { $rrd_options .= " --only-graph"; }
if ($height < "99") { $rrd_options .= " --only-graph"; }
if ($width <= "300") { $rrd_options .= " --font LEGEND:7:" . $config['mono_font'] . " --font AXIS:6:" . $config['mono_font']; }
else { $rrd_options .= " --font LEGEND:8:" . $config['mono_font'] . " --font AXIS:7:" . $config['mono_font']; }
@@ -17,7 +17,7 @@ $stats = array('icmpInMsgs' => '00cc00',
$i=0;
foreach($stats as $stat => $colour)
foreach($stats as $stat => $colour)
{
$i++;
$rrd_list[$i]['filename'] = $rrd_filename;
@@ -5,7 +5,7 @@ $device = device_by_id_cache($id);
if (!is_array($config['nfsen_rrds'])) { $config['nfsen_rrds'] = array($config['nfsen_rrds']); }
foreach ( $config['nfsen_rrds'] as $nfsenrrds )
{
{
if ($configs[strlen($nfsenrrds)-1] != '/') { $nfsenrrds .= '/'; }
# convert dots in filename to underscores
@@ -16,7 +16,7 @@ foreach ( $config['nfsen_rrds'] as $nfsenrrds )
if (is_file($nfsenrrds . $nfsen_filename . ".rrd"))
{
$rrd_filename = $nfsenrrds . $nfsen_filename . ".rrd";
$rrd_filename = $nfsenrrds . $nfsen_filename . ".rrd";
$flowtypes = array('tcp', 'udp', 'icmp', 'other');
@@ -18,7 +18,7 @@ $rrd_list[2]['filename'] = $file;
$rrd_list[2]['descr'] = "Failed";
$rrd_list[2]['rra'] = "failed";
if ($_GET['debug']) { print_r($rrd_list); }
if ($_GET['debug']) { print_r($rrd_list); }
$colours = "mixed";
$nototal = 1;
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
$rrd_filename_in = $config['rrd_dir'] . "/" . $device['hostname'] . "/ucd_ssIORawReceived.rrd";
$rrd_filename_out = $config['rrd_dir'] . "/" . $device['hostname'] . "/ucd_ssIORawSent.rrd";
$rrd_filename_out = $config['rrd_dir'] . "/" . $device['hostname'] . "/ucd_ssIORawSent.rrd";
$rra_in = "value";
$rra_out = "value";
@@ -1,7 +1,7 @@
<?php
$rrd_filename_in = $config['rrd_dir'] . "/" . $device['hostname'] . "/ucd_ssRawSwapIn.rrd";
$rrd_filename_out = $config['rrd_dir'] . "/" . $device['hostname'] . "/ucd_ssRawSwapOut.rrd";
$rrd_filename_out = $config['rrd_dir'] . "/" . $device['hostname'] . "/ucd_ssRawSwapOut.rrd";
$rra_in = "value";
$rra_out = "value";
@@ -38,7 +38,7 @@ foreach ($rrd_list as $i => $rrd)
$g_defname = $rrd['rra'] . "_cdef";
$rrd_options .= " CDEF:" . $g_defname . $i . "=" . $rrd['rra'] . $i . "," . $multiplier . ",*";
$rrd_options .= " CDEF:" . $g_defname . $i . "max=" . $rrd['rra'] . $i . "max," . $multiplier . ",*";
## If we've been passed a divider (divisor!) we make a CDEF for it.
} elseif (is_numeric($divider))
{
+5 -5
View File
@@ -40,10 +40,10 @@ if (isset($config['allow_unauth_graphs']) && $config['allow_unauth_graphs'])
{
$auth = "1"; ## hardcode auth for all with config function
} else {
if (!$_SESSION['authenticated'])
{
graph_error("Session not authenticated");
exit;
if (!$_SESSION['authenticated'])
{
graph_error("Session not authenticated");
exit;
}
}
@@ -120,7 +120,7 @@ function graph_error($string)
if ($error_msg) {
graph_error($graph_error);
} elseif (!$auth) {
if ($width < 200)
{
graph_error("No Auth");
@@ -21,8 +21,8 @@ if (is_numeric($id))
if(is_file($config['rrd_dir'] . "/" . $acc['hostname'] . "/" . safename("cip-" . $acc['ifIndex'] . "-" . $acc['mac'] . ".rrd")))
{
if($debug) { echo("exists"); }
$rrd_filename = $config['rrd_dir'] . "/" . $acc['hostname'] . "/" . safename("cip-" . $acc['ifIndex'] . "-" . $acc['mac'] . ".rrd");
$port = get_port_by_id($acc['interface_id']);
$rrd_filename = $config['rrd_dir'] . "/" . $acc['hostname'] . "/" . safename("cip-" . $acc['ifIndex'] . "-" . $acc['mac'] . ".rrd");
$port = get_port_by_id($acc['interface_id']);
$device = device_by_id_cache($port['device_id']);
$title = generate_device_link($device);
$title .= " :: Port ".generate_port_link($port);
@@ -5,7 +5,7 @@ $i = 0;
foreach (explode(",", $id) as $ifid)
{
$port = dbFetchRow("SELECT * FROM `ports` AS I, devices as D WHERE I.interface_id = ? AND I.device_id = D.device_id", array($ifid));
if (is_file($config['rrd_dir'] . "/" . $port['hostname'] . "/port-" . safename($port['ifIndex'] . ".rrd")))
if (is_file($config['rrd_dir'] . "/" . $port['hostname'] . "/port-" . safename($port['ifIndex'] . ".rrd")))
{
$rrd_list[$i]['filename'] = $config['rrd_dir'] . "/" . $port['hostname'] . "/port-" . safename($port['ifIndex'] . ".rrd");
$rrd_list[$i]['descr'] = $port['hostname'] . " " . $port['ifDescr'];
+1 -1
View File
@@ -38,7 +38,7 @@ if (1)
include("includes/graphs/generic_multi_seperated.inc.php");
}
elseif (is_file($config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename($port['ifIndex'] . ".rrd")))
elseif (is_file($config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename($port['ifIndex'] . ".rrd")))
{
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename($port['ifIndex'] . ".rrd");
@@ -23,7 +23,7 @@ $rrd_options .= " AREA:sensor_min#ffffffff";
# $rrd_options .= " AREA:sensorcold#CCCCFF";
# $rrd_options .= " LINE1:sensor#cc0000:'" . str_replace(':','\:',str_replace('\*','*',quotemeta($sensor['sensor_descr_fixed'])))."'"; # Ugly hack :(
$rrd_options .= " LINE1.5:sensor#cc0000:'" . $sensor['sensor_descr_fixed']."'";
$rrd_options .= " LINE1.5:sensor#cc0000:'" . $sensor['sensor_descr_fixed']."'";
# $rrd_options .= " LINE1.5:sensorwarm#660000";
$rrd_options .= " GPRINT:sensor_min:MIN:%4.1lfC";
$rrd_options .= " GPRINT:sensor:LAST:%4.1lfC";
+1 -1
View File
@@ -13,7 +13,7 @@ $rrd_options .= " COMMENT:' Size Free % Used\\n'";
$hostname = gethostbyid($storage['device_id']);
$colour="CC0000";
$colour="CC0000";
$colour_area="ffaaaa";
$descr = substr(str_pad($storage[storage_descr], 12),0,12);