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.orgName && group.orgRole ? : ) : ( )} ); })}
LDAP Group Organization Role
{group.groupDN}{group.orgName}} {group.orgRole ? ( {group.orgRole} No match
); };