1 import { Component, OnInit, ViewChild } from '@angular/core';
3 import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
5 import { CephReleaseNamePipe } from '../../../shared/pipes/ceph-release-name.pipe';
6 import { SummaryService } from '../../../shared/services/summary.service';
7 import { AboutComponent } from '../about/about.component';
10 selector: 'cd-dashboard-help',
11 templateUrl: './dashboard-help.component.html',
12 styleUrls: ['./dashboard-help.component.scss']
14 export class DashboardHelpComponent implements OnInit {
15 @ViewChild('docsForm')
21 private summaryService: SummaryService,
22 private cephReleaseNamePipe: CephReleaseNamePipe,
23 private modalService: BsModalService
27 const subs = this.summaryService.subscribe((summary: any) => {
32 const releaseName = this.cephReleaseNamePipe.transform(summary.version);
33 this.docsUrl = `http://docs.ceph.com/docs/${releaseName}/mgr/dashboard/`;
42 this.modalRef = this.modalService.show(AboutComponent);
46 this.docsFormElement.nativeElement.submit();