]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: carbonize the wizard component 59824/head
authorNizamudeen A <nia@redhat.com>
Tue, 17 Sep 2024 09:50:27 +0000 (15:20 +0530)
committerNizamudeen A <nia@redhat.com>
Wed, 18 Sep 2024 06:47:06 +0000 (12:17 +0530)
Fixes: https://tracker.ceph.com/issues/68103
Signed-off-by: Nizamudeen A <nia@redhat.com>
19 files changed:
src/pybind/mgr/dashboard/frontend/src/app/app-routing.module.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/cluster.module.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster-review.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-wizard/rgw-multisite-wizard.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-wizard/rgw-multisite-wizard.component.scss
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-wizard/rgw-multisite-wizard.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw.module.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/components.module.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/wizard/wizard.component.html
src/pybind/mgr/dashboard/frontend/src/app/shared/components/wizard/wizard.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/wizard/wizard.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/wizard-steps.service.ts
src/pybind/mgr/dashboard/frontend/src/styles/themes/_content.scss

index 0d859bbf8a699f7a8f0929d27ce88b38ad4f4cf1..99d7bd0e2d87d0262b85616ed1d37f17ac7dfe86 100644 (file)
@@ -108,7 +108,7 @@ const routes: Routes = [
             redirectTo: 'dashboard',
             backend: 'cephadm'
           },
