{% block content %} diff --git a/app/templates/views/platform-admin/complaints.html b/app/templates/views/platform-admin/complaints.html index 378d3b876..a6955dd90 100644 --- a/app/templates/views/platform-admin/complaints.html +++ b/app/templates/views/platform-admin/complaints.html @@ -13,26 +13,26 @@ Email complaints +
+ {% call(item, row_number) list_table( + complaints, + caption="Complaints", + caption_visible=False, + empty_message='No complaints', + field_headings=['Notification Id', 'Service', 'Complaint type', 'Complaint Date'], + field_headings_visible=True + ) %} - {% call(item, row_number) list_table( - complaints, - caption="Complaints", - caption_visible=False, - empty_message='No complaints', - field_headings=['Notification Id', 'Service', 'Complaint type', 'Complaint Date'], - field_headings_visible=True - ) %} + {{ link_field(item.notification_id, url_for('main.view_notification', service_id=item.service_id, notification_id=item.notification_id)) }} - {{ link_field(item.notification_id, url_for('main.view_notification', service_id=item.service_id, notification_id=item.notification_id)) }} + {{ link_field(item.service_name, url_for('main.service_dashboard', service_id=item.service_id)) }} - {{ link_field(item.service_name, url_for('main.service_dashboard', service_id=item.service_id)) }} + {{ text_field(item.complaint_type) }} - {{ text_field(item.complaint_type) }} - - {{ text_field(item.complaint_date|format_datetime_table if item.complaint_date else None) }} - - {% endcall %} + {{ text_field(item.complaint_date|format_datetime_table if item.complaint_date else None) }} + {% endcall %} +
{{ previous_next_navigation(prev_page, next_page) }} {% endblock %} diff --git a/app/templates/views/platform-admin/services.html b/app/templates/views/platform-admin/services.html index d56e3390e..65f10e281 100644 --- a/app/templates/views/platform-admin/services.html +++ b/app/templates/views/platform-admin/services.html @@ -7,6 +7,7 @@ {% from "components/components/details/macro.njk" import usaDetails %} {% macro services_table(services, caption) %} +
{% call(item, row_number) mapping_table( caption=caption, caption_visible=False, @@ -48,6 +49,7 @@ {% endfor %} {% endcall %} +
{% endmacro %} diff --git a/app/templates/views/pricing/index.html b/app/templates/views/pricing/index.html index 46a7c2666..060b19032 100644 --- a/app/templates/views/pricing/index.html +++ b/app/templates/views/pricing/index.html @@ -35,7 +35,7 @@ part.

Calculation of message parts without special characters

-
+
{% call mapping_table( caption='Text message pricing', field_headings=['Message length', 'Charge'], @@ -86,7 +86,7 @@ recipient’s preferred language, but we are aware that, rarely, a phone carrier to be calculated as detailed below.

Calculation of message parts with special characters or non-romanized scripts

{% set accentedChars %} -
+
{% call mapping_table( caption='Accented characters that affect text message charges', field_headings=['Character', 'Description'], @@ -151,7 +151,7 @@ to be calculated as detailed below.

"html": accentedChars }) }} -

+
{% call mapping_table( caption='Pricing for text messages containing accented characters that affect the charges', field_headings=['Message length', 'Charge'], diff --git a/app/templates/views/service-settings.html b/app/templates/views/service-settings.html index 1745bd528..560998685 100644 --- a/app/templates/views/service-settings.html +++ b/app/templates/views/service-settings.html @@ -16,7 +16,7 @@

Settings

-
+
{% call mapping_table( caption='General', diff --git a/app/templates/views/signedout.html b/app/templates/views/signedout.html index fab9fbb30..9a458a10c 100644 --- a/app/templates/views/signedout.html +++ b/app/templates/views/signedout.html @@ -20,7 +20,7 @@ Notify.gov

Reach people where they are with government-powered text messages

Notify.gov is a text message service that helps federal, state, local, tribal and territorial governments more effectively communicate with the people they serve.

-
+
if you are an existing pilot partner diff --git a/app/templates/views/usage.html b/app/templates/views/usage.html index f964982ee..065bdaa2a 100644 --- a/app/templates/views/usage.html +++ b/app/templates/views/usage.html @@ -70,8 +70,7 @@
#} {% if months %} -
-
+
{% call(item, row_index) list_table( months, caption="Total spend", @@ -122,7 +121,6 @@ {% endcall %}
-
{% endif %}
diff --git a/app/templates/withnav_template.html b/app/templates/withnav_template.html index ce4b5d9b3..93b7d973e 100644 --- a/app/templates/withnav_template.html +++ b/app/templates/withnav_template.html @@ -30,7 +30,7 @@ {% block orgNavBreadcrumb %}{% include "/new/components/org_nav_breadcrumb.html" %}{% endblock %} {% endif %}
-
+
{% block sideNavigation %} {% if current_org.name %} {% include "/new/components/org_nav.html" %} @@ -44,7 +44,7 @@ #} {% endblock %}
-
+
{% block beforeContent %} {% block backLink %}{% endblock %} {% endblock %} diff --git a/deploy-config/production.yml b/deploy-config/production.yml index c114a65bf..b99c4dd54 100644 --- a/deploy-config/production.yml +++ b/deploy-config/production.yml @@ -1,6 +1,6 @@ env: production instances: 2 -memory: 4G +memory: 1.5G public_admin_route: beta.notify.gov cloud_dot_gov_route: notify.app.cloud.gov redis_enabled: 1 diff --git a/gulpfile.js b/gulpfile.js index 353670fe1..e9bec7a3d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -150,9 +150,8 @@ const images = () => { paths.toolkit + 'images/**/*', paths.govuk_frontend + 'assets/images/**/*', paths.src + 'images/**/*', - paths.src + 'img/**/*' - // paths.templates + 'assets/images/**/*' - ]) + paths.src + 'img/**/*', + ], {encoding: false}) .pipe(dest(paths.dist + 'images/')) }; diff --git a/runtime.txt b/runtime.txt index 4ddc7cd66..64f28603a 100644 --- a/runtime.txt +++ b/runtime.txt @@ -1 +1 @@ -python-3.12.3 +python-3.12.x diff --git a/terraform/demo/main.tf b/terraform/demo/main.tf index 4223e29e4..d0b8ef92c 100644 --- a/terraform/demo/main.tf +++ b/terraform/demo/main.tf @@ -34,12 +34,6 @@ module "logo_upload_bucket" { name = "${local.app_name}-logo-upload-bucket-${local.env}" } -# ########################################################################## -# The following lines need to be commented out for the initial `terraform apply` -# It can be re-enabled after: -# 1) the api app has first been deployed -# 2) the admin app has first been deployed -########################################################################### module "api_network_route" { source = "../shared/container_networking" diff --git a/terraform/development/main.tf b/terraform/development/main.tf index 939b5a3fb..eec66d260 100644 --- a/terraform/development/main.tf +++ b/terraform/development/main.tf @@ -1,7 +1,6 @@ locals { cf_org_name = "gsa-tts-benefits-studio" cf_space_name = "notify-local-dev" - recursive_delete = true key_name = "${var.username}-admin-dev-key" } diff --git a/terraform/production/main.tf b/terraform/production/main.tf index 771558ce2..98f37f7d4 100644 --- a/terraform/production/main.tf +++ b/terraform/production/main.tf @@ -34,12 +34,6 @@ module "logo_upload_bucket" { name = "${local.app_name}-logo-upload-bucket-${local.env}" } -# ########################################################################## -# The following lines need to be commented out for the initial `terraform apply` -# It can be re-enabled after: -# 1) the api app has first been deployed -# 2) the admin app has first been deployed -########################################################################### module "api_network_route" { source = "../shared/container_networking" @@ -50,22 +44,25 @@ module "api_network_route" { } # ########################################################################## -# The following lines need to be commented out for the initial `terraform apply` -# It can be re-enabled after: -# 1) the app has first been deployed -# 2) the route has been manually created by an OrgManager: +# This governs the name of our main website. Because domain names are unique, +# it only lives here in this one location in production. Resulting problem: +# it is hard to test. Create a temporary, similar code block (with a different +# subdomain) in Sandbox, test your changes there, and bring them here. +# +# Dependencies: +# 1) an app named notify-admin-production in Cloud.gov +# 2) this route, manually created by an OrgManager: # `cf create-domain gsa-tts-benefits-studio beta.notify.gov` -# 3) the acme-challenge CNAME record must be created +# 3) the acme-challenge CNAME record # https://cloud.gov/docs/services/external-domain-service/#how-to-create-an-instance-of-this-service ########################################################################### module "domain" { - source = "github.com/18f/terraform-cloudgov//domain?ref=v0.7.1" # TODO: upgrade this + source = "github.com/GSA-TTS/terraform-cloudgov//domain?ref=v1.0.0" cf_org_name = local.cf_org_name cf_space_name = local.cf_space_name app_name_or_id = "${local.app_name}-${local.env}" name = "${local.app_name}-domain-${local.env}" - recursive_delete = local.recursive_delete cdn_plan_name = "domain" domain_name = "beta.notify.gov" } diff --git a/terraform/sandbox/main.tf b/terraform/sandbox/main.tf index ad0748199..76495b4c9 100644 --- a/terraform/sandbox/main.tf +++ b/terraform/sandbox/main.tf @@ -34,17 +34,11 @@ module "logo_upload_bucket" { name = "${local.app_name}-logo-upload-bucket-${local.env}" } -# ########################################################################## -# The following lines need to be commented out for the initial `terraform apply` -# It can be re-enabled after: -# 1) the api app has first been deployed -# 2) the admin app has first been deployed -########################################################################### -# module "api_network_route" { -# source = "../shared/container_networking" +module "api_network_route" { # API and Admin apps must both exist in Cloud + source = "../shared/container_networking" -# cf_org_name = local.cf_org_name -# cf_space_name = local.cf_space_name -# source_app_name = "${local.app_name}-${local.env}" -# destination_app_name = "notify-api-${local.env}" -# } + cf_org_name = local.cf_org_name + cf_space_name = local.cf_space_name + source_app_name = "${local.app_name}-${local.env}" + destination_app_name = "notify-api-${local.env}" +} diff --git a/terraform/staging/main.tf b/terraform/staging/main.tf index 99ef28590..87c1e64dd 100644 --- a/terraform/staging/main.tf +++ b/terraform/staging/main.tf @@ -34,12 +34,6 @@ module "logo_upload_bucket" { name = "${local.app_name}-logo-upload-bucket-${local.env}" } -# ########################################################################## -# The following lines need to be commented out for the initial `terraform apply` -# It can be re-enabled after: -# 1) the api app has first been deployed -# 2) the admin app has first been deployed -########################################################################### module "api_network_route" { source = "../shared/container_networking" diff --git a/tests/app/main/views/test_dashboard.py b/tests/app/main/views/test_dashboard.py index eb4ff24e5..50a89d0c8 100644 --- a/tests/app/main/views/test_dashboard.py +++ b/tests/app/main/views/test_dashboard.py @@ -305,10 +305,6 @@ def test_inbound_messages_shows_count_of_messages_when_there_are_messages( mock_get_inbound_sms_summary, ): service_one["permissions"] = ["inbound_sms"] - mocker.patch( - "app.notification_api_client.get_notifications_for_service", - return_value=FAKE_ONE_OFF_NOTIFICATION, - ) page = client_request.get( "main.service_dashboard", service_id=SERVICE_ONE_ID, @@ -337,10 +333,6 @@ def test_inbound_messages_shows_count_of_messages_when_there_are_no_messages( mock_get_inbound_sms_summary_with_no_messages, ): service_one["permissions"] = ["inbound_sms"] - mocker.patch( - "app.notification_api_client.get_notifications_for_service", - return_value=FAKE_ONE_OFF_NOTIFICATION, - ) page = client_request.get( "main.service_dashboard", service_id=SERVICE_ONE_ID, @@ -842,10 +834,6 @@ def test_should_not_show_upcoming_jobs_on_dashboard_if_count_is_0( }, ) mocker.patch("app.job_api_client.get_jobs", return_value=MOCK_JOBS) - mocker.patch( - "app.notification_api_client.get_notifications_for_service", - return_value=FAKE_ONE_OFF_NOTIFICATION, - ) page = client_request.get( "main.service_dashboard", service_id=SERVICE_ONE_ID, @@ -922,10 +910,23 @@ def test_correct_font_size_for_big_numbers( mocker.patch("app.main.views.dashboard.get_dashboard_totals", return_value=totals) mocker.patch("app.job_api_client.get_jobs", return_value=MOCK_JOBS) - mocker.patch( - "app.notification_api_client.get_notifications_for_service", - return_value=FAKE_ONE_OFF_NOTIFICATION, - ) + # mocker.patch( + # "app.notification_api_client.get_notifications_for_service", + # return_value=FAKE_ONE_OFF_NOTIFICATION, + # page = client_request.get( + # "main.service_dashboard", + # service_id=service_one["id"], + # ) + + # assert ( + # (len(page.select_one("[data-key=totals]").select(".grid-col-12"))) + # == ( + # # len(page.select_one('[data-key=usage]').select('.grid-col-6')) + # # ) == ( + # len(page.select(".big-number-with-status .big-number-smaller")) + # ) + # == 1 + # ) def test_should_not_show_jobs_on_dashboard_for_users_with_uploads_page( @@ -941,10 +942,6 @@ def test_should_not_show_jobs_on_dashboard_for_users_with_uploads_page( mock_get_free_sms_fragment_limit, mock_get_inbound_sms_summary, ): - mocker.patch( - "app.notification_api_client.get_notifications_for_service", - return_value=FAKE_ONE_OFF_NOTIFICATION, - ) page = client_request.get( "main.service_dashboard", service_id=SERVICE_ONE_ID,