diff --git a/public/app/features/alerting/unified/components/rule-editor/QueryWrapper.tsx b/public/app/features/alerting/unified/components/rule-editor/QueryWrapper.tsx index cb2d669533f..44e21107cf6 100644 --- a/public/app/features/alerting/unified/components/rule-editor/QueryWrapper.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/QueryWrapper.tsx @@ -71,6 +71,7 @@ export const QueryWrapper: FC = ({ return (
+ alerting dataSource={dsSettings} onChangeDataSource={!isExpression ? (settings) => onChangeDataSource(settings, index) : undefined} id={query.refId} diff --git a/public/app/features/query/components/QueryEditorRow.tsx b/public/app/features/query/components/QueryEditorRow.tsx index b378f14cbad..278dd1225ee 100644 --- a/public/app/features/query/components/QueryEditorRow.tsx +++ b/public/app/features/query/components/QueryEditorRow.tsx @@ -51,6 +51,7 @@ interface Props { app?: CoreApp; history?: Array>; eventBus?: EventBusExtended; + alerting?: boolean; } interface State { @@ -361,7 +362,7 @@ export class QueryEditorRow extends PureComponent { - const { query, dataSource, onChangeDataSource, onChange, queries, renderHeaderExtras } = this.props; + const { alerting, query, dataSource, onChangeDataSource, onChange, queries, renderHeaderExtras } = this.props; return ( extends PureComponent ); }; diff --git a/public/app/features/query/components/QueryEditorRowHeader.tsx b/public/app/features/query/components/QueryEditorRowHeader.tsx index 26b2bc701b8..13714dba70a 100644 --- a/public/app/features/query/components/QueryEditorRowHeader.tsx +++ b/public/app/features/query/components/QueryEditorRowHeader.tsx @@ -15,6 +15,7 @@ export interface Props { onChange: (query: TQuery) => void; onClick: (e: React.MouseEvent) => void; collapsedText: string | null; + alerting?: boolean; } export const QueryEditorRowHeader = (props: Props) => { @@ -130,7 +131,7 @@ const renderDataSource = ( props: Props, styles: ReturnType ): ReactNode => { - const { dataSource, onChangeDataSource } = props; + const { alerting, dataSource, onChangeDataSource } = props; if (!onChangeDataSource) { return ({dataSource.name}); @@ -138,7 +139,7 @@ const renderDataSource = ( return (
- +
); };