diff --git a/public/app/features/correlations/CorrelationsPage.tsx b/public/app/features/correlations/CorrelationsPage.tsx index 9f1904f07ae..57f2d08924e 100644 --- a/public/app/features/correlations/CorrelationsPage.tsx +++ b/public/app/features/correlations/CorrelationsPage.tsx @@ -162,7 +162,9 @@ export default function CorrelationsPage() { )} - {showEmptyListCTA && setIsAdding(true)} />} + {showEmptyListCTA && ( + setIsAdding(true)} /> + )} { // This error is not actionable, it'd be nice to have a recovery button diff --git a/public/app/features/correlations/components/EmptyCorrelationsCTA.tsx b/public/app/features/correlations/components/EmptyCorrelationsCTA.tsx index 56546672601..1228224ffc2 100644 --- a/public/app/features/correlations/components/EmptyCorrelationsCTA.tsx +++ b/public/app/features/correlations/components/EmptyCorrelationsCTA.tsx @@ -1,14 +1,16 @@ import React from 'react'; +import { Card } from '@grafana/ui'; import EmptyListCTA from 'app/core/components/EmptyListCTA/EmptyListCTA'; interface Props { onClick?: () => void; + canWriteCorrelations: boolean; } -export const EmptyCorrelationsCTA = ({ onClick }: Props) => { +export const EmptyCorrelationsCTA = ({ onClick, canWriteCorrelations }: Props) => { // TODO: if there are no datasources show a different message - return ( + return canWriteCorrelations ? ( { buttonTitle="Add correlation" proTip="you can also define correlations via datasource provisioning" /> + ) : ( + + There are no correlations configured yet. + Please contact your administrator to create new correlations. + ); };