identify() {
// Nothing we can do, just verify the form is there
this.getFirstTableCell().click();
- cy.contains('cd-table-actions button', 'Identify').click();
- cy.get('cd-modal').within(() => {
+ cy.contains('[data-testid="primary-action"]', 'Identify').click();
+ cy.get('cds-modal').within(() => {
cy.get('#duration').select('15 minutes');
cy.get('#duration').select('10 minutes');
cy.get('cd-back-button').click();
});
- cy.get('cd-modal').should('not.exist');
+ cy.get('cds-modal').should('not.exist');
cy.get(`${this.pages.index.id}`);
}
}
--- /dev/null
+import { InventoryPageHelper } from '../../cluster/inventory.po';
+
+describe('Physical Disks page', () => {
+ const inventory = new InventoryPageHelper();
+
+ beforeEach(() => {
+ cy.login();
+ inventory.navigateTo();
+ });
+
+ it('should identify device', () => {
+ inventory.identify();
+ });
+});
import { Permission } from '~/app/shared/models/permissions';
import { DimlessBinaryPipe } from '~/app/shared/pipes/dimless-binary.pipe';
import { AuthStorageService } from '~/app/shared/services/auth-storage.service';
-import { ModalService } from '~/app/shared/services/modal.service';
import { NotificationService } from '~/app/shared/services/notification.service';
import { InventoryDevice } from './inventory-device.model';
+import { ModalCdsService } from '~/app/shared/services/modal-cds.service';
@Component({
selector: 'cd-inventory-devices',
constructor(
private authStorageService: AuthStorageService,
private dimlessBinary: DimlessBinaryPipe,
- private modalService: ModalService,
+ private modalService: ModalCdsService,
private notificationService: NotificationService,
private orchService: OrchestratorService,
private hostService: HostService
<cds-overflow-menu [customTrigger]="customTrigger"
[flip]="true">
- <li class="cds--overflow-menu-options__option mb-2">
- <button *ngIf="userPermission.read"
- routerLink="/user-management"
+ <li class="cds--overflow-menu-options__option mb-2"
+ *ngIf="userPermission.read">
+ <button routerLink="/user-management"
class="cds--overflow-menu-options__btn"
i18n>User management</button>
</li>
- <li class="cds--overflow-menu-options__option mb-2">
- <button *ngIf="configOptPermission.read"
- routerLink="/telemetry"
+ <li class="cds--overflow-menu-options__option mb-2"
+ *ngIf="configOptPermission.read">
+ <button routerLink="/telemetry"
class="cds--overflow-menu-options__btn"
i18n>Telemetry configuration</button>
</li>
router.navigateByUrl('');
});
tick();
- expect(titleService.getTitle()).toEqual('Ceph');
+ expect(titleService.getTitle()).toEqual('Ceph Dashboard');
}));
it('should display no breadcrumbs in page title when a page is not found', fakeAsync(() => {
router.navigateByUrl('/error');
});
tick();
- expect(titleService.getTitle()).toEqual('Ceph');
+ expect(titleService.getTitle()).toEqual('Ceph Dashboard');
}));
it('should display 2 breadcrumbs in page title when navigating to hosts', fakeAsync(() => {
router.navigateByUrl('/hosts');
});
tick();
- expect(titleService.getTitle()).toEqual('Ceph: Cluster > Hosts');
+ expect(titleService.getTitle()).toEqual('Ceph Dashboard: Cluster > Hosts');
}));
it('should display 3 breadcrumbs in page title when navigating to RBD Add', fakeAsync(() => {
router.navigateByUrl('/block/rbd/add');
});
tick();
- expect(titleService.getTitle()).toEqual('Ceph: Block > Images > Add');
+ expect(titleService.getTitle()).toEqual('Ceph Dashboard: Block > Images > Add');
}));
});
import { concat, from, Observable, of, Subscription } from 'rxjs';
import { distinct, filter, first, mergeMap, toArray } from 'rxjs/operators';
+import { AppConstants } from '~/app/shared/constants/app.constants';
import { BreadcrumbsResolver, IBreadcrumb } from '~/app/shared/models/breadcrumbs';
})
.join(' > ');
if (currentLocation.length > 0) {
- return `Ceph: ${currentLocation}`;
+ return `${AppConstants.projectName}: ${currentLocation}`;
} else {
- return 'Ceph';
+ return AppConstants.projectName;
}
}
}
<cds-select *ngIf="field.type === 'select'"
[label]="field.label"
[for]="field.name"
+ [id]="field.name"
[formControlName]="field.name"
[options]="field?.typeConfig?.options"
[placeholder]="field?.typeConfig?.placeholder"
<ng-container *ngIf="!dropDownOnly; else dropDownOnlyTpl">
- <button *ngIf="currentAction"
+ <button *ngIf="currentAction && tableActions.length > 0"
type="button"
[cdsButton]="currentAction.buttonKind"
title="{{ useDisableDesc(currentAction) }}"
@extend .cd-col-form-input;
}
+// Until all the modals are converted to carbon
+// need to keep this so that modals won't get hidden
+// behind nav bar
+ngb-modal-window {
+ .modal-dialog {
+ margin-top: 3rem;
+ }
+}
+
cd-modal {
.modal {
/* stylelint-disable */
background-color: rgba(0, 0, 0, 0.4);
/* stylelint-enable */
display: block;
+ margin-top: 3rem;
}
.modal-dialog {