mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-04-29 05:30:48 -04:00
This commit adds a placeholder page which, for now, just has links to the API keys page and links to the clients. There’s more stuff to come on this page, but this commit just does the reorganising so that it’s easier to review.
69 lines
2.0 KiB
HTML
69 lines
2.0 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 %}
|
||
{% from "components/page-footer.html" import page_footer %}
|
||
|
||
{% block page_title %}
|
||
API integration – GOV.UK Notify
|
||
{% endblock %}
|
||
|
||
{% block maincolumn_content %}
|
||
|
||
<div class="grid-row bottom-gutter-1-2">
|
||
<div class="column-two-thirds">
|
||
<h1 class="heading-large">
|
||
API keys
|
||
</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',
|
||
'Action'
|
||
],
|
||
field_headings_visible=False
|
||
) %}
|
||
{% call field() %}
|
||
<div class="file-list">
|
||
{{ item.name }}
|
||
<span class="file-list-hint">
|
||
{% if item.key_type == 'normal' %}
|
||
<span class="visually-hidden">Normal</span>
|
||
{% elif item.key_type == 'team' %}
|
||
Only sends to team members
|
||
{% elif item.key_type == 'test' %}
|
||
Simulates sending messages
|
||
{% endif %}
|
||
</span>
|
||
</div>
|
||
{% endcall %}
|
||
{% if item.expiry_date %}
|
||
{% call field(align='right') %}
|
||
Revoked {{ item.expiry_date|format_datetime_short }}
|
||
{% 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-2">
|
||
{{ api_key(current_service.id, "Service ID", thing="service ID") }}
|
||
</div>
|
||
|
||
{{ page_footer(
|
||
secondary_link=url_for('.api_integration', service_id=current_service.id),
|
||
secondary_link_text='Back to API integration'
|
||
) }}
|
||
|
||
{% endblock %}
|