From: Afreen Misbah Date: Fri, 16 Jan 2026 14:17:53 +0000 (+0530) Subject: mgr/dashboard: Change side navigation to `Overview` X-Git-Tag: testing/wip-jcollin-testing-20260212.143545-tentacle~34^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dff5e5507908c71febca2d3396de840e9f8d9510;p=ceph-ci.git mgr/dashboard: Change side navigation to `Overview` Fixes https://tracker.ceph.com/issues/73318 Signed-off-by: Afreen Misbah (cherry picked from commit 828802d21a1b5eb4d99e4b461bcd50b30538eb17) Conflicts: src/pybind/mgr/dashboard/frontend/cypress/e2e/a11y/dashboard.e2e-spec.ts src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/04-osds.e2e-spec.ts src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/dashboard-v3.e2e-spec.ts src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/dashboard/dashboard.component.html src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/dashboard/dashboard.component.ts src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.html src/pybind/mgr/dashboard/frontend/src/app/shared/enum/cell-template.enum.ts src/pybind/mgr/dashboard/frontend/src/styles/ceph-custom/_spacings.scss --- diff --git a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/10501135011127341749 b/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/10501135011127341749 deleted file mode 100644 index 00c12264752..00000000000 --- a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/10501135011127341749 +++ /dev/null @@ -1,5 +0,0 @@ - -Linting "ceph-dashboard"... - -All files pass linting. - diff --git a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/12707214466441736553 b/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/12707214466441736553 deleted file mode 100644 index 00c12264752..00000000000 --- a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/12707214466441736553 +++ /dev/null @@ -1,5 +0,0 @@ - -Linting "ceph-dashboard"... - -All files pass linting. - diff --git a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/13106400625475788256 b/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/13106400625475788256 deleted file mode 100644 index 00c12264752..00000000000 --- a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/13106400625475788256 +++ /dev/null @@ -1,5 +0,0 @@ - -Linting "ceph-dashboard"... - -All files pass linting. - diff --git a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/13685585831439463788 b/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/13685585831439463788 deleted file mode 100644 index 00c12264752..00000000000 --- a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/13685585831439463788 +++ /dev/null @@ -1,5 +0,0 @@ - -Linting "ceph-dashboard"... - -All files pass linting. - diff --git a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/1758954290910463637 b/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/1758954290910463637 deleted file mode 100644 index 00c12264752..00000000000 --- a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/1758954290910463637 +++ /dev/null @@ -1,5 +0,0 @@ - -Linting "ceph-dashboard"... - -All files pass linting. - diff --git a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/2801012194694874285 b/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/2801012194694874285 deleted file mode 100644 index 00c12264752..00000000000 --- a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/2801012194694874285 +++ /dev/null @@ -1,5 +0,0 @@ - -Linting "ceph-dashboard"... - -All files pass linting. - diff --git a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/4379954223956111510 b/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/4379954223956111510 deleted file mode 100644 index 00c12264752..00000000000 --- a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/4379954223956111510 +++ /dev/null @@ -1,5 +0,0 @@ - -Linting "ceph-dashboard"... - -All files pass linting. - diff --git a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/5698680818973360491 b/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/5698680818973360491 deleted file mode 100644 index 00c12264752..00000000000 --- a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/5698680818973360491 +++ /dev/null @@ -1,5 +0,0 @@ - -Linting "ceph-dashboard"... - -All files pass linting. - diff --git a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/6554461255961944329 b/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/6554461255961944329 deleted file mode 100644 index 00c12264752..00000000000 --- a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/6554461255961944329 +++ /dev/null @@ -1,5 +0,0 @@ - -Linting "ceph-dashboard"... - -All files pass linting. - diff --git a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/7234210859985966681 b/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/7234210859985966681 deleted file mode 100644 index 00c12264752..00000000000 --- a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/7234210859985966681 +++ /dev/null @@ -1,5 +0,0 @@ - -Linting "ceph-dashboard"... - -All files pass linting. - diff --git a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/741499322021383751 b/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/741499322021383751 deleted file mode 100644 index 00c12264752..00000000000 --- a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/741499322021383751 +++ /dev/null @@ -1,5 +0,0 @@ - -Linting "ceph-dashboard"... - -All files pass linting. - diff --git a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/9919571031428218619 b/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/9919571031428218619 deleted file mode 100644 index 00c12264752..00000000000 --- a/src/pybind/mgr/dashboard/frontend/.nx/cache/terminalOutputs/9919571031428218619 +++ /dev/null @@ -1,5 +0,0 @@ - -Linting "ceph-dashboard"... - -All files pass linting. - diff --git a/src/pybind/mgr/dashboard/frontend/.nx/workspace-data/project-graph.lock b/src/pybind/mgr/dashboard/frontend/.nx/workspace-data/project-graph.lock deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/a11y/dashboard.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/cypress/e2e/a11y/dashboard.e2e-spec.ts index 39a2dbf14cb..29a32ea1ee9 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/a11y/dashboard.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/a11y/dashboard.e2e-spec.ts @@ -1,11 +1,11 @@ import { DashboardPageHelper } from '../ui/dashboard.po'; describe('Dashboard Main Page', { retries: 0 }, () => { - const dashboard = new DashboardPageHelper(); + const overview = new DashboardPageHelper(); beforeEach(() => { cy.login(); - dashboard.navigateTo(); + overview.navigateTo(); }); describe('Dashboard accessibility', () => { diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/common/urls.po.ts b/src/pybind/mgr/dashboard/frontend/cypress/e2e/common/urls.po.ts index 455fdf2cf93..fc56fe7a9a1 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/common/urls.po.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/common/urls.po.ts @@ -6,7 +6,7 @@ export class UrlsCollection extends PageHelper { welcome: { url: '#/expand-cluster?welcome=true', id: 'cd-create-cluster' }, // Landing page - dashboard: { url: '#/dashboard', id: 'cd-dashboard' }, + overview: { url: '#/overview', id: 'cd-dashboard' }, // Hosts hosts: { url: '#/hosts', id: 'cd-hosts' }, diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/04-osds.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/04-osds.e2e-spec.ts index 74b46054afd..83b799e9b97 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/04-osds.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/04-osds.e2e-spec.ts @@ -4,13 +4,13 @@ import { ManagerModulesPageHelper } from '../cluster/mgr-modules.po'; describe('OSDs page', () => { const osds = new OSDsPageHelper(); - const dashboard = new DashboardPageHelper(); + const overview = new DashboardPageHelper(); const mgrmodules = new ManagerModulesPageHelper(); before(() => { cy.login(); mgrmodules.navigateTo(); - mgrmodules.navigateEdit('dashboard'); + mgrmodules.navigateEdit('overview'); cy.get('#FEATURE_TOGGLE_DASHBOARD').uncheck(); cy.contains('button', 'Update').click(); }); @@ -34,10 +34,10 @@ describe('OSDs page', () => { osds.expectTableCount('total', expectedCount); // landing page is easier to check OSD status - dashboard.navigateTo(); - dashboard.infoCardBody('OSDs').should('contain.text', `${expectedCount} total`); - dashboard.infoCardBody('OSDs').should('contain.text', `${expectedCount} up`); - dashboard.infoCardBody('OSDs').should('contain.text', `${expectedCount} in`); + overview.navigateTo(); + overview.infoCardBody('OSDs').should('contain.text', `${expectedCount} total`); + overview.infoCardBody('OSDs').should('contain.text', `${expectedCount} up`); + overview.infoCardBody('OSDs').should('contain.text', `${expectedCount} in`); cy.wait(30000); expect(Number(newCount)).to.be.gte(2); diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/workflow/01-create-cluster-welcome.feature b/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/workflow/01-create-cluster-welcome.feature index 3ffdc40f249..a5809537fc6 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/workflow/01-create-cluster-welcome.feature +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/workflow/01-create-cluster-welcome.feature @@ -23,4 +23,4 @@ Feature: Cluster expansion welcome screen And I should see a button to "Skip" When I click on "Skip" button And I confirm to "Continue" on carbon modal - Then I should be on the "dashboard" page + Then I should be on the "overview" page diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/dashboard-v3.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/dashboard-v3.e2e-spec.ts index 3815011a185..18b989312f6 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/dashboard-v3.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/dashboard-v3.e2e-spec.ts @@ -2,7 +2,7 @@ import { ManagerModulesPageHelper } from '../cluster/mgr-modules.po'; import { DashboardV3PageHelper } from './dashboard-v3.po'; describe('Dashboard-v3 Main Page', () => { - const dashboard = new DashboardV3PageHelper(); + const overview = new DashboardV3PageHelper(); const mgrmodules = new ManagerModulesPageHelper(); before(() => { @@ -15,7 +15,7 @@ describe('Dashboard-v3 Main Page', () => { beforeEach(() => { cy.login(); - dashboard.navigateTo(); + overview.navigateTo(); }); describe('Check that all hyperlinks on inventory card lead to the correct page and fields exist', () => { @@ -29,20 +29,20 @@ describe('Dashboard-v3 Main Page', () => { }; for (const [linkText, breadcrumbText] of Object.entries(expectationMap)) { - cy.location('hash').should('eq', '#/dashboard'); - dashboard.clickInventoryCardLink(linkText); - dashboard.expectBreadcrumbText(breadcrumbText); - dashboard.navigateBack(); + cy.location('hash').should('eq', '#/overview'); + overview.clickInventoryCardLink(linkText); + overview.expectBreadcrumbText(breadcrumbText); + overview.navigateBack(); } }); - it('should verify that cards exist on dashboard in proper order', () => { - // Ensures that cards are all displayed on the dashboard tab while being in the proper + it('should verify that cards exist on overview in proper order', () => { + // Ensures that cards are all displayed on the overview tab while being in the proper // order, checks for card title and position via indexing into a list of all cards. const order = ['Details', 'Inventory', 'Status', 'Capacity', 'Cluster Utilization']; for (let i = 0; i < order.length; i++) { - dashboard.card(i).should('contain.text', order[i]); + overview.card(i).should('contain.text', order[i]); } }); }); diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/dashboard-v3.po.ts b/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/dashboard-v3.po.ts index 597d2db9b50..943815eda96 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/dashboard-v3.po.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/dashboard-v3.po.ts @@ -1,7 +1,7 @@ import { PageHelper } from '../page-helper.po'; export class DashboardV3PageHelper extends PageHelper { - pages = { index: { url: '#/dashboard', id: 'cd-dashboard-v3' } }; + pages = { index: { url: '#/overview', id: 'cd-dashboard-v3' } }; cardTitle(index: number) { return cy.get('.card-title').its(index).text(); diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/dashboard.po.ts b/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/dashboard.po.ts index 170555f735c..03b80caa2b6 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/dashboard.po.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/dashboard.po.ts @@ -1,7 +1,7 @@ import { PageHelper } from '../page-helper.po'; export class DashboardPageHelper extends PageHelper { - pages = { index: { url: '#/dashboard', id: 'cd-dashboard' } }; + pages = { index: { url: '#/overview', id: 'cd-dashboard' } }; infoGroupTitle(index: number) { return cy.get('[data-testid=group-title]').its(index).text(); diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/language.po.ts b/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/language.po.ts index fc443f28ffd..72987b699b7 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/language.po.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/language.po.ts @@ -2,7 +2,7 @@ import { PageHelper } from '../page-helper.po'; export class LanguagePageHelper extends PageHelper { pages = { - index: { url: '#/dashboard', id: 'cd-dashboard' } + index: { url: '#/overview', id: 'cd-dashboard' } }; getLanguageBtn() { diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/login.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/login.e2e-spec.ts index bec37e46f62..72e75bbc11f 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/login.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/login.e2e-spec.ts @@ -3,7 +3,7 @@ import { LoginPageHelper } from './login.po'; describe('Login page', () => { const login = new LoginPageHelper(); - it('should login and navigate to dashboard page', () => { + it('should login and navigate to overview page', () => { login.navigateTo(); login.doLogin(); }); diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/login.po.ts b/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/login.po.ts index b275133f015..7746ac1a0c3 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/login.po.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/login.po.ts @@ -3,7 +3,7 @@ import { PageHelper } from '../page-helper.po'; export class LoginPageHelper extends PageHelper { pages = { index: { url: '#/login', id: 'cd-login' }, - dashboard: { url: '#/dashboard', id: 'cd-dashboard' } + overview: { url: '#/overview', id: 'cd-dashboard' } }; doLogin() { diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/navigation.po.ts b/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/navigation.po.ts index ae0e5b64f25..791525bfcf7 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/navigation.po.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/ui/navigation.po.ts @@ -2,11 +2,11 @@ import { PageHelper } from '../page-helper.po'; export class NavigationPageHelper extends PageHelper { pages = { - index: { url: '#/dashboard', id: 'cd-dashboard' } + index: { url: '#/overview', id: 'cd-dashboard' } }; navigations = [ - { menu: 'Dashboard', component: 'cd-dashboard' }, + { menu: 'Overview', component: 'cd-dashboard' }, { menu: 'Multi-Cluster', submenus: [ diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/visualTests/dashboard.vrt-spec.ts b/src/pybind/mgr/dashboard/frontend/cypress/e2e/visualTests/dashboard.vrt-spec.ts index 13802982041..12cea1ead37 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/visualTests/dashboard.vrt-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/visualTests/dashboard.vrt-spec.ts @@ -1,11 +1,11 @@ import { LoginPageHelper } from '../ui/login.po'; -describe.skip('Dashboard Landing Page', () => { +describe.skip('Overview Landing Page', () => { const login = new LoginPageHelper(); beforeEach(() => { cy.eyesOpen({ - testName: 'Dashboard Component' + testName: 'Overview Component' }); }); @@ -13,12 +13,12 @@ describe.skip('Dashboard Landing Page', () => { cy.eyesClose(); }); - it('should take screenshot of dashboard landing page', () => { + it('should take screenshot of overview landing page', () => { login.navigateTo(); login.doLogin(); cy.get('[aria-label="Status card"]').should('be.visible'); cy.get('[aria-label="Inventory card"]').should('be.visible'); cy.get('[aria-label="Cluster utilization card"]').should('be.visible'); - cy.eyesCheckWindow({ tag: 'Dashboard landing page' }); + cy.eyesCheckWindow({ tag: 'Overview landing page' }); }); }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/app-routing.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/app-routing.module.ts index fc2dd0b5610..ea8714b90c2 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/app-routing.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/app-routing.module.ts @@ -93,8 +93,8 @@ export class StartCaseBreadcrumbsResolver extends BreadcrumbsResolver { } const routes: Routes = [ - // Dashboard - { path: '', redirectTo: 'dashboard', pathMatch: 'full' }, + // Overview + { path: '', redirectTo: 'overview', pathMatch: 'full' }, { path: 'api-docs', component: ApiDocsComponent }, { path: '', @@ -102,7 +102,7 @@ const routes: Routes = [ canActivate: [AuthGuardService, ChangePasswordGuardService], canActivateChild: [AuthGuardService, ChangePasswordGuardService], children: [ - { path: 'dashboard', component: DashboardComponent }, + { path: 'overview', component: DashboardComponent }, { path: 'error', component: ErrorComponent }, // Cluster @@ -113,7 +113,7 @@ const routes: Routes = [ data: { moduleStatusGuardConfig: { uiApiPath: 'orchestrator', - redirectTo: 'dashboard', + redirectTo: 'overview', backend: 'cephadm' }, breadcrumbs: 'Cluster/Expand Cluster' diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.ts index 892bd3fe49f..eb53bdfdd4e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.ts @@ -150,7 +150,7 @@ export class CreateClusterComponent implements OnInit, OnDestroy, AfterViewInit NotificationType.info, $localize`Cluster expansion skipped by user` ); - this.router.navigate(['/dashboard']); + this.router.navigate(['/overview']); this.modalService.dismissAll(); } }); @@ -178,7 +178,7 @@ export class CreateClusterComponent implements OnInit, OnDestroy, AfterViewInit NotificationType.success, $localize`Cluster expansion was successful` ); - this.router.navigate(['/dashboard']); + this.router.navigate(['/overview']); }) ) ) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/dashboard/dashboard.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/dashboard/dashboard.component.html index 87b8c3376dc..b55baf32f1d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/dashboard/dashboard.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/dashboard/dashboard.component.html @@ -1,4 +1,4 @@ -
+
skip to content diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/dashboard/dashboard.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/dashboard/dashboard.component.spec.ts index d3b4f5e8bb9..55b2152e175 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/dashboard/dashboard.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/dashboard/dashboard.component.spec.ts @@ -1,7 +1,6 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { NO_ERRORS_SCHEMA } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { By } from '@angular/platform-browser'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; import { FeatureTogglesService } from '~/app/shared/services/feature-toggles.service'; @@ -12,7 +11,6 @@ import { DashboardComponent } from './dashboard.component'; describe('DashboardComponent', () => { let component: DashboardComponent; let fixture: ComponentFixture; - let featureTogglesService: FeatureTogglesService; configureTestBed({ imports: [NgbNavModule, HttpClientTestingModule], @@ -22,70 +20,12 @@ describe('DashboardComponent', () => { }); beforeEach(() => { - featureTogglesService = TestBed.inject(FeatureTogglesService); fixture = TestBed.createComponent(DashboardComponent); component = fixture.componentInstance; }); it('should create', () => { - spyOn(featureTogglesService, 'isFeatureEnabled').and.returnValue(true); - fixture.detectChanges(); expect(component).toBeTruthy(); }); - - it('should call featureTogglesService.isFeatureEnabled() on initialization', () => { - const spy = spyOn(featureTogglesService, 'isFeatureEnabled').and.returnValue(true); - fixture.detectChanges(); - expect(spy).toHaveBeenCalled(); - expect(spy).toHaveBeenCalledWith('dashboard'); - }); - - it('should set useDeprecated based on feature toggle', () => { - spyOn(featureTogglesService, 'isFeatureEnabled').and.returnValue(true); - fixture.detectChanges(); - expect(component.useDeprecated).toBe(true); - }); - - describe('when dashboard feature is enabled (new dashboard)', () => { - beforeEach(() => { - spyOn(featureTogglesService, 'isFeatureEnabled').and.returnValue(true); - fixture.detectChanges(); - }); - - it('should show cd-dashboard-v3 in template when dashboard feature is enabled', () => { - const overviewElement = fixture.debugElement.query(By.css('[data-testid="cd-overview"]')); - const dashboardV3Element = fixture.debugElement.query( - By.css('[data-testid="cd-dashboard-v3"]') - ); - - expect(overviewElement).toBeNull(); - expect(dashboardV3Element).toBeTruthy(); - }); - - it('should set useDeprecated to false when feature is enabled', () => { - expect(component.useDeprecated).toBe(true); - }); - }); - - describe('when dashboard feature is disabled (old dashboard)', () => { - beforeEach(() => { - spyOn(featureTogglesService, 'isFeatureEnabled').and.returnValue(false); - fixture.detectChanges(); - }); - - it('should show cd-overview in template when dashboard feature is disabled', () => { - const overviewElement = fixture.debugElement.query(By.css('[data-testid="cd-overview"]')); - const dashboardV3Element = fixture.debugElement.query( - By.css('[data-testid="cd-dashboard-v3"]') - ); - - expect(overviewElement).toBeTruthy(); - expect(dashboardV3Element).toBeNull(); - }); - - it('should set useDeprecated to true when feature is disabled', () => { - expect(component.useDeprecated).toBe(false); - }); - }); }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.html index d736a3df24b..70d5d3908a1 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.html @@ -2,34 +2,37 @@ [narrow]="true" [condensed]="false" [fullWidth]="true" - class="overview"> + class="cds-mt-5 cds-mb-5">
+ [narrow]="true">
+ class="cds-mb-5" + [columnNumbers]="{lg: 11}"> Health card
+ class="cds-mb-5" + [columnNumbers]="{lg: 5}"> Alerts card
+ [narrow]="true">
+ class="cds-mb-5" + [columnNumbers]="{lg: 11}"> Storage card
+ class="cds-mb-5" + [columnNumbers]="{lg: 5}"> Docs card
+ class="cds-mb-5" + [columnNumbers]="{lg: 16}"> Performance card
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.scss b/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.scss index a84b2ba119c..e69de29bb2d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.scss +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/overview/overview.component.scss @@ -1,8 +0,0 @@ -.overview { - margin-top: var(--cds-spacing-05); - margin-bottom: var(--cds-spacing-05); -} - -.overview-row { - margin-bottom: var(--cds-spacing-05); -} diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/health-checks/health-checks.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/health-checks/health-checks.component.html index cd1105e1284..41e8d5c40fa 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/health-checks/health-checks.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/health-checks/health-checks.component.html @@ -7,6 +7,6 @@
  • - {{ check.key }}: {{ check.value.summary.message }}
    + {{ check?.key }}: {{ check?.value?.summary?.message }}
  • diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/login/login.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/login/login.component.ts index 8bfda90c9e7..8524f53c2f7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/auth/login/login.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/auth/login/login.component.ts @@ -68,7 +68,7 @@ export class LoginComponent implements OnInit { this.authService.login(this.model).subscribe(() => { const urlPath = this.postInstalled ? '/' : '/expand-cluster'; let url = _.get(this.route.snapshot.queryParams, 'returnUrl', urlPath); - if (!this.postInstalled && this.route.snapshot.queryParams['returnUrl'] === '/dashboard') { + if (!this.postInstalled && this.route.snapshot.queryParams['returnUrl'] === '/overview') { url = '/expand-cluster'; } if (url == '/expand-cluster') { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/error/error.component.html b/src/pybind/mgr/dashboard/frontend/src/app/core/error/error.component.html index 5cc3fcd9e35..0496931bb19 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/error/error.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/error/error.component.html @@ -62,8 +62,8 @@
    + [routerLink]="'/overview'" + i18n>Go To Overview
    diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.html b/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.html index aace1638ce6..30075594d40 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.html @@ -1,12 +1,12 @@
    + [ngClass]="{'overview': (router.url == '/overview' || router.url == '/dashboard_3' || router.url == '/multi-cluster/overview'), 'rgw-dashboard': (router.url == '/rgw/overview')}">
    + [ngClass]="{'ms-4 me-4': (router.url == '/overview' || router.url == '/dashboard_3' || router.url == '/multi-cluster/overview'), 'm-3': (router.url == '/rgw/overview')}"> diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.scss b/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.scss index bb405a75fc4..9cd7e009418 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.scss +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/layouts/workbench-layout/workbench-layout.component.scss @@ -1,6 +1,6 @@ @use './src/styles/vendor/variables' as vv; -.dashboard { +.overview { background-color: vv.$body-bg-alt; margin: 0; padding: 0; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.html b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.html index 31160159b78..25527d9c022 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.html @@ -54,7 +54,7 @@ + routerLink="/overview"> Ceph @@ -81,17 +81,17 @@ - - + + class="nav-item tc_menuitem_overview"> - Dashboard + Overview { fixture.detectChanges(); const expectedTexts = { - '.tc_menuitem_dashboard': 'Dashboard', + '.tc_menuitem_overview': 'Overview', '.tc_submenuitem_multiCluster_overview': 'Overview', '.tc_submenuitem_multiCluster_manage_clusters': 'Manage clusters', '.tc_submenuitem_cluster_pool': 'Pools', diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/feature-toggles.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/feature-toggles.service.ts index 03577681e1a..039ca9dd183 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/feature-toggles.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/feature-toggles.service.ts @@ -12,7 +12,7 @@ export class FeatureTogglesMap { cephfs = true; rgw = true; nfs = true; - dashboardV3 = true; + dashboard = true; } export type Features = keyof FeatureTogglesMap; export type FeatureTogglesMap$ = Observable; diff --git a/src/pybind/mgr/dashboard/frontend/src/styles/ceph-custom/_spacings.scss b/src/pybind/mgr/dashboard/frontend/src/styles/ceph-custom/_spacings.scss new file mode 100644 index 00000000000..12abe388835 --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/src/styles/ceph-custom/_spacings.scss @@ -0,0 +1,33 @@ +@use '@carbon/layout'; + +.cds-p-0 { + padding: 0; +} + +.cds-pt-3 { + padding-top: layout.$spacing-03; +} + +.cds-ml-3 { + margin-left: layout.$spacing-03; +} + +.cds-mr-3 { + margin-right: layout.$spacing-03; +} + +.cds-mb-2 { + margin-bottom: layout.$spacing-02; +} + +.cds-mb-3 { + margin-bottom: layout.$spacing-03; +} + +.cds-mb-5 { + margin-bottom: layout.$spacing-05; +} + +.cds-mt-5 { + margin-top: layout.$spacing-05; +}