summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-devices-selection-groups/osd-devices-selection-groups.component.html
blob: 8b1f59eac371c922d991abbe2cac964936dff1f9 (plain)
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
<!-- button -->
<div class="form-group row">
  <label class="cd-col-form-label"
         for="createDeleteButton">
    <ng-container i18n>{{ name }} devices</ng-container>
    <cd-helper>
      <span i18n
            *ngIf="type === 'data'">The primary storage devices. These devices contain all OSD data.</span>
      <span i18n
            *ngIf="type === 'wal'">Write-Ahead-Log devices. These devices are used for BlueStore’s internal journal. It is only useful to use a WAL device if the device is faster than the primary device (e.g. NVME devices or SSDs). If there is only a small amount of fast storage available (e.g., less than a gigabyte), we recommend using it as a WAL device.</span>
      <span i18n
            *ngIf="type === 'db'">DB devices can be used for storing BlueStore’s internal metadata.  It is only helpful to provision a DB device if it is faster than the primary device (e.g. NVME devices or SSD).</span>
    </cd-helper>
  </label>
  <div class="cd-col-form-input">
    <ng-container *ngIf="devices.length === 0; else blockClearDevices">
      <button type="button"
              class="btn btn-light"
              (click)="showSelectionModal()"
              data-toggle="tooltip"
              [title]="addButtonTooltip"
              [disabled]="availDevices.length === 0 || !canSelect || expansionCanSelect">
        <i [ngClass]="[icons.add]"></i>
        <ng-container i18n>Add</ng-container>
      </button>
    </ng-container>
    <ng-template #blockClearDevices>
      <div class="pb-2 my-2 border-bottom">
        <span *ngFor="let filter of appliedFilters">
          <span class="badge badge-dark mr-2">{{ filter.name }}: {{ filter.value.formatted }}</span>
        </span>
        <a class="tc_clearSelections"
           href=""
           (click)="clearDevices(); false">
          <i [ngClass]="[icons.clearFilters]"></i>
          <ng-container i18n>Clear</ng-container>
        </a>
      </div>
      <div>
        <cd-inventory-devices [devices]="devices"
                              [hiddenColumns]="['available', 'osd_ids']"
                              [filterColumns]="[]">
        </cd-inventory-devices>
      </div>
      <div *ngIf="type === 'data'"
           class="float-right">
        <span i18n>Raw capacity: {{ capacity | dimlessBinary }}</span>
      </div>
    </ng-template>
  </div>
</div>