]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/prometheus-list-helper.ts
buildsys: change download over to reef release
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / cluster / prometheus / prometheus-list-helper.ts
1 import { Directive, OnInit } from '@angular/core';
2
3 import { PrometheusService } from '~/app/shared/api/prometheus.service';
4 import { ListWithDetails } from '~/app/shared/classes/list-with-details.class';
5
6 @Directive()
7 // tslint:disable-next-line: directive-class-suffix
8 export class PrometheusListHelper extends ListWithDetails implements OnInit {
9 public isPrometheusConfigured = false;
10 public isAlertmanagerConfigured = false;
11
12 constructor(protected prometheusService: PrometheusService) {
13 super();
14 }
15
16 ngOnInit() {
17 this.prometheusService.ifAlertmanagerConfigured(() => {
18 this.isAlertmanagerConfigured = true;
19 });
20 this.prometheusService.ifPrometheusConfigured(() => {
21 this.isPrometheusConfigured = true;
22 });
23 }
24 }