mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
DataSource: Default data source is no longer a persisted state but just the default data source for new panels (#45132)
* PanelEdit: Change the meaning of default data source to be just that the default for new panels * Added migration, and also migration for annotation datasource prop to data source refs * fix * Fixing tests * Fixes to annotation * Fixing unit test
This commit is contained in:
@@ -308,7 +308,7 @@ export class DatasourceSrv implements DataSourceService {
|
||||
return this.getList({ annotations: true, variables: true }).map((x) => {
|
||||
return {
|
||||
name: x.name,
|
||||
value: x.isDefault ? null : x.name,
|
||||
value: x.name,
|
||||
meta: x.meta,
|
||||
};
|
||||
});
|
||||
@@ -321,7 +321,7 @@ export class DatasourceSrv implements DataSourceService {
|
||||
return this.getList({ metrics: true, variables: !options?.skipVariables }).map((x) => {
|
||||
return {
|
||||
name: x.name,
|
||||
value: x.isDefault ? null : x.name,
|
||||
value: x.name,
|
||||
meta: x.meta,
|
||||
};
|
||||
});
|
||||
@@ -345,5 +345,3 @@ export function variableInterpolation(value: any[]) {
|
||||
export const getDatasourceSrv = (): DatasourceSrv => {
|
||||
return getDataSourceService() as DatasourceSrv;
|
||||
};
|
||||
|
||||
export default DatasourceSrv;
|
||||
|
||||
Reference in New Issue
Block a user