|
17 | 17 | <kd-help-section>
|
18 | 18 | <md-input-container class="md-block" md-is-error="ctrl.isNameError()">
|
19 | 19 | <label>App name</label>
|
20 |
| - <input ng-model="ctrl.name" name="name" namespace="ctrl.namespace" required kd-unique-name |
21 |
| - ng-model-options="{ updateOn: 'default blur', debounce: { 'default': 500, 'blur': 0 } }"> |
22 |
| - <md-progress-linear class="kd-deploy-form-progress" md-mode="indeterminate" |
23 |
| - ng-show="ctrl.form.name.$pending"> |
| 20 | + <input ng-model="ctrl.name" name="name" namespace="ctrl.namespace" required ng-pattern="ctrl.namePattern" |
| 21 | + ng-model-options="{ updateOn: 'default blur', debounce: { 'default': 500, 'blur': 0 } }" kd-unique-name |
| 22 | + ng-maxlength="ctrl.nameMaxLength"> |
| 23 | + <md-progress-linear class="kd-deploy-form-progress" md-mode="indeterminate" ng-show="ctrl.form.name.$pending"> |
24 | 24 | </md-progress-linear>
|
25 | 25 | <ng-messages for="ctrl.form.name.$error" role="alert" multiple>
|
26 | 26 | <ng-message when="required">Application name is required.</ng-message>
|
27 |
| - <ng-message when="uniqueName"> |
28 |
| - Application with this name already exists within namespace <i>{{ctrl.namespace}}</i>. |
| 27 | + <ng-message when="uniqueName">Application with this name |
| 28 | + already exists within namespace <i>{{ctrl.namespace}}</i>.</ng-message> |
| 29 | + <ng-message when="pattern">Application name should contain only lowercase letters, numbers, and '-' between words |
29 | 30 | </ng-message>
|
| 31 | + <ng-message when="maxlength">Application name should have no more than 63 characters</ng-message> |
30 | 32 | </ng-messages>
|
| 33 | + |
31 | 34 | </md-input-container>
|
| 35 | + |
32 | 36 | <kd-user-help>
|
33 | 37 | An 'app' label with this value will be added to the Replication Controller and Service that get deployed.
|
34 | 38 | <a href="http://kubernetes.io/v1.1/docs/user-guide/labels.html" target="_blank">Learn more</a>
|
|
55 | 59 | <label>Number of pods</label>
|
56 | 60 | <input ng-model="ctrl.replicas" type="number" required min="1" name="replicas">
|
57 | 61 | <ng-messages for="ctrl.form.replicas.$error" role="alert" multiple>
|
| 62 | + <ng-message when="required">Number of pods is required.</ng-message> |
58 | 63 | <ng-message when="number">Number of pods must be a positive integer.</ng-message>
|
59 |
| - <ng-message when="min">Number of pods must be positive.</ng-message> |
| 64 | + <ng-message when="min">Number of pods must be at least 1.</ng-message> |
60 | 65 | </ng-messages>
|
61 | 66 | </md-input-container>
|
62 | 67 | <kd-user-help>
|
|
81 | 86 |
|
82 | 87 | <kd-help-section>
|
83 | 88 | <md-checkbox ng-model="ctrl.isExternal" class="md-primary"
|
84 |
| - ng-model-options="{ debounce: { 'default': 500, 'blur': 0 } }"> |
| 89 | + ng-model-options="{ debounce: { 'default': 500, 'blur': 0 } }"> |
85 | 90 | Expose service externally
|
86 | 91 | </md-checkbox>
|
87 | 92 | </kd-help-section>
|
88 | 93 |
|
| 94 | +<!-- advanced options --> |
89 | 95 | <div ng-show="ctrl.isMoreOptionsEnabled()">
|
90 | 96 | <kd-help-section>
|
91 | 97 | <md-input-container>
|
|
99 | 105 | </kd-help-section>
|
100 | 106 |
|
101 | 107 | <kd-help-section>
|
102 |
| - <div> |
103 |
| - <div>Labels</div> |
104 |
| - <div layout="column"> |
105 |
| - <div layout="row"> |
106 |
| - <p flex>Key</p> |
107 |
| - <p flex>Value</p> |
108 |
| - </div> |
109 |
| - <div ng-repeat="label in ctrl.labels"> |
110 |
| - <kd-deploy-label layout="row" flex label="label" labels="ctrl.labels"></kd-deploy-label> |
111 |
| - </div> |
| 108 | + <div layout="column"> |
| 109 | + <div class="kd-label-title md-body-2">Labels</div> |
| 110 | + <div layout="row" class="kd-label-header-row"> |
| 111 | + <div flex="45">Key</div> |
| 112 | + <div flex="5"></div> |
| 113 | + <div flex="40">Value</div> |
| 114 | + </div> |
| 115 | + <div ng-repeat="label in ctrl.labels"> |
| 116 | + <kd-deploy-label layout="row" flex label="label" labels="ctrl.labels"></kd-deploy-label> |
112 | 117 | </div>
|
113 | 118 | </div>
|
| 119 | + |
114 | 120 | <kd-user-help>
|
115 | 121 | The specified labels will be applied to the created Replication Controller, Service (if any) and Pods.
|
116 | 122 | Common labels include release, environment, tier, partition and track.
|
|
165 | 171 | <ng-message when="min">CPU requirement must be given as a positive number.</ng-message>
|
166 | 172 | </ng-messages>
|
167 | 173 | </md-input-container>
|
| 174 | + <div flex="5"></div> |
168 | 175 | <md-input-container flex>
|
169 | 176 | <label>Memory requirement (MiB)</label>
|
170 | 177 | <input ng-model="ctrl.memoryRequirement" type="number" name="memoryRequirement" min="0">
|
|
200 | 207 | </kd-help-section>
|
201 | 208 |
|
202 | 209 | <kd-help-section>
|
203 |
| - <md-switch ng-model="ctrl.runAsPrivileged" class="md-primary"> |
204 |
| - Run as privileged |
205 |
| - </md-switch> |
| 210 | + <div class="md-block"> |
| 211 | + <md-checkbox ng-model="ctrl.runAsPrivileged" class="md-primary"> |
| 212 | + Run as privileged |
| 213 | + </md-checkbox> |
| 214 | + </div> |
206 | 215 | <kd-user-help>
|
207 | 216 | Processes in privileged containers are equivalent to processes running as root on the host.
|
208 | 217 | </kd-user-help>
|
|
219 | 228 | </kd-help-section>
|
220 | 229 | </div>
|
221 | 230 |
|
| 231 | +<!-- show/hide advanced options toggle --> |
222 | 232 | <md-button class="md-primary kd-deploy-moreoptions-button" type="button"
|
223 | 233 | ng-click="ctrl.switchMoreOptions()"
|
224 | 234 | ng-hide="ctrl.isMoreOptionsEnabled()">
|
225 |
| - <md-icon>arrow_drop_down</md-icon>More options |
| 235 | + <md-icon>arrow_drop_down</md-icon>show advanced options |
226 | 236 | </md-button>
|
227 |
| - |
228 | 237 | <md-button class="md-primary kd-deploy-moreoptions-button" type="button"
|
229 | 238 | ng-click="ctrl.switchMoreOptions()"
|
230 | 239 | ng-show="ctrl.isMoreOptionsEnabled()">
|
231 |
| - <md-icon>arrow_drop_up</md-icon>Less options |
| 240 | + <md-icon>arrow_drop_up</md-icon>hide advanced options |
232 | 241 | </md-button>
|
0 commit comments