grafana/public/app/features/plugins/state/selectors.ts
Ryan McKinley 3d89f04562
Plugins: show signing status on datasources and plugins (#23542)
* show signing status

* show signing status

* Progress on signed badge style

* Progress on signing status look and updated card background

* Updates

* Transforms card tweak

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-04-23 11:52:11 +02:00

12 lines
396 B
TypeScript

import { PluginsState } from 'app/types/plugins';
export const getPlugins = (state: PluginsState) => {
const regex = new RegExp(state.searchQuery, 'i');
return state.plugins.filter(item => {
return regex.test(item.name) || regex.test(item.info.author.name) || regex.test(item.info.description);
});
};
export const getPluginsSearchQuery = (state: PluginsState) => state.searchQuery;