20 |
'In Progress/Failures' => '192,64,192', |
'In Progress/Failures' => '192,64,192', |
21 |
'In Progress/Errors' => '255,128,128', |
'In Progress/Errors' => '255,128,128', |
22 |
'Queuing' => '255,255,0', |
'Queuing' => '255,255,0', |
23 |
|
'Queuing/Errors' => '255,192,64', |
24 |
'Aborted' => '255,0,0', |
'Aborted' => '255,0,0', |
25 |
'Failed' => '255,0,0', |
'Failed' => '255,0,0', |
26 |
'Completed' => '64,255,64', |
'Completed' => '64,255,64', |
60 |
# keep count of each status |
# keep count of each status |
61 |
my %count; |
my %count; |
62 |
|
|
63 |
if (param('pic')) { |
if (path_info()) { |
64 |
print "Content-type: image/png\nCache-Control: max-age=3600, must-revalidate\n\n"; |
print "Content-type: image/png\nCache-Control: max-age=86400, must-revalidate\nExpires: ",scalar localtime(time()+24*60*60),"\nLast-Modified: ",scalar localtime(0),"\n"; |
65 |
# create picture using GD |
# create picture using GD |
66 |
use GD; |
use GD; |
67 |
my $im = new GD::Image(1,$height); |
my $im = new GD::Image(1,$height); |
68 |
my $back = $im->colorAllocate(255,255,255); |
my $back = $im->colorAllocate(255,255,255); |
69 |
$im->transparent($back); |
$im->transparent($back); |
70 |
my ($r,$g,$b) = split(/,/,param('pic')); |
my $col = path_info(); $col =~ s,/,,g; |
71 |
|
my ($r,$g,$b) = split(/,/,$col); |
72 |
my $col = $im->colorAllocate($r,$g,$b); |
my $col = $im->colorAllocate($r,$g,$b); |
73 |
$im->fill(0,0,$col); |
$im->fill(0,0,$col); |
74 |
|
print "Content-Length: ",length($im->png),"\n\n"; |
75 |
binmode STDOUT; |
binmode STDOUT; |
76 |
print $im->png; |
print $im->png; |
77 |
exit; |
exit; |
83 |
<html> |
<html> |
84 |
<head> |
<head> |
85 |
<title>OmniBack Gantt: $from - $to</title> |
<title>OmniBack Gantt: $from - $to</title> |
86 |
<meta HTTP-EQUIV=\"Refresh\" CONTENT=60>"; |
<meta HTTP-EQUIV=\"Refresh\" CONTENT=600>"; |
87 |
if ($use_js) { |
if ($use_js) { |
88 |
print ' |
print ' |
89 |
<script type="text/javascript" language="javascript" src="1k.js"></script> |
<script type="text/javascript" language="javascript" src="1k.js"></script> |
207 |
|
|
208 |
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); |
209 |
|
|
210 |
my $html = "<img src=\"".$q->url(-relative=>1)."?pic=$col\" width=\"$size\" height=\"$h\""; |
my $html = "<img src=\"".$q->url(-relative=>1)."/$col\" width=\"$size\" height=\"$h\""; |
211 |
|
|
212 |
if ($use_js && $alt) { |
if ($use_js && $alt) { |
213 |
$html .= " onmouseover=\"T('$alt')\" onmouseout=\"T()\""; |
$html .= " onmouseover=\"T('$alt')\" onmouseout=\"T()\""; |
257 |
$len++; |
$len++; |
258 |
} else { |
} else { |
259 |
my $h = $last_var / $max_use * $height; |
my $h = $last_var / $max_use * $height; |
260 |
my $c = 255 - 255 * $last_var / $max_use; |
my $c = 255 - int (255 * $last_var / $max_use); |
261 |
print color_bar($len,"$c,$c,$c","$last_var concurrent jobs",1,$h+1); |
print color_bar($len,"$c,$c,$c","$last_var concurrent jobs",1,$h+1); |
262 |
$len = 0; |
$len = 0; |
263 |
$last_var = $v; |
$last_var = $v; |
264 |
} |
} |
265 |
} |
} |
266 |
my $h = $last_var / $max_use * $height; |
my $h = $last_var / $max_use * $height; |
267 |
my $c = 255 - 255 * $last_var / $max_use; |
my $c = 255 - int (255 * $last_var / $max_use); |
268 |
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); |
269 |
print "</td></tr>"; |
print "</td></tr>"; |
270 |
} |
} |