import { useMemo } from 'react'; import { Tooltip, Icon, InteractiveTable, type CellProps, Column } from '@grafana/ui'; import { Trans } from 'app/core/internationalization'; import { LdapRole } from 'app/types'; interface Props { groups: LdapRole[]; } export const LdapUserGroups = ({ groups }: Props) => { const items = useMemo(() => groups, [groups]); const columns = useMemo>>( () => [ { id: 'groupDN', header: 'LDAP Group', }, { id: 'orgName', header: 'Organization', cell: (props: CellProps) => props.value && props.row.original.orgRole ? props.value : '', }, { id: 'orgRole', header: 'Role', cell: (props: CellProps) => props.value || ( <> No match{' '} ), }, ], [] ); return ( row.orgId + row.orgRole + row.groupDN} /> ); };