mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-16 06:22:59 +00:00
Handle NULL created column of api_tokens table
This commit is contained in:
@@ -12,7 +12,7 @@ require(["jquery", "jhapi", "moment"], function($, JHAPI, moment) {
|
|||||||
// convert ISO datestamps to nice momentjs ones
|
// convert ISO datestamps to nice momentjs ones
|
||||||
el = $(el);
|
el = $(el);
|
||||||
let m = moment(new Date(el.text().trim()));
|
let m = moment(new Date(el.text().trim()));
|
||||||
el.text(m.isValid() ? m.fromNow() : "Never");
|
el.text(m.isValid() ? m.fromNow() : el.text());
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#request-token-form").submit(function() {
|
$("#request-token-form").submit(function() {
|
||||||
|
@@ -73,7 +73,11 @@
|
|||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
</td>
|
</td>
|
||||||
<td class="time-col col-sm-3">
|
<td class="time-col col-sm-3">
|
||||||
|
{%- if token.created -%}
|
||||||
{{ token.created.isoformat() + 'Z' }}
|
{{ token.created.isoformat() + 'Z' }}
|
||||||
|
{%- else -%}
|
||||||
|
N/A
|
||||||
|
{%- endif -%}
|
||||||
</td>
|
</td>
|
||||||
<td class="col-sm-1 text-center">
|
<td class="col-sm-1 text-center">
|
||||||
<button class="revoke-token-btn btn btn-xs btn-danger">revoke</button>
|
<button class="revoke-token-btn btn btn-xs btn-danger">revoke</button>
|
||||||
@@ -118,7 +122,11 @@
|
|||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
</td>
|
</td>
|
||||||
<td class="time-col col-sm-3">
|
<td class="time-col col-sm-3">
|
||||||
|
{%- if client['created'] -%}
|
||||||
{{ client['created'].isoformat() + 'Z' }}
|
{{ client['created'].isoformat() + 'Z' }}
|
||||||
|
{%- else -%}
|
||||||
|
N/A
|
||||||
|
{%- endif -%}
|
||||||
</td>
|
</td>
|
||||||
<td class="col-sm-1 text-center">
|
<td class="col-sm-1 text-center">
|
||||||
<button class="revoke-token-btn btn btn-xs btn-danger">revoke</a>
|
<button class="revoke-token-btn btn btn-xs btn-danger">revoke</a>
|
||||||
|
Reference in New Issue
Block a user