# All files / src/app/ceph/cluster/configuration/configuration-form configuration-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
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    1626x

     <div class="col-sm-12 col-lg-6">
      <form name="configForm"
            class="form-horizontal"
            #formDir="ngForm"
            [formGroup]="configForm"
            novalidate>
        <div class="panel panel-default">
          <div class="panel-heading">
            <h3 class="panel-title">
              <ng-container i18n>Edit</ng-container> {{ configForm.getValue('name') }}
            </h3>
          </div>
          <div class="panel-body">

            <!-- Name -->
            <div class="form-group">
              <label i18n
                     class="control-label col-sm-3">Name</label>
              <div class="col-sm-9">
                <input class="form-control"
                       type="text"
                       id="name"
                       formControlName="name"
                       readonly>
              </div>
            </div>

            <!-- Description -->
            <div class="form-group"
                 *ngIf="configForm.getValue('desc')">
              <label i18n
                     class="control-label col-sm-3">Description</label>
              <div class="col-sm-9">
                <textarea class="form-control resize-vertical"
                          id="desc"
                          formControlName="desc"
                          readonly>
                </textarea>
              </div>
            </div>

            <!-- Long description -->
            <div class="form-group"
                 *ngIf="configForm.getValue('long_desc')">
              <label i18n
                     class="control-label col-sm-3">Long description</label>
              <div class="col-sm-9">
                <textarea class="form-control resize-vertical"
                          id="long_desc"
                          formControlName="long_desc"
                          readonly>
                </textarea>
              </div>
            </div>

            <!-- Default -->
            <div class="form-group"
                 *ngIf="configForm.getValue('default') !== ''">
              <label i18n
                     class="control-label col-sm-3">Default</label>
              <div class="col-sm-9">
                <input class="form-control"
                       type="text"
                       id="default"
                       formControlName="default"
                       readonly>
              </div>
            </div>

            <!-- Daemon default -->
            <div class="form-group"
                 *ngIf="configForm.getValue('daemon_default') !== ''">
              <label i18n
                     class="control-label col-sm-3">Daemon default</label>
              <div class="col-sm-9">
                <input class="form-control"
                       type="text"
                       id="daemon_default"
                       formControlName="daemon_default"
                       readonly>
              </div>
            </div>

            <!-- Services -->
            <div class="form-group"
                 *ngIf="configForm.getValue('services').length > 0">
              <label i18n
                     class="control-label col-sm-3">Services</label>
              <div class="col-sm-9">
                <span *ngFor="let service of configForm.getValue('services')"
                      class="form-component-badge">
                  <span class="badge badge-pill badge-primary">{{ service }}</span>
                </span>
              </div>
            </div>

            <!-- Values -->
            <div class="col-sm-12"
                 formGroupName="values">
              <h2 i18n
                  class="page-header">Values</h2>
              <div class="row"
                   *ngFor="let section of availSections">
                <div class="form-group"
                     *ngIf="type === 'bool'">
                  <div class="col-sm-offset-3 col-sm-9">
                    <div class="checkbox checkbox-primary">
                      <input [id]="section"
                             type="checkbox"
                             [formControlName]="section">
                      <label [for]="section">{{ section }}
                      </label>
                    </div>
                  </div>
                </div>
                <div class="form-group"
                     [ngClass]="{'has-error': configForm.showError(section, formDir)}"
                     *ngIf="type !== 'bool'">
                  <label class="control-label col-sm-3"
                         [for]="section">{{ section }}
                  </label>
                  <div class="col-sm-9">
                    <input class="form-control"
                           [type]="inputType"
                           [id]="section"
                           [placeholder]="humanReadableType"
                           [formControlName]="section"
                           [step]="getStep(type, this.configForm.getValue(section))">
                    <span class="help-block"
                          *ngIf="configForm.showError(section, formDir, 'pattern')">
                      {{ patternHelpText }}
                    </span>
                    <span class="help-block"
                          *ngIf="configForm.showError(section, formDir, 'invalidUuid')">
                      {{ patternHelpText }}
                    </span>
                    <span class="help-block"
                          *ngIf="configForm.showError(section, formDir, 'max')"
                          i18n>The entered value is too high! It must not be greater than {{ maxValue }}.</span>
                    <span class="help-block"
                          *ngIf="configForm.showError(section, formDir, 'min')"
                          i18n>The entered value is too low! It must not be lower than {{ minValue }}.</span>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <!-- Footer -->
          <div class="panel-footer">
            <div class="button-group text-right">
              <cd-submit-button [form]="formDir"
                                type="button"
                                (submitAction)="submit()">
                <span i18n>Save</span>
              </cd-submit-button>
              <cd-back-button></cd-back-button>
            </div>
          </div>
        </div>
      </form>
    </div>