]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Fixes: https://tracker.ceph.com/issues/67074
authorNaman Munet <nmunet@redhat.com>
Mon, 22 Jul 2024 09:52:55 +0000 (15:22 +0530)
committerNaman Munet <nmunet@redhat.com>
Thu, 25 Jul 2024 11:45:35 +0000 (17:15 +0530)
Signed-off-by: Naman Munet <nmunet@redhat.com>
(cherry picked from commit 6241be164dc1f764b66bf63ca4e42a4f3931c07a)

src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.ts

index 25d87175130640dbaa8c5ecc98809bd33f48f165..bd6f768c236a8a3d3c4389a60d092ebb433482e8 100644 (file)
@@ -31,6 +31,7 @@ import { NotificationService } from '~/app/shared/services/notification.service'
 import { TaskWrapperService } from '~/app/shared/services/task-wrapper.service';
 import { WizardStepsService } from '~/app/shared/services/wizard-steps.service';
 import { DriveGroup } from '../osd/osd-form/drive-group.model';
+import { Location } from '@angular/common';
 
 @Component({
   selector: 'cd-create-cluster',
@@ -69,7 +70,8 @@ export class CreateClusterComponent implements OnInit, OnDestroy {
     private modalService: ModalService,
     private taskWrapper: TaskWrapperService,
     private osdService: OsdService,
-    private route: ActivatedRoute
+    private route: ActivatedRoute,
+    private location: Location
   ) {
     this.permissions = this.authStorageService.getPermissions();
     this.currentStepSub = this.wizardStepsService
@@ -229,7 +231,7 @@ export class CreateClusterComponent implements OnInit, OnDestroy {
     if (!this.wizardStepsService.isFirstStep()) {
       this.wizardStepsService.moveToPreviousStep();
     } else {
-      this.router.navigate(['/dashboard']);
+      this.location.back();
     }
   }