diff --git a/app/templates/views/api-keys.html b/app/templates/views/api-keys.html index eca7175cf..4fa1267c4 100644 --- a/app/templates/views/api-keys.html +++ b/app/templates/views/api-keys.html @@ -1,5 +1,6 @@ {% 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 @@ -7,13 +8,24 @@ {% block maincolumn_content %} -

- API keys -

+
+
+

+ API keys +

+
+
+ Create new API key +
+

- To connect to the API you will need to create an API Key. Each service can have multiple API Keys to allow - for test and live environments. + To connect to the API you need to create an API Key. +

+

+ Each service can have multiple API Keys. This allows you to integrate a + number of systems, each with its own key. You can also have separate + keys for your development and test environments.

@@ -22,17 +34,11 @@ developer documentation.

-

- Service ID -

-

- {{ current_service.id }} -

- {% 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=['Key name', hidden_field_heading('Action')] ) %} {% call field() %} @@ -49,8 +55,6 @@ {% endif %} {% endcall %} - + {{ api_key(current_service.id, "Service ID", thing="service ID") }} {% endblock %} diff --git a/tests/app/main/views/test_api_keys.py b/tests/app/main/views/test_api_keys.py index a21905246..70ad47196 100644 --- a/tests/app/main/views/test_api_keys.py +++ b/tests/app/main/views/test_api_keys.py @@ -34,7 +34,7 @@ def test_should_show_empty_api_keys_page(app_, assert response.status_code == 200 assert 'You haven’t created any API keys yet' in response.get_data(as_text=True) - assert 'Create a new API key' in response.get_data(as_text=True) + assert 'Create new API key' in response.get_data(as_text=True) mock_get_no_api_keys.assert_called_once_with(service_id=service_id)