Allow platform admins to change rate limit

One less thing we have to go into the database to do, and remember to
manually clear the cache for after.
This commit is contained in:
Chris Hill-Scott
2020-10-21 14:30:35 +01:00
parent 37187b5757
commit 43b4acf1f9
8 changed files with 89 additions and 3 deletions

View File

@@ -353,6 +353,11 @@
{% endcall %}
{{ edit_field('Change', url_for('.link_service_to_organisation', service_id=current_service.id), suffix='organisation for service') }}
{% endcall %}
{% call row() %}
{{ text_field('Rate limit')}}
{{ text_field('{:,} per minute'.format(current_service.rate_limit)) }}
{{ edit_field('Change', url_for('.set_rate_limit', service_id=current_service.id), suffix='rate limit') }}
{% endcall %}
{% call row() %}
{{ text_field('Message limit')}}
{{ text_field('{:,} per day'.format(current_service.message_limit)) }}

View File

@@ -0,0 +1,21 @@
{% extends "withnav_template.html" %}
{% from "components/page-header.html" import page_header %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/form.html" import form_wrapper %}
{% block service_page_title %}
Set rate limit
{% endblock %}
{% block maincolumn_content %}
{% call form_wrapper() %}
{{ page_header(
'Rate limit',
back_link=url_for('.service_settings', service_id=current_service.id)
) }}
{{ form.rate_limit }}
{{ page_footer('Save') }}
{% endcall %}
{% endblock %}