Skip to content

Commit

Permalink
Merge pull request #1860 from OleksandrOrlov/42851_link_for_parent_jo…
Browse files Browse the repository at this point in the history
…b_groups

Add link to test results for multiple job grops
  • Loading branch information
coolo committed Nov 21, 2018
2 parents 1d4420d + 2a42bd4 commit 121b6ee
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion assets/stylesheets/dashboard.scss
Expand Up @@ -44,7 +44,7 @@ td div.progress {
}
}

// expandible items on dashboard (mainly the BuildXXXX headings)
// expandable items on dashboard (mainly the BuildXXXX headings)
.build-row .h4 {
text-overflow: ellipsis;
overflow: hidden;
Expand Down
8 changes: 8 additions & 0 deletions t/22-dashboard.t
Expand Up @@ -448,6 +448,14 @@ subtest 'job parent groups with multiple version and builds' => sub {
check_builds(\@build_names, $test_parent, 'parent group builds shown sorted by dotted versions',
'parent_group_overview');

my @entire_build_url_list = $get->tx->res->dom->find('.h4 a:first-child')->each();
my $first_entire_build_url = $entire_build_url_list[0]->attr('href');
is(
$first_entire_build_url,
'/tests/overview?distri=suse&version=14.2&build=87.5011&groupid=1001&groupid=1002',
'entire build url contains all the child group ids'
);

$test_parent->update({build_version_sort => 0});

$get = $t->get_ok('/parent_group_overview/' . $test_parent->id)->status_is(200);
Expand Down
5 changes: 3 additions & 2 deletions templates/main/group_builds.html.ep
@@ -1,14 +1,15 @@
% for my $build_res (@$build_results) {
% my $build = $build_res->{build};
% my $group_id;
% my @tests_overview_url_data = (distri => [sort keys %{$build_res->{distris}}], version => $build_res->{version}, build => $build);
<div class="d-md-flex flex-row build-row <%= $children ? ($default_expanded ? 'children-expanded' : 'children-collapsed') : 'no-children' %>">
<div class="px-2 build-label text-nowrap">
<span class="h4">
% if ($children) {
% $group_id = "group$group->{id}_build$build_res->{escaped_id}";
<a href="#<%= $group_id %>" onclick="return toggleChildGroups(this);" data-toggle="collapse">Build<%= $build %></a>
<a data-target="#<%= $group_id %>" href="<%= url_for('tests_overview')->query(@tests_overview_url_data, map { (groupid => $_->{id}) } @{$children});%>" onclick="return toggleChildGroups(this);" data-toggle="collapse" title="Open in new tab to view the entire build">Build<%= $build %></a>
% } else {
%= link_to "Build$build" => url_for('tests_overview')->query(distri => [sort keys %{$build_res->{distris}}], version => $build_res->{version}, build => $build, groupid => $group->{id} )
%= link_to "Build$build" => url_for('tests_overview')->query(@tests_overview_url_data, groupid => $group->{id})
% }

<span class="smaller-font">(<abbr class="timeago" title="<%= $build_res->{oldest}->datetime() %>Z">
Expand Down

0 comments on commit 121b6ee

Please sign in to comment.