3 (overalSelected)="closeModal()">
5 <cds-modal-header (closeSelect)="closeModal()">
6 <h3 cdsModalHeaderHeading
7 i18n>{{ action | titlecase }} {{ resource | upperFirst }}</h3>
10 <section cdsModalContent>
11 <form name="snapshotForm"
13 [formGroup]="snapshotForm"
16 <div class="form-item">
17 <cds-text-label label="Name"
21 cdRequiredField="Name"
22 [invalid]="snapshotForm.controls['snapshotName'].invalid && (snapshotForm.controls['snapshotName'].dirty)"
23 [invalidText]="snapshotError">
26 placeholder="Snapshot name..."
29 formControlName="snapshotName"
30 [attr.disabled]="((mirroring === 'snapshot') ? true : null) && (snapshotForm.getValue('mirrorImageSnapshot') === true) ? true: null"
31 [invalid]="snapshotForm.controls['snapshotName'].invalid && (snapshotForm.controls['snapshotName'].dirty)"
33 <span *ngIf="((mirroring === 'snapshot') ? true : null) && (snapshotForm.getValue('mirrorImageSnapshot') === true) ? true: null">
34 Snapshot mode is enabled on image <b>{{ imageName }}</b>: snapshot names are auto generated</span>
36 <ng-template #snapshotError>
37 <span *ngIf="snapshotForm.showError('snapshotName', formDir, 'required')"
38 class="invalid-feedback"
39 i18n>This field is required.</span>
40 <span *ngIf="snapshotForm.showError('snapshotName', formDir, 'pattern')"
41 class="invalid-feedback"
42 i18n>The snapshot name cannot start with "." and cannot contain "/" and "@".</span>
46 <ng-container *ngIf="mirroring === 'snapshot'">
47 <div class="form-item"
48 *ngIf="peerConfigured$ | async as peerConfigured">
49 <cds-checkbox id="mirrorImageSnapshot"
50 formControlName="mirrorImageSnapshot"
51 name="mirrorImageSnapshot"
52 (checkedChange)="onMirrorCheckBoxChange()"
53 [attr.disabled]="!peerConfigured.length > 0 ? true : null"
54 i18n>Mirror Image Snapshot
60 <cd-form-button-panel (submitActionEvent)="submit()"
62 [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)"
63 [modalForm]="true"></cd-form-button-panel>