All files / src/app/ceph/rgw/rgw-bucket-form rgw-bucket-form.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 103 104 105 106 107 108 1091x                                                                                                                                                                                                                        
<cd-loading-panel *ngIf="editing && loading && !error"
                  i18n>Loading bucket data...</cd-loading-panel>
<cd-error-panel *ngIf="editing && error"
                (backAction)="goToListView()"
                i18n>The bucket data could not be loaded.</cd-error-panel>
 
<div class="col-sm-12 col-lg-6"
     *ngIf="!loading && !error">
  <form name="bucketForm"
        class="form-horizontal"
        #frm="ngForm"
        [formGroup]="bucketForm"
        novalidate>
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 i18n="form title|Example: Create Pool@@formTitle"
            class="panel-title">{{ action | titlecase }} {{ resource | upperFirst }}</h3>
      </div>
      <div class="panel-body">
 
        <!-- Id -->
        <div class="form-group"
             *ngIf="editing">
          <label i18n
                 class="col-sm-3 control-label"
                 for="id">Id</label>
          <div class="col-sm-9">
            <input id="id"
                   name="id"
                   class="form-control"
                   type="text"
                   formControlName="id"
                   readonly>
          </div>
        </div>
 
        <!-- Name -->
        <div class="form-group"
             [ngClass]="{'has-error': bucketForm.showError('bid', frm)}">
          <label class="control-label col-sm-3"
                 for="bid">
            <ng-container i18n>Name</ng-container>
            <span class="required"
                  *ngIf="!editing"></span>
          </label>
          <div class="col-sm-9">
            <input id="bid"
                   name="bid"
                   class="form-control"
                   type="text"
                   i18n-placeholder
                   placeholder="Name..."
                   formControlName="bid"
                   [readonly]="editing"
                   autofocus>
            <span class="help-block"
                  *ngIf="bucketForm.showError('bid', frm, 'required')"
                  i18n>This field is required.</span>
            <span class="help-block"
                  *ngIf="bucketForm.showError('bid', frm, 'bucketNameInvalid')"
                  i18n>The value is not valid.</span>
            <span class="help-block"
                  *ngIf="bucketForm.showError('bid', frm, 'bucketNameExists')"
                  i18n>The chosen name is already in use.</span>
          </div>
        </div>
 
        <!-- Owner -->
        <div class="form-group"
             [ngClass]="{'has-error': bucketForm.showError('owner', frm)}">
          <label class="control-label col-sm-3"
                 for="owner">
            <ng-container i18n>Owner</ng-container>
            <span class="required"></span>
          </label>
          <div class="col-sm-9">
            <select id="owner"
                    name="owner"
                    class="form-control"
                    formControlName="owner">
              <option i18n
                      *ngIf="owners === null"
                      [ngValue]="null">Loading...</option>
              <option i18n
                      *ngIf="owners !== null"
                      [ngValue]="null">-- Select a user --</option>
              <option *ngFor="let owner of owners"
                      [value]="owner">{{ owner }}</option>
            </select>
            <span class="help-block"
                  *ngIf="bucketForm.showError('owner', frm, 'required')"
                  i18n>This field is required.</span>
          </div>
        </div>
 
      </div>
      <div class="panel-footer">
        <div class="button-group text-right">
          <cd-submit-button
            (submitAction)="submit()" [form]="bucketForm"
            i18n="form action button|Example: Create Pool@@formActionButton"
            type="button">{{ action | titlecase }} {{ resource | upperFirst }}</cd-submit-button>
          <cd-back-button></cd-back-button>
        </div>
      </div>
    </div>
  </form>
</div>