@@ -10,14 +10,112 @@ <h1>Deployments</h1>
10
10
< em > {{emptyMessage}}</ em >
11
11
</ div >
12
12
</ div >
13
- < div style ="margin-bottom: 10px; " ng-repeat ="deployment in deployments ">
14
- < h3 > {{deployment.metadata.annotations.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.metadata.annotations.deploymentStatus}}</ div >
17
- < div > Version: {{deployment.metadata.annotations.deploymentVersion}}</ div >
18
- < div > Replicas: {{deployment.spec.replicas}}</ div >
19
- < pod-template ng-init ="podTemplate = deployment.spec.template "> </ pod-template >
13
+ < div class ="tile " ng-repeat ="(deploymentConfigName, deploymentConfig) in deploymentConfigs ">
14
+ < div >
15
+ < h2 > {{deploymentConfigName}}</ h2 >
16
+ < dl class ="dl-horizontal left indent ">
17
+ < div >
18
+ < dt > Created:</ dt >
19
+ < dd > < relative-timestamp timestamp ="deploymentConfig.metadata.creationTimestamp "> </ relative-timestamp > </ dd >
20
+ </ div >
21
+ < div >
22
+ < dt > Labels:</ dt >
23
+ < dd > {{deploymentConfig.metadata.labels}}</ dd >
24
+ </ div >
25
+ < div >
26
+ < dt > Latest Version:</ dt >
27
+ < dd > {{deploymentConfig.latestVersion}}</ dd >
28
+ </ div >
29
+ < div >
30
+ < dt > Strategy:</ dt >
31
+ < dd > {{deploymentConfig.template.strategy.type}}</ dd >
32
+ </ div >
33
+
34
+ < div >
35
+ < h3 > Triggers:</ h3 >
36
+ < dl class ="dl-horizontal left indent ">
37
+ < div ng-repeat ="trigger in deploymentConfig.triggers ">
38
+ < span ng-switch ="trigger.type ">
39
+ < span ng-switch-when ="ImageChange ">
40
+ TODO: ImageChange
41
+ </ span >
42
+ < span ng-switch-when ="ConfigChange ">
43
+ TODO: ConfigChange
44
+ </ span >
45
+ < span ng-switch-default > {{trigger.type}}</ span >
46
+ </ span >
47
+ </ div >
48
+ </ dl >
49
+
50
+ < dl class ="dl-horizontal left indent ">
51
+ < dt > Manual:</ dt >
52
+ < dd >
53
+ < span >
54
+ < button class ="btn btn-primary " ng-click ="" ng-disabled =""> Start Deployment</ button >
55
+ < span >
56
+ </ dd >
57
+ </ dl >
58
+
59
+ < dl class ="dl-horizontal left indent ">
60
+ < dt > Manual (CLI):
61
+ < a href ="{{'start-deployment' | helpLink}} " target ="_blank ">
62
+ < span class ="learn-more-block "> Learn more < i class ="fa fa-external-link "> </ i > </ span >
63
+ </ a >
64
+ </ dt >
65
+ < dd >
66
+ < code > osc deploy {{deploymentConfigName}} -n {{project.metadata.name}}</ code >
67
+ < copy-to-clipboard-button clipboard-text ="'osc deploy ' + deploymentConfigName + ' -n ' + project.metadata.name "> </ copy-to-clipboard-button >
68
+ </ dd >
69
+
70
+ </ dl >
71
+ </ div >
72
+
73
+ < div class ="well " style ="margin-bottom: 10px; " ng-repeat ="deployment in deploymentsByDeploymentConfig[deploymentConfigName] | orderObjectsByDate : true ">
74
+
75
+ < h3 >
76
+ Deployment #{{deployment.metadata.annotations.deploymentVersion}}
77
+ < span ng-if ="deployment.metadata.annotations.deploymentVersion == deploymentConfig.latestVersion "> (latest)</ span >
78
+ </ h3 >
79
+ < div > Name: {{deployment.metadata.name}}</ div >
80
+ < div > Created: < relative-timestamp timestamp ="deployment.metadata.creationTimestamp "> </ relative-timestamp > </ div >
81
+ < div >
82
+ < span > Status: {{deployment.metadata.annotations.deploymentStatus}}</ span >
83
+ < span ng-switch ="deployment.metadata.annotations.deploymentStatus " class ="hide-ng-leave ">
84
+ < span ng-switch-when ="Running "> for < duration-until-now timestamp ="deployment.metadata.creationTimestamp "> </ duration-until-now > </ span >
85
+ < span ng-switch-when ="New "> for < duration-until-now timestamp ="deployment.metadata.creationTimestamp "> </ duration-until-now > </ span >
86
+ < span ng-switch-when ="Pending "> for < duration-until-now timestamp ="deployment.metadata.creationTimestamp "> </ duration-until-now > </ span >
87
+ </ span >
88
+ < span ng-switch ="deployment.metadata.annotations.deploymentStatus " class ="hide-ng-leave ">
89
+ < span ng-switch-when ="Complete " class ="fa fa-check text-success " aria-hidden ="true "> </ span >
90
+ < span ng-switch-when ="Failed " class ="fa fa-times text-danger " aria-hidden ="true "> </ span >
91
+ < span style ="margin-left: 5px; " ng-switch-default class ="fa fa-refresh fa-spin " aria-hidden ="true "> </ span >
92
+ </ span >
93
+ </ div >
94
+ < div > Replicas: {{deployment.spec.replicas}}</ div >
95
+ < pod-template ng-init ="podTemplate = deployment.spec.template "> </ pod-template >
96
+ </ div >
97
+ </ div >
98
+ </ div >
99
+
100
+ <!-- render any deployments whose deployment configs no longer exist -->
101
+ < div class ="tile " ng-repeat ="(deploymentConfigName, deployments) in deploymentsByDeploymentConfig " ng-if ="!deploymentConfigs[deploymentConfigName] ">
102
+ < h2 ng-if ="deploymentConfigName != '' ">
103
+ {{deploymentConfigName}}
104
+ < span class ="pficon-layered " data-toggle ="tooltip " data-placement ="right " title ="This deployment config no longer exists " style ="cursor: help; ">
105
+ < span class ="pficon pficon-warning-triangle "> </ span >
106
+ < span class ="pficon pficon-warning-exclamation "> </ span >
107
+ </ span >
108
+ </ h2 >
109
+ < div style ="margin-bottom: 10px; " ng-repeat ="deployment in deployments | orderObjectsByDate : true ">
110
+ < h3 > {{deployment.metadata.annotations.deploymentConfig}} < span class ="small "> ({{deployment.metadata.name}})</ span > </ h3 >
111
+ < div > Created: < relative-timestamp timestamp ="deployment.metadata.creationTimestamp "> </ relative-timestamp > </ div >
112
+ < div > Status: {{deployment.metadata.annotations.deploymentStatus}}</ div >
113
+ < div > Version: {{deployment.metadata.annotations.deploymentVersion}}</ div >
114
+ < div > Replicas: {{deployment.spec.replicas}}</ div >
115
+ < pod-template ng-init ="podTemplate = deployment.spec.template "> </ pod-template >
116
+ </ div >
20
117
</ div >
118
+
21
119
</ div >
22
120
</ project-page >
23
121
</ div >
0 commit comments