# All files / src/app/ceph/cluster/osd/osd-list osd-list.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
    956x

     <tabset>
      <tab i18n-heading
           heading="OSDs List">
        <cd-table [data]="osds"
                  (fetchData)="getOsdList()"
                  [columns]="columns"
                  selectionType="single"
                  (updateSelection)="updateSelection($event)"
                  [updateSelectionOnRefresh]="'never'">
          <div class="table-actions btn-toolbar">
            <cd-table-actions [permission]="permissions.osd"
                              [selection]="selection"
                              class="btn-group"
                              [tableActions]="tableActions">
            </cd-table-actions>

            <div class="btn-group"
                 dropdown>
              <button type="button"
                      class="btn btn-sm btn-default btn-label tc_configureCluster"
                      (click)="configureClusterAction()">
                <i class="fa fa-fw fa-cog"
                   aria-hidden="true">
                </i>
                <ng-container i18n>Set Cluster-wide Flags</ng-container>
              </button>
              <button type="button"
                      dropdownToggle
                      class="btn btn-sm btn-default dropdown-toggle dropdown-toggle-split">
                <span class="caret caret-black"></span>
              </button>
              <ul *dropdownMenu
                  class="dropdown-menu"
                  role="menu">
                <li role="menuitem">
                  <a class="dropdown-item"
                     (click)="configureQosParamsAction()">
                    <i class="fa fa-fw fa-cog"
                       aria-hidden="true">
                    </i>
                    <ng-container i18n>Set Cluster-wide Recovery Priority</ng-container>
                  </a>
                </li>
              </ul>
            </div>
          </div>

          <cd-osd-details cdTableDetail
                          [selection]="selection">
          </cd-osd-details>
        </cd-table>

        <ng-template #statusColor
                     let-value="value">
          <span *ngFor="let state of value; last as last">
            <span class="label"
                  [ngClass]="{'label-success': ['in', 'up'].includes(state), 'label-danger': ['down', 'out'].includes(state)}">{{ state }}</span>
            <span *ngIf="!last">&nbsp;</span>
          </span>
        </ng-template>

        <ng-template #osdUsageTpl
                     let-row="row">
          <cd-usage-bar [totalBytes]="row.stats.stat_bytes"
                        [usedBytes]="row.stats.stat_bytes_used">
          </cd-usage-bar>
        </ng-template>
      </tab>
      <tab i18n-heading
           *ngIf="permissions.grafana.read"
           heading="Overall Performance">
        <cd-grafana [grafanaPath]="'osd-overview?'"
                    uid="lo02I1Aiz"
                    grafanaStyle="three">
        </cd-grafana>
      </tab>
    </tabset>

    <ng-template #markOsdConfirmationTpl
                 let-markActionDescription="markActionDescription">
      <ng-container i18n><strong>OSD {{ selection.first().id }}</strong> will be marked
      <strong>{{ markActionDescription }}</strong> if you proceed.</ng-container>
    </ng-template>

    <ng-template #criticalConfirmationTpl
                 let-safeToDestroyResult="result"
                 let-actionDescription="actionDescription">
      <div *ngIf="!safeToDestroyResult['is_safe_to_destroy']"
           class="danger">
        <cd-warning-panel i18n>The OSD is not safe to destroy!</cd-warning-panel>
      </div>
      <ng-container i18n><strong>OSD {{ selection.first().id }}</strong> will be
      <strong>{{ actionDescription }}</strong> if you proceed.</ng-container>
    </ng-template>