10 |
|
|
11 |
my $debug = 0; |
my $debug = 0; |
12 |
|
|
13 |
|
# comment out following field if you don't want links to omni reports |
14 |
|
# or haven't installed repgen.pl |
15 |
|
my $repgen_url="/omni/"; # URL to pages with rptgen.pl |
16 |
|
|
17 |
my $width = 600; # width of bar |
my $width = 600; # width of bar |
18 |
my $height = 15; # height of bar |
my $height = 15; # height of bar |
19 |
my $use_js = 1; # use JavaScript pop-up |
my $use_js = 1; # use JavaScript pop-up |
236 |
|
|
237 |
print STDERR "bar[$col] len:$l s scale:",($len_t/$width)," size:$size px<br> alt:$alt\n" if ($debug); |
print STDERR "bar[$col] len:$l s scale:",($len_t/$width)," size:$size px<br> alt:$alt\n" if ($debug); |
238 |
|
|
239 |
my $html = "<img src=\"".$q->url(-relative=>1)."/$col\" width=\"$size\" height=\"$h\""; |
my $html; |
240 |
|
|
241 |
|
my ($html_end, $img_end) = ("",""); |
242 |
|
if ($repgen_url && $alt =~ m#(\d\d\d\d)/(\d\d)/(\d\d)-(\d+)#) { |
243 |
|
$html .= "<a href=\"$repgen_url/$1-$2-$3-$4.html\">"; |
244 |
|
$html_end .= "</a>"; |
245 |
|
$img_end .= " border=0"; |
246 |
|
} |
247 |
|
|
248 |
|
$html .= "<img src=\"".$q->url(-relative=>1)."/$col\" width=\"$size\" height=\"$h\""; |
249 |
|
|
250 |
if ($use_js && $alt) { |
if ($use_js && $alt) { |
251 |
$html .= " onmouseover=\"T('$alt')\" onmouseout=\"T()\""; |
$html .= " onmouseover=\"T('$alt')\" onmouseout=\"T()\""; |
252 |
} elsif ($alt) { |
} elsif ($alt) { |
253 |
$html .= " alt=\"$alt\""; |
$html .= " alt=\"$alt\""; |
254 |
} |
} |
255 |
$html .= ">"; |
$html .= "$img_end>$html_end"; |
256 |
|
|
257 |
return($html); |
return($html); |
258 |
} |
} |
302 |
$last_var = $v; |
$last_var = $v; |
303 |
} |
} |
304 |
} |
} |
305 |
|
# fix division by zero |
306 |
|
$max_use++ if ($max_use == 0); |
307 |
my $h = $last_var / $max_use * $height; |
my $h = $last_var / $max_use * $height; |
308 |
my $c = 255 - int (255 * $last_var / $max_use); |
my $c = 255 - int (255 * $last_var / $max_use); |
309 |
print color_bar($len,"$c,$c,$c","$last_var concurrent jobs",1,$h+1) if ($len); |
print color_bar($len,"$c,$c,$c","$last_var concurrent jobs",1,$h+1) if ($len); |