mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 02:23:31 -06:00
12 lines
433 B
TypeScript
12 lines
433 B
TypeScript
export const getDataSources = state => {
|
|
const regex = new RegExp(state.searchQuery, 'i');
|
|
|
|
return state.dataSources.filter(dataSource => {
|
|
return regex.test(dataSource.name) || regex.test(dataSource.database);
|
|
});
|
|
};
|
|
|
|
export const getDataSourcesSearchQuery = state => state.searchQuery;
|
|
export const getDataSourcesLayoutMode = state => state.layoutMode;
|
|
export const getDataSourcesCount = state => state.dataSourcesCount;
|