Refactor: reverts unintentional changes
This commit is contained in:
@@ -363,7 +363,6 @@ func InitTestDB(t ITestDB) *SQLStore {
|
||||
|
||||
// set test db config
|
||||
testSQLStore.Cfg = setting.NewCfg()
|
||||
|
||||
sec, err := testSQLStore.Cfg.Raw.NewSection("database")
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create section: %s", err)
|
||||
|
||||
@@ -20,11 +20,6 @@ export async function getVariableQueryEditor<
|
||||
datasource: DataSourceApi<TQuery, TOptions>,
|
||||
importDataSourcePluginFunc = importDataSourcePlugin
|
||||
): Promise<VariableQueryEditorType> {
|
||||
if (hasLegacyVariableSupport(datasource)) {
|
||||
const dsPlugin = await importDataSourcePluginFunc(datasource.meta!);
|
||||
return dsPlugin.components.VariableQueryEditor ?? LegacyVariableQueryEditor;
|
||||
}
|
||||
|
||||
if (hasCustomVariableSupport(datasource)) {
|
||||
return datasource.variables.editor;
|
||||
}
|
||||
@@ -43,6 +38,11 @@ export async function getVariableQueryEditor<
|
||||
return StandardVariableQueryEditor;
|
||||
}
|
||||
|
||||
if (hasLegacyVariableSupport(datasource)) {
|
||||
const dsPlugin = await importDataSourcePluginFunc(datasource.meta!);
|
||||
return dsPlugin.components.VariableQueryEditor ?? LegacyVariableQueryEditor;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user