]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/blob
10adf680618bcf42e9ed6624223306215992f00e
[ceph-ci.git] /
1 import { Component, OnInit } from '@angular/core';
2
3 import { CephReleaseNamePipe } from '../../../shared/pipes/ceph-release-name.pipe';
4 import { SummaryService } from '../../../shared/services/summary.service';
5
6 @Component({
7   selector: 'cd-dashboard-help',
8   templateUrl: './dashboard-help.component.html',
9   styleUrls: ['./dashboard-help.component.scss']
10 })
11 export class DashboardHelpComponent implements OnInit {
12
13   docsUrl: string;
14
15   constructor(private summaryService: SummaryService,
16               private cephReleaseNamePipe: CephReleaseNamePipe) {}
17
18   ngOnInit() {
19     const subs = this.summaryService.summaryData$.subscribe((summary: any) => {
20       const releaseName = this.cephReleaseNamePipe.transform(summary.version);
21       this.docsUrl = `http://docs.ceph.com/docs/${releaseName}/mgr/dashboard/`;
22       subs.unsubscribe();
23     });
24   }
25 }