mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
added admin icon and permission member definitions(role,team,user)
This commit is contained in:
parent
73eaba076e
commit
e037ef21f7
@ -13,9 +13,12 @@ export default class DisabledPermissionListItem extends Component<IProps, any> {
|
|||||||
return (
|
return (
|
||||||
<tr className="gf-form-disabled">
|
<tr className="gf-form-disabled">
|
||||||
<td style={{ width: '1%' }}>
|
<td style={{ width: '1%' }}>
|
||||||
<i className={`fa--permissions-list ${item.icon}`} />
|
<i style={{ width: '25px' }} className="gicon gicon-shield" />
|
||||||
|
</td>
|
||||||
|
<td style={{ width: '90%' }}>
|
||||||
|
{item.name}
|
||||||
|
<span className="filter-table__weak-italic"> (Role)</span>
|
||||||
</td>
|
</td>
|
||||||
<td style={{ width: '90%' }}>{item.name}</td>
|
|
||||||
<td />
|
<td />
|
||||||
<td className="query-keyword">Can</td>
|
<td className="query-keyword">Can</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -14,7 +14,17 @@ function ItemAvatar({ item }) {
|
|||||||
if (item.teamAvatarUrl) {
|
if (item.teamAvatarUrl) {
|
||||||
return <img className="filter-table__avatar" src={item.teamAvatarUrl} />;
|
return <img className="filter-table__avatar" src={item.teamAvatarUrl} />;
|
||||||
}
|
}
|
||||||
return <span className={item.icon} />;
|
return <span style={{ width: '25px' }} className={item.icon} />;
|
||||||
|
}
|
||||||
|
|
||||||
|
function ItemDescription({ item }) {
|
||||||
|
if (item.userId) {
|
||||||
|
return <span className="filter-table__weak-italic">(User)</span>;
|
||||||
|
}
|
||||||
|
if (item.teamId) {
|
||||||
|
return <span className="filter-table__weak-italic">(Team)</span>;
|
||||||
|
}
|
||||||
|
return <span className="filter-table__weak-italic">(Role)</span>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default observer(({ item, removeItem, permissionChanged, itemIndex, folderInfo }) => {
|
export default observer(({ item, removeItem, permissionChanged, itemIndex, folderInfo }) => {
|
||||||
@ -35,7 +45,9 @@ export default observer(({ item, removeItem, permissionChanged, itemIndex, folde
|
|||||||
<td style={{ width: '1%' }}>
|
<td style={{ width: '1%' }}>
|
||||||
<ItemAvatar item={item} />
|
<ItemAvatar item={item} />
|
||||||
</td>
|
</td>
|
||||||
<td style={{ width: '90%' }}>{item.name}</td>
|
<td style={{ width: '90%' }}>
|
||||||
|
{item.name} <ItemDescription item={item} />
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{item.inherited &&
|
{item.inherited &&
|
||||||
folderInfo && (
|
folderInfo && (
|
||||||
|
@ -85,3 +85,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.filter-table__weak-italic {
|
||||||
|
font-style: italic;
|
||||||
|
color: $text-color-weak;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user