blob: c1a594908c5bde942a4e40caeb73201e0e6c5274 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import { Directive, OnInit } from '@angular/core';
import { PrometheusService } from '~/app/shared/api/prometheus.service';
import { ListWithDetails } from '~/app/shared/classes/list-with-details.class';
@Directive()
// tslint:disable-next-line: directive-class-suffix
export class PrometheusListHelper extends ListWithDetails implements OnInit {
public isPrometheusConfigured = false;
public isAlertmanagerConfigured = false;
constructor(protected prometheusService: PrometheusService) {
super();
}
ngOnInit() {
this.prometheusService.ifAlertmanagerConfigured(() => {
this.isAlertmanagerConfigured = true;
});
this.prometheusService.ifPrometheusConfigured(() => {
this.isPrometheusConfigured = true;
});
}
}
|