文件操作 - LdapUserGroups.tsx
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/grafana/public/app/features/admin/ldap/LdapUserGroups.tsx
编辑文件内容
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<Props> = ({ groups, showAttributeMapping }) => { const items = showAttributeMapping ? groups : groups.filter(item => item.orgRole); return ( <div className="gf-form-group"> <div className="gf-form"> <table className="filter-table form-inline"> <thead> <tr> {showAttributeMapping && <th>LDAP Group</th>} <th> Organization <Tooltip placement="top" content="Only the first match for an Organization will be used" theme={'info'}> <span className="gf-form-help-icon"> <Icon name="info-circle" /> </span> </Tooltip> </th> <th>Role</th> </tr> </thead> <tbody> {items.map((group, index) => { return ( <tr key={`${group.orgId}-${index}`}> {showAttributeMapping && ( <> <td>{group.groupDN}</td> {!group.orgRole && ( <> <td /> <td> <span className="text-warning"> No match <Tooltip placement="top" content="No matching groups found" theme={'info'}> <span className="gf-form-help-icon"> <Icon name="info-circle" /> </span> </Tooltip> </span> </td> </> )} </> )} {group.orgName && ( <> <td>{group.orgName}</td> <td>{group.orgRole}</td> </> )} </tr> ); })} </tbody> </table> </div> </div> ); };
修改文件时间
将文件时间修改为当前时间的前一年
删除文件