added feature flag

This commit is contained in:
Beverly Nguyen
2025-04-10 12:35:04 -07:00
parent d8ca53e08b
commit 6dd44fdc2d
9 changed files with 72 additions and 44 deletions

View File

@@ -3,7 +3,7 @@
{% from "components/page-footer.html" import page_footer %}
{% from "components/page-header.html" import page_header %}
{% from "components/components/back-link/macro.njk" import usaBackLink %}
{% from 'components/ajax-block.html' import socket_block %}
{% block service_page_title %}
{{ "Message status" }}
{% endblock %}
@@ -11,20 +11,33 @@
{% block maincolumn_content %}
{{ page_header("Message status") }}
<div
data-socket-update="status"
data-resource="{{ updates_url }}"
data-key="status"
data-job-id="{{ job.id }}"
>
<div data-job-id="{{ job.id }}" data-feature="{{FEATURE_SOCKET_ENABLED}}">
{% if not job.finished_processing %}
<div
data-resource="{{ updates_url }}"
{% if FEATURE_SOCKET_ENABLED %}
data-socket-update="status"
{% else %}
data-module="update-content"
{% endif %}
data-key="status"
data-form=""
>
{% endif %}
{{ partials['status']|safe }}
{% if not job.finished_processing %}
</div>
{% endif %}
{% if not finished %}
<div
data-socket-update="counts"
data-job-id="{{ job.id }}"
data-resource="{{ updates_url }}"
{% if FEATURE_SOCKET_ENABLED %}
data-socket-update="counts"
{% else %}
data-module="update-content"
{% endif %}
data-key="counts"
data-form=""
>
{% endif %}
{{ partials['counts']|safe }}
@@ -37,9 +50,12 @@
</p>
{% if not job.processing_finished %}
<div
data-socket-update="notifications"
data-job-id="{{ job.id }}"
data-resource="{{ updates_url }}"
{% if FEATURE_SOCKET_ENABLED %}
data-socket-update="notifications"
{% else %}
data-module="update-content"
{% endif %}
data-key="notifications"
data-form=""
>
@@ -48,7 +64,6 @@
{% if not job.processing_finished %}
</div>
{% endif %}
<div> </div>
</div>
{% endblock %}