1 import { Component, OnDestroy, OnInit } from '@angular/core';
2 import { ActivatedRoute } from '@angular/router';
4 import { I18n } from '@ngx-translate/i18n-polyfill';
6 import { CephReleaseNamePipe } from '../../../shared/pipes/ceph-release-name.pipe';
7 import { SummaryService } from '../../../shared/services/summary.service';
10 selector: 'cd-nfs-501',
11 templateUrl: './nfs-501.component.html',
12 styleUrls: ['./nfs-501.component.scss']
14 export class Nfs501Component implements OnInit, OnDestroy {
16 message = this.i18n('The NFS Ganesha service is not configured.');
17 routeParamsSubscribe: any;
20 private route: ActivatedRoute,
21 private summaryService: SummaryService,
22 private cephReleaseNamePipe: CephReleaseNamePipe,
27 const subs = this.summaryService.subscribe((summary: any) => {
32 const releaseName = this.cephReleaseNamePipe.transform(summary.version);
34 `http://docs.ceph.com/docs/${releaseName}/mgr/dashboard/` +
35 `#configuring-nfs-ganesha-in-the-dashboard`;
42 this.routeParamsSubscribe = this.route.params.subscribe((params: { message: string }) => {
43 this.message = params.message;
48 this.routeParamsSubscribe.unsubscribe();