Skip to content

Commit b18bbea

Browse files
committed
mgr/dashboard: use border:0 for clipboard css
- Sets border-width: 0 - Completely removes the border - More memory efficient than `border: none` which occupies some browser memory - Higher priority in border conflicts Signed-off-by: Afreen Misbah <[email protected]>
1 parent c940c43 commit b18bbea

File tree

9 files changed

+11
-244
lines changed

9 files changed

+11
-244
lines changed

src/pybind/mgr/dashboard/frontend/cypress/e2e/a11y/dashboard.e2e-spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { DashboardPageHelper } from '../ui/dashboard.po';
1+
import { DashboardV3PageHelper } from '../ui/dashboard-v3.po';
22

33
describe('Dashboard Main Page', { retries: 0 }, () => {
4-
const dashboard = new DashboardPageHelper();
4+
const dashboard = new DashboardV3PageHelper();
55

66
beforeEach(() => {
77
cy.login();

src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/04-osds.e2e-spec.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
import { OSDsPageHelper } from '../cluster/osds.po';
2-
import { DashboardPageHelper } from '../ui/dashboard.po';
3-
import { ManagerModulesPageHelper } from '../cluster/mgr-modules.po';
2+
import { DashboardV3PageHelper } from '../ui/dashboard-v3.po';
43

54
describe('OSDs page', () => {
65
const osds = new OSDsPageHelper();
7-
const dashboard = new DashboardPageHelper();
8-
const mgrmodules = new ManagerModulesPageHelper();
6+
const dashboard = new DashboardV3PageHelper();
97

108
before(() => {
119
cy.login();
12-
mgrmodules.navigateTo();
13-
mgrmodules.navigateEdit('dashboard');
14-
cy.get('#FEATURE_TOGGLE_DASHBOARD').uncheck();
15-
cy.contains('button', 'Update').click();
1610
});
1711

1812
beforeEach(() => {
@@ -35,9 +29,7 @@ describe('OSDs page', () => {
3529

3630
// landing page is easier to check OSD status
3731
dashboard.navigateTo();
38-
dashboard.infoCardBody('OSDs').should('contain.text', `${expectedCount} total`);
39-
dashboard.infoCardBody('OSDs').should('contain.text', `${expectedCount} up`);
40-
dashboard.infoCardBody('OSDs').should('contain.text', `${expectedCount} in`);
32+
dashboard.cardRow('OSD').should('contain.text', `${expectedCount} OSDs`);
4133

4234
cy.wait(30000);
4335
expect(Number(newCount)).to.be.gte(2);

src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/dashboard-v3.e2e-spec.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
import { ManagerModulesPageHelper } from '../cluster/mgr-modules.po';
21
import { DashboardV3PageHelper } from './dashboard-v3.po';
32

43
describe('Dashboard-v3 Main Page', () => {
54
const dashboard = new DashboardV3PageHelper();
6-
const mgrmodules = new ManagerModulesPageHelper();
75

86
before(() => {
97
cy.login();
10-
mgrmodules.navigateTo();
11-
mgrmodules.navigateEdit('dashboard');
12-
cy.get('#FEATURE_TOGGLE_DASHBOARD').check();
13-
cy.contains('button', 'Update').click();
148
});
159

1610
beforeEach(() => {

src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/dashboard-v3.po.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,8 @@ export class DashboardV3PageHelper extends PageHelper {
1717

1818
return cy.get('@cards').its(indexOrTitle);
1919
}
20+
21+
cardRow(rowName: string) {
22+
return cy.get(`[data-testid=${rowName}]`);
23+
}
2024
}

src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/dashboard.e2e-spec.ts

Lines changed: 0 additions & 141 deletions
This file was deleted.

src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/dashboard.po.ts

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/pybind/mgr/dashboard/frontend/src/app/shared/components/card-row/card-row.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<a [routerLink]="link"
77
*ngIf="link && total > 0; else noLinkTitle"
88
[ngPlural]="total"
9+
data-testid="title"
910
i18n>
1011
{{ total }}
1112
<ng-template ngPluralCase="=0">{{ title }}</ng-template>

src/pybind/mgr/dashboard/frontend/src/app/shared/components/copy2clipboard-button/copy2clipboard-button.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.clipboard-btn {
2-
border: none;
2+
border: 0;
33
box-shadow: none;
44
outline: none;
55
}

src/pybind/mgr/dashboard/frontend/src/styles/bootstrap-extends.scss

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,6 @@
44
* thus reducing the final css size.
55
*/
66

7-
cd-info-card {
8-
.card {
9-
@extend .pb-2;
10-
11-
.card-body {
12-
.card-title {
13-
@extend .ps-2;
14-
}
15-
16-
.card-text {
17-
@extend .pt-2;
18-
}
19-
}
20-
}
21-
}
22-
237
.btn-toolbar cd-table-actions.btn-group {
248
@extend .me-2;
259
}
@@ -46,42 +30,6 @@ cd-table {
4630
}
4731
}
4832

49-
cd-health {
50-
cd-info-card {
51-
@extend .d-flex;
52-
@extend .flex-column;
53-
@extend .mb-4;
54-
@extend .col-12;
55-
@extend .col-sm-12;
56-
@extend .col-md-6;
57-
@extend .col-lg-4;
58-
59-
&.cd-status-card {
60-
@extend .col-xl-3;
61-
}
62-
63-
&.cd-performance-card,
64-
&.cd-capacity-card {
65-
@extend .col-xl;
66-
}
67-
68-
&.cd-capacity-card {
69-
@extend .col-lg-3;
70-
}
71-
72-
&.cd-performance-card {
73-
@extend .col-lg-6;
74-
}
75-
76-
&.cd-chart-card {
77-
@extend .col-md-12;
78-
@extend .col-lg-6;
79-
@extend .col-xl-4;
80-
@extend .col-2xl-3;
81-
}
82-
}
83-
}
84-
8533
cd-logs {
8634
label {
8735
@extend .me-2;

0 commit comments

Comments
 (0)