import React, { FC } from 'react'; import { Tooltip, Icon } from '@grafana/ui'; import { LdapRole } from 'app/types'; interface Props { groups: LdapRole[]; showAttributeMapping?: boolean; } export const LdapUserGroups: FC = ({ groups, showAttributeMapping }) => { const items = showAttributeMapping ? groups : groups.filter(item => item.orgRole); return (
{showAttributeMapping && } {items.map((group, index) => { return ( {showAttributeMapping && ( <> {!group.orgRole && ( <> )} )} {group.orgName && ( <> )} ); })}
LDAP Group Organization Role
{group.groupDN} No match {group.orgName} {group.orgRole}
); };