From 045d4168649fabeb42bc6e8d6564b070d927ee8e Mon Sep 17 00:00:00 2001 From: Aashish Sharma Date: Mon, 16 Feb 2026 12:52:27 +0530 Subject: [PATCH] mgr/dashboard:revamp on-borading screen Signed-off-by: Aashish Sharma --- .../create-cluster.component.html | 118 ++++++++++++++---- .../create-cluster.component.spec.ts | 7 +- .../create-cluster.component.ts | 2 + .../app/core/navigation/navigation.module.ts | 8 +- .../components/icon/icon.component.html | 2 +- .../shared/components/icon/icon.component.ts | 1 + .../src/app/shared/enum/icons.enum.ts | 2 + 7 files changed, 110 insertions(+), 30 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.html index 2051e61568c..2d63b8ae1dc 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.html @@ -1,33 +1,101 @@ -
-
-
- - Ceph -

Welcome to {{ projectConstants.projectName }}

+
+ @if (startClusterCreation) { +
+
+
+ + Ceph +
+ +
+ Welcome to {{ projectConstants.projectName }} + +
+ +
+ Finish cluster setup! + +
+ +
+ + + + You've successfully initialised your ceph cluster + +
-
-

Please expand your cluster first

-
- - +
A few setup steps are still pending before the cluster can store data and serve workloads. You can complete these now or skip and configure services later
+ +
+
+ + + Add hosts +
+
+ + + Add storage
+
+ + + Create data services (optional) +
+
+ +
+ + +
+ +
+ + + Skipping setup does not affect the cluster. The cluster will remain available, but it cannot store data until storage is added
+ }
{ expect(component).toBeTruthy(); }); - it('should have project name as heading in welcome screen', () => { + it('should have project name in welcome screen', () => { component.startClusterCreation = true; fixture.detectChanges(); - const heading = fixture.debugElement.query(By.css('h3')).nativeElement; - expect(heading.innerHTML).toBe(`Welcome to ${projectConstants.projectName}`); + + const nativeEl = fixture.debugElement.nativeElement; + expect(nativeEl.textContent).toContain(`Welcome to ${projectConstants.projectName}`); }); // @TODO: Opening modals in unit testing is broken since carbon. 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 e61ef3ee6e7..19c6143fabc 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 @@ -35,6 +35,7 @@ import { DriveGroup } from '../osd/osd-form/drive-group.model'; import { Location } from '@angular/common'; import { ModalCdsService } from '~/app/shared/services/modal-cds.service'; import { Step } from 'carbon-components-angular'; +import { Icons } from '~/app/shared/enum/icons.enum'; @Component({ selector: 'cd-create-cluster', @@ -75,6 +76,7 @@ export class CreateClusterComponent implements OnInit, OnDestroy, AfterViewInit selectedOption = {}; simpleDeployment = true; stepsToSkip: { [steps: string]: boolean } = {}; + icons = Icons; @Output() submitAction = new EventEmitter(); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation.module.ts index 9b642e8f35f..b481d6e5fae 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation.module.ts @@ -59,6 +59,9 @@ import ErrorFilledIcon from '@carbon/icons/es/error--filled/16'; import InformationFilledIcon from '@carbon/icons/es/information--filled/16'; import WarningFilledIcon from '@carbon/icons/es/warning--filled/16'; import NotificationFilledIcon from '@carbon/icons/es/notification--filled/16'; +import CircleDashIcon20 from '@carbon/icons/es/circle-dash/20'; +import CheckmarkOutlineIcon20 from '@carbon/icons/es/checkmark--outline/20'; +import ArrowRightIcon from '@carbon/icons/es/arrow--right/20'; import CloseIcon from '@carbon/icons/es/close/16'; import { NotificationPanelComponent } from './notification-panel/notification-panel/notification-panel.component'; @@ -142,7 +145,10 @@ export class NavigationModule { WarningFilledIcon, NotificationFilledIcon, NotificationNewIcon, - CloseIcon + CloseIcon, + CircleDashIcon20, + CheckmarkOutlineIcon20, + ArrowRightIcon ]); } } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/icon/icon.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/icon/icon.component.html index a6e092b1414..a6b1b21a7db 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/icon/icon.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/icon/icon.component.html @@ -1,4 +1,4 @@ + [class]="type+'-icon '+class"> diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/icon/icon.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/icon/icon.component.ts index 5af1ff72654..bbed643e0f5 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/icon/icon.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/icon/icon.component.ts @@ -11,6 +11,7 @@ import { ICON_TYPE, Icons, IconSize } from '../../enum/icons.enum'; export class IconComponent implements OnInit { @Input() type!: keyof typeof ICON_TYPE; @Input() size: IconSize = IconSize.size16; + @Input() class: string = ''; icon: string; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/enum/icons.enum.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/enum/icons.enum.ts index 1e6b926ed88..7602b745d3b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/enum/icons.enum.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/enum/icons.enum.ts @@ -87,6 +87,8 @@ export enum Icons { userAccessLocked = 'user--access-locked', // User access locked chevronDown = 'chevron--down', connect = 'connect', + checkmarkOutline = 'checkmark--outline', + circleDash = 'circle-dash', /* Icons for special effect */ size16 = '16', size20 = '20', -- 2.47.3