1 import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
2 import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
5 selector: 'cd-cephfs-mount-details',
6 templateUrl: './cephfs-mount-details.component.html',
7 styleUrls: ['./cephfs-mount-details.component.scss']
9 export class CephfsMountDetailsComponent implements OnInit, OnDestroy {
10 @ViewChild('mountDetailsTpl', { static: true })
13 private canceled = false;
14 private MOUNT_DIRECTORY = '<MOUNT_DIRECTORY>';
15 mountData!: Record<string, any>;
16 constructor(public activeModal: NgbActiveModal) {}
22 this.mount = `sudo mount -t ceph <CLIENT_USER>@${this.mountData?.fsId}.${this.mountData?.fsName}=${this.mountData?.rootPath} ${this.MOUNT_DIRECTORY}`;
23 this.fuse = `sudo ceph-fuse ${this.MOUNT_DIRECTORY} -r ${this.mountData?.rootPath} --client_mds_namespace=${this.mountData?.fsName}`;
24 this.nfs = `sudo mount -t nfs -o port=<PORT> <IP of active_nfs daemon>:<export_name> ${this.MOUNT_DIRECTORY}`;
28 if (this.onCancel && this.canceled) {
35 this.activeModal.close();