All files / src/app/ceph/block/iscsi-target-image-settings-modal iscsi-target-image-settings-modal.component.html

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 1034x                                                                                                                                                                                                            
<cd-modal>
  <ng-container class="modal-title">
    <ng-container i18n>Configure</ng-container>&nbsp;
    <small>{{ image }}</small>
  </ng-container>
 
  <ng-container class="modal-content">
    <form name="settingsForm"
          class="form"
          #formDir="ngForm"
          [formGroup]="settingsForm"
          novalidate>
      <div class="modal-body">
        <p class="alert-warning"
           i18n>Changing these parameters from their default values is usually not necessary.</p>
 
        <span *ngIf="api_version >= 1">
          <legend class="cd-header"
                  i18n>Identifier</legend>
          <!-- LUN -->
          <div class="form-group row">
            <div class="col-sm-12">
              <label class="col-form-label"
                     for="lun">
                <ng-container i18n>lun</ng-container>
                <span class="required"></span>
              </label>
              <input type="number"
                     class="form-control"
                     id="lun"
                     name="lun"
                     formControlName="lun">
              <span class="invalid-feedback"
                    *ngIf="settingsForm.showError('lun', formDir, 'required')"
                    i18n>This field is required.</span>
            </div>
          </div>
          <!-- WWN -->
          <div class="form-group row">
            <div class="col-sm-12">
              <label class="col-form-label"
                     for="wwn"
                     i18n>wwn</label>
              <input type="text"
                     class="form-control"
                     id="wwn"
                     name="wwn"
                     formControlName="wwn">
            </div>
          </div>
        </span>
 
        <legend class="cd-header"
                i18n>Settings</legend>
 
        <!-- BACKSTORE -->
        <div class="form-group row">
          <div class="col-sm-12">
            <label class="control-label"
                   i18n>Backstore</label>
            <select id="backstore"
                    name="backstore"
                    class="form-control"
                    formControlName="backstore">
              <option *ngFor="let bs of backstores"
                      [value]="bs">{{ bs | iscsiBackstore }}</option>
            </select>
          </div>
        </div>
 
        <!-- CONTROLS -->
        <ng-container *ngFor="let bs of backstores">
          <ng-container *ngIf="settingsForm.value['backstore'] === bs">
            <div class="form-group row"
                 *ngFor="let setting of disk_default_controls[bs] | keyvalue"
                 [ngClass]="{'has-error': settingsForm.showError(setting.key, formDir)}">
              <div class="col-sm-12">
                <cd-iscsi-setting [settingsForm]="settingsForm"
                                  [formDir]="formDir"
                                  [setting]="setting.key"
                                  [limits]="getDiskControlLimits(bs, setting.key)"></cd-iscsi-setting>
              </div>
            </div>
          </ng-container>
        </ng-container>
      </div>
 
      <div class="modal-footer">
        <div class="button-group text-right">
          <cd-submit-button i18n
                            [form]="settingsForm"
                            (submitAction)="save()">Confirm</cd-submit-button>
          <cd-back-button [back]="modalRef.hide"
                          name="Cancel"
                          i18n-name>
          </cd-back-button>
        </div>
      </div>
 
    </form>
  </ng-container>
</cd-modal>