-
Notifications
You must be signed in to change notification settings - Fork 231
/
Copy pathreplica-set.html
159 lines (157 loc) · 9.18 KB
/
replica-set.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
<project-header class="top-header"></project-header>
<project-page>
<!-- Middle section -->
<div class="middle-section">
<div class="middle-container">
<div class="middle-header">
<div class="container-fluid">
<breadcrumbs breadcrumbs="breadcrumbs"></breadcrumbs>
<alerts alerts="alerts"></alerts>
<div ng-if="!loaded" class="mar-top-md">Loading...</div>
<div ng-if="replicaSet">
<h1 class="contains-actions">
<!-- Actions -->
<ng-include ng-if="kind === 'ReplicaSet'"
src=" 'views/browse/_replica-set-actions.html' ">
</ng-include>
<ng-include ng-if="kind === 'ReplicationController'"
src=" 'views/browse/_replication-controller-actions.html' ">
</ng-include>
{{replicaSet.metadata.name}}
<span
ng-if="deploymentConfigMissing"
class="pficon pficon-warning-triangle-o"
style="cursor: help; vertical-align: middle;"
data-toggle="tooltip"
data-trigger="hover"
title="The deployment's deployment config is missing."
aria-hidden="true">
</span>
<span ng-if="deploymentConfigMissing" class="sr-only">Warning: The deployment's deployment config is missing.</span>
<small class="meta">created <span am-time-ago="replicaSet.metadata.creationTimestamp"></span></small>
</h1>
<labels ng-if="deploymentConfigName" labels="replicaSet.metadata.labels" clickable="true" kind="deployments" title-kind="deployments for deployment config {{deploymentConfigName}}" project-name="{{replicaSet.metadata.namespace}}" limit="3" navigate-url="{{replicaSet | configURLForResource}}"></labels>
<labels ng-if="!deploymentConfigName" labels="replicaSet.metadata.labels" clickable="true" kind="deployments" project-name="{{replicaSet.metadata.namespace}}" limit="3"></labels>
</div>
</div>
</div><!-- /middle-header-->
<div class="middle-content" persist-tab-state>
<div class="container-fluid">
<div class="row" ng-if="replicaSet">
<div class="col-md-12">
<uib-tabset>
<uib-tab active="selectedTab.details">
<uib-tab-heading>Details</uib-tab-heading>
<div class="resource-details">
<ng-include src=" 'views/browse/_replica-set-details.html' "></ng-include>
</div>
</uib-tab>
<uib-tab heading="Environment" active="selectedTab.environment">
<uib-tab-heading>Environment</uib-tab-heading>
<!--
Use the `hasDeployment` filter rather than checking for the `deployment` scope
var. This prevents the editor from displaying briefly before the deployment has
loaded, which adds an empty env var name/value to the array. The empty
value breaks `container.env.length` check for the no env vars message.
-->
<div ng-if="(replicaSet | hasDeployment) || (replicaSet | hasDeploymentConfig)">
<p ng-if="deployment && ({ group: 'extensions', resource: 'deployments' } | canI : 'update')">
<span class="pficon pficon-info" aria-hidden="true"></span>
Environment variables can be edited on the <a ng-href="{{deployment | navigateResourceURL}}?tab=environment">deployment</a>.
</p>
<p ng-if="(replicaSet | hasDeploymentConfig) && ('deploymentconfigs' | canI : 'update')">
<span class="pficon pficon-info" aria-hidden="true"></span>
Environment variables can be edited on the <a ng-href="{{replicaSet | configURLForResource}}?tab=environment">deployment configuration</a>.
</p>
<div ng-repeat="container in updatedDeployment.spec.template.spec.containers">
<h3>Container {{container.name}} Environment Variables</h3>
<key-value-editor
ng-if="container.env.length"
entries="container.env"
key-placeholder="Name"
value-placeholder="Value"
cannot-add
cannot-delete
cannot-sort
is-readonly
show-header></key-value-editor>
<em ng-if="!container.env.length">The container specification has no environment variables set.</em>
</div>
</div>
<ng-form ng-if="!(replicaSet | hasDeployment) && !(replicaSet | hasDeploymentConfig)" name="forms.envForm">
<div ng-repeat="container in updatedDeployment.spec.template.spec.containers">
<div ng-if="resource | canI : 'update'">
<key-value-editor
entries="container.env"
key-placeholder="Name"
value-placeholder="Value"
key-validator="[A-Za-z_][A-Za-z0-9_]*"
key-validator-error="Please enter a valid key"
key-validator-error-tooltip="A valid environment variable name is an alphanumeric (a-z and 0-9) string beginning with a letter that may contain underscores."
add-row-link="Add Environment Variable"
show-header></key-value-editor>
<button
class="btn btn-default"
ng-click="saveEnvVars()"
ng-disabled="forms.envForm.$pristine || forms.envForm.$invalid">Save</button>
<a
ng-if="!forms.envForm.$pristine"
href=""
ng-click="clearEnvVarUpdates()"
class="mar-left-sm"
style="vertical-align: -2px;">Clear changes</a>
</div>
<div ng-if="!(resource | canI : 'update')">
<key-value-editor
ng-if="container.env.length"
entries="container.env"
key-placeholder="Name"
value-placeholder="Value"
cannot-add
cannot-delete
cannot-sort
is-readonly
show-header></key-value-editor>
<em ng-if="!container.env.length">The container specification has no environment variables set.</em>
</div>
</div>
</ng-form>
</uib-tab>
<uib-tab ng-if="metricsAvailable" heading="Metrics" active="selectedTab.metrics">
<!-- Use ng-if to remove the metrics directive when the tab is not active so
we don't update in the background. -->
<deployment-metrics
ng-if="selectedTab.metrics && podsForDeployment"
pods="podsForDeployment" containers="replicaSet.spec.template.spec.containers"
alerts="alerts">
</deployment-metrics>
</uib-tab>
<uib-tab ng-if="deploymentConfigName && logOptions.version && ('deploymentconfigs/log' | canI : 'get')" active="selectedTab.logs">
<uib-tab-heading>Logs</uib-tab-heading>
<log-viewer
ng-if="selectedTab.logs"
follow-affix-top="390"
object="replicaSet"
context="projectContext"
options="logOptions"
empty="logEmpty"
run="logCanRun">
<span ng-if="replicaSet | deploymentStatus">
<label>Status:</label>
<status-icon status="replicaSet | deploymentStatus"></status-icon>
{{replicaSet | deploymentStatus}}
</span>
</log-viewer>
</uib-tab>
<uib-tab active="selectedTab.events" ng-if="'events' | canI : 'watch'">
<uib-tab-heading>Events</uib-tab-heading>
<events resource-kind="{{kind}}" resource-name="{{replicaSet.metadata.name}}" project-context="projectContext" ng-if="selectedTab.events"></events>
</uib-tab>
</uib-tabset>
</div><!-- /col-* -->
</div>
</div>
</div><!-- /middle-content -->
</div><!-- /middle-container -->
</div><!-- /middle-section -->
</project-page>