forked from openshift/origin-web-console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuilds.html
190 lines (189 loc) · 9.98 KB
/
builds.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<div class="middle">
<div class="middle-header header-toolbar">
<div class="container-fluid">
<div class="page-header page-header-bleed-right page-header-bleed-left">
<h1>
Builds
<span class="page-header-link">
<a ng-href="{{'builds' | helpLink}}" target="_blank">
Learn More <i class="fa fa-external-link" aria-hidden="true"></i>
</a>
</span>
</h1>
</div>
<div ng-if="(((latestByConfig | hashSize) || (buildsNoConfig | hashSize)) || filterWithZeroResults)" class="data-toolbar">
<div class="data-toolbar-filter">
<project-filter></project-filter>
</div>
</div>
</div>
</div><!-- /middle-header-->
<div class="middle-content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div ng-if="!(latestByConfig | hashSize) && !(buildsNoConfig | hashSize)">
<p ng-if="!buildsLoaded">
Loading...
</p>
<div ng-if="buildsLoaded" class="empty-state-message text-center">
<div ng-if="!filterWithZeroResults">
<h2>No builds.</h2>
<p>No builds have been added to project {{projectName}}.</p>
</div>
<div ng-if="filterWithZeroResults">
<h2>The filter is hiding all builds. <a href="" ng-click="clearFilter()" role="button" class="nowrap">Clear Filter</a></h2>
</div>
</div>
</div>
<table class="table table-bordered table-mobile table-layout-fixed" ng-if="(latestByConfig | hashSize) || (buildsNoConfig | hashSize)">
<colgroup>
<col class="col-sm-2">
<col class="col-sm-1">
<col class="col-sm-2">
<col class="col-sm-2">
<col class="col-sm-2">
<col class="col-sm-1">
<col class="col-sm-2 hidden-sm">
</colgroup>
<thead>
<tr>
<th>Name</th>
<th>Last Build</th>
<th>Status</th>
<th>Duration</th>
<th>Created</th>
<th>Type</th>
<th ng-class="{'hidden-sm' : (latestByConfig | hashSize)}">Source</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="(buildConfigName, latestBuild) in latestByConfig" ng-if="buildConfigName !== ''">
<!-- Build config with no builds-->
<td ng-if-start="!latestBuild" data-title="Name">
<a href="{{buildConfigs[buildConfigName] | navigateResourceURL}}">{{buildConfigName}}</a>
</td>
<td data-title="Last Build"><em>No builds</em></td>
<td class="hidden-xs"> </td>
<td class="hidden-xs"> </td>
<td class="hidden-xs"> </td>
<td data-title="Type">{{buildConfigs[buildConfigName].spec.strategy.type | startCase}}</td>
<td ng-if-end data-title="Source" class="hidden-sm">
<span ng-if="source = buildConfigs[buildConfigName].spec.source">
<span ng-switch="source.type">
<span ng-switch-when="None">
<i>None</i>
</span>
<span ng-switch-when="Git">
<osc-git-link
uri="source.git.uri"
ref="source.git.ref"
context-dir="source.contextDir">{{source.git.uri}}</osc-git-link>
</span>
<span ng-switch-default>
{{source.type}}
</span>
</span>
</span>
</td>
<!-- Build config with builds, or builds whose build config has since been deleted -->
<!-- We only show the first build from a build config for now-->
<td ng-if-start="latestBuild && (buildConfigs[buildConfigName] || !unfilteredBuildConfigs[buildConfigName])" data-title="Name">
<a ng-if="buildConfigName" href="{{latestBuild | configURLForResource}}">{{buildConfigName}}</a>
<span ng-if="buildConfigs && buildConfigName && !buildConfigs[buildConfigName]" class="pficon pficon-warning-triangle-o" data-toggle="tooltip" title="This build config no longer exists" style="cursor: help;"></span>
</td>
<td data-title="Last Build">
<!-- Build number and link -->
<span ng-if="(latestBuild | annotation : 'buildNumber') && buildConfigName">
<a ng-href="{{latestBuild | navigateResourceURL}}">#{{latestBuild | annotation : 'buildNumber'}}</a>
</span>
<span ng-if="!(latestBuild | annotation : 'buildNumber') && buildConfigName">
<a ng-href="{{latestBuild | navigateResourceURL}}">{{latestBuild.metadata.name}}</a>
</span>
</td>
<td data-title="Status">
<div row class="status">
<!-- <build-status build="build"></build-status> -->
<status-icon status="latestBuild.status.phase" disable-animation></status-icon>
<span ng-if="!latestBuild.status.reason || latestBuild.status.phase === 'Cancelled'">{{latestBuild.status.phase}}</span>
<span ng-if="latestBuild.status.reason && latestBuild.status.phase !== 'Cancelled'">{{latestBuild.status.reason | sentenceCase}}</span>
</div>
</td>
<td data-title="Duration">
<duration-until-now ng-if="latestBuild.status.startTimestamp && !latestBuild.status.completionTimestamp" timestamp="latestBuild.status.startTimestamp" time-only></duration-until-now>
<span ng-if="latestBuild.status.startTimestamp && latestBuild.status.completionTimestamp">{{latestBuild.status.startTimestamp | duration : latestBuild.status.completionTimestamp}}</span>
</td>
<td data-title="Created">
<span am-time-ago="latestBuild.metadata.creationTimestamp"></span>
</td>
<td data-title="Type">{{latestBuild.spec.strategy.type | startCase}}</td>
<td ng-if-end data-title="Source" class="hidden-sm">
<span ng-if="latestBuild.spec.source">
<span ng-switch="latestBuild.spec.source.type">
<span ng-switch-when="None">
<i>none</i>
</span>
<span ng-switch-when="Git">
<osc-git-link
uri="latestBuild.spec.source.git.uri"
ref="latestBuild.spec.source.git.ref"
context-dir="latestBuild.spec.source.contextDir">{{latestBuild.spec.source.git.uri}}</osc-git-link>
</span>
<span ng-switch-default>
{{latestBuild.spec.source.type}}
</span>
</span>
</span>
</td>
</tr>
<!-- Builds that were not spawned from a build config -->
<tr ng-repeat="latestBuild in buildsNoConfig track by (latestBuild | uid)">
<td data-title="Name">
<em>none</em>
</td>
<td data-title="Last Build">
<!-- Build number and link -->
<a ng-href="{{latestBuild | navigateResourceURL}}">{{latestBuild.metadata.name}}</a>
</td>
<td data-title="Status">
<div row class="status">
<!-- <build-status build="build"></build-status> -->
<status-icon status="latestBuild.status.phase" disable-animation></status-icon>
<span ng-if="!latestBuild.status.reason || latestBuild.status.phase === 'Cancelled'">{{latestBuild.status.phase}}</span>
<span ng-if="latestBuild.status.reason && latestBuild.status.phase !== 'Cancelled'">{{latestBuild.status.reason | sentenceCase}}</span>
</div>
</td>
<td data-title="Duration">
<duration-until-now ng-if="latestBuild.status.startTimestamp && !latestBuild.status.completionTimestamp" timestamp="latestBuild.status.startTimestamp" time-only></duration-until-now>
<span ng-if="latestBuild.status.startTimestamp && latestBuild.status.completionTimestamp">{{latestBuild.status.startTimestamp | duration : latestBuild.status.completionTimestamp}}</span>
</td>
<td data-title="Created">
<span am-time-ago="latestBuild.metadata.creationTimestamp"></span>
</td>
<td data-title="Type">{{latestBuild.spec.strategy.type | startCase}}</td>
<td data-title="Source" class="hidden-sm">
<span ng-if="latestBuild.spec.source">
<span ng-switch="latestBuild.spec.source.type">
<span ng-switch-when="None">
<i>none</i>
</span>
<span ng-switch-when="Git">
<osc-git-link
uri="latestBuild.spec.source.git.uri"
ref="latestBuild.spec.source.git.ref"
context-dir="latestBuild.spec.source.contextDir">{{latestBuild.spec.source.git.uri}}</osc-git-link>
</span>
<span ng-switch-default>
{{latestBuild.spec.source.type}}
</span>
</span>
</span>
</td>
</tr>
</tbody>
</table>
</div><!-- /col-* -->
</div>
</div>
</div><!-- /middle-content -->
</div>