Skip to content

Commit

Permalink
attempt to add build status to template
Browse files Browse the repository at this point in the history
  • Loading branch information
adong committed May 21, 2024
1 parent cb6f7f2 commit 62e8de6
Showing 1 changed file with 31 additions and 64 deletions.
95 changes: 31 additions & 64 deletions app/components/newui-event-card/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@
@spin={{this.icon.spin}}
@flip={{this.icon.flip}}
/>
{{this.event.status}}
</div>
</div>
<div class="sha" title={{truncate this.event.sha}}>#{{this.event.truncatedSha}} </div>
<div class="sha" title={{truncate this.event.sha}}>
<a
class={{if (eq this.event.sha this.latestCommit.sha) "latest-commit"}}
href={{this.event.commit.url}}
>#{{this.event.truncatedSha}}
</a>
</div>
<div class="branch" title={{this.event.baseBranch}}>
<FaIcon @icon="code-branch" />
<span class="branch-name">{{truncate this.event.baseBranch 7 true}}</span>
Expand All @@ -21,10 +26,13 @@
{{/if}}
</div>

<div class="label" title={{truncate this.event.meta.label}}>{{truncate this.event.meta.label}} </div>

<div class="message" title={{this.event.commit.message}}>{{this.event.truncatedMessage}} </div>

{{#if this.event.label}}
<div class="label">{{linkify this.event.label target="_blank" rel="nofollow" urlLength=30}}</div>{{/if}}

<div class="time">Started {{this.startDate.content}}</div>
<div class="duration">Duration: {{this.event.durationText}}</div>
<div class="by">
{{#if this.isCommitterDifferent}}
<span>
Expand Down Expand Up @@ -73,6 +81,7 @@
{{/if}}
{{/if}}
</div>

{{#if (get-length this.event.meta.parameters)}}
<div class="parameters-section">
{{#if this.isShowingModal}}
Expand All @@ -98,67 +107,25 @@
{{/if}}

<div class="parameters">
{{#if this.isInlineParameters}}
<span>
Parameters:
</span>
<ul>
{{#if (get-length this.pipelineParameters)}}
<li>
<span class="parameter-group badge">
Shared
</span>
<ul>
{{#each-in this.pipelineParameters as |pName pVal|}}
<li>
<span class="parameter-name badge">
{{pName}}
</span>
<span class="parameter-value">
:{{pVal.value}}
</span>
</li>
{{/each-in}}
</ul>
</li>
{{/if}}
{{#if (get-length this.jobParameters)}}
{{#each-in this.jobParameters as |jobName parameters|}}
<li>
<span class="parameter-group badge">
Job: {{jobName}}
</span>
<ul>
{{#each-in parameters as |pName pVal|}}
<li>
<span class="parameter-name badge">
{{pName}}
</span>
<span class="parameter-value">
:{{pVal.value}}
</span>
</li>
{{/each-in}}
</ul>
</li>
{{/each-in}}
{{/if}}
</ul>
{{else}}
<span>
<button
class="btn btn-primary btn-xs"
type="button"
onClick={{action "toggleParametersPreview"}}
>
Parameters...
<span class="badge">
{{this.numberOfParameters}}
</span>
</button>
</span>
{{/if}}
<span>
<button
class="btn btn-primary btn-xs"
type="button"
onClick={{action "toggleParametersPreview"}}
>
Parameters...
<span class="badge">
{{this.numberOfParameters}}
</span>
</button>
</span>
</div>
</div>
{{/if}}
<div class="builds">Builds:
<br/>
<span>Unstable/Failure: {{await this.numberOfUnstableOrFailureBuilds}}</span>
<br/>
<span>Running: {{await this.numberOfRunningBuilds}}</span>
</div>
{{yield}}

0 comments on commit 62e8de6

Please sign in to comment.