diff --git a/web/src/components/dashboards/perses/PersesWrapper.tsx b/web/src/components/dashboards/perses/PersesWrapper.tsx index 6371d873..42639dda 100644 --- a/web/src/components/dashboards/perses/PersesWrapper.tsx +++ b/web/src/components/dashboards/perses/PersesWrapper.tsx @@ -195,7 +195,8 @@ function InnerWrapper({ children, project, dashboardName }) { > { const { t } = useTranslation(process.env.I18N_NAMESPACE); @@ -54,12 +58,16 @@ const DashboardSkeleton: React.FC = React.memo( const { perspective } = usePerspective(); const { setDashboard } = useDashboardActions(); + const variables = useVariableDefinitions(); const onChangeBoard = (selectedDashboard: string) => { changeBoard(selectedDashboard); if (isPerses) { - const selectedBoard = boardItems.find((item) => item.name === selectedDashboard); + const selectedBoard = boardItems.find( + (item) => item.name.toLowerCase() === selectedDashboard.toLowerCase(), + ); + if (selectedBoard) { setDashboard(selectedBoard.persesDashboard); } @@ -86,10 +94,12 @@ const DashboardSkeleton: React.FC = React.memo( )} {isPerses ? ( - - {t('Dashboard Variables')} - - + variables.length > 0 ? ( + + {t('Dashboard Variables')} + + + ) : null ) : (