mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 11:23:48 -05:00
Since this page is more than just your API keys, it should be named something else. Hopefully the word ‘integration’ will give non-techical users a clue that it’s possible to use Notify without doing the CSV dance.
54 lines
1.5 KiB
HTML
54 lines
1.5 KiB
HTML
{% extends "withnav_template.html" %}
|
||
{% from "components/table.html" import list_table, field, hidden_field_heading %}
|
||
{% from "components/api-key.html" import api_key %}
|
||
|
||
{% block page_title %}
|
||
API keys – GOV.UK Notify
|
||
{% endblock %}
|
||
|
||
{% block maincolumn_content %}
|
||
|
||
<div class="grid-row">
|
||
<div class="column-two-thirds">
|
||
<h1 class="heading-large">
|
||
API integration
|
||
</h1>
|
||
</div>
|
||
<div class="column-one-third">
|
||
<a href="{{ url_for('.create_api_key', service_id=current_service.id) }}" class="button align-with-heading">Create an API key</a>
|
||
</div>
|
||
</div>
|
||
|
||
{% call(item, row_number) list_table(
|
||
keys,
|
||
empty_message="You haven’t created any API keys yet",
|
||
caption="API keys",
|
||
caption_visible=false,
|
||
field_headings=['API keys', hidden_field_heading('Action')],
|
||
) %}
|
||
{% call field() %}
|
||
{{ item.name }}
|
||
{% endcall %}
|
||
{% if item.expiry_date %}
|
||
{% call field(align='right', status='default') %}
|
||
Revoked {{ item.expiry_date|format_datetime }}
|
||
{% endcall %}
|
||
{% else %}
|
||
{% call field(align='right', status='error') %}
|
||
<a href='{{ url_for('.revoke_api_key', service_id=current_service.id, key_id=item.id) }}'>Revoke</a>
|
||
{% endcall %}
|
||
{% endif %}
|
||
{% endcall %}
|
||
|
||
<div class="bottom-gutter">
|
||
{{ api_key(current_service.id, "Service ID", thing="service ID") }}
|
||
</div>
|
||
|
||
<p>
|
||
API usage is described in the
|
||
<a href="{{ url_for('.documentation', service_id=current_service.id) }}">
|
||
API documentation</a>.
|
||
</p>
|
||
|
||
{% endblock %}
|