mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
clean up
This commit is contained in:
@@ -103,12 +103,8 @@ def view_job_csv(service_id, job_id):
|
|||||||
@user_has_permissions("send_messages")
|
@user_has_permissions("send_messages")
|
||||||
def cancel_job(service_id, job_id):
|
def cancel_job(service_id, job_id):
|
||||||
Job.from_id(job_id, service_id=service_id).cancel()
|
Job.from_id(job_id, service_id=service_id).cancel()
|
||||||
|
|
||||||
return redirect(url_for("main.service_dashboard", service_id=service_id))
|
return redirect(url_for("main.service_dashboard", service_id=service_id))
|
||||||
|
|
||||||
# //this is the resource that gets updated by being passed to ajax via updates_url to data-resource
|
|
||||||
# and everything that is within get_job_partials is the html that gets updated
|
|
||||||
|
|
||||||
|
|
||||||
@main.route("/services/<uuid:service_id>/jobs/<uuid:job_id>.json")
|
@main.route("/services/<uuid:service_id>/jobs/<uuid:job_id>.json")
|
||||||
@user_has_permissions()
|
@user_has_permissions()
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ from app.extensions import redis_client
|
|||||||
from app.notify_client import NotifyAdminAPIClient, _attach_current_user, cache
|
from app.notify_client import NotifyAdminAPIClient, _attach_current_user, cache
|
||||||
from app.utils.csv import get_user_preferred_timezone
|
from app.utils.csv import get_user_preferred_timezone
|
||||||
|
|
||||||
# from app.main.views.jobs import emit_job_update
|
|
||||||
|
|
||||||
|
|
||||||
class JobApiClient(NotifyAdminAPIClient):
|
class JobApiClient(NotifyAdminAPIClient):
|
||||||
JOB_STATUSES = {
|
JOB_STATUSES = {
|
||||||
|
|||||||
@@ -12,17 +12,3 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro socket_block(partials, job_id, key, finished=False, form='') %}
|
|
||||||
{% if not finished %}
|
|
||||||
<div
|
|
||||||
data-module="live-content"
|
|
||||||
data-key="{{ key }}"
|
|
||||||
data-room="job-{{ job_id }}"
|
|
||||||
>
|
|
||||||
{% endif %}
|
|
||||||
{{ partials[key]|safe }}
|
|
||||||
{% if not finished %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% endmacro %}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user