]> git.apps.os.sepia.ceph.com Git - ceph.git/blob
30bf6f8efc0c6f9ec78d308af7ee012cba08c40c
[ceph.git] /
1 import { Component, OnInit } from '@angular/core';
2
3 import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
4
5 import { Icons } from '~/app/shared/enum/icons.enum';
6 import { DocService } from '~/app/shared/services/doc.service';
7
8 import { AboutComponent } from '../about/about.component';
9 import { ModalCdsService } from '~/app/shared/services/modal-cds.service';
10 import { FeedbackComponent } from '~/app/ceph/shared/feedback/feedback.component';
11 import { ModalService } from '~/app/shared/services/modal.service';
12
13 @Component({
14   selector: 'cd-dashboard-help',
15   templateUrl: './dashboard-help.component.html',
16   styleUrls: ['./dashboard-help.component.scss']
17 })
18 export class DashboardHelpComponent implements OnInit {
19   docsUrl: string;
20   icons = Icons;
21   bsModalRef: NgbModalRef;
22
23   constructor(
24     private docService: DocService,
25     private modalCdsService: ModalCdsService,
26     private modalService: ModalService
27   ) {}
28
29   ngOnInit() {
30     this.docService.subscribeOnce('dashboard', (url: string) => {
31       this.docsUrl = url;
32     });
33   }
34
35   openAboutModal() {
36     this.modalCdsService.show(AboutComponent);
37   }
38
39   openFeedbackModal() {
40     this.bsModalRef = this.modalService.show(FeedbackComponent, null, { size: 'lg' });
41   }
42 }