diff options
Diffstat (limited to 'src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.html')
-rw-r--r-- | src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.html | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.html new file mode 100644 index 000000000..598e3fd38 --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.html @@ -0,0 +1,41 @@ +<cd-modal [modalRef]="activeModal"> + <ng-container i18n="form title" + class="modal-title">{{ action | titlecase }} {{ resource | upperFirst }}</ng-container> + + <ng-container class="modal-content"> + <form name="snapshotForm" + #formDir="ngForm" + [formGroup]="snapshotForm" + novalidate> + <div class="modal-body"> + <!-- Name --> + <div class="form-group row"> + <label class="cd-col-form-label required" + for="snapshotName" + i18n>Name</label> + <div class="cd-col-form-input"> + <input class="form-control" + type="text" + placeholder="Snapshot name..." + id="snapshotName" + name="snapshotName" + [attr.disabled]="(mirroring === 'snapshot') ? true : null" + formControlName="snapshotName" + autofocus> + <span class="invalid-feedback" + *ngIf="snapshotForm.showError('snapshotName', formDir, 'required')" + i18n>This field is required.</span><br><br> + <span *ngIf="mirroring === 'snapshot'" + i18n>Snapshot mode is enabled on image <b>{{ imageName }}</b>: snapshot names are auto generated</span> + </div> + </div> + </div> + + <div class="modal-footer"> + <cd-form-button-panel (submitActionEvent)="submit()" + [form]="snapshotForm" + [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)"></cd-form-button-panel> + </div> + </form> + </ng-container> +</cd-modal> |