Dashboards: Fix home dashboard loading (#95376)

Dashboards: Fix home dashboard load
pull/95476/head
Alex Khomenko 9 months ago committed by GitHub
parent 0880329796
commit 16b9cf07f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      public/app/features/dashboard/containers/DashboardPageProxy.tsx

@ -43,10 +43,6 @@ function DashboardPageProxy(props: DashboardPageProxyProps) {
return stateManager.fetchDashboard({ route: props.route.routeName as DashboardRoutes, uid: params.uid ?? '' });
}, [params.uid, props.route.routeName]);
if (!config.featureToggles.dashboardSceneForViewers) {
return <DashboardPage {...props} params={params} location={location} />;
}
if (dashboard.loading) {
return null;
}
@ -55,6 +51,10 @@ function DashboardPageProxy(props: DashboardPageProxyProps) {
return null;
}
if (!config.featureToggles.dashboardSceneForViewers) {
return <DashboardPage {...props} params={params} location={location} />;
}
if (
dashboard.value &&
!(dashboard.value.meta?.canEdit || dashboard.value.meta?.canMakeEditable) &&

Loading…
Cancel
Save