]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/dashboard-help/dashboard-help.component.ts
import quincy beta 17.1.0
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / core / navigation / dashboard-help / dashboard-help.component.ts
CommitLineData
b3b6e05e 1import { Component, OnInit } from '@angular/core';
11fdf7f2 2
f67539c2 3import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
11fdf7f2 4
20effc67 5import { FeedbackComponent } from '~/app/ceph/shared/feedback/feedback.component';
f67539c2
TL
6import { Icons } from '~/app/shared/enum/icons.enum';
7import { DocService } from '~/app/shared/services/doc.service';
8import { ModalService } from '~/app/shared/services/modal.service';
11fdf7f2
TL
9import { AboutComponent } from '../about/about.component';
10
11@Component({
12 selector: 'cd-dashboard-help',
13 templateUrl: './dashboard-help.component.html',
14 styleUrls: ['./dashboard-help.component.scss']
15})
16export class DashboardHelpComponent implements OnInit {
11fdf7f2 17 docsUrl: string;
f67539c2 18 modalRef: NgbModalRef;
9f95a23c 19 icons = Icons;
20effc67 20 bsModalRef: NgbModalRef;
11fdf7f2 21
f67539c2 22 constructor(private modalService: ModalService, private docService: DocService) {}
11fdf7f2
TL
23
24 ngOnInit() {
f6b5b4d7
TL
25 this.docService.subscribeOnce('dashboard', (url: string) => {
26 this.docsUrl = url;
11fdf7f2
TL
27 });
28 }
29
30 openAboutModal() {
f67539c2 31 this.modalRef = this.modalService.show(AboutComponent, null, { size: 'lg' });
11fdf7f2 32 }
20effc67
TL
33
34 openFeedbackModal() {
35 this.bsModalRef = this.modalService.show(FeedbackComponent, null, { size: 'lg' });
36 }
11fdf7f2 37}