@@ -9,14 +9,210 @@ <h1>Deployments</h1>
9
9
< div >
10
10
< em > {{emptyMessage}}</ em >
11
11
</ div >
12
- </ div >
13
- < div style ="margin-bottom: 10px; " ng-repeat ="deployment in deployments ">
14
- < h3 > {{deployment | annotation:'deploymentConfig'}} < span class ="small "> ({{deployment.metadata.name}})</ span > </ h3 >
15
- < div > Created: < relative-timestamp timestamp ="deployment.metadata.creationTimestamp "> </ relative-timestamp > </ div >
16
- < div > Status: {{deployment | annotation:'deploymentStatus'}}</ div >
17
- < div > Version: {{deployment | annotation:'deploymentVersion'}}</ div >
18
- < div > Replicas: {{deployment.spec.replicas}}</ div >
19
- < pod-template ng-init ="podTemplate = deployment.spec.template "> </ pod-template >
12
+ </ div >
13
+
14
+ < div class ="tile " ng-repeat ="(deploymentConfigName, deploymentConfig) in deploymentConfigs track by (deploymentConfig | uid) ">
15
+ < div >
16
+ < h2 > {{deploymentConfigName}}</ h2 >
17
+ < dl class ="dl-horizontal left indent ">
18
+ < div >
19
+ < dt > Created:</ dt >
20
+ < dd > < relative-timestamp timestamp ="deploymentConfig.metadata.creationTimestamp "> </ relative-timestamp > </ dd >
21
+ </ div >
22
+ < div >
23
+ < dt > Labels:</ dt > < dd ng-if ="!deploymentConfig.metadata.labels "> none</ dd >
24
+ < dd ng-repeat ="(labelKey, labelValue) in deploymentConfig.metadata.labels "> {{labelKey}}={{labelValue}}< span ng-show ="!$last "> , </ span > </ dd >
25
+ </ div >
26
+ < div >
27
+ < dt > Latest Version:</ dt >
28
+ < dd > {{deploymentConfig.latestVersion}}</ dd >
29
+ </ div >
30
+ < div ng-if ="deploymentConfig.template.strategy.type ">
31
+ < dt > Strategy:</ dt >
32
+ < dd > {{deploymentConfig.template.strategy.type}}</ dd >
33
+ </ div >
34
+
35
+ < div >
36
+ < h3 > Template:</ h3 >
37
+ < dl class ="dl-horizontal left indent ">
38
+ < dt > Selectors:</ dt > < dd ng-if ="!deploymentConfig.template.controllerTemplate.replicaSelector "> none</ dd >
39
+ < dd ng-repeat ="(selectorLabel, selectorValue) in deploymentConfig.template.controllerTemplate.replicaSelector "> {{selectorLabel}}={{selectorValue}}< span ng-show ="!$last "> , </ span > </ dd >
40
+ < dt > Replicas:</ dt >
41
+ < dd >
42
+ {{deploymentConfig.template.controllerTemplate.replicas}}
43
+ </ dd >
44
+ </ dl >
45
+ </ div >
46
+
47
+ < div >
48
+ < h3 > Triggers:</ h3 >
49
+ <!---<dl class="dl-horizontal left indent">
50
+ <dt>Manual:</dt>
51
+ <dd>
52
+ <span>
53
+ <button class="btn btn-primary" ng-click="startLatestDeployment(deploymentConfigName)" ng-disabled="">Start Deployment</button>
54
+ <span>
55
+ </dd>
56
+ </dl>-->
57
+
58
+ < dl class ="dl-horizontal left indent ">
59
+ < dt > Manual (CLI):
60
+ < a href ="{{'deployment-operations' | helpLink}} " target ="_blank ">
61
+ < span class ="learn-more-block "> Learn more < i class ="fa fa-external-link "> </ i > </ span >
62
+ </ a >
63
+ </ dt >
64
+ < dd >
65
+ < code > osc deploy {{deploymentConfigName}} --latest -n {{project.metadata.name}}</ code >
66
+ < copy-to-clipboard-button clipboard-text ="'osc deploy ' + deploymentConfigName + ' --latest -n ' + project.metadata.name "> </ copy-to-clipboard-button >
67
+ </ dd >
68
+ </ dl >
69
+
70
+ < dl class ="dl-horizontal left indent ">
71
+ < div ng-repeat ="trigger in deploymentConfig.triggers ">
72
+ < span ng-switch ="trigger.type ">
73
+ < span ng-switch-default > {{trigger.type}}</ span >
74
+ < span ng-switch-when ="ImageChange ">
75
+ < div ng-switch ="deploymentConfig.template.strategy.type ">
76
+ < div ng-switch-when ="Recreate ">
77
+ < dl class ="dl-horizontal " ng-if ="trigger.imageChangeParams.from ">
78
+ < dt >
79
+ New image for:
80
+ </ dt >
81
+ < dd >
82
+ Image stream {{trigger.imageChangeParams.from | imageRepoReference : trigger.imageChangeParams.from.kind : trigger.imageChangeParams.tag}}
83
+ </ dd >
84
+ </ dl >
85
+ </ div >
86
+ </ div >
87
+ </ span >
88
+ < span ng-switch-when ="ConfigChange ">
89
+ < dt > Change of:</ dt >
90
+ < dd > Config</ dd >
91
+ </ span >
92
+ </ span >
93
+ </ div >
94
+ </ dl >
95
+ </ div >
96
+
97
+ < div class ="well " style ="margin-bottom: 10px; " ng-repeat ="deployment in deploymentsByDeploymentConfig[deploymentConfigName] | orderObjectsByDate : true ">
98
+ < h3 >
99
+ {{deployment.metadata.name}}
100
+ < span ng-if ="(deployment | annotation:'deploymentVersion') == deploymentConfig.latestVersion "> (latest)</ span >
101
+ </ h3 >
102
+ < div >
103
+ < dt > Created:</ dt >
104
+ < dd > < relative-timestamp timestamp ="deployment.metadata.creationTimestamp "> </ relative-timestamp > </ dd >
105
+ </ div >
106
+ < div >
107
+ < span >
108
+ < dt > Status:</ dt >
109
+ < dd >
110
+ < span > {{deployment | annotation:'deploymentStatus'}}</ span >
111
+ < span ng-switch ="deployment | annotation:'deploymentStatus' " class ="hide-ng-leave ">
112
+ < span ng-switch-when ="Running "> for < duration-until-now timestamp ="deployment.metadata.creationTimestamp "> </ duration-until-now > </ span >
113
+ < span ng-switch-when ="New "> for < duration-until-now timestamp ="deployment.metadata.creationTimestamp "> </ duration-until-now > </ span >
114
+ < span ng-switch-when ="Pending "> for < duration-until-now timestamp ="deployment.metadata.creationTimestamp "> </ duration-until-now > </ span >
115
+ </ span >
116
+ < span ng-switch ="deployment | annotation:'deploymentStatus' " class ="hide-ng-leave ">
117
+ < span style ="margin-left: 5px; " ng-switch-default class ="fa fa-refresh fa-spin " aria-hidden ="true "> </ span >
118
+ < span ng-switch-when ="Complete " class ="fa fa-check text-success " aria-hidden ="true "> </ span >
119
+ < span ng-switch-when ="Failed " class ="fa fa-times text-danger " aria-hidden ="true "> </ span >
120
+ </ span >
121
+ </ dd >
122
+ </ span >
123
+ </ div >
124
+ < div >
125
+ < dt > Labels:</ dt >
126
+ < dd >
127
+ < span ng-if ="!deployment.metadata.labels "> none</ span >
128
+ < span ng-repeat ="(labelKey, labelValue) in deployment.metadata.labels "> {{labelKey}}={{labelValue}}< span ng-show ="!$last "> , </ span > </ span >
129
+ </ dd >
130
+ </ div >
131
+ < div >
132
+ < dt > Selectors:</ dt >
133
+ < dd >
134
+ < span ng-if ="!deployment.spec.selector "> none</ span >
135
+ < span ng-repeat ="(labelKey, labelValue) in deployment.spec.selector "> {{labelKey}}={{labelValue}}< span ng-show ="!$last "> , </ span > </ span >
136
+ </ dd >
137
+ </ div >
138
+ < div >
139
+ < dt > Replicas:</ dt >
140
+ < dd > {{deployment.spec.replicas}}</ dd >
141
+ </ div >
142
+ < div style ="padding-top:10px; " ng-if ="deployment.spec.template ">
143
+ < dt > Pod Template:</ dt >
144
+ < pod-template ng-init ="podTemplate = deployment.spec.template "> </ pod-template >
145
+ </ div >
146
+ </ div >
147
+
148
+ <!--<div ng-if="(deploymentsByDeploymentConfig[deploymentConfigName] | hashSize) > 1">
149
+ <button class="btn btn-default" ng-click="" data-toggle="button">Show older deployments</button>
150
+ </div>-->
151
+ </ dl >
152
+ </ div >
153
+ </ div >
154
+
155
+ <!-- render any deployments whose deployment configs no longer exist -->
156
+ < div class ="tile " ng-repeat ="(deploymentConfigName, deployments) in deploymentsByDeploymentConfig " ng-if ="!deploymentConfigs[deploymentConfigName] ">
157
+ < div >
158
+ < h2 ng-if ="deploymentConfigName != '' ">
159
+ {{deploymentConfigName}}
160
+ < span class ="pficon-layered " data-toggle ="tooltip " data-placement ="right " title ="This deployment config no longer exists " style ="cursor: help; ">
161
+ < span class ="pficon pficon-warning-triangle "> </ span >
162
+ < span class ="pficon pficon-warning-exclamation "> </ span >
163
+ </ span >
164
+ </ h2 >
165
+ < dl class ="dl-horizontal left indent ">
166
+ < div class ="well " style ="margin-bottom: 10px; " ng-repeat ="deployment in deployments | orderObjectsByDate : true ">
167
+ < h3 >
168
+ {{deployment.metadata.name}}
169
+ </ h3 >
170
+ < div >
171
+ < dt > Created:</ dt >
172
+ < dd > < relative-timestamp timestamp ="deployment.metadata.creationTimestamp "> </ relative-timestamp > </ div > </ dd >
173
+ < div >
174
+ < span >
175
+ < dt > Status:</ dt >
176
+ < dd >
177
+ < span > {{deployment | annotation:'deploymentStatus'}}</ span >
178
+ < span ng-switch ="deployment | annotation:'deploymentStatus' " class ="hide-ng-leave ">
179
+ < span ng-switch-when ="Running "> for < duration-until-now timestamp ="deployment.metadata.creationTimestamp "> </ duration-until-now > </ span >
180
+ < span ng-switch-when ="New "> for < duration-until-now timestamp ="deployment.metadata.creationTimestamp "> </ duration-until-now > </ span >
181
+ < span ng-switch-when ="Pending "> for < duration-until-now timestamp ="deployment.metadata.creationTimestamp "> </ duration-until-now > </ span >
182
+ </ span >
183
+ < span ng-switch ="deployment | annotation:'deploymentStatus' " class ="hide-ng-leave ">
184
+ < span style ="margin-left: 5px; " ng-switch-default class ="fa fa-refresh fa-spin " aria-hidden ="true "> </ span >
185
+ < span ng-switch-when ="Complete " class ="fa fa-check text-success " aria-hidden ="true "> </ span >
186
+ < span ng-switch-when ="Failed " class ="fa fa-times text-danger " aria-hidden ="true "> </ span >
187
+ </ span >
188
+ </ dd >
189
+ </ span >
190
+ </ div >
191
+ < div >
192
+ < dt > Labels:</ dt >
193
+ < dd >
194
+ < span ng-if ="!deployment.metadata.labels "> none</ span >
195
+ < span ng-repeat ="(labelKey, labelValue) in deployment.metadata.labels "> {{labelKey}}={{labelValue}}< span ng-show ="!$last "> , </ span > </ span >
196
+ </ dd >
197
+ </ div >
198
+ < div >
199
+ < dt > Selectors:</ dt >
200
+ < dd >
201
+ < span ng-if ="!deployment.spec.selector "> none</ span >
202
+ < span ng-repeat ="(labelKey, labelValue) in deployment.spec.selector "> {{labelKey}}={{labelValue}}< span ng-show ="!$last "> , </ span > </ span >
203
+ </ dd >
204
+ </ div >
205
+ < div >
206
+ < dt > Replicas:</ dt >
207
+ < dd > {{deployment.spec.replicas}}</ dd >
208
+ </ div >
209
+ < div style ="padding-top:10px; " ng-if ="deployment.spec.template ">
210
+ < dt > Pod Template:</ dt >
211
+ < pod-template ng-init ="podTemplate = deployment.spec.template "> </ pod-template >
212
+ </ div >
213
+ </ div >
214
+ </ dl >
215
+ </ div >
20
216
</ div >
21
217
</ div >
22
218
</ project-page >
0 commit comments