Commit 5778e727 authored by Leo Gordon's avatar Leo Gordon
Browse files

job_count_breakout now also returns the components that go into the breakout_label

parent 7421008e
......@@ -274,16 +274,18 @@ sub inprogress_job_count {
sub job_count_breakout {
my $self = shift;
my @counter_list = ();
my @count_list = ();
my %count_hash = ();
my $total_job_count = $self->total_job_count();
foreach my $count_method (qw(semaphored_job_count ready_job_count inprogress_job_count done_job_count failed_job_count)) {
if(my $count = $self->$count_method()) {
push @counter_list, $count.substr($count_method,0,1);
if( my $count = $count_hash{$count_method} = $self->$count_method() ) {
push @count_list, $count.substr($count_method,0,1);
}
}
my $breakout = join('+', @counter_list);
$breakout .= '='.$self->total_job_count() if(scalar(@counter_list)!=1); # only provide a total if multiple or no categories available
my $breakout_label = join('+', @count_list);
$breakout_label .= '='.$total_job_count if(scalar(@count_list)!=1); # only provide a total if multiple or no categories available
return $breakout;
return ($breakout_label, $total_job_count, \%count_hash);
}
......
......@@ -275,8 +275,10 @@ sub _add_analysis_node {
my ($self, $a) = @_;
my $stats = $a->stats();
my ($breakout_label) = $stats->job_count_breakout();
my $analysis_label = $a->logic_name().' ('.$a->dbID().')\n'.$stats->job_count_breakout();
my $analysis_label = $a->logic_name().' ('.$a->dbID().')\n'.$breakout_label;
my $shape = $a->can_be_empty() ? 'doubleoctagon' : 'ellipse' ;
my $status_colour = $self->config->get('Graph', 'Node', $stats->status, 'Colour');
my $node_fontname = $self->config->get('Graph', 'Node', $stats->status, 'Font');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment