]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard: Fix title of disabled table actions
authorTiago Melo <tmelo@suse.com>
Tue, 23 Jun 2020 10:40:23 +0000 (10:40 +0000)
committerTiago Melo <tmelo@suse.com>
Tue, 30 Jun 2020 11:21:22 +0000 (11:21 +0000)
Fix regression introduced in a1fac664f5b0fa1c8b78de3440e99ee68d34f512.
Title attribute was unintentionally removed from the table actions.

Fixes: https://tracker.ceph.com/issues/46153
Signed-off-by: Tiago Melo <tmelo@suse.com>
src/pybind/mgr/dashboard/frontend/cypress/integration/page-helper.po.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-actions.model.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-actions/table-actions.component.html
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-actions/table-actions.component.scss

index bc0bd1435c11ff8108ac42f03d65b7853921bcfe..44532b6667812364703a1cc7d1e849d5fa87a006 100644 (file)
@@ -57,6 +57,7 @@ export abstract class PageHelper {
       this.navigateTo();
       this.getFirstTableCell(name).click();
     }
+    cy.contains('Creating...').should('not.exist');
     cy.contains('button', 'Edit').click();
     this.expectBreadcrumbText('Edit');
   }
index 3086a1a5a2acfd72da79b1ea180d737e93b8cfd4..871939ec050f10b6505cf9864ef96eca1f8a1be7 100644 (file)
@@ -93,7 +93,7 @@ export class RbdSnapshotActionsModel {
   }
 
   getCloneDisableDesc(featuresName: string[]): string | undefined {
-    if (!featuresName.includes('layering')) {
+    if (!featuresName?.includes('layering')) {
       return this.i18n('Parent image must support Layering');
     }
 
index 68ae24696a5ff120678ec0db4b4a335a592325fd..c8061057154e45fcb24348563b18bf6cb09fe79d 100644 (file)
@@ -1,12 +1,12 @@
 <div class="btn-group">
   <ng-container *ngIf="getCurrentButton() as action">
     <button type="button"
+            title="{{ useDisableDesc(action) }}"
             class="btn btn-{{btnColor}}"
             [ngClass]="{'disabled': disableSelectionAction(action)}"
             (click)="useClickAction(action)"
             [routerLink]="useRouterLink(action)"
             [preserveFragment]="action.preserveFragment ? '' : null">
-
       <i [ngClass]="[action.icon]"></i>
       <span>{{ action.name }}</span>
     </button>
@@ -28,6 +28,7 @@
       <ng-container *ngFor="let action of dropDownActions">
         <button ngbDropdownItem
                 class="{{ toClassName(action['name']) }}"
+                title="{{ useDisableDesc(action) }}"
                 (click)="useClickAction(action)"
                 [routerLink]="useRouterLink(action)"
                 [preserveFragment]="action.preserveFragment ? '' : null"