Fix link to actual tests logs

This commit is contained in:
Alexandre Aubin 2018-12-12 16:33:24 +00:00
parent 86ca1285f2
commit d0415b88bb
2 changed files with 11 additions and 17 deletions

View file

@ -13,7 +13,7 @@ class AppCIBranch(db.Model):
branch = db.Column(db.String(64), nullable=False)
display_name = db.Column(db.String(64), unique=True, nullable=False)
url = db.Column(db.String(128), nullable=False)
console_uri = db.Column(db.String(128), nullable=False)
url_per_app = db.Column(db.String(128), nullable=False)
def __repr__(self):
return '<AppCIBranch %r>' % self.name
@ -24,17 +24,17 @@ class AppCIBranch(db.Model):
branch="stable",
display_name='Stable (x86)',
url='https://ci-apps.yunohost.org/ci/logs/list_level_stable.json',
console_uri='/job/{} ({})/lastBuild/consoleText')
url_per_app='https://ci-apps.yunohost.org/ci/apps/{}/')
yield AppCIBranch(name='arm',
arch="arm",
branch="stable",
display_name='Stable (ARM)',
url='https://ci-apps-arm.yunohost.org/ci/logs/list_level_stable.json',
console_uri='/job/{} ({}) (~ARM~)/lastBuild/consoleText')
url_per_app='https://ci-apps-arm.yunohost.org/ci/apps/{}/')
def last_build_url(self, app):
return self.url + self.console_uri.format(app.name, app.list.name.title())
return self.url_per_app.format(app.name)
def most_recent_tests_per_app(self):

View file

@ -76,18 +76,10 @@
</td>
{% endfor %}
<td class="ci-app-test-info px-0">
{% if result.url == None %}
{% if result.date == None %}
<span class="daysAgo">???</span>
<span class="daysAgo" href="{{ branch.last_build_url(result.app) }}">???</span>
{% else %}
<span class="daysAgo" timestamp="{{ result.date.timestamp() }}"></span>
{% endif %}
{% else %}
{% if result.date == None %}
<span class="daysAgo" href="{{ result.url.replace("consoleText", "consoleFull") }}">???</span>
{% else %}
<span class="daysAgo" timestamp="{{ result.date.timestamp() }}" href="{{ result.url.replace("consoleText", "consoleFull") }}"></span>
{% endif %}
<span class="daysAgo" timestamp="{{ result.date.timestamp() }}" href="{{ branch.last_build_url(result.app) }}"></span>
{% endif %}
{% if result.commit != result.app.master_commit %}
<span class="oi oi-clock text-warning"
@ -95,6 +87,7 @@
title="This test is outdated : a more recent commit exists in master than the one tested."></span>
{% endif %}
{% if result.app.public_commit != 'HEAD' and result.app.public_commit != result.app.master_commit %}
<!--
{% if result.app.public_vs_master_time_diff > 60 %}
<span class="oi oi-warning text-danger"
{% else %}
@ -102,6 +95,7 @@
{% endif %}
aria-hidden="true"
title="Master commit is not up to date with {{ result.app.list.name }}.json !"></span>
-->
{% endif %}
{% if result.app.testing_diff > 0 %}
<span class="oi oi-fork text-info"