Commit 7b5decdb by Hugo Häggmark Committed by GitHub

Azure: Fixes cancellation of requests with different Azure sources (#28180)

* Azure: Fixes cancellation of requests whit different Azure query types

* Azure: Fixes cancellation of requests whit different Azure query types
parent 83a6a514
...@@ -2,16 +2,16 @@ import _ from 'lodash'; ...@@ -2,16 +2,16 @@ import _ from 'lodash';
import AzureMonitorDatasource from './azure_monitor/azure_monitor_datasource'; import AzureMonitorDatasource from './azure_monitor/azure_monitor_datasource';
import AppInsightsDatasource from './app_insights/app_insights_datasource'; import AppInsightsDatasource from './app_insights/app_insights_datasource';
import AzureLogAnalyticsDatasource from './azure_log_analytics/azure_log_analytics_datasource'; import AzureLogAnalyticsDatasource from './azure_log_analytics/azure_log_analytics_datasource';
import { AzureMonitorQuery, AzureDataSourceJsonData, AzureQueryType, InsightsAnalyticsQuery } from './types'; import { AzureDataSourceJsonData, AzureMonitorQuery, AzureQueryType, InsightsAnalyticsQuery } from './types';
import { import {
DataSourceApi,
DataQueryRequest, DataQueryRequest,
DataSourceInstanceSettings,
DataQueryResponseData, DataQueryResponseData,
DataSourceApi,
DataSourceInstanceSettings,
LoadingState, LoadingState,
ScopedVars, ScopedVars,
} from '@grafana/data'; } from '@grafana/data';
import { Observable, of, from } from 'rxjs'; import { from, Observable, of } from 'rxjs';
import { DataSourceWithBackend } from '@grafana/runtime'; import { DataSourceWithBackend } from '@grafana/runtime';
import InsightsAnalyticsDatasource from './insights_analytics/insights_analytics_datasource'; import InsightsAnalyticsDatasource from './insights_analytics/insights_analytics_datasource';
import { migrateMetricsDimensionFilters } from './query_ctrl'; import { migrateMetricsDimensionFilters } from './query_ctrl';
...@@ -82,6 +82,7 @@ export default class Datasource extends DataSourceApi<AzureMonitorQuery, AzureDa ...@@ -82,6 +82,7 @@ export default class Datasource extends DataSourceApi<AzureMonitorQuery, AzureDa
let q = byType[target.queryType]; let q = byType[target.queryType];
if (!q) { if (!q) {
q = _.cloneDeep(options); q = _.cloneDeep(options);
q.requestId = `${q.requestId}-${target.refId}`;
q.targets = []; q.targets = [];
byType[target.queryType] = q; byType[target.queryType] = q;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment