Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add link to test results for multiple job grops #1860

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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