]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Fix smb module enablement 64515/head
authorAfreen Misbah <afreen@ibm.com>
Thu, 10 Jul 2025 21:15:08 +0000 (02:45 +0530)
committerAfreen Misbah <afreen@ibm.com>
Tue, 15 Jul 2025 17:10:16 +0000 (22:40 +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>
(cherry picked from commit 8f2a88eb4dd8e779044e7cd5b48c90f290303912)

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 c8f9de71e022c65b4686790139ea9b271bcee204..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 d82e122ff0ea817f8765fb16c9ac75626a08f152..6bcb216c4c8c3015054e17779ac6523480f17222 100644 (file)
@@ -69,9 +69,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 4ade21c832dd9bf97b1f07b49640fde83c6f585f..f1d3a5a65d811408f2e9fccd955e88c4532fcde1 100644 (file)
@@ -32,7 +32,7 @@ export class ErrorComponent implements OnDestroy, OnInit {
   secondaryButtonRoute: string;
   secondaryButtonName: string;
   secondaryButtonTitle: string;
-  buttonToEnableModule: string;
+  module_name: string;
   navigateTo: string;
   component: string;
 
@@ -91,7 +91,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);
@@ -107,11 +107,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,