Files
notifications-admin/app/templates/views/api-keys.html

69 lines
1.9 KiB
HTML
Raw Normal View History

2015-12-14 16:53:07 +00:00
{% 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 %}
2015-12-14 16:53:07 +00:00
{% 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">
2016-04-29 14:17:34 +01:00
<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 havent created any API keys yet",
caption="API keys",
caption_visible=false,
field_headings=[
'API keys',
hidden_field_heading('Action')
],
) %}
{% 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') %}
2016-07-07 09:06:07 +01:00
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 %}
2016-04-29 14:17:34 +01:00
<div class="bottom-gutter">
{{ api_key(current_service.id, "Service ID", thing="service ID") }}
</div>
<h2 class="heading-small">Documentation</h2>
2016-04-29 14:17:34 +01:00
<p>
See the
<a href="{{ url_for('.documentation') }}">
API documentation</a> for clients and specfications.
2016-04-29 14:17:34 +01:00
</p>
{% endblock %}