createnamespace.html 1.8 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
<!--
Copyright 2015 Google Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<md-dialog aria-label="Create a new namespace" layout="column" layout-padding>
  <md-content layout-padding>
    <h4 class="md-title" >Create a new namespace</h4>
    <p>The new namespace will be added to the cluster.</p>
21
    <!-- TODO(maciaszczykm): Missing detailed cluster info. -->
C
Christoph Held 已提交
22
    <form name="ctrl.namespaceForm" ng-submit="ctrl.createNamespace()"
C
Christoph Held 已提交
23
          novalidate>
24 25
      <md-input-container class="md-block">
        <label>Namespace name</label>
C
Christoph Held 已提交
26 27 28 29
        <input name="namespace" ng-model="ctrl.namespace"
            md-maxlength="{{ctrl.namespaceMaxLength}}"
            ng-pattern="ctrl.namespacePattern"
            required>
C
Christoph Held 已提交
30
        <div ng-messages="ctrl.namespaceForm.namespace.$error">
C
Christoph Held 已提交
31 32 33 34
            <div ng-message="pattern">Name must be alphanumeric and may contain dashes</div>
            <div ng-message="md-maxlength">Name is too long</div>
            <div ng-message="required">Name is required</div>
        </div>
35
      </md-input-container>
B
bryk 已提交
36
      <md-dialog-actions layout="row">
37 38
        <md-button ng-disabled="ctrl.isDisabled()" class="md-primary" type="submit">OK</md-button>
        <md-button ng-click="ctrl.cancel()">Cancel</md-button>
B
bryk 已提交
39
      </md-dialog-actions>
40 41 42
    </form>
  </md-content>
</md-dialog>