mirror of
https://github.com/grafana/grafana.git
synced 2026-09-05 04:40:13 -05:00
Service Accounts: Add enabled/disabled status to list (#46259)
* ServiceAccounts: improve where condition * ServiceAccounts: Add Enabled/Disabled status to list
This commit is contained in:
@@ -113,6 +113,7 @@ const ServiceAccountsListPage = ({
|
||||
<th>Display name</th>
|
||||
<th>ID</th>
|
||||
<th>Roles</th>
|
||||
<th>Status</th>
|
||||
<th>Tokens</th>
|
||||
<th style={{ width: '34px' }} />
|
||||
</tr>
|
||||
@@ -174,6 +175,9 @@ type ServiceAccountListItemProps = {
|
||||
const getServiceAccountsAriaLabel = (name: string) => {
|
||||
return `Edit service account's ${name} details`;
|
||||
};
|
||||
const getServiceAccountsEnabledStatus = (disabled: boolean) => {
|
||||
return disabled ? 'Disabled' : 'Enabled';
|
||||
};
|
||||
|
||||
const ServiceAccountListItem = memo(
|
||||
({ serviceAccount, onRoleChange, roleOptions, builtInRoles, onSetToRemove }: ServiceAccountListItemProps) => {
|
||||
@@ -237,7 +241,17 @@ const ServiceAccountListItem = memo(
|
||||
<a
|
||||
className="ellipsis"
|
||||
href={editUrl}
|
||||
title="tokens"
|
||||
title={getServiceAccountsEnabledStatus(serviceAccount.isDisabled)}
|
||||
aria-label={getServiceAccountsAriaLabel(serviceAccount.name)}
|
||||
>
|
||||
{getServiceAccountsEnabledStatus(serviceAccount.isDisabled)}
|
||||
</a>
|
||||
</td>
|
||||
<td className="link-td max-width-10">
|
||||
<a
|
||||
className="ellipsis"
|
||||
href={editUrl}
|
||||
title="Tokens"
|
||||
aria-label={getServiceAccountsAriaLabel(serviceAccount.name)}
|
||||
>
|
||||
<span>
|
||||
|
||||
Reference in New Issue
Block a user