forked from openshift/origin-web-console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_dc.html
158 lines (153 loc) · 7.88 KB
/
_dc.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
<div class="overview-tile" ng-class="{ 'deployment-in-progress': inProgressDeployment }">
<ng-include src="'views/overview/_service-header.html'"></ng-include>
<div class="overview-tile-header">
<div class="rc-header">
<div>
Deployment Config
<a ng-href="{{deploymentConfig | navigateResourceURL}}">{{deploymentConfig.metadata.name}}</a>
<small class="overview-timestamp" ng-if="activeReplicationController && !inProgressDeployment">
<span class="hidden-xs">–</span>
<span am-time-ago="activeReplicationController.metadata.creationTimestamp"></span>
</small>
</div>
<div>
<div class="small truncate">
<image-names
ng-if="activeReplicationController && !inProgressDeployment && showMetrics"
pod-template="activeReplicationController.spec.template"
pods="podsByOwnerUID[activeReplicationController.metadata.uid]">
</image-names>
</div>
<div ng-if="inProgressDeployment" class="small">
{{deploymentConfig.spec.strategy.type}} <ellipsis-pulser color="dark" size="sm" display="inline" msg="deployment in progress"></ellipsis-pulser>
<span ng-if="'deploymentconfigs/log' | canI : 'get'" class="deployment-log-link">
<a ng-href="{{inProgressDeployment | navigateResourceURL}}?tab=logs">View Log</a>
<span ng-if="'replicationcontrollers' | canI: 'update'" class="action-divider">|</span>
</span>
<span ng-if="'replicationcontrollers' | canI : 'update'" class="deployment-log-link">
<a href="" ng-click="cancelDeployment()" role="button">Cancel</a>
</span>
</div>
<div ng-if="deploymentConfig.spec.paused" class="small">
<span class="pficon pficon-info" aria-hidden="true"></span>
Deployment is paused.
<span ng-if="'deploymentconfigs' | canI : 'update'">
<a href="" ng-click="resumeDeployment()" role="button">Resume</a>
</span>
</div>
</div>
</div>
<div ng-if="!(orderedReplicationControllers | hashSize)" class="empty-dc">
<h2>No deployments.</h2>
<div ng-if="imageChangeTriggers.length">
A new deployment will start automatically when
<span ng-if="imageChangeTriggers.length === 1">
an image is available for
<a ng-href="{{urlForImageChangeTrigger(imageChangeTriggers[0], deploymentConfig)}}">
{{imageChangeTriggers[0].imageChangeParams.from | imageObjectRef : deploymentConfig.metadata.namespace}}</a>.
</span>
<span ng-if="imageChangeParams.length > 1">
one of the images for this deployment config changes.
</span>
</div>
<div ng-if="!imageChangeTriggers.length">
<div ng-if="pipeline = pipelinesForDC[deploymentConfig.metadata.name][0]">
<p>
This deployment config is part of pipeline
<a ng-href="{{pipeline | navigateResourceURL}}">{{pipeline.metadata.name}}</a>.
</p>
<div ng-if="('buildconfigs/instantiate' | canI : 'create')">
<!-- Disable the button if a pipeline is running. -->
<button
class="btn btn-primary"
ng-click="startPipeline(pipeline)"
ng-disabled="incompletePipelinesByDC[deploymentConfig.metadata.name].length">
Start Pipeline
</button>
</div>
</div>
<div ng-if="!pipelinesForDC[deploymentConfig.metadata.name].length">
<p>
No deployments have started for
<a ng-href="{{deploymentConfig | navigateResourceURL}}">{{deploymentConfig.metadata.name}}</a>.
</p>
<button ng-if="'deploymentconfigs' | canI : 'update'" class="btn btn-primary" ng-click="startDeployment(deploymentConfig)">
Start Deployment
</button>
</div>
</div>
</div>
<div column flex class="shield" ng-if="activeReplicationController"
ng-class="{ 'shield-lg': (activeReplicationController | annotation: 'deploymentVersion').length > 3 }">
<a ng-href="{{activeReplicationController | navigateResourceURL}}">
<span class="shield-number">#{{activeReplicationController | annotation: 'deploymentVersion'}}</span>
</a>
</div>
</div>
<div row class="overview-tile-body">
<!-- all visible replication controllers -->
<div column class="overview-donut"
ng-repeat="replicationController in orderedReplicationControllers track by (replicationController | uid)"
ng-class="{ latest: isDeploymentLatest(replicationController) }"
ng-if="!activeReplicationController || !(isDeploymentLatest(replicationController) && ((replicationController | deploymentStatus) == 'Cancelled' || (replicationController | deploymentStatus) == 'Failed'))">
<deployment-donut
rc="replicationController"
deployment-config="deploymentConfig"
pods="podsByOwnerUID[replicationController.metadata.uid]"
hpa="getHPA(deploymentConfig) || getHPA(replicationController)"
limit-ranges="limitRanges"
quotas="quotas"
cluster-quotas="clusterQuotas"
scalable="isScalableReplicationController(replicationController)"
alerts="alerts">
</deployment-donut>
</div>
<!-- /all visible replication controllers -->
<!-- deployment in progress (connecting arrow) -->
<div column class="overview-donut-connector" ng-class="{'contains-deployment-status-msg':orderedReplicationControllers.length === 1}" ng-if="inProgressDeployment">
<div ng-if="orderedReplicationControllers.length > 1" class="deployment-connector-arrow">
</div>
<div ng-if="orderedReplicationControllers.length === 1" class="deployment-status-msg">
<status-icon status="orderedReplicationControllers[0] | deploymentStatus" class="mar-right-xs"></status-icon>
Deployment #{{orderedReplicationControllers[0] | annotation : 'deploymentVersion'}}
{{orderedReplicationControllers[0] | deploymentStatus | lowercase}}
</div>
</div>
<!-- /deployment in progress (connecting arrow) -->
<!-- cancelled/failed state -->
<div column class="overview-unsuccessful-state" ng-if="!activeReplicationController && !inProgressDeployment" ng-switch="orderedReplicationControllers[0] | deploymentStatus">
<div ng-switch-when="Cancelled">
<span class="deployment-status-msg">
<i class="fa fa-ban" aria-hidden="true"></i>
{{deploymentConfig.metadata.name}}
<a ng-href="{{orderedReplicationControllers[0] | navigateResourceURL}}">#{{orderedReplicationControllers[0] | annotation: 'deploymentVersion'}}</a>
cancelled
</span>
</div>
<div ng-switch-when="Failed">
<span class="text-danger deployment-status-msg">
<i class="fa fa-times" aria-hidden="true"></i>
{{deploymentConfig.metadata.name}}
<a ng-href="{{orderedReplicationControllers[0] | navigateResourceURL}}">#{{orderedReplicationControllers[0] | annotation: 'deploymentVersion'}}</a>
failed
</span>
</div>
</div>
<!-- /cancelled/failed state -->
<!-- succeeded state -->
<div column class="overview-tile-details" ng-if="activeReplicationController && !inProgressDeployment">
<!-- metrics or pod template -->
<!-- pause metrics updates when the service group is collapsed -->
<deployment-metrics
ng-if="showMetrics && !collapse"
pods="podsByOwnerUID[activeReplicationController.metadata.uid]"
containers="activeReplicationController.spec.template.spec.containers"
profile="compact"
class="overview-metrics">
</deployment-metrics>
<pod-template ng-if="!showMetrics" pod-template="activeReplicationController.spec.template"></pod-template>
<!-- /metrics or pod template -->
</div>
<!-- /succeeded state -->
</div>
</div>