[FIX] runbot: add proper db argument when build is a duplicate

When a build was a duplicate, the link to the running build instance was
leading to the duplicate instance with the db filter of the current
build. Because of that, the user was then redirected to the database selector.

With this commit, the link button gives the proper database argument.

Thanks @RomainLibert for reporting this issue.
This commit is contained in:
Christophe Monniez 2018-04-25 14:34:55 +02:00
parent efbce41e2e
commit d7f727a0d0

View File

@ -23,7 +23,7 @@
<template id="runbot.build_button">
<div t-attf-class="pull-right">
<div t-attf-class="btn-group {{klass}}">
<a t-if="bu['state']=='running'" t-attf-href="http://{{bu['domain']}}/?db={{bu['dest']}}-all" class="btn btn-primary" aria-label="Sign in on this build"><i class="fa fa-sign-in"/></a>
<a t-if="bu['state']=='running'" t-attf-href="http://{{bu['domain']}}/?db={{bu['real_dest']}}-all" class="btn btn-primary" aria-label="Sign in on this build"><i class="fa fa-sign-in"/></a>
<a t-attf-href="/runbot/build/{{bu['id']}}" class="btn btn-default" aria-label="Build details"><i class="fa fa-file-text-o"/></a>
<a t-attf-href="https://#{repo.base}/commit/#{bu['name']}" class="btn btn-default" aria-label="Open commit on GitHub"><i class="fa fa-github"/></a>
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-label="Build options" aria-expanded="false"><i class="fa fa-cog"/><span class="caret"></span></button>