useAlertManagerSources.ts 293 B

1234567
  1. import { useMemo } from 'react';
  2. import { getAlertManagerDataSourcesByPermission } from '../utils/datasource';
  3. export function useAlertManagersByPermission(accessType: 'instance' | 'notification') {
  4. return useMemo(() => getAlertManagerDataSourcesByPermission(accessType), [accessType]);
  5. }