|
|
|
@ -24,7 +24,7 @@ import { |
|
|
|
|
instanceSettings as expressionInstanceSettings, |
|
|
|
|
} from 'app/features/expressions/ExpressionDatasource'; |
|
|
|
|
|
|
|
|
|
import { DataSourceVariableModel } from '../variables/types'; |
|
|
|
|
import { isDataSource } from '../variables/guard'; |
|
|
|
|
|
|
|
|
|
import { importDataSourcePlugin } from './plugin_loader'; |
|
|
|
|
|
|
|
|
@ -245,11 +245,12 @@ export class DatasourceSrv implements DataSourceService { |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
if (filters.variables) { |
|
|
|
|
for (const variable of this.templateSrv.getVariables().filter((variable) => variable.type === 'datasource')) { |
|
|
|
|
const dsVar = variable as DataSourceVariableModel; |
|
|
|
|
const first = dsVar.current.value === 'default' ? this.defaultName : dsVar.current.value; |
|
|
|
|
const dsName = first as unknown as string; |
|
|
|
|
const dsSettings = this.settingsMapByName[dsName]; |
|
|
|
|
for (const variable of this.templateSrv.getVariables()) { |
|
|
|
|
if (!isDataSource(variable) || variable.multi || variable.includeAll) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
const dsName = variable.current.value === 'default' ? this.defaultName : variable.current.value; |
|
|
|
|
const dsSettings = !Array.isArray(dsName) && this.settingsMapByName[dsName]; |
|
|
|
|
|
|
|
|
|
if (dsSettings) { |
|
|
|
|
const key = `$\{${variable.name}\}`; |
|
|
|
|