Merge pull request #517 from alphagov/temp-event-view

Add events to temp history page for story sign off
This commit is contained in:
Adam Shimali
2016-04-28 10:52:22 +01:00
2 changed files with 27 additions and 1 deletions

View File

@@ -35,7 +35,8 @@ def temp_service_history(service_id):
data = service_api_client.get_service_history(service_id)['data']
return render_template('views/temp-history.html',
services=data['service_history'],
api_keys=data['api_key_history'])
api_keys=data['api_key_history'],
events=data['events'])
@main.route("/services/<service_id>/dashboard")

View File

@@ -79,4 +79,29 @@ History GOV.UK Notify
{% endcall %}
</div
<div class="grid-row">
{% call(item, row_number) list_table(
events,
caption="Events",
field_headings=['ID','Event type','User ID','IP Address','Event data']
)%}
{% call field() %}
{{item.id}}
{% endcall %}
{% call field() %}
{{item.event_type}}
{% endcall %}
{% call field() %}
{{item.data.user_id}}
{% endcall %}
{% call field() %}
{{item.data.ip_address}}
{% endcall %}
{% call field() %}
{{item.data}}
{% endcall %}
{% endcall %}
</div>
{% endblock %}