Skip to content

Commit 5be49cd

Browse files
authored
Merge pull request ceph#56939 from rhcs-dashboard/grafana-anonymous-disabled
mgr/dashboard: fix dashboard not visible on disabled anonymous access Reviewed-by: Aashish Sharma <[email protected]>
2 parents 8f4c22c + f802e99 commit 5be49cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pybind/mgr/dashboard/frontend/src/app/shared/components/grafana/grafana.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export class GrafanaComponent implements OnInit, OnChanges {
172172
getFrame() {
173173
this.settingsService
174174
.validateGrafanaDashboardUrl(this.uid)
175-
.subscribe((data: any) => (this.dashboardExist = data === 200));
175+
.subscribe((data: any) => (this.dashboardExist = data === 200 || data === 401)); // 401 because grafana API shows unauthorized when anonymous access is disabled
176176
if (this.type === 'metrics') {
177177
this.url = `${this.baseUrl}${this.uid}/${this.grafanaPath}&refresh=2s&var-datasource=${this.datasource}${this.mode}&${this.time}`;
178178
} else {

0 commit comments

Comments
 (0)