
This commit adds adapters and serializers for v3, but also a fallback serializer for v2, which allows to handle v2 and v3 payloads at the same time. This is needed, because when we use v3 endpoint for one of the models (in this case repo), we can also get embedded records of other types (like branch or build).
38 lines
1.1 KiB
Handlebars
38 lines
1.1 KiB
Handlebars
<div class="tile {{repo.lastBuild.state}}">
|
|
<h2 class="tile-title {{repo.lastBuild.state}}">
|
|
{{#if repo.slug}}
|
|
{{#link-to "repo" repo}}
|
|
{{status-icon status=repo.lastBuildState}}
|
|
<span class="label-align">{{repo.slug}}</span>
|
|
{{/link-to}}
|
|
{{/if}}
|
|
</h2>
|
|
|
|
{{#if repo.slug}}
|
|
{{#if repo.lastBuild.id}}
|
|
<p class="tile-title float-right {{repo.lastBuild.state}}">
|
|
{{#link-to "build" repo repo.lastBuild.id}}
|
|
<span class="icon-hash"></span>
|
|
<span class="label-align">{{lastBuild.number}}</span>
|
|
{{/link-to}}
|
|
</p>
|
|
{{/if}}
|
|
{{/if}}
|
|
|
|
<p>
|
|
<span class="icon-clock"></span>
|
|
<span class="label-align">Duration:
|
|
<abbr class="duration" title={{lastBuild.startedAt}}>
|
|
{{format-duration repo.lastBuild.duration}}
|
|
</abbr></span>
|
|
</p>
|
|
|
|
<p>
|
|
<span class="icon-calendar"></span>
|
|
<span class="label-align">Finished:
|
|
<abbr class="finished_at timeago" title={{lastBuild.finishedAt}}>
|
|
{{format-time repo.lastBuild.finishedAt}}
|
|
</abbr></span>
|
|
</p>
|
|
</div>
|