mirror of
https://github.com/grafana/grafana.git
synced 2026-09-05 04:40:13 -05:00
API Keys: Add revocation for SATs (#53896)
* add apikey is_revoked field * add token store tests * Apply suggestions from code review * remove unused fields
This commit is contained in:
@@ -25,18 +25,22 @@ export const ServiceAccountTokensTable = ({ tokens, timeZone, tokenActionsDisabl
|
||||
<th>Created</th>
|
||||
<th>Last used at</th>
|
||||
<th />
|
||||
<th />
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{tokens.map((key) => {
|
||||
return (
|
||||
<tr key={key.id} className={styles.tableRow(key.hasExpired)}>
|
||||
<tr key={key.id} className={styles.tableRow(key.hasExpired || key.isRevoked)}>
|
||||
<td>{key.name}</td>
|
||||
<td>
|
||||
<TokenExpiration timeZone={timeZone} token={key} />
|
||||
</td>
|
||||
<td>{formatDate(timeZone, key.created)}</td>
|
||||
<td>{formatLastUsedAtDate(timeZone, key.lastUsedAt)}</td>
|
||||
<td className="width-1 text-center">
|
||||
{key.isRevoked && <span className="label label-tag label-tag--gray">Revoked</span>}
|
||||
</td>
|
||||
<td>
|
||||
<DeleteButton
|
||||
aria-label={`Delete service account token ${key.name}`}
|
||||
|
||||
Reference in New Issue
Block a user