Skip to content

Commit

Permalink
When using multiple databases group the entries that have the same name
Browse files Browse the repository at this point in the history
  • Loading branch information
muffato committed Sep 21, 2018
1 parent 2855484 commit 541b522
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/generate_timeline.pl
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@ sub main {
$key_name{"$pipeline..".$_->dbID} = $_->display_name for $pipeline->collection_of($key eq 'analysis' ? 'Analysis' : 'ResourceClass')->list;
$key_name{"$pipeline..-1"} = 'UNSPECIALIZED';
}
if (scalar(@pipelines) > 1) {
# Add a pseudo category for each display name
foreach my $display_name (values %key_name) {
$key_name{$display_name} = $display_name;
}
}
warn scalar(keys %key_name), " keys: ", Dumper \%key_name if $verbose;

# Get the events from the database
Expand Down Expand Up @@ -221,6 +227,7 @@ sub main {
$key_value = -1 if not defined $key_value;

$key_value = "$pipeline..$key_value";
$key_value = $key_name{$key_value} if scalar(@pipelines) > 1;
$resource_class_id = "$pipeline..$resource_class_id";
$worker_id = "$pipeline..$worker_id";

Expand Down

0 comments on commit 541b522

Please sign in to comment.