mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-21 13:43:14 -04:00
Merge pull request #2984 from GSA/remove-socketio
Remove Socket.IO dependencies and Socket infrastructure
This commit is contained in:
@@ -143,7 +143,6 @@ navigation = {
|
||||
def _csp(config):
|
||||
asset_domain = config["ASSET_DOMAIN"]
|
||||
api_public_url = config["API_PUBLIC_URL"]
|
||||
api_public_ws_url = config["API_PUBLIC_WS_URL"]
|
||||
|
||||
return {
|
||||
"default-src": ["'self'", asset_domain],
|
||||
@@ -162,7 +161,6 @@ def _csp(config):
|
||||
"https://www.googletagmanager.com",
|
||||
"https://www.google-analytics.com",
|
||||
"https://dap.digitalgov.gov",
|
||||
"https://cdn.socket.io",
|
||||
],
|
||||
"connect-src": list(
|
||||
dict.fromkeys(
|
||||
@@ -171,7 +169,6 @@ def _csp(config):
|
||||
"https://gov-bam.nr-data.net",
|
||||
"https://www.google-analytics.com",
|
||||
f"{api_public_url}",
|
||||
f"{api_public_ws_url}",
|
||||
]
|
||||
)
|
||||
),
|
||||
@@ -193,16 +190,7 @@ def create_app(application):
|
||||
# @application.context_processor
|
||||
# def inject_feature_flags():
|
||||
# this is where feature flags can be easily added as a dictionary within context
|
||||
# feature_socket_enabled = application.config.get("FEATURE_SOCKET_ENABLED", True)
|
||||
|
||||
# current_app.logger.info(
|
||||
# f"FEATURE_SOCKET_ENABLED value in __init__.py coming \
|
||||
# from config is {application.config.get('FEATURE_SOCKET_ENABLED')} and \
|
||||
# the ending value is {feature_socket_enabled}"
|
||||
# )
|
||||
# return dict(
|
||||
# FEATURE_SOCKET_ENABLED=feature_socket_enabled,
|
||||
# )
|
||||
# feature_enabled = application.config.get("FEATURE_ENABLED", True)
|
||||
|
||||
@application.context_processor
|
||||
def inject_initial_signin_url():
|
||||
|
||||
@@ -13,7 +13,6 @@ class Config(object):
|
||||
NOTIFY_ENVIRONMENT = getenv("NOTIFY_ENVIRONMENT", "development")
|
||||
API_HOST_NAME = getenv("API_HOST_NAME", "localhost")
|
||||
API_PUBLIC_URL = getenv("API_PUBLIC_URL", "localhost")
|
||||
API_PUBLIC_WS_URL = getenv("API_PUBLIC_WS_URL", "localhost")
|
||||
|
||||
ADMIN_BASE_URL = getenv("ADMIN_BASE_URL", "http://localhost:6012")
|
||||
HEADER_COLOUR = "#81878b" # mix of dark-grey and mid-grey
|
||||
@@ -131,7 +130,6 @@ class Test(Development):
|
||||
ASSET_PATH = "https://static.example.com/"
|
||||
API_HOST_NAME = "http://you-forgot-to-mock-an-api-call-to"
|
||||
API_PUBLIC_URL = "http://you-forgot-to-mock-an-api-call-to"
|
||||
API_PUBLIC_WS_URL = "ws://you-forgot-to-mock-an-api-call-to"
|
||||
REDIS_URL = "redis://you-forgot-to-mock-a-redis-call-to"
|
||||
LOGO_CDN_DOMAIN = "static-logos.test.com"
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from functools import partial
|
||||
|
||||
from flask import (
|
||||
@@ -59,7 +58,6 @@ def view_job(service_id, job_id):
|
||||
|
||||
filter_args = parse_filter_args(request.args)
|
||||
filter_args["status"] = set_status_filters(filter_args)
|
||||
api_public_url = os.environ.get("API_PUBLIC_URL")
|
||||
|
||||
notifications = None
|
||||
more_than_one_page = False
|
||||
@@ -74,7 +72,6 @@ def view_job(service_id, job_id):
|
||||
|
||||
return render_template(
|
||||
"views/jobs/job.html",
|
||||
api_public_url=api_public_url,
|
||||
job=job,
|
||||
status=request.args.get("status", ""),
|
||||
counts=_get_job_counts(job),
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
{% if not job.finished_processing %}
|
||||
<p class="max-width-full">Status updates automatically while processing. Refresh the page if needed.</p>
|
||||
{% endif %}
|
||||
<div data-job-id="{{ job.id }}" data-job-finished="{{ 'true' if job.finished_processing else 'false' }}" data-host="{{ api_public_url }}">
|
||||
<div data-job-id="{{ job.id }}" data-job-finished="{{ 'true' if job.finished_processing else 'false'}}">
|
||||
<div class='tabs ajax-block-container' data-key="counts">
|
||||
{{ pill(counts, status, {'smaller': True}) }}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user