syntaxer run

git-svn-id: http://www.observium.org/svn/observer/trunk@3045 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2012-04-17 15:27:17 +00:00
parent 5e523e222e
commit ff72c2843e
14 changed files with 30 additions and 30 deletions

View File

@@ -12,7 +12,7 @@ function toner2colour($descr, $percent)
if (substr($descr,-1) == 'K' || stripos($descr,"black" ) !== false
|| stripos($descr,"nero" ) !== false) { $colour['left'] = "000000"; $colour['right'] = "222222"; }
return $colour;
return $colour;
}
function generate_link($text, $vars, $new_vars = array())

View File

@@ -12,7 +12,7 @@ foreach (dbFetchRows("SELECT * FROM toner where device_id = ?", array($id)) as $
{
$colour = toner2colour($toner['toner_descr']);
if ($colour['left'] == NULL)
if ($colour['left'] == NULL)
{
# FIXME generic colour function
switch ($iter)

View File

@@ -135,22 +135,22 @@ if ($error_msg) {
if (!$debug)
{
header('Content-type: image/png');
if($config['trim_tobias'])
if ($config['trim_tobias'])
{
list($w, $h, $type, $attr) = getimagesize($graphfile);
$src_im = imagecreatefrompng($graphfile);
$src_x = '0'; // begin x
$src_y = '0'; // begin y
$src_w = $w-12; // width
$src_h = $h; // height
$dst_x = '0'; // destination x
$dst_y = '0'; // destination y
$dst_im = imagecreatetruecolor($src_w, $src_h);
$white = imagecolorallocate($dst_im, 255, 255, 255);
imagefill($dst_im, 0, 0, $white);
imagecopy($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h);
imagepng($dst_im);
imagedestroy($dst_im);
$src_y = '0'; // begin y
$src_w = $w-12; // width
$src_h = $h; // height
$dst_x = '0'; // destination x
$dst_y = '0'; // destination y
$dst_im = imagecreatetruecolor($src_w, $src_h);
$white = imagecolorallocate($dst_im, 255, 255, 255);
imagefill($dst_im, 0, 0, $white);
imagecopy($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h);
imagepng($dst_im);
imagedestroy($dst_im);
} else {
$fd = fopen($graphfile,'r');fpassthru($fd);fclose($fd);
}

View File

@@ -127,7 +127,7 @@ if (isset($config['branding']) && is_array($config['branding']))
# page_title_prefix is displayed, unless page_title is set
if ($config['page_title']) { $config['page_title_prefix'] = $config['page_title']; }
?>
<!DOCTYPE HTML>
<html>
@@ -333,10 +333,10 @@ if (is_array($pagetitle))
{
# if prefix is set, put it in front
if ($config['page_title_prefix']) { array_unshift($pagetitle,$config['page_title_prefix']); }
# if suffix is set, put it in the back
if ($config['page_title_suffix']) { $pagetitle[] = $config['page_title_suffix']; }
# create and set the title
$title = join(" - ",$pagetitle);
echo("<script type=\"text/javascript\">\ndocument.title = '$title';\n</script>");

View File

@@ -74,7 +74,7 @@ foreach ($entity_state['group']['c6kxbar'] as $index => $entry)
$minigraph = generate_graph_tag($graph_array);
echo("<tr class=device-overview>
echo("<tr class=device-overview>
<td width=10></td>
<td width=200><strong>Fabric ".$subindex."</strong></td>
<td><span style='font-weight: bold;' class=".$fabric['mode_class'].">".

View File

@@ -38,7 +38,7 @@ if (count($mempools))
$overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - " . $text_descr);
$graph_array['width'] = 80; $graph_array['height'] = 20; $graph_array['bg'] = 'ffffff00'; # the 00 at the end makes the area transparent.
$minigraph = generate_graph_tag($graph_array);
echo("<tr class=device-overview>

View File

@@ -63,7 +63,7 @@ if (count($drives))
$overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - " . $drive['storage_descr']);
$graph_array['width'] = 80; $graph_array['height'] = 20; $graph_array['bg'] = 'ffffff00'; # the 00 at the end makes the area transparent.
$minigraph = generate_graph_tag($graph_array);
echo("<tr class=device-overview>

View File

@@ -20,7 +20,7 @@ if (count($toners))
$used = formatStorage($toner['toner_used']);
$background = toner2colour($toner['toner_descr'], $percent);
$graph_array = array();
$graph_array['height'] = "100";
$graph_array['width'] = "210";
@@ -38,7 +38,7 @@ if (count($toners))
$overlib_content = generate_overlib_content($graph_array, $device['hostname'] . " - " . $toner['toner_descr']);
$graph_array['width'] = 80; $graph_array['height'] = 20; $graph_array['bg'] = 'ffffff00'; # the 00 at the end makes the area transparent.
$minigraph = generate_graph_tag($graph_array);
echo("<tr class=device-overview>

View File

@@ -68,7 +68,7 @@ if (!$auth)
onchange="window.open(this.options[this.selectedIndex].value,'_top')" >
<?php
foreach($types as $avail_type)
foreach ($types as $avail_type)
{
echo("<option value='".generate_url($vars, array('type' => $type."_".$avail_type, 'page' => "graphs"))."'");
if ($avail_type == $subtype) { echo(" selected"); }

View File

@@ -49,7 +49,7 @@ foreach (dbFetchRows("SELECT * FROM `processors` AS P, `devices` AS D WHERE D.de
if ($vars['view'] == "graphs")
{
echo(' <tr></tr><tr class="health"><td colspan="5">');
$daily_graph = "graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=$day&amp;to=$now&amp;width=211&amp;height=100";
$daily_url = "graph.php?id=" . $proc['processor_id'] . "&amp;type=".$graph_type."&amp;from=$day&amp;to=$now&amp;width=400&amp;height=150";