]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/dashboard-help/dashboard-help.component.ts
bump version to 15.2.11-pve1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / core / navigation / dashboard-help / dashboard-help.component.ts
CommitLineData
11fdf7f2
TL
1import { Component, OnInit, ViewChild } from '@angular/core';
2
3import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
4
9f95a23c 5import { Icons } from '../../../shared/enum/icons.enum';
f6b5b4d7 6import { DocService } from '../../../shared/services/doc.service';
11fdf7f2
TL
7import { AboutComponent } from '../about/about.component';
8
9@Component({
10 selector: 'cd-dashboard-help',
11 templateUrl: './dashboard-help.component.html',
12 styleUrls: ['./dashboard-help.component.scss']
13})
14export class DashboardHelpComponent implements OnInit {
9f95a23c
TL
15 @ViewChild('docsForm', { static: true })
16 docsFormElement: any;
11fdf7f2
TL
17 docsUrl: string;
18 modalRef: BsModalRef;
9f95a23c 19 icons = Icons;
11fdf7f2 20
adb31ebb 21 constructor(private modalService: BsModalService, private docService: DocService) {}
11fdf7f2
TL
22
23 ngOnInit() {
f6b5b4d7
TL
24 this.docService.subscribeOnce('dashboard', (url: string) => {
25 this.docsUrl = url;
11fdf7f2
TL
26 });
27 }
28
29 openAboutModal() {
30 this.modalRef = this.modalService.show(AboutComponent);
9f95a23c 31 this.modalRef.setClass('modal-lg');
11fdf7f2
TL
32 }
33
34 goToApiDocs() {
11fdf7f2
TL
35 this.docsFormElement.nativeElement.submit();
36 }
37}