-          breadcrumbs: 'Expand Cluster'
+          breadcrumbs: 'Cluster/Expand Cluster'
         }
       },
       {
index 37ba8e0c1df6a5f04cbca5a3666993ebda77e9eb..dc61dc5ab672f7f3b25d60cfb51bcce1b3900fca 100644 (file)
@@ -3,7 +3,14 @@ import { NgModule } from '@angular/core';
 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
 import { RouterModule } from '@angular/router';
 
-import { ComboBoxModule, DropdownModule, CheckboxModule } from 'carbon-components-angular';
+import {
+  ComboBoxModule,
+  DropdownModule,
+  CheckboxModule,
+  ButtonModule,
+  GridModule,
+  ProgressIndicatorModule
+} from 'carbon-components-angular';
 
 import { TreeModule } from '@circlon/angular-tree-component';
 import {
@@ -92,7 +99,10 @@ import { MultiClusterDetailsComponent } from './multi-cluster/multi-cluster-deta
     DashboardV3Module,
     ComboBoxModule,
     DropdownModule,
-    CheckboxModule
+    CheckboxModule,
+    GridModule,
+    ProgressIndicatorModule,
+    ButtonModule
   ],
   declarations: [
     HostsComponent,
index a87f4011b28d7ad8d9d8202782263b7427a98f90..2fbc6a75d634be83b5fc759472e39a3243b4c2ec 100644 (file)
@@ -1,53 +1,57 @@
-<div class="row">
-  <div class="col-lg-3">
+<div cdsRow>
+  <div cdsCol>
     <fieldset>
       <legend class="cd-header"
               i18n>Cluster Resources</legend>
       <table class="cds--data-table--sort cds--data-table--no-border cds--data-table cds--data-table--md">
-        <tr>
-          <td i18n
-              class="bold">Hosts</td>
-          <td>{{ hostsCount }}</td>
-        </tr>
-        <tr *ngIf="!isSimpleDeployment; else simpleDeploymentTextTpl">
-          <td>
-            <dl>
-              <dt>
-                <p i18n>Storage Capacity</p>
-              </dt>
-              <dd>
-                <p i18n>Number of devices</p>
-              </dd>
-              <dd>
-                <p i18n>Raw capacity</p>
-              </dd>
-            </dl>
-          </td>
-          <td class="pt-5"><p>{{ totalDevices }}</p><p>
-            {{ totalCapacity | dimlessBinary }}</p></td>
-        </tr>
-        <tr>
-          <td i18n
-              class="bold">CPUs</td>
-          <td>{{ totalCPUs | empty }}</td>
-        </tr>
-        <tr>
-          <td i18n
-              class="bold">Memory</td>
-          <td>{{ totalMemory | empty }}</td>
-        </tr>
+        <tbody>
+          <tr>
+            <td i18n
+                class="bold">Hosts</td>
+            <td>{{ hostsCount }}</td>
+          </tr>
+          <tr *ngIf="!isSimpleDeployment; else simpleDeploymentTextTpl">
+            <td>
+              <dl>
+                <dt>
+                  <p i18n>Storage Capacity</p>
+                </dt>
+                <dd>
+                  <p i18n>Number of devices</p>
+                </dd>
+                <dd>
+                  <p i18n>Raw capacity</p>
+                </dd>
+              </dl>
+            </td>
+            <td class="pt-5"><p>{{ totalDevices }}</p><p>
+              {{ totalCapacity | dimlessBinary }}</p></td>
+          </tr>
+          <tr>
+            <td i18n
+                class="bold">CPUs</td>
+            <td>{{ totalCPUs | empty }}</td>
+          </tr>
+          <tr>
+            <td i18n
+                class="bold">Memory</td>
+            <td>{{ totalMemory | empty }}</td>
+          </tr>
+        </tbody>
       </table>
     </fieldset>
   </div>
-
-  <div class="col-lg-9">
-  <legend i18n
-          class="cd-header">Host Details</legend>
-  <cd-hosts [hiddenColumns]="['services', 'status']"
-            [hideToolHeader]="true"
-            [hasTableDetails]="false"
-            [showGeneralActionsOnly]="true"
-            [showExpandClusterBtn]="false">
+</div>
+<div cdsRow>
+  <div cdsCol>
+    <legend i18n
+            class="cd-header">Host Details</legend>
+    <cd-hosts [hiddenColumns]="['service_instances', 'status']"
+              [hideToolHeader]="true"
+              [hasTableDetails]="false"
+              [showGeneralActionsOnly]="true"
+              [showExpandClusterBtn]="false"
+              [showInlineActions]="false">
     </cd-hosts>
   </div>
 </div>
index 930c6b42ac9c7cffa083deef87bc6851320ae408..4e30931c1b09e515f074546d7515fbb5d85df04e 100644 (file)
@@ -1,6 +1,7 @@
 <div class="container h-75"
      *ngIf="startClusterCreation">
-  <div class="row h-100 justify-content-center align-items-center">
+  <div class="h-100 justify-content-center align-items-center"
+       cdsRow>
     <div class="blank-page">
       <!-- htmllint img-req-src="false" -->
       <img [src]="projectConstants.cephLogo"
         <h4 class="text-center"
             i18n>Please expand your cluster first</h4>
         <div class="text-center">
-          <button class="btn btn-accent m-2"
+          <button cdsButton="primary"
                   name="expand-cluster"
                   (click)="createCluster()"
                   aria-label="Expand Cluster"
                   i18n>Expand Cluster</button>
-          <button class="btn btn-light"
+          <button cdsButton="secondary"
                   name="skip-cluster-creation"
                   aria-label="Skip"
                   (click)="skipClusterCreation()"
   </div>
 </div>
 
-<div class="card"
+<div cdsRow
+     class="form"
      *ngIf="!startClusterCreation">
-  <div class="card-header"
-       i18n>Expand Cluster</div>
-  <div class="container-fluid">
+  <div cdsCol
+       [columnNumbers]="{'lg': 2, 'md': 2, 'sm': 2}"
+       class="indicator-wrapper">
+
+    <div class="form-header"
+         i18n>Expand Cluster</div>
     <cd-wizard [stepsTitle]="stepTitles"></cd-wizard>
-    <div class="card-body vertical-line">
-      <ng-container [ngSwitch]="currentStep?.stepIndex">
-        <div *ngSwitchCase="'1'"
-             class="ms-5">
-          <h4 class="title"
-              i18n>Add Hosts</h4>
-          <br>
-          <cd-hosts [hiddenColumns]="['services']"
-                    [hideMaintenance]="true"
-                    [hasTableDetails]="false"
-                    [showGeneralActionsOnly]="true"
-                    [showExpandClusterBtn]="false"></cd-hosts>
-        </div>
-        <div *ngSwitchCase="'2'"
-             class="ms-5">
-          <h4 class="title"
-              i18n>Create OSDs</h4>
-          <div class="alignForm">
-            <cd-osd-form [hideTitle]="true"
-                         [hideSubmitBtn]="true"
-                         (emitDriveGroup)="setDriveGroup($event)"
-                         (emitDeploymentOption)="setDeploymentOptions($event)"
-                         (emitMode)="setDeploymentMode($event)"></cd-osd-form>
-          </div>
-        </div>
-        <div *ngSwitchCase="'3'"
-             class="ms-5">
-          <h4 class="title"
-              i18n>Create Services</h4>
-          <br>
-          <cd-services [hasDetails]="false"
-                       [hiddenServices]="['mon', 'mgr', 'crash', 'agent']"
-                       [hiddenColumns]="['status.running', 'status.size', 'status.last_refresh']"
-                       [routedModal]="false"></cd-services>
-        </div>
-        <div *ngSwitchCase="'4'"
-             class="ms-5">
-          <cd-create-cluster-review></cd-create-cluster-review>
+  </div>
+
+  <div cdsCol
+       [columnNumbers]="{'lg': 14, 'md': 14, 'sm': 14}">
+    <ng-container [ngSwitch]="currentStep?.stepIndex">
+      <div *ngSwitchCase="'0'"
+           class="ms-5">
+        <h4 class="title"
+            i18n>Add Hosts</h4>
+
+        <cd-hosts [hiddenColumns]="['service_instances']"
+                  [hideMaintenance]="true"
+                  [hasTableDetails]="false"
+                  [showGeneralActionsOnly]="true"
+                  [showExpandClusterBtn]="false"></cd-hosts>
+      </div>
+      <div *ngSwitchCase="'1'"
+           class="ms-5">
+        <h4 class="title"
+            i18n>Create OSDs</h4>
+        <div class="alignForm">
+          <cd-osd-form [hideTitle]="true"
+                       [hideSubmitBtn]="true"
+                       (emitDriveGroup)="setDriveGroup($event)"
+                       (emitDeploymentOption)="setDeploymentOptions($event)"
+                       (emitMode)="setDeploymentMode($event)"></cd-osd-form>
         </div>
-      </ng-container>
+      </div>
+      <div *ngSwitchCase="'2'"
+           class="ms-5">
+        <h4 class="title"
+            i18n>Create Services</h4>
+        <cd-services [hasDetails]="false"
+                     [hiddenServices]="['mon', 'mgr', 'crash', 'agent']"
+                     [hiddenColumns]="['status.running', 'status.size', 'status.last_refresh']"
+                     [routedModal]="false"></cd-services>
+      </div>
+      <div *ngSwitchCase="'3'"
+           class="ms-5">
+        <cd-create-cluster-review></cd-create-cluster-review>
+      </div>
+    </ng-container>
+    <div cdsRow
+         class="m-5">
+      <button cdsButton="secondary"
+              class="me-3"
+              id="skipStepBtn"
+              (click)="onSkip()"
+              aria-label="Skip this step"
+              *ngIf="stepTitles[currentStep?.stepIndex]?.label === 'Create OSDs'"
+              i18n>Skip</button>
+      <cd-back-button buttonType="secondary"
+                      aria-label="Close"
+                      (backAction)="onPreviousStep()"
+                      [name]="showCancelButtonLabel()"></cd-back-button>
+      <button cdsButton="primary"
+              (click)="onNextStep()"
+              aria-label="Next"
+              i18n>{{ showSubmitButtonLabel() }}</button>
     </div>
   </div>
-  <div class="card-footer">
-    <button class="btn btn-accent m-2 float-end"
-            (click)="onNextStep()"
-            aria-label="Next"
-            i18n>{{ showSubmitButtonLabel() }}</button>
-    <cd-back-button class="m-2 float-end"
-                    aria-label="Close"
-                    (backAction)="onPreviousStep()"
-                    [name]="showCancelButtonLabel()"></cd-back-button>
-    <button class="btn btn-light m-2 me-4 float-end"
-            id="skipStepBtn"
-            (click)="onSkip()"
-            aria-label="Skip this step"
-            *ngIf="stepTitles[currentStep.stepIndex - 1] === 'Create OSDs'"
-            i18n>Skip</button>
-  </div>
 </div>
 
 <ng-template #skipConfirmTpl>
index 204897d6898f52f671d336ef8e21f3f314a12a84..fc0ce5823aab342e082dcbbb8751905fdbcd207d 100644 (file)
@@ -32,6 +32,7 @@ import { WizardStepsService } from '~/app/shared/services/wizard-steps.service';
 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';
 
 @Component({
   selector: 'cd-create-cluster',
@@ -45,7 +46,23 @@ export class CreateClusterComponent implements OnInit, OnDestroy {
   currentStepSub: Subscription;
   permissions: Permissions;
   projectConstants: typeof AppConstants = AppConstants;
-  stepTitles = ['Add Hosts', 'Create OSDs', 'Create Services', 'Review'];
+  stepTitles: Step[] = [
+    {
+      label: 'Add Hosts'
+    },
+    {
+      label: 'Create OSDs',
+      complete: false
+    },
+    {
+      label: 'Create Services',
+      complete: false
+    },
+    {
+      label: 'Review',
+      complete: false
+    }
+  ];
   startClusterCreation = false;
   observables: any = [];
   modalRef: NgbModalRef;
@@ -79,10 +96,13 @@ export class CreateClusterComponent implements OnInit, OnDestroy {
       .subscribe((step: WizardStepModel) => {
         this.currentStep = step;
       });
-    this.currentStep.stepIndex = 1;
+    this.currentStep.stepIndex = 0;
   }
 
   ngOnInit(): void {
+    this.stepTitles.forEach((steps, index) => {
+      steps.onClick = () => (this.currentStep.stepIndex = index);
+    });
     this.route.queryParams.subscribe((params) => {
       // reading 'welcome' value true/false to toggle expand-cluster wizand view and welcome view
       const showWelcomeScreen = params['welcome'];
@@ -97,10 +117,14 @@ export class CreateClusterComponent implements OnInit, OnDestroy {
     });
 
     this.stepTitles.forEach((stepTitle) => {
-      this.stepsToSkip[stepTitle] = false;
+      this.stepsToSkip[stepTitle.label] = false;
     });
   }
 
+  onStepClick(step: WizardStepModel) {
+    this.wizardStepsService.setCurrentStep(step);
+  }
+
   createCluster() {
     this.startClusterCreation = false;
   }
@@ -236,8 +260,8 @@ export class CreateClusterComponent implements OnInit, OnDestroy {
   }
 
   onSkip() {
-    const stepTitle = this.stepTitles[this.currentStep.stepIndex - 1];
-    this.stepsToSkip[stepTitle] = true;
+    const stepTitle = this.stepTitles[this.currentStep.stepIndex];
+    this.stepsToSkip[stepTitle.label] = true;
     this.onNextStep();
   }
 
index e474fb854cde5671f341beef404e9b538a5a86c4..8a92776b8be134362e627c8763766c343e0b4934 100644 (file)
@@ -18,7 +18,8 @@
                 [maxLimit]="25"
                 (setExpandedRow)="setExpandedRow($event)"
                 (updateSelection)="updateSelection($event)"
-                [toolHeader]="!hideToolHeader">
+                [toolHeader]="!hideToolHeader"
+                [showMenu]="showMenu">
         <div class="table-actions">
           <cd-table-actions [permission]="permissions.hosts"
                             [selection]="selection"
index 7cd02b8a580a1f518f2a5d8757b294c609868434..adb89e6cd5cec54cf272879c7000398474c0fa94 100644 (file)
@@ -82,6 +82,9 @@ export class HostsComponent extends ListWithDetails implements OnDestroy, OnInit
   @Input()
   showExpandClusterBtn = true;
 
+  @Input()
+  showInlineActions = true;
+
   permissions: Permissions;
   columns: Array<CdTableColumn> = [];
   hosts: Array<object> = [];
index ad39b0ebae743bf8d2e18f12f86848f66e7a264a..edc973572a2ad140bed96ea5354fffa1f2545d98 100644 (file)
@@ -39,6 +39,7 @@ import { BlockUI, NgBlockUI } from 'ng-block-ui';
 import { Router } from '@angular/router';
 import { RgwMultisiteWizardComponent } from '../rgw-multisite-wizard/rgw-multisite-wizard.component';
 import { RgwMultisiteSyncPolicyComponent } from '../rgw-multisite-sync-policy/rgw-multisite-sync-policy.component';
+import { ModalCdsService } from '~/app/shared/services/modal-cds.service';
 
 const BASE_URL = 'rgw/multisite/configuration';
 
@@ -119,7 +120,8 @@ export class RgwMultisiteDetailsComponent implements OnDestroy, OnInit {
     public rgwZoneService: RgwZoneService,
     public rgwDaemonService: RgwDaemonService,
     public mgrModuleService: MgrModuleService,
-    private notificationService: NotificationService
+    private notificationService: NotificationService,
+    private cdsModalService: ModalCdsService
   ) {
     this.permission = this.authStorageService.getPermissions().rgw;
   }
@@ -150,9 +152,7 @@ export class RgwMultisiteDetailsComponent implements OnDestroy, OnInit {
   }
 
   openMultisiteSetupWizard() {
-    this.bsModalRef = this.modalService.show(RgwMultisiteWizardComponent, {
-      size: 'lg'
-    });
+    this.bsModalRef = this.cdsModalService.show(RgwMultisiteWizardComponent);
   }
 
   openMigrateModal() {
index 5c00a54a933c0507d2d57f819687f520838c87f4..8956e3ef0b27fbf55a58da91aaa6a15efdf24ffe 100644 (file)
-<div class="custom-modal-content">
-  <cd-modal [modalRef]="activeModal"
-            [pageURL]="pageURL">
-    <ng-container i18n="form title"
-                  class="modal-title">Set up Multi-site Replication</ng-container>
-    <ng-container class="modal-content">
-      <div class="card">
-        <div class="container-fluid">
-          <cd-wizard [stepsTitle]="stepTitles"></cd-wizard>
-          <div class="card-body vertical-line">
-            <form [formGroup]="multisiteSetupForm"
-                  #formDir="ngForm"
-                  novalidate>
-              <ng-container [ngSwitch]="currentStep?.stepIndex">
-                <cd-alert-panel *ngIf="loading"
-                                spacingClass="mb-3"
-                                type="info">
-                  <span i18n>Please note that this process can take some time. During this period, do not click the back button or close the wizard. Thank you for your patience.</span>
-                </cd-alert-panel>
-                <div *ngSwitchCase="'1'"
-                     class="ms-5">
-                  <h4 class="title"
-                      i18n>Create Realm & Zonegroup</h4>
-                  <br>
-                  <div class="modal-body">
-                    <div class="form-group row">
-                      <label class="cd-col-form-label required"
-                             for="realmName"
-                             i18n>Realm Name</label>
-                      <div class="cd-col-form-input">
-                        <input class="form-control"
-                               type="text"
-                               placeholder="Realm name..."
-                               id="realmName"
-                               name="realmName"
-                               formControlName="realmName">
-                        <cd-help-text>
-                          <span i18n>Enter a unique name for the Realm. The Realm is a logical grouping of all your Zonegroups.</span>
-                        </cd-help-text>
-                        <span class="invalid-feedback"
-                              *ngIf="multisiteSetupForm.showError('realmName', formDir, 'required')"
-                              i18n>This field is required.</span>
-                        <span class="invalid-feedback"
-                              *ngIf="multisiteSetupForm.showError('realmName', formDir, 'uniqueName')"
-                              i18n>The chosen realm name is already in use.</span>
-                      </div>
-                    </div>
-                    <div class="form-group row">
-                      <label class="cd-col-form-label required"
-                             for="zonegroupName"
-                             i18n>Zone Group Name</label>
-                      <div class="cd-col-form-input">
-                        <input class="form-control"
-                               type="text"
-                               placeholder="Zone group name..."
-                               id="zonegroupName"
-                               name="zonegroupName"
-                               formControlName="zonegroupName">
-                        <cd-help-text>
-                          <span i18n>Enter a name for the Zonegroup. Zonegroup will help you identify and manage the group of zones.</span>
-                        </cd-help-text>
-                        <span class="invalid-feedback"
-                              *ngIf="multisiteSetupForm.showError('zonegroupName', formDir, 'required')"
-                              i18n>This field is required.</span>
-                        <span class="invalid-feedback"
-                              *ngIf="multisiteSetupForm.showError('zonegroupName', formDir, 'uniqueName')"
-                              i18n>The chosen zone group name is already in use.</span>
-                      </div>
-                    </div>
-                    <div class="form-group row">
-                      <label class="cd-col-form-label required"
-                             for="zonegroup_endpoints"
-                             i18n>Zonegroup Endpoints</label>
-                      <div class="cd-col-form-input">
-                        <cd-select-badges id="zonegroup_endpoints"
-                                          [data]="rgwEndpoints.value"
-                                          [options]="rgwEndpoints.options"
-                                          [customBadges]="true">
-                        </cd-select-badges>
-                        <cd-help-text>
-                          <span i18n>Select the endpoints for the Zonegroup. Endpoints are the URLs or IP addresses from which the rgw gateways in that zonegroup can be accessed. You can select multiple endpoints in case you have multiple rgw gateways in a zonegroup</span>
-                        </cd-help-text>
-                      </div>
-                    </div>
+
+<cds-modal size="lg"
+           [open]="open"
+           [hasScrollingContent]="true"
+           (overlaySelected)="closeModal()">
+  <cds-modal-header (closeSelect)="closeModal()">
+    <h3 cdsModalHeaderHeading
+        i18n>Set up Multi-site Replication</h3>
+  </cds-modal-header>
+
+  <div cdsModalContent>
+    <div cdsRow>
+      <div cdsCol
+           [columnNumbers]="{'lg': 2, 'md': 2, 'sm': 2}"
+           class="indicator-wrapper">
+        <cd-wizard [stepsTitle]="stepTitles"></cd-wizard>
+      </div>
+
+      <div cdsCol
+           [columnNumbers]="{'lg': 14, 'md': 14, 'sm': 14}">
+        <form [formGroup]="multisiteSetupForm"
+              #formDir="ngForm"
+              novalidate>
+          <ng-container [ngSwitch]="currentStep?.stepIndex">
+            <cd-alert-panel *ngIf="loading"
+                            spacingClass="mb-3"
+                            type="info">
+              <span i18n>Please note that this process can take some time. During this period, do not click the back button or close the wizard. Thank you for your patience.</span>
+            </cd-alert-panel>
+            <div *ngSwitchCase="'0'"
+                 class="ms-5">
+              <div class="form-group row">
+                <label class="cd-col-form-label required"
+                       for="realmName"
+                       i18n>Realm Name</label>
+                <div class="cd-col-form-input">
+                  <input class="form-control"
+                         type="text"
+                         placeholder="Realm name..."
+                         id="realmName"
+                         name="realmName"
+                         formControlName="realmName"
+                         modal-primary-focus>
+                  <cd-help-text>
+                    <span i18n>Enter a unique name for the Realm. The Realm is a logical grouping of all your Zonegroups.</span>
+                  </cd-help-text>
+                  <span class="invalid-feedback"
+                        *ngIf="multisiteSetupForm.showError('realmName', formDir, 'required')"
+                        i18n>This field is required.</span>
+                  <span class="invalid-feedback"
+                        *ngIf="multisiteSetupForm.showError('realmName', formDir, 'uniqueName')"
+                        i18n>The chosen realm name is already in use.</span>
+                </div>
+              </div>
+              <div class="form-group row">
+                <label class="cd-col-form-label required"
+                       for="zonegroupName"
+                       i18n>Zone Group Name</label>
+                <div class="cd-col-form-input">
+                  <input class="form-control"
+                         type="text"
+                         placeholder="Zone group name..."
+                         id="zonegroupName"
+                         name="zonegroupName"
+                         formControlName="zonegroupName">
+                  <cd-help-text>
+                    <span i18n>Enter a name for the Zonegroup. Zonegroup will help you identify and manage the group of zones.</span>
+                  </cd-help-text>
+                  <span class="invalid-feedback"
+                        *ngIf="multisiteSetupForm.showError('zonegroupName', formDir, 'required')"
+                        i18n>This field is required.</span>
+                  <span class="invalid-feedback"
+                        *ngIf="multisiteSetupForm.showError('zonegroupName', formDir, 'uniqueName')"
+                        i18n>The chosen zone group name is already in use.</span>
+                </div>
+              </div>
+              <div class="form-group row">
+                <label class="cd-col-form-label required"
+                       for="zonegroup_endpoints"
+                       i18n>Zonegroup Endpoints</label>
+                <div class="cd-col-form-input">
+                  <cd-select-badges id="zonegroup_endpoints"
+                                    [data]="rgwEndpoints.value"
+                                    [options]="rgwEndpoints.options"
+                                    [customBadges]="true">
+                  </cd-select-badges>
+                  <cd-help-text>
+                    <span i18n>Select the endpoints for the Zonegroup. Endpoints are the URLs or IP addresses from which the rgw gateways in that zonegroup can be accessed. You can select multiple endpoints in case you have multiple rgw gateways in a zonegroup</span>
+                  </cd-help-text>
+                </div>
+              </div>
+            </div>
+            <div *ngSwitchCase="'1'"
+                 class="ms-5">
+              <h4 class="title"
+                  i18n>Create Zone</h4>
+              <div class="form-group row">
+                <label class="cd-col-form-label required"
+                       for="zonegroupName"
+                       i18n>Zone Name</label>
+                <div class="cd-col-form-input">
+                  <input class="form-control"
+                         type="text"
+                         placeholder="Zone name..."
+                         id="zoneName"
+                         name="zoneName"
+                         formControlName="zoneName">
+                  <cd-help-text>
+                    <span i18n>Enter a unique name for the Zone. A Zone represents a distinct data center or geographical location within a Zonegroup.</span>
+                  </cd-help-text>
+                  <span class="invalid-feedback"
+                        *ngIf="multisiteSetupForm.showError('zoneName', formDir, 'required')"
+                        i18n>This field is required.</span>
+                  <span class="invalid-feedback"
+                        *ngIf="multisiteSetupForm.showError('zoneName', formDir, 'uniqueName')"
+                        i18n>The chosen zone name is already in use.</span>
+                </div>
+              </div>
+              <div class="form-group row">
+                <label class="cd-col-form-label required"
+                       for="zone_endpoints"
+                       i18n>Zone Endpoints</label>
+                <div class="cd-col-form-input">
+                  <cd-select-badges id="zone_endpoints"
+                                    [data]="rgwEndpoints.value"
+                                    [options]="rgwEndpoints.options"
+                                    [customBadges]="true">
+                  </cd-select-badges>
+                  <cd-help-text>
+                    <span i18n>Select the endpoints for the Zone. Endpoints are the URLs or IP addresses from which the rgw gateways in that zone can be accessed. You can select multiple endpoints in case you have multiple rgw gateways in a zone</span>
+                  </cd-help-text>
+                </div>
+              </div>
+              <div class="form-group row">
+                <label class="cd-col-form-label required"
+                       for="username"
+                       i18n>Username</label>
+                <div class="cd-col-form-input">
+                  <input class="form-control"
+                         type="text"
+                         placeholder="Username..."
+                         id="username"
+                         name="username"
+                         formControlName="username"
+                         ngbTooltip="White spaces at the beginning and end will be trimmed"
+                         i18n-ngbTooltip
+                         cdTrim>
+                  <cd-help-text>
+                    <span i18n>Specify the username for the system user.</span>
+                  </cd-help-text>
+                  <cd-alert-panel type="info"
+                                  [showTitle]="false">
+                    <span i18n>This user will be created automatically as part of the process, and it will have the necessary permissions to manage and synchronize resources across zones.</span>
+                  </cd-alert-panel>
+                  <span class="invalid-feedback"
+                        *ngIf="multisiteSetupForm.showError('username', formDir, 'required')"
+                        i18n>This field is required.</span>
+                  <span class="invalid-feedback"
+                        *ngIf="multisiteSetupForm.showError('username', formDir, 'notUnique')"
+                        i18n>The username already exists.</span>
+                </div>
+              </div>
+            </div>
+            <div class="ms-5"
+                 *ngSwitchCase="'2'">
+              <div *ngIf="isMultiClusterConfigured; else exportTokenTemplate">
+                <h4 class="title"
+                    i18n>Select Cluster</h4>
+                <div class="form-group row">
+                  <label class="cd-col-form-label required"
+                         for="cluster"
+                         i18n>Cluster</label>
+                  <div class="cd-col-form-input">
+                    <select class="form-select"
+                            id="cluster"
+                            [(ngModel)]="selectedCluster"
+                            formControlName="cluster"
+                            name="cluster">
+                      <option *ngFor="let cluster_detail of clusterDetailsArray"
+                              [value]="cluster_detail.name">
+                        {{ cluster_detail.cluster_alias }} - {{ cluster_detail.name }}
+                      </option>
+                    </select>
+                    <cd-help-text>
+                      <span i18n>Choose the cluster where you want to apply this multisite configuration. The selected cluster will integrate the defined Realm, Zonegroup, and Zones, enabling data synchronization and management across the multisite setup.</span>
+                    </cd-help-text>
+                    <cd-alert-panel type="info"
+                                    [showTitle]="false">
+                      <span i18n>Before submitting this form, please verify that the selected cluster has an active RGW (Rados Gateway) service running.</span>
+                    </cd-alert-panel>
                   </div>
                 </div>
-                <div *ngSwitchCase="'2'"
-                     class="ms-5">
-                  <h4 class="title"
-                      i18n>Create Zone</h4>
+              </div>
+              <ng-template #exportTokenTemplate>
+                <h4 class="title"
+                    i18n>Export Token</h4>
+                <div *ngFor="let realminfo of realms">
                   <div class="form-group row">
-                    <label class="cd-col-form-label required"
-                           for="zonegroupName"
-                           i18n>Zone Name</label>
+                    <label class="cd-col-form-label"
+                           for="realmName"
+                           i18n>Realm Name</label>
                     <div class="cd-col-form-input">
-                      <input class="form-control"
+                      <input id="realmName"
+                             name="realmName"
                              type="text"
-                             placeholder="Zone name..."
-                             id="zoneName"
-                             name="zoneName"
-                             formControlName="zoneName">
+                             [value]="realminfo.realm"
+                             readonly>
                       <cd-help-text>
-                        <span i18n>Enter a unique name for the Zone. A Zone represents a distinct data center or geographical location within a Zonegroup.</span>
+                        <span i18n>Name of the realm that will be involved in replication.</span>
                       </cd-help-text>
-                      <span class="invalid-feedback"
-                            *ngIf="multisiteSetupForm.showError('zoneName', formDir, 'required')"
-                            i18n>This field is required.</span>
-                      <span class="invalid-feedback"
-                            *ngIf="multisiteSetupForm.showError('zoneName', formDir, 'uniqueName')"
-                            i18n>The chosen zone name is already in use.</span>
                     </div>
                   </div>
                   <div class="form-group row">
-                    <label class="cd-col-form-label required"
-                           for="zone_endpoints"
-                           i18n>Zone Endpoints</label>
+                    <label class="cd-col-form-label"
+                           for="token"
+                           i18n>Token</label>
                     <div class="cd-col-form-input">
-                      <cd-select-badges id="zone_endpoints"
-                                        [data]="rgwEndpoints.value"
-                                        [options]="rgwEndpoints.options"
-                                        [customBadges]="true">
-                      </cd-select-badges>
-                      <cd-help-text>
-                        <span i18n>Select the endpoints for the Zone. Endpoints are the URLs or IP addresses from which the rgw gateways in that zone can be accessed. You can select multiple endpoints in case you have multiple rgw gateways in a zone</span>
-                      </cd-help-text>
-                    </div>
-                  </div>
-                  <div class="form-group row">
-                    <label class="cd-col-form-label required"
-                           for="username"
-                           i18n>Username</label>
-                    <div class="cd-col-form-input">
-                      <input class="form-control"
+                      <input id="realmToken"
+                             name="realmToken"
                              type="text"
-                             placeholder="Username..."
-                             id="username"
-                             name="username"
-                             formControlName="username"
-                             ngbTooltip="White spaces at the beginning and end will be trimmed"
-                             i18n-ngbTooltip
-                             cdTrim>
+                             [value]="realminfo.token"
+                             class="me-2 mb-4"
+                             readonly>
+                      <cd-copy-2-clipboard-button [source]="realminfo.token"
+                                                  [byId]="false">
+                      </cd-copy-2-clipboard-button>
                       <cd-help-text>
-                        <span i18n>Specify the username for the system user.</span>
+                        <span i18n>This field displays the token needed to import the multisite configuration into a secondary cluster. Copy this token securely and use it on the secondary cluster to replicate the current multisite setup. Ensure that the token is handled securely to prevent unauthorized access.</span>
                       </cd-help-text>
-                      <cd-alert-panel type="info"
-                                      [showTitle]="false">
-                        <span i18n>This user will be created automatically as part of the process, and it will have the necessary permissions to manage and synchronize resources across zones.</span>
-                      </cd-alert-panel>
-                      <span class="invalid-feedback"
-                            *ngIf="multisiteSetupForm.showError('username', formDir, 'required')"
-                            i18n>This field is required.</span>
-                      <span class="invalid-feedback"
-                            *ngIf="multisiteSetupForm.showError('username', formDir, 'notUnique')"
-                            i18n>The username already exists.</span>
                     </div>
                   </div>
+                  <hr *ngIf="realms.length > 1">
                 </div>
-                <div class="ms-5"
-                     *ngSwitchCase="'3'">
-                  <div *ngIf="isMultiClusterConfigured; else exportTokenTemplate">
-                    <h4 class="title"
-                        i18n>Select Cluster</h4>
-                    <div class="form-group row">
-                      <label class="cd-col-form-label required"
-                             for="cluster"
-                             i18n>Cluster</label>
-                      <div class="cd-col-form-input">
-                        <select class="form-select"
-                                id="cluster"
-                                [(ngModel)]="selectedCluster"
-                                formControlName="cluster"
-                                name="cluster">
-                          <option *ngFor="let cluster_detail of clusterDetailsArray"
-                                  [value]="cluster_detail.name">
-                            {{ cluster_detail.cluster_alias }} - {{ cluster_detail.name }}
-                          </option>
-                        </select>
-                        <cd-help-text>
-                          <span i18n>Choose the cluster where you want to apply this multisite configuration. The selected cluster will integrate the defined Realm, Zonegroup, and Zones, enabling data synchronization and management across the multisite setup.</span>
-                        </cd-help-text>
-                        <cd-alert-panel type="info"
-                                        [showTitle]="false">
-                          <span i18n>Before submitting this form, please verify that the selected cluster has an active RGW (Rados Gateway) service running.</span>
-                        </cd-alert-panel>
-                      </div>
-                    </div>
-                  </div>
-                  <ng-template #exportTokenTemplate>
-                    <h4 class="title"
-                        i18n>Export Token</h4>
-                    <div *ngFor="let realminfo of realms">
-                      <div class="form-group row">
-                        <label class="cd-col-form-label"
-                               for="realmName"
-                               i18n>Realm Name</label>
-                        <div class="cd-col-form-input">
-                          <input id="realmName"
-                                 name="realmName"
-                                 type="text"
-                                 [value]="realminfo.realm"
-                                 readonly>
-                          <cd-help-text>
-                            <span i18n>Name of the realm that will be involved in replication.</span>
-                          </cd-help-text>
-                        </div>
-                      </div>
-                      <div class="form-group row">
-                        <label class="cd-col-form-label"
-                               for="token"
-                               i18n>Token</label>
-                        <div class="cd-col-form-input">
-                          <input id="realmToken"
-                                 name="realmToken"
-                                 type="text"
-                                 [value]="realminfo.token"
-                                 class="me-2 mb-4"
-                                 readonly>
-                          <cd-copy-2-clipboard-button [source]="realminfo.token"
-                                                      [byId]="false">
-                          </cd-copy-2-clipboard-button>
-                          <cd-help-text>
-                            <span i18n>This field displays the token needed to import the multisite configuration into a secondary cluster. Copy this token securely and use it on the secondary cluster to replicate the current multisite setup. Ensure that the token is handled securely to prevent unauthorized access.</span>
-                          </cd-help-text>
-                        </div>
-                      </div>
-                      <hr *ngIf="realms.length > 1">
-                    </div>
-                  </ng-template>
-                </div>
-              </ng-container>
-            </form>
-          </div>
-        </div>
-        <div class="card-footer">
-          <button class="btn btn-accent m-2 float-end"
-                  (click)="onNextStep()"
-                  aria-label="Next"
-                  i18n>{{ showSubmitButtonLabel() }}
-            <span *ngIf="loading">
-              <i [ngClass]="[icons.spinner, icons.spin]"></i>
-            </span>
-          </button>
-          <cd-back-button class="m-2 float-end"
-                          aria-label="Close"
-                          (backAction)="onPreviousStep()"
-                          [name]="showCancelButtonLabel()"
-                          [disabled]="loading">
-          </cd-back-button>
-        </div>
+              </ng-template>
+            </div>
+          </ng-container>
+        </form>
       </div>
-    </ng-container>
-  </cd-modal>
-</div>
+    </div>
+  </div>
+  <cds-modal-footer>
+    <button cdsButton="secondary"
+            (click)="onPreviousStep()"
+            [attr.aria-label]="showCancelButtonLabel()"
+            [disabled]="loading"
+            i18n>{{ showCancelButtonLabel() }}</button>
+    <button cdsButton="primary"
+            (click)="onNextStep()"
+            aria-label="Next"
+            i18n>{{ showSubmitButtonLabel() }}
+      <cds-loading [isActive]="loading"
+                   [overlay]="false"
+                   size="sm"
+                   *ngIf="loading"></cds-loading>
+    </button>
+  </cds-modal-footer>
+</cds-modal>
index 6f91a2864a87e1a7c265abe88b41058f4854b564..bd53b868bcfd076b6057c826f974756d09fefdc3 100644 (file)
@@ -1,11 +1,3 @@
-.container-fluid {
-  align-items: flex-start;
-  display: flex;
-  padding-left: 0;
-  width: 100%;
-}
-
-::ng-deep .custom-modal-content .modal-content {
-  right: 40vh;
-  width: 140vh;
+cds-loading {
+  margin-left: 0.5rem;
 }
index 673d8daefbea044452a916bfa75870a821c27689..623826b73639a177660130f4fc450a0566462b91 100644 (file)
@@ -16,20 +16,32 @@ import _ from 'lodash';
 import { SelectMessages } from '~/app/shared/components/select/select-messages.model';
 import { NotificationType } from '~/app/shared/enum/notification-type.enum';
 import { NotificationService } from '~/app/shared/services/notification.service';
-import { Router } from '@angular/router';
+import { ActivatedRoute, Router } from '@angular/router';
 import { map, switchMap } from 'rxjs/operators';
+import { BaseModal, Step } from 'carbon-components-angular';
+import { Location } from '@angular/common';
 
 @Component({
   selector: 'cd-rgw-multisite-wizard',
   templateUrl: './rgw-multisite-wizard.component.html',
   styleUrls: ['./rgw-multisite-wizard.component.scss']
 })
-export class RgwMultisiteWizardComponent implements OnInit {
+export class RgwMultisiteWizardComponent extends BaseModal implements OnInit {
   multisiteSetupForm: CdFormGroup;
   currentStep: WizardStepModel;
   currentStepSub: Subscription;
   permissions: Permissions;
-  stepTitles = ['Create Realm & Zonegroup', 'Create Zone', 'Select Cluster'];
+  stepTitles: Step[] = [
+    {
+      label: 'Create Realm & Zonegroup'
+    },
+    {
+      label: 'Create Zone'
+    },
+    {
+      label: 'Select Cluster'
+    }
+  ];
   stepsToSkip: { [steps: string]: boolean } = {};
   daemons: RgwDaemon[] = [];
   selectedCluster = '';
@@ -50,15 +62,18 @@ export class RgwMultisiteWizardComponent implements OnInit {
     private multiClusterService: MultiClusterService,
     private rgwMultisiteService: RgwMultisiteService,
     public notificationService: NotificationService,
-    private router: Router
+    private router: Router,
+    private route: ActivatedRoute,
+    private location: Location
   ) {
+    super();
     this.pageURL = 'rgw/multisite/configuration';
     this.currentStepSub = this.wizardStepsService
       .getCurrentStep()
       .subscribe((step: WizardStepModel) => {
         this.currentStep = step;
       });
-    this.currentStep.stepIndex = 1;
+    this.currentStep.stepIndex = 0;
     this.createForm();
     this.rgwEndpoints = {
       value: [],
@@ -71,6 +86,7 @@ export class RgwMultisiteWizardComponent implements OnInit {
   }
 
   ngOnInit(): void {
+    this.open = this.route.outlet === 'modal';
     this.rgwDaemonService
       .list()
       .pipe(
@@ -105,7 +121,20 @@ export class RgwMultisiteWizardComponent implements OnInit {
         .filter((cluster) => cluster['cluster_alias'] !== 'local-cluster');
       this.isMultiClusterConfigured = this.clusterDetailsArray.length > 0;
       if (!this.isMultiClusterConfigured) {
-        this.stepTitles = ['Create Realm & Zonegroup', 'Create Zone', 'Export Multi-site token'];
+        this.stepTitles = [
+          {
+            label: 'Create Realm & Zonegroup'
+          },
+          {
+            label: 'Create Zone'
+          },
+          {
+            label: 'Export Multi-site token'
+          }
+        ];
+        this.stepTitles.forEach((steps, index) => {
+          steps.onClick = () => (this.currentStep.stepIndex = index);
+        });
       } else {
         this.selectedCluster = this.clusterDetailsArray[0]['name'];
       }
@@ -245,13 +274,13 @@ export class RgwMultisiteWizardComponent implements OnInit {
     if (!this.wizardStepsService.isFirstStep()) {
       this.wizardStepsService.moveToPreviousStep();
     } else {
-      this.activeModal.close();
+      this.location.back();
     }
   }
 
   onSkip() {
-    const stepTitle = this.stepTitles[this.currentStep.stepIndex - 1];
-    this.stepsToSkip[stepTitle] = true;
+    const stepTitle = this.stepTitles[this.currentStep.stepIndex];
+    this.stepsToSkip[stepTitle.label] = true;
     this.onNextStep();
   }
 }
index 91db38d319a1b3e45ab35460f94291933f8e7bc5..58f85fb61ff1b366f46965dbddb6ed5e3abe1f9f 100644 (file)
@@ -63,6 +63,14 @@ import { RgwMultisiteSyncPolicyDetailsComponent } from './rgw-multisite-sync-pol
 import { RgwMultisiteSyncFlowModalComponent } from './rgw-multisite-sync-flow-modal/rgw-multisite-sync-flow-modal.component';
 import { RgwMultisiteSyncPipeModalComponent } from './rgw-multisite-sync-pipe-modal/rgw-multisite-sync-pipe-modal.component';
 import { RgwMultisiteTabsComponent } from './rgw-multisite-tabs/rgw-multisite-tabs.component';
+import {
+  ButtonModule,
+  GridModule,
+  IconModule,
+  LoadingModule,
+  ModalModule,
+  ProgressIndicatorModule
+} from 'carbon-components-angular';
 
 @NgModule({
   imports: [
@@ -79,7 +87,13 @@ import { RgwMultisiteTabsComponent } from './rgw-multisite-tabs/rgw-multisite-ta
     TreeModule,
     DataTableModule,
     DashboardV3Module,
-    NgbTypeaheadModule
+    NgbTypeaheadModule,
+    ModalModule,
+    GridModule,
+    ProgressIndicatorModule,
+    ButtonModule,
+    LoadingModule,
+    IconModule
   ],
   exports: [
     RgwDaemonListComponent,
index b01336f1fee3fca7c5d41e7540d599e9cb3d46a2..72bacdddf0c93309db405399e54663d23cb380ee 100644 (file)
@@ -34,7 +34,8 @@ import {
   NumberModule,
   DropdownModule,
   SelectModule,
-  ComboBoxModule
+  ComboBoxModule,
+  ProgressIndicatorModule
 } from 'carbon-components-angular';
 
 import { MotdComponent } from '~/app/shared/components/motd/motd.component';
@@ -118,7 +119,8 @@ import InfoIcon from '@carbon/icons/es/information/16';
     TimePickerSelectModule,
     DropdownModule,
     SelectModule,
-    ComboBoxModule
+    ComboBoxModule,
+    ProgressIndicatorModule
   ],
   declarations: [
     SparklineComponent,
index 7ffd1b320592febaaf9742e8a198a6ca9780ca14..e5efa0b1e6201a455d3c3cad42913dbe6b3c903b 100644 (file)
@@ -1,19 +1,7 @@
-<div class="card-body">
-  <div class="row m-7">
-    <nav class="col">
-      <ul class="nav nav-pills flex-column"
-          *ngFor="let step of steps | async; let i = index;">
-        <li class="nav-item text-nowrap">
-          <a class="nav-link"
-             (click)="onStepClick(step)"
-             [ngClass]="{active: currentStep.stepIndex === step.stepIndex}">
-            <span class="circle-step"
-                  [ngClass]="{active: currentStep.stepIndex === step.stepIndex}"
-                  i18n>{{ step.stepIndex }}</span>
-            <span i18n>{{ stepsTitle[i] }}</span>
-          </a>
-        </li>
-      </ul>
-    </nav>
-  </div>
+<div class="indicator">
+  <cds-progress-indicator
+    orientation="vertical"
+    [steps]="stepsTitle"
+    [current]="currentStep?.stepIndex">
+  </cds-progress-indicator>
 </div>
index b42578fb7119303ece93d616cd2b468cacd89653..213ace34de1e7930de2cbd55ea91983165686c00 100644 (file)
@@ -15,7 +15,15 @@ describe('WizardComponent', () => {
   beforeEach(() => {
     fixture = TestBed.createComponent(WizardComponent);
     component = fixture.componentInstance;
-    component.stepsTitle = ['Add Hosts', 'Review'];
+    component.stepsTitle = [
+      {
+        label: 'Add Hosts'
+      },
+      {
+        label: 'Create OSDs',
+        complete: false
+      }
+    ];
     fixture.detectChanges();
   });
 
index d46aa480e7918165d865a3cb8791903973c1c01e..72c1e10676467c64bba8b5da45894bdd34605d1f 100644 (file)
@@ -1,4 +1,5 @@
 import { Component, Input, OnDestroy, OnInit } from '@angular/core';
+import { Step } from 'carbon-components-angular';
 
 import * as _ from 'lodash';
 import { Observable, Subscription } from 'rxjs';
@@ -13,13 +14,17 @@ import { WizardStepsService } from '~/app/shared/services/wizard-steps.service';
 })
 export class WizardComponent implements OnInit, OnDestroy {
   @Input()
-  stepsTitle: string[];
+  stepsTitle: Step[];
 
   steps: Observable<WizardStepModel[]>;
   currentStep: WizardStepModel;
   currentStepSub: Subscription;
 
-  constructor(private stepsService: WizardStepsService) {}
+  constructor(private stepsService: WizardStepsService) {
+    this.stepsTitle?.forEach((steps, index) => {
+      steps.onClick = () => (this.currentStep.stepIndex = index);
+    });
+  }
 
   ngOnInit(): void {
     this.stepsService.setTotalSteps(this.stepsTitle.length);
index 5b2bd777dc7a00a9855f0197baf0a6672ac262e4..2a631639558c99138945c1fef36d0a1d07d8e370 100644 (file)
@@ -125,6 +125,9 @@ export class TableComponent implements AfterViewInit, OnInit, OnChanges, OnDestr
   @Input()
   hasDetails = false;
 
+  @Input()
+  showInlineActions = true;
+
   /**
    * Auto reload time in ms - per default every 5s
    * You can set it to 0, undefined or false to disable the auto reload feature in order to
@@ -387,7 +390,7 @@ export class TableComponent implements AfterViewInit, OnInit, OnChanges, OnDestr
   }
 
   ngAfterViewInit(): void {
-    if (this.tableActions?.dropDownActions?.length) {
+    if (this.showInlineActions && this.tableActions?.dropDownActions?.length) {
       this.tableColumns = [
         ...this.tableColumns,
         {
@@ -465,7 +468,6 @@ export class TableComponent implements AfterViewInit, OnInit, OnChanges, OnDestr
               }
 
               tableItem.template = column.cellTemplate || this.defaultValueTpl;
-
               return tableItem;
             });
           });
@@ -1084,7 +1086,7 @@ export class TableComponent implements AfterViewInit, OnInit, OnChanges, OnDestr
     if (!_.find(this.visibleColumns, (c: CdTableColumn) => c.prop === sortProp)) {
       this.userConfig.sorts = this.createSortingDefinition(this.visibleColumns[0].prop);
     }
-    if (this.tableActions?.dropDownActions?.length) {
+    if (this.showInlineActions && this.tableActions?.dropDownActions?.length) {
       this.tableColumns = [
         ...this.tableColumns,
         {
index e0fb2be944de02195147569f7e4ffa6478dcd4d7..7813cc163b0785aa81a403aeeabde932009ddada 100644 (file)
@@ -4,7 +4,7 @@ import { BehaviorSubject, Observable } from 'rxjs';
 
 import { WizardStepModel } from '~/app/shared/models/wizard-steps';
 
-const initialStep = [{ stepIndex: 1, isComplete: false }];
+const initialStep = [{ stepIndex: 0, isComplete: false }];
 
 @Injectable({
   providedIn: 'root'
@@ -20,7 +20,7 @@ export class WizardStepsService {
 
   setTotalSteps(step: number) {
     const steps: WizardStepModel[] = [];
-    for (let i = 1; i <= step; i++) {
+    for (let i = 0; i < step; i++) {
       steps.push({ stepIndex: i, isComplete: false });
     }
     this.steps$ = new BehaviorSubject<WizardStepModel[]>(steps);
@@ -40,19 +40,19 @@ export class WizardStepsService {
 
   moveToNextStep(): void {
     const index = this.currentStep$.value.stepIndex;
-    this.currentStep$.next(this.steps$.value[index]);
+    this.currentStep$.next(this.steps$.value[index + 1]);
   }
 
   moveToPreviousStep(): void {
-    const index = this.currentStep$.value.stepIndex - 1;
+    const index = this.currentStep$.value.stepIndex;
     this.currentStep$.next(this.steps$.value[index - 1]);
   }
 
   isLastStep(): boolean {
-    return this.currentStep$.value.stepIndex === this.steps$.value.length;
+    return this.currentStep$.value?.stepIndex === this.steps$.value.length - 1;
   }
 
   isFirstStep(): boolean {
-    return this.currentStep$.value?.stepIndex - 1 === 0;
+    return this.currentStep$.value?.stepIndex === 0;
   }
 }
index 88d19435a2f33203360f0f6691d4a6a480fb04bc..c4f529a2f41136c16b03f5bf13f6b37348928902 100644 (file)
@@ -34,7 +34,8 @@ $content-theme: map-merge(
     text-secondary: vv.$dark,
     text-disabled: vv.$gray-500,
     icon-secondary: vv.$body-bg-alt,
-    field-01: colors.$gray-10
+    field-01: colors.$gray-10,
+    interactive: vv.$primary
   )
 );