Add names to API tokens.
This commit is contained in:
@@ -275,9 +275,12 @@ if ($user_data) { ?>
|
||||
<form method="POST" action="/api/v1/user/apitoken/">
|
||||
<input type="hidden" name="user_uuid" value="<?php echo $user_uuid ?>">
|
||||
<input type="hidden" name="_return" value="/userprofile/">
|
||||
<button type="submit" href="#" class="btn btn-primary">
|
||||
<i class="fa-solid fa-plus"></i> <?php echo __('generate_new_api_token') ?>
|
||||
</button>
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" name="api_token_name" class="form-control" placeholder="API Token name..." aria-label="API Token name..." aria-describedby="button-addon2">
|
||||
<button type="submit" href="#" class="btn btn-success">
|
||||
<i class="fa-solid fa-plus"></i> <?php echo __('generate_new_api_token') ?>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<?php } ?>
|
||||
</div>
|
||||
@@ -286,6 +289,7 @@ if ($user_data) { ?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Token id</th>
|
||||
<th>Token Name</th>
|
||||
<th>Expiration</th>
|
||||
<th>Created</th>
|
||||
<th>Last used</th>
|
||||
@@ -300,11 +304,12 @@ if ($user_data) { ?>
|
||||
<div class="text-truncate" style="max-width: 200px;" id="<?php echo $token_data['api_token_uuid'] ?>" data-copy-data="<?php echo $token_data['api_token_uuid']; ?>">
|
||||
<?php echo $token_data['api_token_uuid']; ?>
|
||||
</div>
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary" data-copy-target="<?php echo $token_data['api_token_uuid'] ?>" title="Copy Token">
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary" data-copy-target="<?php echo $token_data['api_token_uuid'] ?>" title="Copy ID">
|
||||
<i class="fa-solid fa-copy"></i>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
<td><?php echo $token_data['api_token_name'] ?></td>
|
||||
<td><?php showTime($token_data['api_token_expiration_timestamp']) ?></td>
|
||||
<td><?php showTime($token_data['api_token_created_timestamp']) ?></td>
|
||||
<td><?php showTime($token_data['api_token_last_used_timestamp']) ?></td>
|
||||
|
||||
Reference in New Issue
Block a user