]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.html
import 15.2.0 Octopus source
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / cluster / osd / osd-list / osd-list.component.html
index 54182338efd8554a01e5a5034ae620b62df2e4b6..f939dc7231756c0a205b5009d2b05d7e9550d6dd 100644 (file)
@@ -1,49 +1,29 @@
 <tabset>
   <tab i18n-heading
        heading="OSDs List">
+
     <cd-table [data]="osds"
               (fetchData)="getOsdList()"
               [columns]="columns"
-              selectionType="single"
+              selectionType="multiClick"
               (updateSelection)="updateSelection($event)"
               [updateSelectionOnRefresh]="'never'">
+
       <div class="table-actions btn-toolbar">
         <cd-table-actions [permission]="permissions.osd"
                           [selection]="selection"
                           class="btn-group"
+                          id="osd-actions"
                           [tableActions]="tableActions">
         </cd-table-actions>
-
-        <div class="btn-group"
-             dropdown
-             *ngIf="advancedTableActions.length > 0">
-          <button type="button"
-                  class="btn btn-sm btn-default btn-label tc_configureCluster"
-                  (click)="advancedTableActions[0].click()">
-            <i class="fa fa-fw {{ advancedTableActions[0].icon }}"></i><span>{{ advancedTableActions[0].name }}</span>
-          </button>
-          <button type="button"
-                  dropdownToggle
-                  class="btn btn-sm btn-default dropdown-toggle dropdown-toggle-split"
-                  *ngIf="advancedTableActions.length > 1">
-            <span class="caret caret-black"></span>
-          </button>
-          <ul *dropdownMenu
-              class="dropdown-menu"
-              role="menu">
-            <ng-container *ngFor="let action of advancedTableActions | slice:1">
-              <li role="menuitem">
-                <a class="dropdown-item"
-                   (click)="action.click()">
-                  <i class="fa fa-fw {{ action.icon }}"
-                     aria-hidden="true">
-                  </i>
-                  <ng-container>{{ action.name }}</ng-container>
-                </a>
-              </li>
-            </ng-container>
-          </ul>
-        </div>
+        <cd-table-actions [permission]="{read: true}"
+                          [selection]="selection"
+                          dropDownOnly="Cluster-wide configuration"
+                          btnColor="light"
+                          class="btn-group"
+                          id="cluster-wide-actions"
+                          [tableActions]="clusterWideActions">
+        </cd-table-actions>
       </div>
 
       <cd-osd-details cdTableDetail
       </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"
 
 <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-container i18n><strong>OSD(s) {{  getSelectedOsdIds() | join }}</strong> will be marked
+<strong>{{ markActionDescription }}</strong> if you proceed.</ng-container>
 </ng-template>
 
 <ng-template #criticalConfirmationTpl
-             let-safeToDestroyResult="result"
+             let-safeToPerform="safeToPerform"
+             let-message="message"
              let-actionDescription="actionDescription">
-  <div *ngIf="!safeToDestroyResult['is_safe_to_destroy']"
+  <div *ngIf="!safeToPerform"
        class="danger">
-    <cd-warning-panel i18n>The OSD is not safe to destroy!</cd-warning-panel>
+    <cd-alert-panel type="warning"
+                    i18n>The {selection.hasSingleSelection, select, 1 {OSD is} 0 {OSDs are}} not safe to be {{ actionDescription }}! {{ message }}</cd-alert-panel>
   </div>
-  <ng-container i18n><strong>OSD {{ selection.first().id }}</strong> will be
-  <strong>{{ actionDescription }}</strong> if you proceed.</ng-container>
+  <ng-container i18n><strong>OSD {{ getSelectedOsdIds() | join }}</strong> will be
+<strong>{{ actionDescription }}</strong> if you proceed.</ng-container>
 </ng-template>