]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Fix smb module enablement 64447/head
authorAfreen Misbah <afreen@ibm.com>
Thu, 10 Jul 2025 21:15:08 +0000 (02:45 +0530)
committerAfreen Misbah <afreen@ibm.com>
Fri, 11 Jul 2025 11:52:02 +0000 (17:22 +0530)
- changed prop name to `module_name` to avoid confusion while pasisng input props
- the module name is required to enable module

Signed-off-by: Afreen Misbah <afreen@ibm.com>
src/pybind/mgr/dashboard/frontend/src/app/app-routing.module.ts
src/pybind/mgr/dashboard/frontend/src/app/core/error/error.component.html
src/pybind/mgr/dashboard/frontend/src/app/core/error/error.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/module-status-guard.service.ts

index 941606865cf728c3d5a7e610963ae4fb2d50cf8e..fc2dd0b56109972efb92d360c9606767b7cc9652 100644 (file)
@@ -446,7 +446,7 @@ const routes: Routes = [
                 uiApiPath: 'smb',
                 redirectTo: 'error',
                 header: 'SMB module is not enabled',
-                button_to_enable_module: 'SMB',
+                module_name: 'smb',
                 navigate_to: 'cephfs/smb'
               },
               breadcrumbs: 'File/SMB'
index 06881a861a29640524d08b370fef82e880e2494b..0359f6d0ec4089648571b543a27534db0ebcb77d 100644 (file)
@@ -68,9 +68,9 @@
 
 <ng-template #enableButton>
   <div class="mt-4 text-center"
-       *ngIf="buttonToEnableModule && !(buttonName && buttonRoute)">
+       *ngIf="module_name && !(buttonName && buttonRoute)">
     <button class="btn btn-primary"
             (click)="enableModule()"
-            i18n>Enable {{ buttonToEnableModule | upperFirst }} module</button>
+            i18n>Enable {{ module_name | upperFirst }} module</button>
   </div>
 </ng-template>
index d63264f2a2fd98d45b1eab3b26f30aeb55bd4943..8b5847c865191b1d21095297ffd93648bb80da84 100644 (file)
@@ -33,7 +33,7 @@ export class ErrorComponent implements OnDestroy, OnInit {
   secondaryButtonRoute: string;
   secondaryButtonName: string;
   secondaryButtonTitle: string;
-  buttonToEnableModule: string;
+  module_name: string;
   navigateTo: string;
   component: string;
   icons = Icons;
@@ -93,7 +93,7 @@ export class ErrorComponent implements OnDestroy, OnInit {
       this.secondaryButtonRoute = history.state.secondary_button_route;
       this.secondaryButtonName = history.state.secondary_button_name;
       this.secondaryButtonTitle = history.state.secondary_button_title;
-      this.buttonToEnableModule = history.state.button_to_enable_module;
+      this.module_name = history.state.module_name;
       this.navigateTo = history.state.navigate_to;
       this.component = history.state.component;
       this.docUrl = this.docService.urlGenerator(this.section);
@@ -109,11 +109,6 @@ export class ErrorComponent implements OnDestroy, OnInit {
   }
 
   enableModule(): void {
-    this.mgrModuleService.updateModuleState(
-      this.buttonToEnableModule,
-      false,
-      null,
-      this.navigateTo
-    );
+    this.mgrModuleService.updateModuleState(this.module_name, false, null, this.navigateTo);
   }
 }
index e828a5ba523cfc3fa36bba1b05bfcb9299ed9a92..5c7eee256db40e989543541823819548b0e5c1cd 100644 (file)
@@ -86,7 +86,7 @@ export class ModuleStatusGuardService {
               secondary_button_name: config.secondary_button_name,
               secondary_button_route: config.secondary_button_route,
               secondary_button_title: config.secondary_button_title,
-              button_to_enable_module: config.button_to_enable_module,
+              module_name: config.module_name,
               navigate_to: config.navigate_to,
               uiConfig: config.uiConfig,
               uiApiPath: config.uiApiPath,