]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/blob
94c263de10d8d24b46b8da4da725be8a320161fb
[ceph-ci.git] /
1 import { Component, OnInit, ViewChild } from '@angular/core';
2 import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
3 import { BaseModal } from 'carbon-components-angular';
4
5 @Component({
6   selector: 'cd-cephfs-mount-details',
7   templateUrl: './cephfs-mount-details.component.html',
8   styleUrls: ['./cephfs-mount-details.component.scss']
9 })
10 export class CephfsMountDetailsComponent extends BaseModal implements OnInit {
11   @ViewChild('mountDetailsTpl', { static: true })
12   mountDetailsTpl: any;
13   onCancel?: Function;
14   private MOUNT_DIRECTORY = '<MOUNT_DIRECTORY>';
15   mountData!: Record<string, any>;
16   constructor(public activeModal: NgbActiveModal) {
17     super();
18   }
19   mount!: string;
20   fuse!: string;
21   nfs!: string;
22
23   ngOnInit(): void {
24     this.mount = `sudo mount -t ceph <CLIENT_USER>@${this.mountData?.fsId}.${this.mountData?.fsName}=${this.mountData?.rootPath} ${this.MOUNT_DIRECTORY}`;
25     this.fuse = `sudo ceph-fuse  ${this.MOUNT_DIRECTORY} -r ${this.mountData?.rootPath} --client_mds_namespace=${this.mountData?.fsName}`;
26     this.nfs = `sudo mount -t nfs -o port=<PORT> <IP of active_nfs daemon>:<export_name> ${this.MOUNT_DIRECTORY}`;
27   }
28
29   cancel() {
30     this.closeModal();
31   }
32 }