mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 00:55:47 -06:00
1d689888b0
* Updated package json but not updated source files * Update eslint plugin * updated files
12 lines
328 B
TypeScript
12 lines
328 B
TypeScript
import { ApiKeysState } from 'app/types';
|
|
|
|
export const getApiKeysCount = (state: ApiKeysState) => state.keys.length;
|
|
|
|
export const getApiKeys = (state: ApiKeysState) => {
|
|
const regex = RegExp(state.searchQuery, 'i');
|
|
|
|
return state.keys.filter((key) => {
|
|
return regex.test(key.name) || regex.test(key.role);
|
|
});
|
|
};
|