forked from openshift/origin-web-console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedit-environment-variables.html
61 lines (59 loc) · 2.3 KB
/
edit-environment-variables.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
<form ng-if="$ctrl.apiObject" name="$ctrl.form" class="mar-bottom-xl">
<confirm-on-exit ng-if="$ctrl.canIUpdate && !$ctrl.ngReadonly" dirty="$ctrl.form.$dirty"></confirm-on-exit>
<div ng-repeat="container in $ctrl.containers track by container.name">
<h3>Container {{container.name}}</h3>
<div ng-if="!$ctrl.canIUpdate || $ctrl.ngReadonly">
<span ng-if="!container.env.length">
No environment variables set in the {{$ctrl.apiObject.kind | humanizeKind}}
template for container {{container.name}}.
</span>
<key-value-editor
ng-if="container.env.length"
entries="container.env"
key-placeholder="Name"
value-placeholder="Value"
cannot-add
cannot-sort
cannot-delete
is-readonly
show-header>
</key-value-editor>
</div>
<key-value-editor
ng-if="$ctrl.canIUpdate && !$ctrl.ngReadonly"
entries="container.env"
key-placeholder="Name"
value-placeholder="Value"
value-from-selector-options="$ctrl.valueFromObjects"
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 Value"
add-row-with-selectors-link="Add Value from Config Map or Secret"
show-header>
</key-value-editor>
<h4 class="section-label">
Environment From
<span class="pficon pficon-help"
aria-hidden="true"
data-toggle="tooltip"
data-original-title="Environment From lets you add all key-value pairs from a config map or secret as environment variables."></span>
</h4>
<edit-environment-from
entries="container.envFrom"
env-from-selector-options="$ctrl.valueFromObjects"
is-readonly="$ctrl.ngReadonly"
show-header>
</edit-environment-from>
</div>
<button
class="btn btn-default"
ng-if="$ctrl.canIUpdate && !$ctrl.ngReadonly"
ng-click="$ctrl.save()"
ng-disabled="$ctrl.form.$pristine || $ctrl.form.$invalid">Save</button>
<a
ng-if="!$ctrl.form.$pristine"
href=""
ng-click="$ctrl.clearChanges()"
class="mar-left-sm clear-env-changes-link">Clear Changes</a>
</form>