When the anonymous access is disabled, the dashboards will have a
password so the verification error code can be 401 (Unauthorized)
Fixes: https://tracker.ceph.com/issues/65534
Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit
f802e99c1e743675bc9b4d8c6d3399879391135f)
getFrame() {
this.settingsService
.validateGrafanaDashboardUrl(this.uid)
- .subscribe((data: any) => (this.dashboardExist = data === 200));
+ .subscribe((data: any) => (this.dashboardExist = data === 200 || data === 401)); // 401 because grafana API shows unauthorized when anonymous access is disabled
if (this.type === 'metrics') {
this.url = `${this.baseUrl}${this.uid}/${this.grafanaPath}&refresh=2s&var-datasource=${this.datasource}${this.mode}&${this.time}`;
} else {