Merge pull request #25830 from rhcs-dashboard/grafana-500

mgr/dashboard: Fixes Grafana 500 error

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Ricardo Marques <rimarques@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
This commit is contained in:
Lenz Grimmer 2019-01-08 15:33:41 +01:00 committed by GitHub
commit 22947238f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,7 +65,6 @@ export class GrafanaComponent implements OnInit, OnChanges {
subs.unsubscribe();
}, 0);
});
this.settingsService.ifSettingConfigured('api/grafana/url', (url) => {
this.grafanaExist = true;
this.loading = false;
@ -92,17 +91,23 @@ export class GrafanaComponent implements OnInit, OnChanges {
} else {
this.modeText = 'Return to default';
}
this.getFrame();
if (this.grafanaExist) {
this.getFrame();
}
this.modeFlag = false;
}
reset() {
this.mode = '&kiosk';
this.modeText = 'Change time selection';
this.getFrame();
if (this.grafanaExist) {
this.getFrame();
}
}
ngOnChanges(changes) {
this.getFrame();
if (this.grafanaExist) {
this.getFrame();
}
}
}