mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-08 10:28:57 -04:00
The default is 2 seconds and this will mean that we are halving traffic for these ajax calls which can only be good for trying to limit queries on the database. I think the user impact on this will likely not be noticable. Debatable whether we should up them all even further to 10 seconds but this is definitely a quick although maybe small win.
17 lines
419 B
HTML
17 lines
419 B
HTML
{% macro ajax_block(partials, url, key, interval=5, finished=False, form='') %}
|
|
{% if not finished %}
|
|
<div
|
|
data-module="update-content"
|
|
data-resource="{{ url }}"
|
|
data-key="{{ key }}"
|
|
data-interval-seconds="{{ interval }}"
|
|
data-form="{{ form }}"
|
|
aria-live="polite"
|
|
>
|
|
{% endif %}
|
|
{{ partials[key]|safe }}
|
|
{% if not finished %}
|
|
</div>
|
|
{% endif %}
|
|
{% endmacro %}
|