Submit
Path:
~
/
/
usr
/
share
/
grafana
/
public
/
app
/
features
/
api-keys
/
state
/
File Content:
selectors.ts
import { ApiKeysState } from 'app/types'; export const getApiKeysCount = (state: ApiKeysState) => state.includeExpired ? state.keysIncludingExpired.length : state.keys.length; export const getApiKeys = (state: ApiKeysState) => { const regex = RegExp(state.searchQuery, 'i'); const keysToFilter = state.includeExpired ? state.keysIncludingExpired : state.keys; return keysToFilter.filter((key) => { return regex.test(key.name) || regex.test(key.role); }); }; export const getIncludeExpired = (state: ApiKeysState) => state.includeExpired; export const getIncludeExpiredDisabled = (state: ApiKeysState) => state.keys.length === 0 && state.keysIncludingExpired.length > 0;
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
actions.ts
1475 bytes
0644
reducers.test.ts
1768 bytes
0644
reducers.ts
1569 bytes
0644
selectors.test.ts
4518 bytes
0644
selectors.ts
694 bytes
0644
N4ST4R_ID | Naxtarrr