grafana/public/app/features/admin/ldap/LdapUserMappingInfo.tsx
Josh Hunt 3c6e0e8ef8
Chore: ESlint import order (#44959)
* Add and configure eslint-plugin-import

* Fix the lint:ts npm command

* Autofix + prettier all the files

* Manually fix remaining files

* Move jquery code in jest-setup to external file to safely reorder imports

* Resolve issue caused by circular dependencies within Prometheus

* Update .betterer.results

* Fix missing // @ts-ignore

* ignore iconBundle.ts

* Fix missing // @ts-ignore
2022-04-22 14:33:13 +01:00

48 lines
1.4 KiB
TypeScript

import React, { FC } from 'react';
import { LdapUserInfo } from 'app/types';
interface Props {
info: LdapUserInfo;
showAttributeMapping?: boolean;
}
export const LdapUserMappingInfo: FC<Props> = ({ info, showAttributeMapping }) => {
return (
<div className="gf-form-group">
<div className="gf-form">
<table className="filter-table form-inline">
<thead>
<tr>
<th colSpan={2}>User information</th>
{showAttributeMapping && <th>LDAP attribute</th>}
</tr>
</thead>
<tbody>
<tr>
<td className="width-16">First name</td>
<td>{info.name.ldapValue}</td>
{showAttributeMapping && <td>{info.name.cfgAttrValue}</td>}
</tr>
<tr>
<td className="width-16">Surname</td>
<td>{info.surname.ldapValue}</td>
{showAttributeMapping && <td>{info.surname.cfgAttrValue}</td>}
</tr>
<tr>
<td className="width-16">Username</td>
<td>{info.login.ldapValue}</td>
{showAttributeMapping && <td>{info.login.cfgAttrValue}</td>}
</tr>
<tr>
<td className="width-16">Email</td>
<td>{info.email.ldapValue}</td>
{showAttributeMapping && <td>{info.email.cfgAttrValue}</td>}
</tr>
</tbody>
</table>
</div>
</div>
);
};