this.getTableCell(this.columnIndex.hostname, hostname, true).as('row').click();
cy.get('@row')
.parent()
- .find(`[cdstabledata]:nth-child(${this.columnIndex.labels}) .tag`)
+ .find(`[cdstabledata]:nth-child(${this.columnIndex.labels}) cds-tag span`)
.should(($ele) => {
const newLabels = $ele.toArray().map((v) => v.innerText);
for (const label of labels) {
}
cy.get('cd-service-daemon-list').within(() => {
+ cy.wait(1000); // wait for the status to be updated
this.getTableCell(daemonNameIndex, daemon, true)
.parent()
.find(`[cdstabledata]:nth-child(${statusIndex}) cds-tag`)
cy.get('.grafana-app')
.wait(WAIT_TO_LOAD)
.within(() => {
- cy.get(`[data-testid="data-testid Panel header ${panel}"]`).click();
- cy.get(`[aria-label="Menu for panel with title ${panel}"]`).click();
+ cy.contains('[data-testid="data-testid header-container"] h2', panel)
+ .closest('[data-testid="data-testid header-container"]')
+ .click();
+ cy.get(`[data-testid="data-testid Panel menu ${panel}"]`).click();
});
cy.get('[data-testid="data-testid Panel menu item View"]').click();
if (options) {
cy.get('.cds--search-input').first().clear().type(row);
for (const option of options.split(',')) {
- cy.contains(`[cdstablerow] [cdstabledata] .tag`, option).should('exist');
+ cy.contains(`[cdstablerow] [cdstabledata] cds-tag span`, option).should('exist');
}
}
});
| Total Requests/sec by RGW Instance | foo.ceph-node-00, foo.ceph-node-01, foo.ceph-node-02 |
| GET Latencies by RGW Instance | foo.ceph-node-00, foo.ceph-node-01, foo.ceph-node-02 |
| Bandwidth by RGW Instance | foo.ceph-node-00, foo.ceph-node-01, foo.ceph-node-02 |
- | PUT Latencies by RGW Instance | foo.ceph-node-00, foo.ceph-node-01, foo.ceph-node-02 |
| Average GET/PUT Latencies by RGW Instance | GET, PUT |
| Bandwidth Consumed by Type | GETs, PUTs |
.find('[cdstabledata] [data-testid="table-action-btn"]')
.click({ force: true });
cy.wait(waitTime);
- cy.get(`button.${action}`).click({ force: true });
+ cy.get(`button.${action}`).should('not.be.disabled').click({ force: true });
}
/**
});
Cypress.on('uncaught:exception', (err: Error) => {
- if (
- err.message.includes('ResizeObserver loop limit exceeded') ||
- err.message.includes('api/prometheus/rules') ||
- err.message.includes('NG0100: ExpressionChangedAfterItHasBeenCheckedError')
- ) {
+ const ignoredErrors = [
+ 'ResizeObserver loop limit exceeded',
+ 'api/prometheus/rules',
+ 'NG0100: ExpressionChangedAfterItHasBeenCheckedError',
+ 'NgClass can only toggle CSS classes'
+ ];
+ if (ignoredErrors.some((error) => err.message.includes(error))) {
return false;
}
return true;
<ng-template #hostNameTpl
let-row="data.row">
- <span [ngClass]="row">
+ <span>
{{ row.hostname }}
</span><br>
<span class="text-muted fst-italic"
isExecuting = false;
errorMessage: string;
enableMaintenanceBtn: boolean;
- enableDrainBtn: boolean;
+ draining: boolean = false;
bsModalRef: NgbModalRef;
icons = Icons;
) {
super();
this.permissions = this.authStorageService.getPermissions();
+ }
+
+ ngOnInit() {
this.expandClusterActions = [
{
name: this.actionLabels.EXPAND_CLUSTER,
permission: 'update',
icon: Icons.exit,
click: () => this.hostDrain(),
- disable: (selection: CdTableSelection) =>
- this.getDisable('drain', selection) || !this.enableDrainBtn,
- visible: () => !this.showGeneralActionsOnly && this.enableDrainBtn
+ visible: () => !this.showGeneralActionsOnly && !this.draining
},
{
name: this.actionLabels.STOP_DRAIN,
permission: 'update',
icon: Icons.exit,
click: () => this.hostDrain(true),
- disable: (selection: CdTableSelection) =>
- this.getDisable('drain', selection) || this.enableDrainBtn,
- visible: () => !this.showGeneralActionsOnly && !this.enableDrainBtn
+ visible: () => !this.showGeneralActionsOnly && this.draining
},
{
name: this.actionLabels.REMOVE,
visible: () => !this.showGeneralActionsOnly && this.enableMaintenanceBtn
}
];
- }
-
- ngOnInit() {
this.columns = [
{
name: $localize`Hostname`,
updateSelection(selection: CdTableSelection) {
this.selection = selection;
this.enableMaintenanceBtn = false;
- this.enableDrainBtn = false;
if (this.selection.hasSelection) {
if (this.selection.first().status === 'maintenance') {
this.enableMaintenanceBtn = true;
}
- if (!this.selection.first().labels.includes('_no_schedule')) {
- this.enableDrainBtn = true;
- }
+ this.selection.first().labels.includes('_no_schedule')
+ ? (this.draining = true)
+ : (this.draining = false);
}
}