25 |
'Completed/Errors' => '255,128,0', |
'Completed/Errors' => '255,128,0', |
26 |
'Completed/Failure' => '128,0,128', |
'Completed/Failure' => '128,0,128', |
27 |
'Mount Request' => '128,128,255', |
'Mount Request' => '128,128,255', |
28 |
|
'Mount/Errors' => '255,64,128', |
29 |
); |
); |
30 |
|
|
31 |
my $int_t = (12 * 60 * 60); # interval to display on one screen |
my $int_t = (12 * 60 * 60); # interval to display on one screen |
35 |
|
|
36 |
# time range |
# time range |
37 |
|
|
38 |
|
$int_t = m_round($int_t); |
39 |
|
|
40 |
my ($from_t,$to_t) = (time()-$int_t,time()); |
my ($from_t,$to_t) = (time()-$int_t,time()); |
41 |
|
|
42 |
$to_t = param('to_t') if (param('to_t')); |
$to_t = param('to_t') if (param('to_t')); |
43 |
$from_t = param('from_t') if (param('from_t')); |
$from_t = param('from_t') if (param('from_t')); |
44 |
|
|
45 |
# round to nearest minute |
# round to nearest minute |
46 |
$to_t = $to_t - ($to_t % 60); |
sub m_round { |
47 |
$from_t = $from_t - ($from_t % 60) + 60; |
my $t = shift @_; |
48 |
|
return ($t - ($t % 60)); |
49 |
|
} |
50 |
|
|
51 |
|
$to_t = m_round($to_t); |
52 |
|
$from_t = m_round($from_t); |
53 |
|
|
54 |
my $to=strftime("%Y-%m-%d %H:%M",localtime ($to_t)); |
my $to=strftime("%Y-%m-%d %H:%M",localtime ($to_t)); |
55 |
my $from=strftime("%Y-%m-%d %H:%M",localtime ($from_t)); |
my $from=strftime("%Y-%m-%d %H:%M",localtime ($from_t)); |
199 |
|
|
200 |
} |
} |
201 |
|
|
202 |
my $start_t = str2time($row->{start}); |
my $start_t = m_round(str2time($row->{start})); |
203 |
my $fin_t = str2time($row->{finish}); |
my $fin_t = m_round(str2time($row->{finish})); |
204 |
|
|
205 |
if ($start_t > $curr_t) { |
if ($start_t > $curr_t + 60) { |
206 |
my $t = $start_t - $curr_t; |
my $t = $start_t - $curr_t; |
207 |
print STDERR "[middle filler $curr_t:$t]" if ($debug); |
print STDERR "[middle filler $curr_t:$t]" if ($debug); |
208 |
print bar($t); |
print bar($t); |