mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 01:23:32 -06:00
make getAll return array instead of object
This commit is contained in:
parent
df75fb0e6d
commit
3d45b5ba73
@ -144,7 +144,7 @@ export class Explore extends React.PureComponent<ExploreProps, ExploreState> {
|
||||
if (!datasourceSrv) {
|
||||
throw new Error('No datasource service passed as props.');
|
||||
}
|
||||
const datasources = Object['values'](datasourceSrv.getAll());
|
||||
const datasources = datasourceSrv.getAll();
|
||||
const exploreDatasources = datasources.map(ds => ({
|
||||
value: ds.name,
|
||||
label: ds.name,
|
||||
|
@ -74,7 +74,8 @@ export class DatasourceSrv {
|
||||
}
|
||||
|
||||
getAll() {
|
||||
return config.datasources;
|
||||
const { datasources } = config;
|
||||
return Object.keys(datasources).map(name => datasources[name]);
|
||||
}
|
||||
|
||||
getAnnotationSources() {
|
||||
|
Loading…
Reference in New Issue
Block a user