]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-form/host-form.component.html
import ceph pacific 16.2.5
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / cluster / hosts / host-form / host-form.component.html
CommitLineData
f67539c2
TL
1<div class="cd-col-form"
2 *cdFormLoading="loading">
9f95a23c 3 <form name="hostForm"
9f95a23c
TL
4 #formDir="ngForm"
5 [formGroup]="hostForm"
6 novalidate>
7 <div class="card">
8 <div i18n="form title|Example: Create Pool@@formTitle"
9 class="card-header">{{ action | titlecase }} {{ resource | upperFirst }}</div>
10
11 <div class="card-body">
12
13 <!-- Hostname -->
14 <div class="form-group row">
15 <label class="cd-col-form-label required"
16 for="hostname"
17 i18n>Hostname</label>
18 <div class="cd-col-form-input">
19 <input class="form-control"
20 type="text"
21 placeholder="mon-123"
22 id="hostname"
23 name="hostname"
24 formControlName="hostname"
25 autofocus>
26 <span class="invalid-feedback"
27 *ngIf="hostForm.showError('hostname', formDir, 'required')"
28 i18n>This field is required.</span>
29 <span class="invalid-feedback"
30 *ngIf="hostForm.showError('hostname', formDir, 'uniqueName')"
31 i18n>The chosen hostname is already in use.</span>
32 </div>
33 </div>
b3b6e05e
TL
34
35 <!-- Address -->
36 <div class="form-group row">
37 <label class="cd-col-form-label"
38 for="addr"
39 i18n>Nework address</label>
40 <div class="cd-col-form-input">
41 <input class="form-control"
42 type="text"
43 placeholder="192.168.0.1"
44 id="addr"
45 name="addr"
46 formControlName="addr">
47 <span class="invalid-feedback"
48 *ngIf="hostForm.showError('addr', formDir, 'pattern')"
49 i18n>The value is not a valid IP address.</span>
50 </div>
51 </div>
52
53 <!-- Labels -->
54 <div class="form-group row">
55 <label i18n
56 for="labels"
57 class="cd-col-form-label">Labels</label>
58 <div class="cd-col-form-input">
59 <cd-select-badges id="labels"
60 [data]="hostForm.controls.labels.value"
61 [customBadges]="true"
62 [messages]="messages">
63 </cd-select-badges>
64 </div>
65 </div>
66
67 <!-- Maintenance Mode -->
68 <div class="form-group row">
69 <div class="cd-col-form-offset">
70 <div class="custom-control custom-checkbox">
71 <input class="custom-control-input"
72 id="maintenance"
73 type="checkbox"
74 formControlName="maintenance">
75 <label class="custom-control-label"
76 for="maintenance"
77 i18n>Maintenance Mode</label>
78 </div>
79 </div>
80 </div>
9f95a23c
TL
81 </div>
82
83 <div class="card-footer">
f67539c2
TL
84 <cd-form-button-panel (submitActionEvent)="submit()"
85 [form]="hostForm"
86 [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)"
87 wrappingClass="text-right"></cd-form-button-panel>
9f95a23c
TL
88 </div>
89 </div>
90 </form>
91</div>