]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: FS - Attach Command showing undefined for MountData 65600/head
authorDnyaneshwari <dnyaneshwari@li-9c9fbecc-2d5c-11b2-a85c-e2a7cc8a424f.ibm.com>
Fri, 19 Sep 2025 11:01:43 +0000 (16:31 +0530)
committerDnyaneshwari <dnyaneshwari@li-9c9fbecc-2d5c-11b2-a85c-e2a7cc8a424f.ibm.com>
Mon, 22 Sep 2025 07:43:48 +0000 (13:13 +0530)
Fixes: https://tracker.ceph.com/issues/73137
Signed-off-by: Dnyaneshwari Talwekar <dtalwekar@redhat.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-mount-details/cephfs-mount-details.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-list/cephfs-subvolume-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/models/cephfs.model.ts [new file with mode: 0644]

index 005071b1f906a754df57f8e40db10c5257cc5ad6..33721407cad7b656a546870b079198e6cf36ac4e 100644 (file)
@@ -165,9 +165,9 @@ export class CephfsListComponent extends ListWithDetails implements OnInit {
           this.modalRef = this.modalService.show(CephfsMountDetailsComponent, {
             onSubmit: () => this.modalRef.close(),
             mountData: {
-              fsId: val.clusterId,
+              clusterFSID: val.clusterId,
               fsName: selectedFileSystem?.mdsmap?.fs_name,
-              rootPath: val.fs['path']
+              path: val.fs['path']
             }
           });
         }
index 94c263de10d8d24b46b8da4da725be8a320161fb..6bfbfc47ec4605efa929a6f657eb1b3863369424 100644 (file)
@@ -1,6 +1,7 @@
-import { Component, OnInit, ViewChild } from '@angular/core';
+import { Component, Inject, OnInit, Optional, ViewChild } from '@angular/core';
 import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
 import { BaseModal } from 'carbon-components-angular';
+import { MountData } from '~/app/shared/models/cephfs.model';
 
 @Component({
   selector: 'cd-cephfs-mount-details',
@@ -12,8 +13,10 @@ export class CephfsMountDetailsComponent extends BaseModal implements OnInit {
   mountDetailsTpl: any;
   onCancel?: Function;
   private MOUNT_DIRECTORY = '<MOUNT_DIRECTORY>';
-  mountData!: Record<string, any>;
-  constructor(public activeModal: NgbActiveModal) {
+  constructor(
+    public activeModal: NgbActiveModal,
+    @Optional() @Inject('mountData') public mountData: MountData
+  ) {
     super();
   }
   mount!: string;
@@ -21,8 +24,8 @@ export class CephfsMountDetailsComponent extends BaseModal implements OnInit {
   nfs!: string;
 
   ngOnInit(): void {
-    this.mount = `sudo mount -t ceph <CLIENT_USER>@${this.mountData?.fsId}.${this.mountData?.fsName}=${this.mountData?.rootPath} ${this.MOUNT_DIRECTORY}`;
-    this.fuse = `sudo ceph-fuse  ${this.MOUNT_DIRECTORY} -r ${this.mountData?.rootPath} --client_mds_namespace=${this.mountData?.fsName}`;
+    this.mount = `sudo mount -t ceph <CLIENT_USER>@${this.mountData?.clusterFSID}.${this.mountData?.fsName}=${this.mountData?.path} ${this.MOUNT_DIRECTORY}`;
+    this.fuse = `sudo ceph-fuse  ${this.MOUNT_DIRECTORY} -r ${this.mountData?.path} --client_mds_namespace=${this.mountData?.fsName}`;
     this.nfs = `sudo mount -t nfs -o port=<PORT> <IP of active_nfs daemon>:<export_name> ${this.MOUNT_DIRECTORY}`;
   }
 
index eb048cb5b236b965d4026494e082367969b66670..ef929610b4daa342fae3e51a832dd2caa3f7c6f5 100644 (file)
@@ -221,9 +221,9 @@ export class CephfsSubvolumeListComponent extends CdForm implements OnInit, OnCh
         this.modalRef = this.modalService.show(CephfsMountDetailsComponent, {
           onSubmit: () => this.modalRef.close(),
           mountData: {
-            fsId: clusterId,
+            clusterFSID: clusterId,
             fsName: this.fsName,
-            rootPath: selectedSubVolume.info.path
+            path: selectedSubVolume.info.path
           }
         });
       }
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/models/cephfs.model.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/models/cephfs.model.ts
new file mode 100644 (file)
index 0000000..0e137ae
--- /dev/null
@@ -0,0 +1,5 @@
+export interface MountData {
+  clusterFSID: string;
+  fsName: string;
+  path: string;
+}