/
app-build-item.component.html
52 lines (50 loc) · 3.89 KB
/
app-build-item.component.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<div class="columns">
<div class="column is-2">
<img class="avatar-icon" [src]="build?.data?.sender?.avatar_url" *ngIf="build?.data?.sender?.avatar_url">
<span *ngIf="!build?.pr && !tag" class="bold larger">#{{ build?.id }}</span>
<span *ngIf="build?.pr && !tag" class="bold larger">PR #{{ build?.pr }}</span>
<span *ngIf="tag" class="bold larger">{{ tag }}</span>
</div>
<div class="column is-2">
<span class="larger">{{ build?.repository?.full_name }}</span>
</div>
<div class="column is-4 commit-column">
<span class="icon">
<img src="images/icons/git-commit.svg">
</span>
<span class="bold" *ngIf="build?.data?.pull_request?.head.sha && !tag">{{ build?.data?.pull_request.head.sha }}</span>
<span class="bold" *ngIf="!build?.data?.pull_request?.head.sha">{{ build?.data?.after }}</span>
<span *ngIf="build?.data?.commits && !tag">{{ build?.data?.commits[build?.data?.commits.length - 1]?.message }}</span>
<span *ngIf="!build?.data?.commits && !tag">{{ build?.data?.pull_request?.title }}</span>
<span *ngIf="tag">{{ build?.data?.head_commit?.message }}</span>
<span class="smaller">{{ build?.timeInWords }} ago</span>
</div>
<div class="column is-2">
<span *ngIf="build?.data?.commits && !tag">{{ build?.data?.commits[0]?.committer?.name }}</span>
<span *ngIf="!build?.data?.commits && !tag">{{ build?.data?.sender.login }}</span>
<span *ngIf="tag">{{ build?.data?.head_commit?.comitter?.name }}</span>
</div>
<div class="column is-1">
<span class="build-time">{{ build?.totalTime }}</span>
</div>
<div class="column is-1 justify-end" *ngIf="build?.hasPermission">
<span class="icon restart-build" (click)="restartBuild($event, build.id)" [class.disabled]="processingRequest">
<svg width="15px" height="14px" viewBox="0 0 15 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="icon" fill-rule="nonzero" fill="#FFFFFF">
<path d="M12.083,1.887 C11.288,1.093 10.353,0.528 9.356,0.19 L9.356,2.325 C9.836,2.564 10.291,2.875 10.69,3.275 C12.683,5.269 12.683,8.511 10.69,10.504 C8.697,12.494 5.457,12.494 3.461,10.504 C1.47,8.509 1.47,5.269 3.461,3.275 C3.466,3.269 3.482,3.259 3.489,3.25 L3.491,3.25 L4.672,4.429 L4.665,0.685 L0.923,0.68 L2.099,1.856 C2.092,1.868 2.081,1.88 2.072,1.887 C-0.691,4.649 -0.691,9.13 2.072,11.892 C4.839,14.657 9.317,14.657 12.083,11.892 C14.844,9.13 14.847,4.649 12.083,1.887 Z" id="Shape"></path>
</g>
</g>
</svg>
</span>
<span class="icon stop-build" (click)="stopBuild($event, build.id)" [class.disabled]="processingRequest">
<svg width="44px" height="44px" viewBox="0 0 44 44" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="cancel-2" fill-rule="nonzero" fill="#FFFFFF">
<path d="M22,0 C9.8,0 0,9.8 0,22 C0,34.2 9.8,44 22,44 C34.2,44 44,34.2 44,22 C44,9.8 34.2,0 22,0 Z M25.2,22.4 L32.7,29.9 C32.9,30.1 33,30.4 33,30.6 C33,30.8 32.9,31.1 32.7,31.3 L31.3,32.7 C31.1,32.9 30.8,33 30.6,33 C30.3,33 30.1,32.9 29.9,32.7 L22.4,25.2 C22.2,25 21.9,25 21.7,25.2 L14.2,32.7 C14,32.9 13.7,33 13.5,33 C13.2,33 13,32.9 12.8,32.7 L11.4,31.3 C11.2,31.1 11.1,30.8 11.1,30.6 C11.1,30.4 11.2,30.1 11.4,29.9 L18.9,22.4 C19.1,22.2 19.1,21.9 18.9,21.7 L11.4,14.2 C11.2,14 11.1,13.7 11.1,13.5 C11.1,13.3 11.2,13 11.4,12.8 L12.8,11.4 C13,11.2 13.3,11.1 13.5,11.1 C13.7,11.1 14,11.2 14.2,11.4 L21.7,18.9 C21.9,19.1 22.2,19.1 22.4,18.9 L29.9,11.4 C30.1,11.2 30.4,11.1 30.6,11.1 C30.9,11.1 31.1,11.2 31.3,11.4 L32.7,12.8 C32.9,13 33,13.3 33,13.5 C33,13.7 32.9,14 32.7,14.2 L25.2,21.7 C25,21.8 25,22.2 25.2,22.4 L25.2,22.4 Z" id="Shape"></path>
</g>
</g>
</svg>
</span>
</div>
</div>