Compare commits

...

406 Commits

Author SHA1 Message Date
Carlo Costino
31076781a3 Merge pull request #2027 from GSA/fix-deploy-actions
Fix the prod and demo deployment actions
2024-10-16 13:11:16 -04:00
Carlo Costino
e54d18170e Add missing env var
Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2024-10-16 13:03:35 -04:00
Alex Janousek
c3f4482677 Merge pull request #2009 from GSA/dependabot/npm_and_yarn/uswds/uswds-3.9.0
Bump @uswds/uswds from 3.8.2 to 3.9.0
2024-10-16 12:50:18 -04:00
Alex Janousek
0183f37c7b Merge pull request #2022 from GSA/dependabot/npm_and_yarn/sass-embedded-1.79.5
Bump sass-embedded from 1.79.4 to 1.79.5
2024-10-16 12:49:58 -04:00
Carlo Costino
fc6adc6771 Fix the prod and demo deployment actions
This changeset fixes the prod and deployment actions so they have the correct environment variables.  It also fixes the egress proxy deploy config for each.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2024-10-16 12:44:55 -04:00
Kenneth Kehl
34ccfb5bd7 Merge pull request #1996 from GSA/e2e_tests_uncomment
Make e2e tests work fully with staging API
2024-10-15 09:57:19 -07:00
dependabot[bot]
db5626f5b0 Bump sass-embedded from 1.79.4 to 1.79.5
Bumps [sass-embedded](https://github.com/sass/embedded-host-node) from 1.79.4 to 1.79.5.
- [Changelog](https://github.com/sass/embedded-host-node/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/embedded-host-node/compare/1.79.4...1.79.5)

---
updated-dependencies:
- dependency-name: sass-embedded
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-14 23:36:07 +00:00
Alex Janousek
2624bd885d Merge pull request #2019 from GSA/dependabot/npm_and_yarn/babel/core-7.25.8
Bump @babel/core from 7.25.2 to 7.25.8
2024-10-14 13:53:01 -04:00
Alex Janousek
a5ff9af1eb Merge pull request #2011 from GSA/dependabot/npm_and_yarn/playwright-1.48.0
Bump playwright from 1.47.2 to 1.48.0
2024-10-14 13:44:34 -04:00
dependabot[bot]
8e29229d8b Bump @babel/core from 7.25.2 to 7.25.8
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.25.2 to 7.25.8.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.25.8/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-14 17:39:42 +00:00
Alex Janousek
c30dbec6ce Merge pull request #2020 from GSA/dependabot/npm_and_yarn/babel/preset-env-7.25.8
Bump @babel/preset-env from 7.25.7 to 7.25.8
2024-10-14 13:38:24 -04:00
dependabot[bot]
29854c6164 Bump @babel/preset-env from 7.25.7 to 7.25.8
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.25.7 to 7.25.8.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.25.8/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-10 23:19:49 +00:00
Carlo Costino
978031744f Merge pull request #2016 from GSA/use-the-correct-env-var-names
Use the correct environment variable names
2024-10-10 14:20:16 -04:00
Carlo Costino
f27703112a Use the correct environment variable names
This changeset corrects the reference to the environment names that we are actually trying to reference.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2024-10-10 13:06:47 -04:00
Carlo Costino
c47144a8b0 Merge pull request #2014 from GSA/swap-egress-proxy-config-to-env
Swap out config variables for env variables
2024-10-10 10:33:18 -04:00
Carlo Costino
fd447e9a75 Swap out config variables for env variables
This changeset swaps the CF_USERNAME and CF_PASSWORD config vars to be proper env vars so they can be read in as expected.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2024-10-09 14:20:10 -06:00
Carlo Costino
9ee0da0b32 Merge pull request #2013 from GSA/add-missing-egress-proxy-inputs
Add missing inputs to egress proxy deploy action
2024-10-09 14:00:27 -06:00
Carlo Costino
2fbce24f97 Add missing inputs to egress proxy deploy action
This changeset adds a few missing inputs to the egress proxy deploy action so that it can use the provided environment variables properly.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2024-10-09 13:48:47 -06:00
Carlo Costino
10da94dbf8 Merge pull request #1997 from GSA/update-egress-proxy-even-more
Add missing environment veriables to egress deploy action
2024-10-09 13:24:56 -06:00
Kenneth Kehl
d86b1afb9a code review feedback 2024-10-09 11:42:20 -07:00
Kenneth Kehl
10a8d1b938 code review feedback 2024-10-09 11:04:15 -07:00
Kenneth Kehl
b7b23ba6c8 try reverting hardcoding 2024-10-09 10:06:56 -07:00
Kenneth Kehl
1cc760c153 write a script to get the VCAP value 2024-10-09 09:43:48 -07:00
Steven Reilly
338fbfc407 Merge pull request #2008 from GSA/2007-bug-total-messages-sms-sent-always-zero
2007 - bug - total messages sms sent always zero
2024-10-09 10:26:20 -04:00
Jonathan Bobel
5adcfae5d8 Fixing a test 2024-10-09 09:56:19 -04:00
dependabot[bot]
b8b4a707a3 Bump playwright from 1.47.2 to 1.48.0
Bumps [playwright](https://github.com/microsoft/playwright) from 1.47.2 to 1.48.0.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.47.2...v1.48.0)

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-08 23:37:52 +00:00
dependabot[bot]
61ea8e0b03 Bump @uswds/uswds from 3.8.2 to 3.9.0
Bumps [@uswds/uswds](https://github.com/uswds/uswds) from 3.8.2 to 3.9.0.
- [Release notes](https://github.com/uswds/uswds/releases)
- [Commits](https://github.com/uswds/uswds/compare/v3.8.2...v3.9.0)

---
updated-dependencies:
- dependency-name: "@uswds/uswds"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-08 23:37:27 +00:00
Jonathan Bobel
3ad6f9daae Removing reference to financial year 2024-10-08 16:37:33 -04:00
Jonathan Bobel
947f85ba51 This was from a previous commit 2024-10-08 16:24:03 -04:00
Jonathan Bobel
65c99bf8e8 Removing instances of a financial year 2024-10-08 16:12:50 -04:00
Jonathan Bobel
d8feea6bd5 Merge branch 'main' of https://github.com/GSA/notifications-admin 2024-10-08 16:06:19 -04:00
Alex Janousek
c89a6089a0 Merge pull request #1984 from GSA/dependabot/npm_and_yarn/babel/preset-env-7.25.7
Bump @babel/preset-env from 7.25.4 to 7.25.7
2024-10-08 12:55:44 -04:00
Alex Janousek
971486be20 Merge pull request #1994 from GSA/dependabot/npm_and_yarn/multi-cf87d80143
Bump send and express
2024-10-08 12:55:18 -04:00
Alex Janousek
cd6c9af0bc Merge pull request #1983 from GSA/dependabot/npm_and_yarn/rollup-4.24.0
Bump rollup from 4.22.5 to 4.24.0
2024-10-08 12:54:04 -04:00
Alex Janousek
7eb7ed1855 Merge pull request #1977 from GSA/dependabot/npm_and_yarn/sass-embedded-1.79.4
Bump sass-embedded from 1.79.3 to 1.79.4
2024-10-08 12:53:35 -04:00
Alex Janousek
ea93b57190 Merge pull request #1960 from GSA/dependabot/npm_and_yarn/rollup/plugin-commonjs-28.0.0
Bump @rollup/plugin-commonjs from 26.0.1 to 28.0.0
2024-10-08 12:52:58 -04:00
Jonathan Bobel
3865c5b952 Update to address a11y issue of "Broken Aria link" in the dialog 2024-10-08 10:36:35 -04:00
Kenneth Kehl
f37b89849e cleanup 2024-10-07 13:44:43 -07:00
Kenneth Kehl
397bbeabde Merge pull request #2000 from GSA/stvnrlly-patch-1
Update notify-pilot-info.md
2024-10-07 13:42:33 -07:00
Kenneth Kehl
a11c567de3 fix moderate axe-core accessibility violation 2024-10-07 11:45:14 -07:00
Steven Reilly
bdc27c10d0 Update notify-pilot-info.md 2024-10-07 14:40:50 -04:00
Kenneth Kehl
f7f449ff07 try h2 2024-10-07 11:31:02 -07:00
Kenneth Kehl
b133def7fc cleanup 2024-10-07 11:02:04 -07:00
Kenneth Kehl
b4b15bc209 cleanup 2024-10-07 10:45:02 -07:00
Kenneth Kehl
44524eb9e2 try to not put vcap services into a secret 2024-10-07 10:26:43 -07:00
Kenneth Kehl
4b8b078476 try to not put vcap services into a secret 2024-10-07 10:03:45 -07:00
Kenneth Kehl
22f9ff603a try using h3 instead of h4 2024-10-07 09:11:10 -07:00
Kenneth Kehl
3f7e600ac1 try using h3 instead of h4 2024-10-07 08:37:34 -07:00
Kenneth Kehl
5a5b0649e0 restore axe_core level to minor 2024-10-07 08:23:18 -07:00
Kenneth Kehl
a23fe5c046 relax axe-core tests for now 2024-10-07 08:03:51 -07:00
Kenneth Kehl
306391c958 relax axe-core tests for now 2024-10-07 07:54:14 -07:00
Kenneth Kehl
e41ad9fab9 update secrets 2024-10-07 07:47:30 -07:00
Kenneth Kehl
fb83e8610c update secrets 2024-10-07 07:33:40 -07:00
Carlo Costino
d0a435becd Merge pull request #1978 from GSA/1971-bug-two-skip-links
1971 - BUG - There were two main content skip links
2024-10-05 15:47:58 -06:00
Carlo Costino
62f58c6e27 Merge pull request #1981 from GSA/1967-remove-uk-reference
1967 - Remove reference to UK on error page
2024-10-05 15:39:43 -06:00
Carlo Costino
0db68453b9 Merge pull request #1987 from GSA/1986-go-live-form-link-change
1986 - Updated links for Go Live Form
2024-10-05 15:29:10 -06:00
Carlo Costino
fbba1a735f Merge pull request #1992 from GSA/change-deploytools-demoprod
Switch out deprecated tools in demo/prod deploy scripts
2024-10-05 15:22:11 -06:00
Carlo Costino
35eb2a9013 Add missing environment veriables to egress deploy action
This changeset adds missing environment variables needed by the egress proxy to now properly deploy.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2024-10-04 22:49:42 -04:00
Kenneth Kehl
108e93d06a update secrets 2024-10-04 15:44:08 -07:00
Kenneth Kehl
4d4288d3c7 try again 2024-10-04 15:20:30 -07:00
Kenneth Kehl
c0ffa63f88 try again 2024-10-04 15:14:45 -07:00
Kenneth Kehl
89413c56ba try again 2024-10-04 15:04:34 -07:00
Kenneth Kehl
e6a3c0d4b7 try again 2024-10-04 14:52:58 -07:00
Kenneth Kehl
7d2f7d1c8a try again 2024-10-04 14:37:52 -07:00
Kenneth Kehl
f118b1c4bf try again 2024-10-04 14:28:12 -07:00
Kenneth Kehl
85a5e3075a try again 2024-10-04 14:18:48 -07:00
Kenneth Kehl
59959cfab4 try again 2024-10-04 14:09:39 -07:00
Kenneth Kehl
68cf422ca8 try again 2024-10-04 13:23:23 -07:00
Kenneth Kehl
a9999aa8ec try again 2024-10-04 13:18:15 -07:00
Kenneth Kehl
3a50fff6ea try again 2024-10-04 13:08:36 -07:00
Kenneth Kehl
c15d388fc2 try again 2024-10-04 13:00:31 -07:00
Kenneth Kehl
ec3ebe5b90 try again 2024-10-04 12:32:04 -07:00
Beverly Nguyen
fbdc01b109 Merge pull request #1995 from GSA/update-egress-proxy-more
Add one more potentially missing step
2024-10-04 12:29:08 -07:00
Kenneth Kehl
60e3c5291e try again 2024-10-04 12:18:46 -07:00
Carlo Costino
c178a3e77e Add one more potentially missing step
This changeset adds one more step that hopefully takes care of the egress proxy deploy.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2024-10-04 15:16:16 -04:00
Kenneth Kehl
4e3eb03040 try again 2024-10-04 12:10:16 -07:00
Carlo Costino
29b9e122ba Merge pull request #1993 from GSA/update-egress-proxy
Update cg-egress-proxy installation
2024-10-04 14:57:56 -04:00
dependabot[bot]
63c1652c40 Bump sass-embedded from 1.79.3 to 1.79.4
Bumps [sass-embedded](https://github.com/sass/embedded-host-node) from 1.79.3 to 1.79.4.
- [Changelog](https://github.com/sass/embedded-host-node/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/embedded-host-node/compare/1.79.3...1.79.4)

---
updated-dependencies:
- dependency-name: sass-embedded
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-04 18:48:30 +00:00
dependabot[bot]
f28a618e78 Bump @babel/preset-env from 7.25.4 to 7.25.7
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.25.4 to 7.25.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.25.7/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-04 18:48:27 +00:00
dependabot[bot]
aa7c7b7d9a Bump rollup from 4.22.5 to 4.24.0
Bumps [rollup](https://github.com/rollup/rollup) from 4.22.5 to 4.24.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.22.5...v4.24.0)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-04 18:48:26 +00:00
dependabot[bot]
4c0221e295 Bump @rollup/plugin-commonjs from 26.0.1 to 28.0.0
Bumps [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/HEAD/packages/commonjs) from 26.0.1 to 28.0.0.
- [Changelog](https://github.com/rollup/plugins/blob/master/packages/commonjs/CHANGELOG.md)
- [Commits](https://github.com/rollup/plugins/commits/commonjs-v28.0.0/packages/commonjs)

---
updated-dependencies:
- dependency-name: "@rollup/plugin-commonjs"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-04 18:48:20 +00:00
dependabot[bot]
21d1b69c22 Bump send and express
Bumps [send](https://github.com/pillarjs/send) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `send` from 0.18.0 to 0.19.0
- [Release notes](https://github.com/pillarjs/send/releases)
- [Changelog](https://github.com/pillarjs/send/blob/master/HISTORY.md)
- [Commits](https://github.com/pillarjs/send/compare/0.18.0...0.19.0)

Updates `express` from 4.20.0 to 4.21.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.20.0...4.21.0)

---
updated-dependencies:
- dependency-name: send
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-04 18:48:06 +00:00
Alex Janousek
5aac3130b3 Merge pull request #1950 from GSA/1927-user-story-brief-description-of-the-user-story
Backstop is implemented locally
2024-10-04 14:47:06 -04:00
Carlo Costino
75ce12f5da Update cg-egress-proxy installation
This changeset updates the installation of the cg-egress-proxy repo on account of the recent change to use the newer cg-cli-tools.  It also forces the update for staging to test this out for now; we will have to uncomment the check once this is working.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2024-10-04 14:41:26 -04:00
Kenneth Kehl
21bd20f607 try again 2024-10-04 11:32:16 -07:00
Andrew Shumway
371eb58392 Remove duplicate code in reference 2024-10-04 12:08:45 -06:00
Kenneth Kehl
a27b9a701b try again 2024-10-04 11:08:15 -07:00
Andrew Shumway
c328044636 Switch out deprecated tools in demo/prod deploy scripts 2024-10-04 12:03:16 -06:00
Kenneth Kehl
77f44d4d5e try again 2024-10-04 11:02:52 -07:00
alexjanousekGSA
73b3a61746 Moved condition back to top of method 2024-10-04 13:49:10 -04:00
alexjanousekGSA
c5b2535b8e Fixed calling of response.json() 2024-10-04 13:38:13 -04:00
Carlo Costino
9449b80975 Merge pull request #1991 from GSA/remove-extra-login-env-var
Remove an extra Login.gov environment variable
2024-10-04 13:01:49 -04:00
Kenneth Kehl
cc3d70303c add vcap secret 2024-10-04 09:57:15 -07:00
Carlo Costino
ef528360be Undo change to the cloud.gov repo
They reverted the repo name change

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2024-10-04 12:54:19 -04:00
Carlo Costino
ae1a51ff79 Update reference to the renaming of the cloud-gov/cli-tools repo
Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2024-10-04 12:14:07 -04:00
Carlo Costino
e9b364010a Remove an extra Login.gov environment variable
This changeset removes the LOGIN_DOT_GOV_REGISTRATION_URL environment variable from the admin app deployment configuration.  This is only needed for the API.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2024-10-04 11:33:40 -04:00
Carlo Costino
a8bf2414b4 Merge pull request #1990 from GSA/remove-e2e-env-vars-from-deploy
Remove E2E env vars from deploy
2024-10-04 11:11:54 -04:00
Kenneth Kehl
ced229167f add vcap secret 2024-10-04 08:04:41 -07:00
alexjanousekGSA
8deed320f8 Tweaked mismatch percentage 2024-10-04 11:02:39 -04:00
Kenneth Kehl
114814b0b5 add vcap secret 2024-10-04 07:50:34 -07:00
Kenneth Kehl
88262302e6 add VCAP_SERVICES 2024-10-04 07:06:35 -07:00
Carlo Costino
2e8f82be3b Remove E2E env vars from deploy
The E2E environment variables should not be included with our deploys because we do not want to enable or run E2E tests in production or production-like environments.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2024-10-04 08:35:35 -04:00
Carlo Costino
d63cfb3cb0 Merge pull request #1988 from GSA/switch-18f-deploy-tool-to-CG
Switch 18f deploy tool to CG
2024-10-04 08:06:11 -04:00
Andrew Shumway
6980e28786 Switch 18f deploy tool to CG 2024-10-03 14:19:09 -06:00
Andrew Shumway
c9acf937cf Merge pull request #1975 from GSA/fix-cfcommand-deploytool
Fix cf_command argument for deploy tool
2024-10-03 14:05:13 -06:00
Kenneth Kehl
37bb89402e add VCAP_SERVICES 2024-10-03 12:09:15 -07:00
Kenneth Kehl
f20803ecae add VCAP_SERVICES 2024-10-03 12:04:50 -07:00
Kenneth Kehl
addf4f0959 add VCAP_SERVICES 2024-10-03 12:00:31 -07:00
Kenneth Kehl
b7f26454ff add VCAP_SERVICES 2024-10-03 11:53:11 -07:00
Kenneth Kehl
a669477f48 add VCAP_SERVICES 2024-10-03 11:49:42 -07:00
Jonathan Bobel
8c932a6072 Updated links for Go Live Form 2024-10-03 14:39:51 -04:00
Kenneth Kehl
d2c654214b add VCAP_SERVICES 2024-10-03 11:28:12 -07:00
Kenneth Kehl
3120f82b1e add VCAP_SERVICES 2024-10-03 11:09:17 -07:00
Kenneth Kehl
0e45588e5a add VCAP_SERVICES 2024-10-03 10:52:49 -07:00
Kenneth Kehl
d4223429ec merge from main 2024-10-03 10:49:56 -07:00
Jonathan Bobel
1ea15d5ba1 Updated text for this error page (although I don't know when someone would see it) 2024-10-02 16:02:18 -04:00
Kenneth Kehl
915b18bbbd Merge pull request #1970 from GSA/notify-api-1299
optimize S3 partitioning
2024-10-02 09:55:14 -07:00
alexjanousekGSA
f2fc6da0ee Updated docs 2024-10-02 11:19:33 -04:00
alexjanousekGSA
e96aec9898 Merged in main, created reference images and added delay to screenshots 2024-10-02 11:16:30 -04:00
alexjanousekGSA
e11b6376c2 Redid reference files 2024-10-02 10:37:04 -04:00
Andrew Shumway
4e2630d675 Remove whitespace/fix caps on var 2024-10-02 08:18:47 -06:00
Andrew Shumway
0a5ca7d0d6 Pull in main/fix merge conflicts 2024-10-02 07:58:04 -06:00
Andrew Shumway
64a01e70b7 Wrap vars with quotes and indent 2024-10-02 07:55:58 -06:00
Alex Janousek
466137ba07 Update docs/backstop.md
Co-authored-by: Carlo Costino <ccostino@users.noreply.github.com>
2024-10-01 12:13:35 -04:00
Carlo Costino
0d04524525 Merge pull request #1966 from GSA/USN-COMPLY-49_Verify_Nonce_on_Login
Verify NONCE on login.
2024-10-01 11:05:09 -04:00
Jonathan Bobel
08c97a8066 Removing this link since it was duplicated 2024-10-01 10:42:33 -04:00
Andrew Shumway
6815493f4a Remove brackets from hardcoded var 2024-09-30 14:49:28 -06:00
Andrew Shumway
f578a52010 Retry syntax on cf command 2024-09-30 14:34:47 -06:00
Carlo Costino
40a0418731 Merge pull request #1972 from GSA/dependabot/npm_and_yarn/rollup-4.22.5
Bump rollup from 4.22.4 to 4.22.5
2024-09-30 15:56:25 -04:00
Andrew Shumway
b7d699feae Move admin client username to env variable block 2024-09-30 13:46:13 -06:00
Andrew Shumway
8b9293db0e Fix cf_command syntax 2024-09-30 13:42:48 -06:00
Kenneth Kehl
6ff8be5d3e Merge pull request #1973 from GSA/add-awscli
Add awscli tools to the admin
2024-09-30 11:35:08 -07:00
Andrew Shumway
475bd0c1b4 fix yaml 2024-09-30 11:26:27 -06:00
Carlo Costino
2c7d090b82 Merge pull request #1964 from GSA/notify-admin-1956
make sure phone number is always last in the one-off csv
2024-09-30 13:03:09 -04:00
Carlo Costino
4f193e362c Add awscli tools to the admin
This changeset adds the awscli tools as a development dependency so that we are able to manage local connectivity to AWS resources when needed.  It is also needed to help with deploying the project to the sandbox environment and/or updating the Terraform to manage the infrastructure.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2024-09-30 10:13:12 -04:00
alexjanousekGSA
687372fd6c Added new reference images, removed a few custom pages 2024-09-30 09:58:44 -04:00
dependabot[bot]
302a79b41f Bump rollup from 4.22.4 to 4.22.5
Bumps [rollup](https://github.com/rollup/rollup) from 4.22.4 to 4.22.5.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.22.4...v4.22.5)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-27 23:20:05 +00:00
Kenneth Kehl
f0299c4042 optimize S3 partitioning 2024-09-27 08:39:19 -07:00
Kenneth Kehl
bc5b980431 more debug 2024-09-27 07:49:15 -07:00
Kenneth Kehl
08384dd1fa more debug 2024-09-27 07:36:55 -07:00
Kenneth Kehl
bdc5614fff Update app/main/views/send.py
Co-authored-by: Carlo Costino <ccostino@users.noreply.github.com>
2024-09-27 07:20:40 -07:00
alexjanousekGSA
060db76640 Removed comment 2024-09-26 15:01:34 -04:00
alexjanousekGSA
b2b758ca8d Updated sensitivity 2024-09-26 14:54:55 -04:00
Kenneth Kehl
584ccce53d check bucket name 2024-09-26 10:51:51 -07:00
Kenneth Kehl
dda788b073 check bucket name 2024-09-26 10:46:26 -07:00
Kenneth Kehl
feff8ec1be try specifying region in the config 2024-09-26 10:32:22 -07:00
Kenneth Kehl
cfc9acc6f2 try specifying region in the config 2024-09-26 10:24:38 -07:00
Kenneth Kehl
959a680664 try specifying region in the config 2024-09-26 10:13:19 -07:00
Cliff Hill
a5e72ea4eb manifest.yml changed.
Signed-off-by: Cliff Hill <clifford.hill@gsa.gov>
2024-09-26 12:46:07 -04:00
Kenneth Kehl
122343e46e try not using fips 2024-09-26 09:37:07 -07:00
Kenneth Kehl
86b217b1df remove extrtaneous comments 2024-09-26 09:22:16 -07:00
alexjanousekGSA
982f77413e updated mismatch threshold 2024-09-26 12:02:35 -04:00
Kenneth Kehl
3967612eb1 more debug 2024-09-26 08:53:40 -07:00
alexjanousekGSA
b0f0a8d8db Updated readme 2024-09-26 11:50:10 -04:00
Kenneth Kehl
fd2de9bf9b more debug 2024-09-26 08:44:10 -07:00
Kenneth Kehl
cd24c2b029 more debug 2024-09-26 08:23:13 -07:00
Cliff Hill
63747515db Updated the sample.env with new var.
Signed-off-by: Cliff Hill <clifford.hill@gsa.gov>
2024-09-26 10:16:57 -04:00
Cliff Hill
55f588f13d Updated deploy workflows with new env var.
Signed-off-by: Cliff Hill <clifford.hill@gsa.gov>
2024-09-26 10:11:46 -04:00
Cliff Hill
81a629935c Ok, now working 100% correctly with nonce.
Signed-off-by: Cliff Hill <clifford.hill@gsa.gov>
2024-09-26 09:18:02 -04:00
Jonathan Bobel
49ec3dc559 Merge pull request #1963 from GSA/notify-admin-1937b
Fix moderate a11y violations reported by axe-core
2024-09-25 16:35:02 -04:00
Jonathan Bobel
647b37ae61 Removing moderate violations for the a11y scan 2024-09-25 16:19:00 -04:00
Cliff Hill
7b2d495c1b fixing so nonce check works correctly.
Signed-off-by: Cliff Hill <clifford.hill@gsa.gov>
2024-09-25 16:01:13 -04:00
Cliff Hill
47f0952125 Getting id_token to decode correctly.
Signed-off-by: Cliff Hill <clifford.hill@gsa.gov>
2024-09-25 15:34:31 -04:00
Jonathan Bobel
e0fb031cf5 Semantic update 2024-09-25 15:29:58 -04:00
Jonathan Bobel
72eff3235e Making sure it's testing against this code 2024-09-25 15:15:50 -04:00
Jonathan Bobel
67ad9148d6 Testing back button for a11y issues 2024-09-25 13:58:54 -04:00
alexjanousekGSA
2f40be8cd0 Added documentation 2024-09-25 13:12:18 -04:00
Kenneth Kehl
a088409dfe fix 2024-09-25 09:54:31 -07:00
Kenneth Kehl
ddd413f299 fix 2024-09-25 09:38:59 -07:00
Kenneth Kehl
250a36836d fix 2024-09-25 09:29:50 -07:00
Kenneth Kehl
f8fd0422bf uncomment test code 2024-09-25 09:16:22 -07:00
Cliff Hill
4cdac9eba3 Making coverage not bother with sign in stuff since login.gov.
Signed-off-by: Cliff Hill <clifford.hill@gsa.gov>
2024-09-25 12:05:56 -04:00
Cliff Hill
76863cd4dc Some unit test cleanup.
Signed-off-by: Cliff Hill <clifford.hill@gsa.gov>
2024-09-25 11:23:36 -04:00
Cliff Hill
3d00b0c94f Making nonce passed through redis.
Signed-off-by: Cliff Hill <clifford.hill@gsa.gov>
2024-09-25 10:45:57 -04:00
Kenneth Kehl
4594dc317f merge from main 2024-09-25 07:03:02 -07:00
Kenneth Kehl
5e93f2d572 merge from main 2024-09-25 07:00:10 -07:00
Cliff Hill
a2dbb6c9e6 Typo fix.
Signed-off-by: Cliff Hill <clifford.hill@gsa.gov>
2024-09-24 20:46:48 -04:00
Cliff Hill
d097a0e2a6 I believe nonce is set up for sign_in.py.
Signed-off-by: Cliff Hill <clifford.hill@gsa.gov>
2024-09-24 20:39:08 -04:00
Carlo Costino
d3855f47ac Merge pull request #1959 from GSA/dependabot/npm_and_yarn/rollup-4.22.4
Bump rollup from 4.22.2 to 4.22.4
2024-09-24 15:57:00 -04:00
Kenneth Kehl
6f91d60030 make sure phone number is always last in the one-off csv 2024-09-24 10:35:22 -07:00
alexjanousekGSA
f4d8816eac Added updates 2024-09-24 12:19:20 -04:00
Kenneth Kehl
99ce42fc4a revert test setting to ignore moderate failures 2024-09-24 08:44:01 -07:00
Kenneth Kehl
899347d349 fix tests 2024-09-24 08:23:17 -07:00
Kenneth Kehl
14b37524ae revert to nav 2024-09-24 08:02:32 -07:00
Kenneth Kehl
5caa26e93c try adding service nav 2024-09-24 07:52:10 -07:00
Kenneth Kehl
5ee559da10 try adding service nav 2024-09-24 07:44:43 -07:00
Kenneth Kehl
73852a54f2 add aria-labels 2024-09-24 07:36:21 -07:00
Kenneth Kehl
ec806ce385 1937b 2024-09-24 07:11:08 -07:00
dependabot[bot]
8c3cdabb92 Bump rollup from 4.22.2 to 4.22.4
Bumps [rollup](https://github.com/rollup/rollup) from 4.22.2 to 4.22.4.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.22.2...v4.22.4)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-23 23:13:18 +00:00
alexjanousekGSA
4e52d60a7c Fixed linting issue 2024-09-23 13:53:08 -04:00
Jonathan Bobel
a5889d3448 Merge pull request #1957 from GSA/notify-admin-1936
Fix serious a11y violations reported by axe-core
2024-09-23 13:40:37 -04:00
alexjanousekGSA
5234706ae1 Added script 2024-09-23 13:08:29 -04:00
alexjanousekGSA
70c9801f1d Added script 2024-09-23 13:07:24 -04:00
alexjanousekGSA
df22530fa4 Remove BackstopJS generated folders from Git tracking 2024-09-23 12:03:21 -04:00
alexjanousekGSA
df630b58d8 Merge branch 'main' into 1927-user-story-brief-description-of-the-user-story 2024-09-23 11:57:37 -04:00
alexjanousekGSA
f9337b614f Reverted sign in 2024-09-23 11:57:13 -04:00
Carlo Costino
09a775fdad Merge pull request #1953 from GSA/dependabot/npm_and_yarn/sass-embedded-1.79.3
Bump sass-embedded from 1.78.0 to 1.79.3
2024-09-23 11:50:48 -04:00
Carlo Costino
62cfa2c39c Merge pull request #1954 from GSA/dependabot/npm_and_yarn/rollup-4.22.2
Bump rollup from 4.21.2 to 4.22.2
2024-09-23 11:43:42 -04:00
Kenneth Kehl
8b6f719510 try to fix li elements 2024-09-23 08:18:41 -07:00
Kenneth Kehl
b953d316c4 fix aria label issue 2024-09-23 08:01:56 -07:00
Kenneth Kehl
5c3b5790ae try overriding default govuk-frontend font weight 2024-09-23 07:50:52 -07:00
Carlo Costino
d0d3878881 Merge pull request #1931 from GSA/notify-admin-1926
Integrate axe-core a11y tests into our e2e tests
2024-09-23 10:26:44 -04:00
Kenneth Kehl
b6e0249adb merge from main 2024-09-23 07:10:31 -07:00
dependabot[bot]
4a8d768b6f Bump rollup from 4.21.2 to 4.22.2
Bumps [rollup](https://github.com/rollup/rollup) from 4.21.2 to 4.22.2.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.21.2...v4.22.2)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-20 23:34:39 +00:00
dependabot[bot]
876db282d5 Bump sass-embedded from 1.78.0 to 1.79.3
Bumps [sass-embedded](https://github.com/sass/embedded-host-node) from 1.78.0 to 1.79.3.
- [Changelog](https://github.com/sass/embedded-host-node/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/embedded-host-node/compare/1.78.0...1.79.3)

---
updated-dependencies:
- dependency-name: sass-embedded
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-20 23:34:30 +00:00
alexjanousekGSA
028423adc1 Fixinng linting issues 2024-09-19 16:54:15 -04:00
alexjanousekGSA
56f7ad47e5 Solved merge conflict 2024-09-19 16:11:43 -04:00
alexjanousekGSA
c44084f325 Backstop is working locally 2024-09-18 13:59:16 -04:00
Carlo Costino
cf39b32808 Merge pull request #1421 from GSA/notify-admin-1157
point to staging for e2e
2024-09-13 17:29:19 -04:00
Kenneth Kehl
84f3c61bc0 code review feedback 2024-09-13 07:50:24 -07:00
Kenneth Kehl
892705b125 revert fix for aria label 2024-09-11 14:19:31 -07:00
Kenneth Kehl
ef9e3aecbe set to critical for now 2024-09-11 14:11:19 -07:00
Kenneth Kehl
6da52f91b3 get list of serious violations 2024-09-11 14:01:57 -07:00
Kenneth Kehl
5eadcc0319 switch to serious and above try removing aria label 2024-09-11 13:54:42 -07:00
Kenneth Kehl
8d6478c3c1 switch to serious and above try removing aria label 2024-09-11 13:31:50 -07:00
Kenneth Kehl
a267cf3d4b expand to all tests 2024-09-11 13:16:58 -07:00
Kenneth Kehl
f82bcb0509 expand to all tests 2024-09-11 13:08:50 -07:00
Kenneth Kehl
c3a2441ade try expanding use of axe 2024-09-11 12:57:10 -07:00
Kenneth Kehl
8ef357ea61 try expanding use of axe 2024-09-11 12:36:58 -07:00
Kenneth Kehl
286166c2ad fix import 2024-09-11 11:07:59 -07:00
Kenneth Kehl
7b9e5288f8 fix import 2024-09-11 11:02:01 -07:00
Kenneth Kehl
df85f66a43 fix import 2024-09-11 10:48:26 -07:00
Kenneth Kehl
a91d6d25c8 initial test axe-core 2024-09-11 10:39:28 -07:00
Carlo Costino
88c47d15f6 Merge pull request #1924 from GSA/dependabot/npm_and_yarn/better-npm-audit-3.11.0
Bump better-npm-audit from 3.8.3 to 3.11.0
2024-09-10 14:41:20 -04:00
dependabot[bot]
6537eb2b1d Bump better-npm-audit from 3.8.3 to 3.11.0
Bumps [better-npm-audit](https://github.com/jeemok/better-npm-audit) from 3.8.3 to 3.11.0.
- [Release notes](https://github.com/jeemok/better-npm-audit/releases)
- [Changelog](https://github.com/jeemok/better-npm-audit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jeemok/better-npm-audit/compare/v3.8.3...v3.11.0)

---
updated-dependencies:
- dependency-name: better-npm-audit
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-10 18:28:31 +00:00
Carlo Costino
75727520c0 Merge pull request #1918 from GSA/dependabot/npm_and_yarn/uswds/compile-1.2.0
Bump @uswds/compile from 1.1.0 to 1.2.0
2024-09-10 14:27:14 -04:00
Kenneth Kehl
d6c8ee90e8 cleanup 2024-09-10 09:29:46 -07:00
Kenneth Kehl
a3ef868924 cleanup 2024-09-10 08:46:31 -07:00
Kenneth Kehl
bdf4c9597b clean up Makefile and checks.yml 2024-09-10 07:17:41 -07:00
Carlo Costino
6e3db9d59a Merge pull request #1914 from GSA/dependabot/npm_and_yarn/sass-embedded-1.78.0
Bump sass-embedded from 1.77.8 to 1.78.0
2024-09-09 18:13:01 -04:00
Carlo Costino
fc88ca55e7 Merge pull request #1912 from GSA/dependabot/npm_and_yarn/rollup-4.21.2
Bump rollup from 4.21.1 to 4.21.2
2024-09-09 17:47:08 -04:00
Kenneth Kehl
b8edfa8175 fix dead code 2024-09-09 13:57:45 -07:00
Kenneth Kehl
1a247260ff fix tests and flake8 2024-09-09 13:50:02 -07:00
Kenneth Kehl
92229707e2 comment out part of test that is still failing 2024-09-09 13:27:07 -07:00
Kenneth Kehl
5db3d4878f fix last test 2024-09-09 13:03:16 -07:00
Kenneth Kehl
b1f1005441 reenable e2e tests 2024-09-09 12:50:16 -07:00
Kenneth Kehl
6223341826 reenable e2e tests 2024-09-09 12:34:52 -07:00
Kenneth Kehl
6b3fde3356 merge from main 2024-09-09 12:09:53 -07:00
Kenneth Kehl
749e4cc708 Merge pull request #1911 from GSA/notify-api-1301
start load test work
2024-09-09 09:21:48 -07:00
alexjanousekGSA
a2d542c726 Upgraded vul package 2024-09-09 12:05:00 -04:00
dependabot[bot]
b67b15b6c9 Bump @uswds/compile from 1.1.0 to 1.2.0
Bumps [@uswds/compile](https://github.com/uswds/uswds-compile) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/uswds/uswds-compile/releases)
- [Commits](https://github.com/uswds/uswds-compile/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: "@uswds/compile"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-04 23:42:43 +00:00
Kenneth Kehl
d94a35cd30 get the error message in the url 2024-09-04 14:21:45 -07:00
Carlo Costino
26e53e76c5 Merge pull request #1910 from GSA/1487-display-data-most-used-templates-table
Display data: Most used templates table
2024-09-04 15:59:21 -04:00
Carlo Costino
6cf540be04 Merge pull request #1917 from GSA/cryptography-update
Update cryptography Python dependency
2024-09-04 15:37:26 -04:00
Carlo Costino
e3007f273e Update cryptography Python dependency
This changeset updates the Python cryptography package to the latest release to address a pip-audit finding.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2024-09-04 15:18:02 -04:00
Carlo Costino
46a980c505 Merge pull request #1909 from GSA/1908-remove-folder-and-header-folder-componentscomponents-since-we-no-longer-need-it
Deleting unused files/folders
2024-09-04 15:05:06 -04:00
Kenneth Kehl
b32dde1a07 debug key 2024-09-04 08:19:38 -07:00
Kenneth Kehl
87581705c6 merge from main 2024-09-04 08:09:25 -07:00
dependabot[bot]
3aa68a3d25 Bump sass-embedded from 1.77.8 to 1.78.0
Bumps [sass-embedded](https://github.com/sass/embedded-host-node) from 1.77.8 to 1.78.0.
- [Changelog](https://github.com/sass/embedded-host-node/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/embedded-host-node/compare/1.77.8...1.78.0)

---
updated-dependencies:
- dependency-name: sass-embedded
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-03 23:41:20 +00:00
Kenneth Kehl
1308894191 cleanup 2024-09-03 14:01:17 -07:00
Kenneth Kehl
35dcfccd5f fix tests maybe 2024-09-03 11:03:33 -07:00
Kenneth Kehl
ddf9c6d3ec fix tests maybe 2024-09-03 10:37:05 -07:00
Kenneth Kehl
9e9ba9186a try mock 2024-09-02 10:30:29 -07:00
Kenneth Kehl
b5e2bf705d try mock 2024-09-02 10:02:28 -07:00
Kenneth Kehl
5ada9914b4 try mock 2024-09-02 09:57:22 -07:00
Kenneth Kehl
c075cacae9 try mock 2024-09-02 09:46:27 -07:00
Kenneth Kehl
da7d618460 try mock 2024-09-02 09:42:52 -07:00
Kenneth Kehl
9340069454 try mock 2024-09-02 09:33:23 -07:00
Kenneth Kehl
6621144061 add load_test to excluded 2024-09-02 09:17:51 -07:00
Kenneth Kehl
f6a1f1af5b add load_test to excluded 2024-09-02 09:01:42 -07:00
Kenneth Kehl
8b81c5ce7d add load_test to excluded 2024-09-02 08:43:23 -07:00
Kenneth Kehl
ce74175be1 clean up 2024-09-02 08:34:15 -07:00
Kenneth Kehl
f74bf271a5 clean up 2024-09-02 08:22:03 -07:00
Kenneth Kehl
e8b12de581 clean up 2024-09-02 08:13:05 -07:00
Kenneth Kehl
dcc8055377 more work on load test 2024-09-02 07:51:57 -07:00
dependabot[bot]
ab96955982 Bump rollup from 4.21.1 to 4.21.2
Bumps [rollup](https://github.com/rollup/rollup) from 4.21.1 to 4.21.2.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.21.1...v4.21.2)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-30 23:35:24 +00:00
Kenneth Kehl
c36561ee4d start load test work 2024-08-30 09:50:01 -07:00
Beverly Nguyen
c51a5593a7 clean up 2024-08-29 17:34:24 -07:00
Beverly Nguyen
be14a4a0c4 fix testing 2024-08-29 17:10:51 -07:00
Beverly Nguyen
65ef22f26e removed template type 2024-08-29 15:19:51 -07:00
Beverly Nguyen
e704cb1b78 added template-stats.html 2024-08-29 15:10:08 -07:00
Beverly Nguyen
2cae3462d3 Merge branch 'main' into 1487-display-data-most-used-templates-table 2024-08-29 14:57:36 -07:00
Beverly Nguyen
5beb9fcce1 reverting changes 2024-08-29 14:56:12 -07:00
Beverly Nguyen
7fea566201 dashboard edit 2024-08-29 14:52:04 -07:00
Beverly Nguyen
3158b91378 new revised table 2024-08-29 14:28:37 -07:00
Beverly Nguyen
6f2c7be4ce fix testing 2024-08-29 12:24:44 -07:00
Beverly Nguyen
b15b3a67f6 delete unused files 2024-08-29 11:37:42 -07:00
Kenneth Kehl
8cc14ec4bf try using various commands in checks.yml to obtain admin logs while e2e tests are running 2024-08-29 11:37:21 -07:00
Kenneth Kehl
4dbd9ede92 try using various commands in checks.yml to obtain admin logs while e2e tests are running 2024-08-29 11:25:44 -07:00
Kenneth Kehl
38fde60348 try using various commands in checks.yml to obtain admin logs while e2e tests are running 2024-08-29 11:10:51 -07:00
Kenneth Kehl
b1ad888b65 try using various commands in checks.yml to obtain admin logs while e2e tests are running 2024-08-29 10:20:38 -07:00
Kenneth Kehl
43bafbb617 try using various commands in checks.yml to obtain admin logs while e2e tests are running 2024-08-29 10:07:21 -07:00
Kenneth Kehl
c5060d3f14 try putting default log handler back in place to get logs streaming to github job output 2024-08-29 09:40:36 -07:00
Kenneth Kehl
15a87ec026 try putting default log handler back in place to get logs streaming to github job output 2024-08-29 09:27:04 -07:00
Kenneth Kehl
2690a059d2 try putting default log handler back in place to get logs streaming to github job output 2024-08-29 09:15:23 -07:00
Kenneth Kehl
5cf80ec5dc try putting default log handler back in place to get logs streaming to github job output 2024-08-29 09:07:14 -07:00
Kenneth Kehl
6fffa3cf43 try putting default log handler back in place to get logs streaming to github job output 2024-08-29 08:54:53 -07:00
Kenneth Kehl
e4c99dc15b try to pass message back in 'next' field 2024-08-29 08:28:38 -07:00
Kenneth Kehl
33e616a8f1 try to pass message back in 'next' field 2024-08-29 08:07:37 -07:00
Kenneth Kehl
d4b9a95b29 hmmm 2024-08-28 13:39:35 -07:00
Kenneth Kehl
ed1ef5cd4a increase debug 2024-08-28 13:04:06 -07:00
Kenneth Kehl
caefc958df increase debug 2024-08-28 12:56:46 -07:00
Kenneth Kehl
981281f725 increase debug 2024-08-28 12:50:09 -07:00
Kenneth Kehl
4cacd108b1 increase debug 2024-08-28 12:36:32 -07:00
Kenneth Kehl
68c0763dec increase debug 2024-08-28 11:31:22 -07:00
Kenneth Kehl
3f7d1ffffe increase debug 2024-08-28 11:17:52 -07:00
Kenneth Kehl
7e38e28a5e increase debug 2024-08-28 11:04:25 -07:00
Kenneth Kehl
f5baf1cb79 increase debug 2024-08-28 10:50:47 -07:00
Kenneth Kehl
67f128c26e increase debug 2024-08-28 10:30:53 -07:00
Kenneth Kehl
88af5de89d increase debug 2024-08-28 10:14:31 -07:00
Kenneth Kehl
7d1a50a5b0 increase debug 2024-08-28 09:29:48 -07:00
Kenneth Kehl
758efa8215 increase debug 2024-08-28 08:02:40 -07:00
Kenneth Kehl
e9a8e2769a increase debug 2024-08-28 07:37:33 -07:00
Kenneth Kehl
f27d53116e increase debug 2024-08-28 07:17:13 -07:00
Beverly Nguyen
b20c8ec909 Merge pull request #1901 from GSA/notify-admin-1877
set timezone automatically
2024-08-27 17:35:58 -07:00
Kenneth Kehl
664d07b414 increase debug 2024-08-27 15:16:25 -07:00
Kenneth Kehl
da6e9f4e8c increase debug 2024-08-27 15:06:00 -07:00
Kenneth Kehl
549855c957 increase debug 2024-08-27 14:56:09 -07:00
Kenneth Kehl
20428f7485 increase debug 2024-08-27 14:43:28 -07:00
Kenneth Kehl
d00f4b5f46 try again 2024-08-27 14:22:07 -07:00
Kenneth Kehl
d756b2289f code review feedback 2024-08-27 12:47:15 -07:00
Beverly Nguyen
8f15a83415 Merge pull request #1898 from GSA/1862-data-visualization-bar-chart-isnt-show-clearly
1862 data visualization bar chart isnt show clearly
2024-08-27 12:26:47 -07:00
Beverly Nguyen
bb106c04f1 fixed testing 2024-08-27 12:19:55 -07:00
Carlo Costino
5a4402fd8b Merge pull request #1905 from GSA/dependabot/npm_and_yarn/rollup-4.21.1
Bump rollup from 4.21.0 to 4.21.1
2024-08-27 12:33:34 -04:00
Alex Janousek
3d808cd3e5 Merge pull request #1900 from GSA/dependabot/npm_and_yarn/babel/preset-env-7.25.4
Bump @babel/preset-env from 7.25.3 to 7.25.4
2024-08-27 08:41:46 -04:00
dependabot[bot]
87d4911f89 Bump rollup from 4.21.0 to 4.21.1
Bumps [rollup](https://github.com/rollup/rollup) from 4.21.0 to 4.21.1.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.21.0...v4.21.1)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 23:42:40 +00:00
Kenneth Kehl
407f049360 fix sort ugh 2024-08-26 11:11:59 -07:00
Kenneth Kehl
e15c89703b fix flake 8 2024-08-26 10:24:29 -07:00
Kenneth Kehl
9907409efd remove Change button for timezone 2024-08-26 10:06:29 -07:00
Kenneth Kehl
7b6b363532 add a call on the send page as well 2024-08-26 09:02:39 -07:00
Kenneth Kehl
f78fe350b0 fix flake 8 2024-08-26 07:59:39 -07:00
Kenneth Kehl
0c612581cd finish up 2024-08-26 07:50:24 -07:00
Beverly Nguyen
ca7c2e0c93 captialization 2024-08-23 18:36:16 -07:00
Beverly Nguyen
1768a4bbd9 changed scale y 2024-08-23 18:31:05 -07:00
Kenneth Kehl
3456bb47a1 move file around 2024-08-23 14:01:51 -07:00
Kenneth Kehl
8e3cd6324f fix some tests 2024-08-23 13:13:24 -07:00
Kenneth Kehl
c67407f090 fix some tests 2024-08-23 12:59:00 -07:00
Kenneth Kehl
50e67d2308 cleanup 2024-08-23 12:21:43 -07:00
Kenneth Kehl
85bafde78d fix flake 8 2024-08-23 12:13:14 -07:00
Kenneth Kehl
c7b83596ba add gulp reference 2024-08-23 11:47:43 -07:00
Kenneth Kehl
77d49754c6 initial 2024-08-23 11:03:32 -07:00
Carlo Costino
1361c2f836 Merge pull request #1834 from GSA/dependabot/pip/phonenumbers-8.13.43
Bump phonenumbers from 8.13.40 to 8.13.43
2024-08-23 11:42:54 -04:00
dependabot[bot]
5b14a4ea90 Bump @babel/preset-env from 7.25.3 to 7.25.4
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.25.3 to 7.25.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.25.4/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-22 23:36:50 +00:00
Beverly Nguyen
769e63ebc7 Merge branch 'main' into 1862-data-visualization-bar-chart-isnt-show-clearly 2024-08-22 15:46:40 -07:00
Beverly Nguyen
b40cb5a9ad updated width when sms is zero 2024-08-22 15:46:17 -07:00
Beverly Nguyen
6ae00cabfe Merge pull request #1887 from GSA/1886-cleaning-up-admin-and-fix-missing-files
Clean up admin folders/templates and fix missing files
2024-08-22 14:38:33 -07:00
Beverly Nguyen
13cdb10d88 Merge branch 'main' into 1886-cleaning-up-admin-and-fix-missing-files 2024-08-22 09:56:22 -07:00
dependabot[bot]
8c0fd48e06 Bump phonenumbers from 8.13.40 to 8.13.43
Bumps [phonenumbers](https://github.com/daviddrysdale/python-phonenumbers) from 8.13.40 to 8.13.43.
- [Commits](https://github.com/daviddrysdale/python-phonenumbers/compare/v8.13.40...v8.13.43)

---
updated-dependencies:
- dependency-name: phonenumbers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-22 16:18:00 +00:00
Andrew Shumway
4f9f546f23 Merge pull request #1829 from GSA/dependabot/pip/boto3-1.34.156
Bump boto3 from 1.34.150 to 1.34.156
2024-08-22 10:16:06 -06:00
Jonathan Bobel
4ca7087218 Merge pull request #1882 from GSA/1863-fix-pagination-count
remove ellipsis in pagination
2024-08-21 16:45:03 -04:00
Jonathan Bobel
75f6ee6837 Merge pull request #1885 from GSA/1881-closed-button-is-missing
updated url for close.svg
2024-08-21 16:44:16 -04:00
Carlo Costino
25722deb68 Merge pull request #1873 from GSA/dependabot/npm_and_yarn/better-npm-audit-3.8.3
Bump better-npm-audit from 3.7.3 to 3.8.3
2024-08-21 12:37:27 -04:00
dependabot[bot]
27c6098cc8 Bump better-npm-audit from 3.7.3 to 3.8.3
Bumps [better-npm-audit](https://github.com/jeemok/better-npm-audit) from 3.7.3 to 3.8.3.
- [Release notes](https://github.com/jeemok/better-npm-audit/releases)
- [Changelog](https://github.com/jeemok/better-npm-audit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jeemok/better-npm-audit/compare/v3.7.3...v3.8.3)

---
updated-dependencies:
- dependency-name: better-npm-audit
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-21 16:26:19 +00:00
Carlo Costino
f553b863c6 Merge pull request #1874 from GSA/dependabot/npm_and_yarn/rollup-4.21.0
Bump rollup from 4.20.0 to 4.21.0
2024-08-21 12:24:59 -04:00
Carlo Costino
5243878ef7 Merge pull request #1880 from GSA/notify-admin-1870
Change phone number in Notify.gov w/o entering password
2024-08-20 21:57:36 -04:00
Kenneth Kehl
3b1bd05a10 remove commented out code 2024-08-20 13:52:47 -07:00
Beverly Nguyen
10b65efe1f removed new folder and moved components to components folder 2024-08-20 13:17:01 -07:00
Beverly Nguyen
91f79f694e update webmanifest url to fix broken link 2024-08-20 12:19:09 -07:00
Beverly Nguyen
1bfd619057 updated url for close.svg 2024-08-20 12:01:06 -07:00
Kenneth Kehl
03fae4d08f fix test 2024-08-20 07:14:45 -07:00
Beverly Nguyen
67b928085c remove jobs 2024-08-19 14:37:45 -07:00
Beverly Nguyen
cd98439ac3 remove ellipsis in pagination 2024-08-19 14:33:28 -07:00
Kenneth Kehl
f0ec9e3da9 fix imports 2024-08-19 13:57:07 -07:00
Kenneth Kehl
66a555a2d4 remove print statements 2024-08-19 13:11:02 -07:00
Kenneth Kehl
339797558a remove debug 2024-08-19 13:02:20 -07:00
Kenneth Kehl
672fed7e4b initial 2024-08-19 10:57:08 -07:00
Carlo Costino
5a3f3e5ca0 Merge pull request #1864 from GSA/1859-activity-page-recent-job-reports-not-displaying-for-some-one-off-sends
changed download conditionals
2024-08-19 12:37:52 -04:00
dependabot[bot]
6b236bfa0f Bump boto3 from 1.34.150 to 1.34.156
Bumps [boto3](https://github.com/boto/boto3) from 1.34.150 to 1.34.156.
- [Release notes](https://github.com/boto/boto3/releases)
- [Commits](https://github.com/boto/boto3/compare/1.34.150...1.34.156)

---
updated-dependencies:
- dependency-name: boto3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 16:32:56 +00:00
Andrew Shumway
0c1fc478da Merge pull request #1872 from GSA/add-andrew-assignee-dependabot
Add andrew assignee dependabot
2024-08-19 10:30:21 -06:00
Kenneth Kehl
01eb194a08 Merge pull request #1858 from GSA/1857-no-messages-sent-y-axis-fix
1857 - Activity chart updates
2024-08-19 09:25:45 -07:00
Andrew Shumway
2c7d9d48dc Pull main 2024-08-19 09:57:25 -06:00
dependabot[bot]
1d03d73642 Bump rollup from 4.20.0 to 4.21.0
Bumps [rollup](https://github.com/rollup/rollup) from 4.20.0 to 4.21.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.20.0...v4.21.0)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 15:52:59 +00:00
Alex Janousek
b61329f86d Merge pull request #1853 from GSA/dependabot/update
Added Alex to dependabot node assignee
2024-08-19 11:51:36 -04:00
Andrew Shumway
062eefcf7a Add Andrew to dependabot assignee/review 2024-08-19 09:20:51 -06:00
Beverly Nguyen
8b2a3c26fa changed download conditionals 2024-08-16 11:01:00 -07:00
Andrew Shumway
b7a0dc2225 pull main 2024-08-16 10:59:40 -06:00
Andrew Shumway
6dc9efd13d Poetry lock 2024-08-16 10:59:14 -06:00
Jonathan Bobel
1eb54f8252 Activity chart updates 2024-08-16 11:27:48 -04:00
alexjanousekGSA
eca30e5b20 Added Alex to dependabot node assignee 2024-08-15 15:36:09 -04:00
Carlo Costino
0b75486210 Merge pull request #1852 from GSA/fix-prod-terraform-formatting
Fix formatting in production main.tf file
2024-08-15 14:48:12 -04:00
Alex Janousek
5adc45d591 Merge pull request #1836 from GSA/dependabot/npm_and_yarn/uswds/uswds-3.8.2
Bump @uswds/uswds from 3.8.1 to 3.8.2
2024-08-15 14:35:13 -04:00
Carlo Costino
4cdcdc075c Fix formatting in production main.tf file
This changeset fixes formatting in the production main.tf file.  The terraform fmt -check command is currently failing because of extra whitespace.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2024-08-15 14:34:56 -04:00
dependabot[bot]
932963beb5 Bump @uswds/uswds from 3.8.1 to 3.8.2
Bumps [@uswds/uswds](https://github.com/uswds/uswds) from 3.8.1 to 3.8.2.
- [Release notes](https://github.com/uswds/uswds/releases)
- [Commits](https://github.com/uswds/uswds/compare/v3.8.1...v3.8.2)

---
updated-dependencies:
- dependency-name: "@uswds/uswds"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-13 02:28:57 +00:00
Andrew Shumway
136e82102b Pull main 2024-08-02 09:00:24 -06:00
Andrew Shumway
b84d00bfb1 poetry lock 2024-08-02 09:00:04 -06:00
Andrew Shumway
0ea4d8897e Pull main 2024-07-31 12:18:03 -06:00
Andrew Shumway
8a3bdd181d Pull main 2024-07-10 08:36:49 -06:00
Andrew Shumway
a81dc83133 pull main 2024-07-05 09:07:08 -06:00
Andrew Shumway
cc24604aa4 Pull main 2024-06-27 08:47:01 -06:00
Andrew Shumway
ea8cfbdadb poetry lock 2024-06-13 10:43:46 -06:00
Andrew Shumway
d1ed7e1d0c Pull main 2024-06-12 09:29:37 -06:00
Andrew Shumway
f9169fcbcb poetry lock 2024-06-03 15:55:37 -06:00
Andrew Shumway
17b21b2382 Pull main 2024-05-31 09:27:42 -06:00
Kenneth Kehl
170527cfdf add API HOST NAME to workaround 2024-04-29 12:05:25 -07:00
Kenneth Kehl
7b570bfbed ugh 2024-04-29 11:35:33 -07:00
Kenneth Kehl
bc72288d4d workaround in conftest for pytest.ini overriding all our env variables 2024-04-29 11:06:25 -07:00
Kenneth Kehl
e50b4bb5f7 try overriding pytest.ini variables 2024-04-29 10:42:31 -07:00
Kenneth Kehl
32f1bb4f87 revert 2024-04-29 09:42:32 -07:00
Kenneth Kehl
594ad74006 remove ampersand 2024-04-29 09:31:58 -07:00
Kenneth Kehl
3b9664f220 more debug 2024-04-29 09:09:49 -07:00
Kenneth Kehl
9897385837 try switching env to development 2024-04-29 08:59:08 -07:00
Kenneth Kehl
4ec3bc5892 merge from main 2024-04-29 07:44:10 -07:00
Kenneth Kehl
358971164e fix manifest 2024-04-15 13:07:53 -07:00
Kenneth Kehl
282611ec9c more debug about state.json 2024-04-15 10:39:37 -07:00
Kenneth Kehl
4a6539197f more debug about state.json 2024-04-15 10:27:25 -07:00
Kenneth Kehl
e92fd011ca more debug about state.json 2024-04-15 10:22:31 -07:00
Kenneth Kehl
9e0fe69d2b more debug 2024-04-15 09:25:46 -07:00
Kenneth Kehl
0ce3d5033c more debug 2024-04-15 09:20:15 -07:00
Kenneth Kehl
ff110de97f more debug 2024-04-15 09:08:47 -07:00
Kenneth Kehl
d54c339994 more debug 2024-04-15 08:56:38 -07:00
Kenneth Kehl
3dc73ab92e more debug 2024-04-15 08:24:20 -07:00
Kenneth Kehl
42570416da debug in case auth state path doesn't exist 2024-04-15 07:33:27 -07:00
Kenneth Kehl
e934e49137 fix 2024-04-12 15:07:47 -07:00
Kenneth Kehl
cec1e4cff0 fix 2024-04-12 14:57:37 -07:00
Kenneth Kehl
31762239dd fix 2024-04-12 14:46:49 -07:00
Kenneth Kehl
017198754f point to staging for e2e 2024-04-12 14:29:39 -07:00
126 changed files with 4054 additions and 5901 deletions

View File

@@ -133,15 +133,7 @@
"filename": ".github/workflows/checks.yml",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 65,
"is_secret": false
},
{
"type": "Basic Auth Credentials",
"filename": ".github/workflows/checks.yml",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 99,
"line_number": 68,
"is_secret": false
}
],
@@ -169,7 +161,7 @@
"filename": "app/config.py",
"hashed_secret": "577a4c667e4af8682ca431857214b3a920883efc",
"is_verified": false,
"line_number": 117,
"line_number": 118,
"is_secret": false
}
],
@@ -601,7 +593,7 @@
"filename": "tests/app/main/views/test_user_profile.py",
"hashed_secret": "8072d7aad32964ec43fbcb699c75dc38890792f7",
"is_verified": false,
"line_number": 350,
"line_number": 336,
"is_secret": false
},
{
@@ -609,7 +601,7 @@
"filename": "tests/app/main/views/test_user_profile.py",
"hashed_secret": "4c9dbb972da179e4f66f023eaa5fb9451d835030",
"is_verified": false,
"line_number": 351,
"line_number": 337,
"is_secret": false
}
],
@@ -692,5 +684,5 @@
}
]
},
"generated_at": "2024-08-15T16:29:15Z"
"generated_at": "2024-10-07T20:44:40Z"
}

View File

@@ -1,6 +1,9 @@
name: Deploy egress proxy
description: Set egress space security groups and deploy proxy
inputs:
cf_org:
description: The org the target app exists in.
required: true
cf_space:
description: The space the target app exists in.
required: true
@@ -16,6 +19,19 @@ inputs:
runs:
using: composite
steps:
- name: Install cf-cli
shell: bash
run: |
curl -A "cg-deploy-action" -v -L -o cf-cli_amd64.deb 'https://packages.cloudfoundry.org/stable?release=debian64&version=v8&source=github'
sudo dpkg -i cf-cli_amd64.deb
- name: Login to cf-cli
shell: bash
run: |
cf api api.fr.cloud.gov
cf auth
- name: Target org and space
shell: bash
run: cf target -o ${{ inputs.cf_org }} -s ${{ inputs.cf_space }}
- name: Set restricted space egress
shell: bash
run: ./terraform/set_space_egress.sh -t -s ${{ inputs.cf_space }}

View File

@@ -9,8 +9,16 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "daily"
assignees:
- "A-Shumway42"
reviewers:
- "A-Shumway42"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
versioning-strategy: increase
assignees:
- "alexjanousekGSA"
reviewers:
- "alexjanousekGSA"

View File

@@ -53,11 +53,13 @@ jobs:
end-to-end-tests:
if: ${{ github.actor != 'dependabot[bot]' }}
permissions:
checks: write
pull-requests: write
contents: write
runs-on: ubuntu-latest
environment: staging
services:
postgres:
image: postgres
@@ -89,65 +91,33 @@ jobs:
- uses: ./.github/actions/setup-project
- uses: jwalton/gh-find-current-pr@v1
id: findPr
- name: Clone API
uses: actions/checkout@v4
with:
repository: GSA/notifications-api
path: "notifications-api"
- name: Install API dependencies
working-directory: "notifications-api"
run: make bootstrap
env:
DATABASE_URL: postgresql://user:password@localhost:5432/test_notification_api
SQLALCHEMY_DATABASE_TEST_URI: postgresql://user:password@localhost:5432/test_notification_api
REDIS_URL: redis://localhost:6379
NOTIFY_E2E_TEST_EMAIL: ${{ secrets.NOTIFY_E2E_TEST_EMAIL }}
NOTIFY_E2E_TEST_PASSWORD: ${{ secrets.NOTIFY_E2E_TEST_PASSWORD }}
NOTIFY_ENVIRONMENT: development
- name: Run API server
working-directory: "notifications-api"
run: make run-procfile &
env:
DATABASE_URL: postgresql://user:password@localhost:5432/test_notification_api
SQLALCHEMY_DATABASE_TEST_URI: postgresql://user:password@localhost:5432/test_notification_api
REDIS_URL: redis://localhost:6379
NOTIFY_E2E_TEST_EMAIL: ${{ secrets.NOTIFY_E2E_TEST_EMAIL }}
NOTIFY_E2E_TEST_PASSWORD: ${{ secrets.NOTIFY_E2E_TEST_PASSWORD }}
NOTIFY_ENVIRONMENT: development
- name: Check API Server availability
run: |
curl --fail -v https://notify-api-staging.app.cloud.gov || exit 1
- name: Run Admin server
run: make run-flask &
# If we want to log stuff and see what's broken,
# insert this line:
# tail -f admin-server.log &
# above make e2e-test
run: |
make run-flask > admin-server.log 2>&1 &
tail -f admin-server.log &
make e2e-test
env:
# API_HOST_NAME: https://notify-api-staging.app.cloud.gov
API_HOST_NAME: http://localhost:6011
DANGEROUS_SALT: ${{ secrets.DANGEROUS_SALT }}
API_HOST_NAME: https://notify-api-staging.app.cloud.gov/
SECRET_KEY: ${{ secrets.SECRET_KEY }}
DANGEROUS_SALT: ${{ secrets.DANGEROUS_SALT }}
ADMIN_CLIENT_SECRET: ${{ secrets.ADMIN_CLIENT_SECRET }}
ADMIN_CLIENT_USERNAME: notify-admin
NOTIFY_ENVIRONMENT: e2etest
NOTIFY_E2E_AUTH_STATE_PATH: ${{ secrets.NOTIFY_E2E_AUTH_STATE_PATH }}
NOTIFY_E2E_TEST_EMAIL: ${{ secrets.NOTIFY_E2E_TEST_EMAIL }}
NOTIFY_E2E_TEST_PASSWORD: ${{ secrets.NOTIFY_E2E_TEST_PASSWORD }}
NOTIFY_E2E_TEST_URI: http://localhost:6012
- name: Run E2E tests
# Run the E2E tests against the code found in this PR.
# run: poetry run pytest -v --browser chromium --browser firefox --browser webkit tests/end_to_end
# --browser webkit doesn't work at this time.
run: make e2e-test
# Debugging for now to troubleshoot a connectivity issue to the local servers
# run: curl --request GET --url "http://localhost:6012"
env:
API_HOST_NAME: http://localhost:6011
DANGEROUS_SALT: ${{ secrets.DANGEROUS_SALT }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
ADMIN_CLIENT_SECRET: ${{ secrets.ADMIN_CLIENT_SECRET }}
ADMIN_CLIENT_USERNAME: notify-admin
NOTIFY_ENVIRONMENT: e2etest
NOTIFY_E2E_AUTH_STATE_PATH: ${{ secrets.NOTIFY_E2E_AUTH_STATE_PATH }}
NOTIFY_E2E_TEST_EMAIL: ${{ secrets.NOTIFY_E2E_TEST_EMAIL }}
NOTIFY_E2E_TEST_PASSWORD: ${{ secrets.NOTIFY_E2E_TEST_PASSWORD }}
NOTIFY_E2E_TEST_URI: http://localhost:6012
NOTIFY_E2E_TEST_URI: http://localhost:6012/
VCAP_SERVICES: ${{ secrets.VCAP_SERVICES }}
validate-new-relic-config:
runs-on: ubuntu-latest
environment: staging

View File

@@ -47,11 +47,12 @@ jobs:
run: poetry export --without-hashes --format=requirements.txt > requirements.txt
- name: Deploy to cloud.gov
uses: 18f/cg-deploy-action@main
uses: cloud-gov/cg-cli-tools@main
env:
DANGEROUS_SALT: ${{ secrets.DANGEROUS_SALT }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
ADMIN_CLIENT_SECRET: ${{ secrets.ADMIN_CLIENT_SECRET }}
ADMIN_CLIENT_USERNAME: "notify-admin"
NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }}
NR_BROWSER_KEY: ${{ secrets.NR_BROWSER_KEY }}
COMMIT_HASH: ${{ github.sha }}
@@ -63,21 +64,22 @@ jobs:
LOGIN_DOT_GOV_BASE_LOGOUT_URL: "https://secure.login.gov/openid_connect/logout?"
LOGIN_DOT_GOV_SIGNOUT_REDIRECT: "https://notify-demo.app.cloud.gov/sign-out"
LOGIN_DOT_GOV_INITIAL_SIGNIN_URL: "https://secure.login.gov/openid_connect/authorize?acr_values=http%3A%2F%2Fidmanagement.gov%2Fns%2Fassurance%2Fial%2F1&client_id=urn:gov:gsa:openidconnect.profiles:sp:sso:gsa:notify-gov&nonce=NONCE&prompt=select_account&redirect_uri=https://notify-demo.app.cloud.gov/sign-in&response_type=code&scope=openid+email&state=STATE"
LOGIN_DOT_GOV_CERTS_URL: "https://secure.login.gov/api/openid_connect/certs"
with:
cf_username: ${{ secrets.CLOUDGOV_USERNAME }}
cf_password: ${{ secrets.CLOUDGOV_PASSWORD }}
cf_org: gsa-tts-benefits-studio
cf_space: notify-demo
push_arguments: >-
push -f manifest.yml
--vars-file deploy-config/demo.yml
--var DANGEROUS_SALT="$DANGEROUS_SALT"
--var SECRET_KEY="$SECRET_KEY"
--var ADMIN_CLIENT_USERNAME="notify-admin"
--var ADMIN_CLIENT_SECRET="$ADMIN_CLIENT_SECRET"
--var ADMIN_CLIENT_USERNAME="$ADMIN_CLIENT_USERNAME"
--var NEW_RELIC_LICENSE_KEY="$NEW_RELIC_LICENSE_KEY"
--var NR_BROWSER_KEY="$NR_BROWSER_KEY"
--var COMMIT_HASH="$COMMIT_HASH"
--var LOGIN_PEM="$LOGIN_PEM"
--var LOGIN_DOT_GOV_CLIENT_ID="$LOGIN_DOT_GOV_CLIENT_ID"
--var LOGIN_DOT_GOV_USER_INFO_URL="$LOGIN_DOT_GOV_USER_INFO_URL"
--var LOGIN_DOT_GOV_ACCESS_TOKEN_URL="$LOGIN_DOT_GOV_ACCESS_TOKEN_URL"
@@ -85,6 +87,9 @@ jobs:
--var LOGIN_DOT_GOV_BASE_LOGOUT_URL="$LOGIN_DOT_GOV_BASE_LOGOUT_URL"
--var LOGIN_DOT_GOV_SIGNOUT_REDIRECT="$LOGIN_DOT_GOV_SIGNOUT_REDIRECT"
--var LOGIN_DOT_GOV_INITIAL_SIGNIN_URL="$LOGIN_DOT_GOV_INITIAL_SIGNIN_URL"
--var LOGIN_DOT_GOV_CERTS_URL="$LOGIN_DOT_GOV_CERTS_URL"
--var LOGIN_PEM="$LOGIN_PEM"
--strategy rolling
- name: Check for changes to egress config
id: changed-egress-config
@@ -97,6 +102,10 @@ jobs:
- name: Deploy egress proxy
if: steps.changed-egress-config.outputs.any_changed == 'true'
uses: ./.github/actions/deploy-proxy
env:
CF_USERNAME: ${{ secrets.CLOUDGOV_USERNAME }}
CF_PASSWORD: ${{ secrets.CLOUDGOV_PASSWORD }}
with:
cf_org: gsa-tts-benefits-studio
cf_space: notify-demo
app: notify-admin-demo

View File

@@ -47,11 +47,12 @@ jobs:
run: poetry export --without-hashes --format=requirements.txt > requirements.txt
- name: Deploy to cloud.gov
uses: 18f/cg-deploy-action@main
uses: cloud-gov/cg-cli-tools@main
env:
DANGEROUS_SALT: ${{ secrets.DANGEROUS_SALT }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
ADMIN_CLIENT_SECRET: ${{ secrets.ADMIN_CLIENT_SECRET }}
ADMIN_CLIENT_USERNAME: "notify-admin"
NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }}
NR_BROWSER_KEY: ${{ secrets.NR_BROWSER_KEY }}
COMMIT_HASH: ${{ github.sha }}
@@ -63,21 +64,22 @@ jobs:
LOGIN_DOT_GOV_BASE_LOGOUT_URL: "https://secure.login.gov/openid_connect/logout?"
LOGIN_DOT_GOV_SIGNOUT_REDIRECT: "https://beta.notify.gov/sign-out"
LOGIN_DOT_GOV_INITIAL_SIGNIN_URL: "https://secure.login.gov/openid_connect/authorize?acr_values=http%3A%2F%2Fidmanagement.gov%2Fns%2Fassurance%2Fial%2F1&client_id=urn:gov:gsa:openidconnect.profiles:sp:sso:gsa:notify-gov&nonce=NONCE&prompt=select_account&redirect_uri=https://beta.notify.gov/sign-in&response_type=code&scope=openid+email&state=STATE"
LOGIN_DOT_GOV_CERTS_URL: "https://secure.login.gov/api/openid_connect/certs"
with:
cf_username: ${{ secrets.CLOUDGOV_USERNAME }}
cf_password: ${{ secrets.CLOUDGOV_PASSWORD }}
cf_org: gsa-tts-benefits-studio
cf_space: notify-production
push_arguments: >-
push -f manifest.yml
--vars-file deploy-config/production.yml
--var DANGEROUS_SALT="$DANGEROUS_SALT"
--var SECRET_KEY="$SECRET_KEY"
--var ADMIN_CLIENT_USERNAME="notify-admin"
--var ADMIN_CLIENT_SECRET="$ADMIN_CLIENT_SECRET"
--var ADMIN_CLIENT_USERNAME="$ADMIN_CLIENT_USERNAME"
--var NEW_RELIC_LICENSE_KEY="$NEW_RELIC_LICENSE_KEY"
--var NR_BROWSER_KEY="$NR_BROWSER_KEY"
--var COMMIT_HASH="$COMMIT_HASH"
--var LOGIN_PEM="$LOGIN_PEM"
--var LOGIN_DOT_GOV_CLIENT_ID="$LOGIN_DOT_GOV_CLIENT_ID"
--var LOGIN_DOT_GOV_USER_INFO_URL="$LOGIN_DOT_GOV_USER_INFO_URL"
--var LOGIN_DOT_GOV_ACCESS_TOKEN_URL="$LOGIN_DOT_GOV_ACCESS_TOKEN_URL"
@@ -85,6 +87,9 @@ jobs:
--var LOGIN_DOT_GOV_BASE_LOGOUT_URL="$LOGIN_DOT_GOV_BASE_LOGOUT_URL"
--var LOGIN_DOT_GOV_SIGNOUT_REDIRECT="$LOGIN_DOT_GOV_SIGNOUT_REDIRECT"
--var LOGIN_DOT_GOV_INITIAL_SIGNIN_URL="$LOGIN_DOT_GOV_INITIAL_SIGNIN_URL"
--var LOGIN_DOT_GOV_CERTS_URL="$LOGIN_DOT_GOV_CERTS_URL"
--var LOGIN_PEM="$LOGIN_PEM"
--strategy rolling
- name: Check for changes to egress config
id: changed-egress-config
@@ -97,6 +102,10 @@ jobs:
- name: Deploy egress proxy
if: steps.changed-egress-config.outputs.any_changed == 'true'
uses: ./.github/actions/deploy-proxy
env:
CF_USERNAME: ${{ secrets.CLOUDGOV_USERNAME }}
CF_PASSWORD: ${{ secrets.CLOUDGOV_PASSWORD }}
with:
cf_space: notify-production
app: notify-admin-production
cf_org: gsa-tts-benefits-studio
cf_space: notify-prod
app: notify-admin-prod

View File

@@ -53,11 +53,12 @@ jobs:
- name: Deploy to cloud.gov
uses: 18f/cg-deploy-action@main
uses: cloud-gov/cg-cli-tools@main
env:
DANGEROUS_SALT: ${{ secrets.DANGEROUS_SALT }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
ADMIN_CLIENT_SECRET: ${{ secrets.ADMIN_CLIENT_SECRET }}
ADMIN_CLIENT_USERNAME: "notify-admin"
NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }}
NR_BROWSER_KEY: ${{ secrets.NR_BROWSER_KEY }}
COMMIT_HASH: ${{ github.sha }}
@@ -69,21 +70,22 @@ jobs:
LOGIN_DOT_GOV_BASE_LOGOUT_URL: "https://secure.login.gov/openid_connect/logout?"
LOGIN_DOT_GOV_SIGNOUT_REDIRECT: "https://notify-staging.app.cloud.gov/sign-out"
LOGIN_DOT_GOV_INITIAL_SIGNIN_URL: "https://secure.login.gov/openid_connect/authorize?acr_values=http%3A%2F%2Fidmanagement.gov%2Fns%2Fassurance%2Fial%2F1&client_id=urn:gov:gsa:openidconnect.profiles:sp:sso:gsa:notify-gov&nonce=NONCE&prompt=select_account&redirect_uri=https://notify-staging.app.cloud.gov/sign-in&response_type=code&scope=openid+email&state=STATEE"
LOGIN_DOT_GOV_CERTS_URL: "https://secure.login.gov/api/openid_connect/certs"
with:
cf_username: ${{ secrets.CLOUDGOV_USERNAME }}
cf_password: ${{ secrets.CLOUDGOV_PASSWORD }}
cf_org: gsa-tts-benefits-studio
cf_space: notify-staging
push_arguments: >-
cf_command: >-
push -f manifest.yml
--vars-file deploy-config/staging.yml
--var DANGEROUS_SALT="$DANGEROUS_SALT"
--var SECRET_KEY="$SECRET_KEY"
--var ADMIN_CLIENT_USERNAME="notify-admin"
--var ADMIN_CLIENT_SECRET="$ADMIN_CLIENT_SECRET"
--var ADMIN_CLIENT_USERNAME="$ADMIN_CLIENT_USERNAME"
--var NEW_RELIC_LICENSE_KEY="$NEW_RELIC_LICENSE_KEY"
--var NR_BROWSER_KEY="$NR_BROWSER_KEY"
--var COMMIT_HASH="$COMMIT_HASH"
--var LOGIN_PEM="$LOGIN_PEM"
--var LOGIN_DOT_GOV_CLIENT_ID="$LOGIN_DOT_GOV_CLIENT_ID"
--var LOGIN_DOT_GOV_USER_INFO_URL="$LOGIN_DOT_GOV_USER_INFO_URL"
--var LOGIN_DOT_GOV_ACCESS_TOKEN_URL="$LOGIN_DOT_GOV_ACCESS_TOKEN_URL"
@@ -91,6 +93,9 @@ jobs:
--var LOGIN_DOT_GOV_BASE_LOGOUT_URL="$LOGIN_DOT_GOV_BASE_LOGOUT_URL"
--var LOGIN_DOT_GOV_SIGNOUT_REDIRECT="$LOGIN_DOT_GOV_SIGNOUT_REDIRECT"
--var LOGIN_DOT_GOV_INITIAL_SIGNIN_URL="$LOGIN_DOT_GOV_INITIAL_SIGNIN_URL"
--var LOGIN_DOT_GOV_CERTS_URL="$LOGIN_DOT_GOV_CERTS_URL"
--var LOGIN_PEM="$LOGIN_PEM"
--strategy rolling
- name: Check for changes to egress config
@@ -104,7 +109,11 @@ jobs:
- name: Deploy egress proxy
if: steps.changed-egress-config.outputs.any_changed == 'true'
uses: ./.github/actions/deploy-proxy
env:
CF_USERNAME: ${{ secrets.CLOUDGOV_USERNAME }}
CF_PASSWORD: ${{ secrets.CLOUDGOV_PASSWORD }}
with:
cf_org: gsa-tts-benefits-studio
cf_space: notify-staging
app: notify-admin-staging

5
.gitignore vendored
View File

@@ -134,3 +134,8 @@ playwright/
# Nodenv
.node-version
# BackstopJS
backstop_data/bitmaps_test/
backstop_data/html_report/
backstop_data/engine_scripts/playwright/

3
.prettierrc Normal file
View File

@@ -0,0 +1,3 @@
{
"singleQuote": true
}

View File

@@ -88,7 +88,7 @@ dead-code: ## 60% is our aspirational goal, but currently breaks the build
.PHONY: e2e-test
e2e-test: export NEW_RELIC_ENVIRONMENT=test
e2e-test: ## Run end-to-end integration tests; note that --browser webkit isn't currently working
poetry run pytest -vv --browser chromium --browser firefox tests/end_to_end
DEBUG=pw:api,pw:browser poetry run pytest -vv --browser chromium --browser firefox tests/end_to_end
.PHONY: js-lint
js-lint: ## Run javascript linting scanners

View File

@@ -507,3 +507,13 @@ insurance.
For more information on what we're working on, the Notify tool, and how to get
involved with our team,
[see our flyer.](https://github.com/GSA/notifications-admin/blob/main/docs/notify-pilot-flyer.md)
## Updating secrets for the E2E tests
At some point, E2E tests will fail because the secrets held in VCAP_SERVICES have expired. To refresh
them, you will need to do the following:
1. Log in the normal way to access cloudfoundry command line options
2. In your terminal, run `chmod +x print_vcap.sh`
3. In your terminal, run `./print_vcap.sh`
4. Copy the value in your terminal and paste it into the VCAP_SERVICES secret in Github on the staging tier.

View File

@@ -17,7 +17,7 @@
href="/static/images/apple-touch-icon.png?a0f7e1b728a42016b247dc54ee40d055">
<link rel="icon" type="image/png" sizes="32x32" href="/static/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/static/images/favicon-16x16.png">
<link rel="manifest" href="/static/images/site.webmanifest">
<link rel="manifest" href="{{ asset_url('images/site.webmanifest') }}">
<link rel="stylesheet" media="screen" href="/static/stylesheets/main.css?d077f86473501ab244de0b30600536ee" />
<link rel="stylesheet" media="print" href="/static/stylesheets/print.css?28010888ca5719dc83d7c2c80f6ed2b2" />
@@ -68,11 +68,8 @@
<p class="usa-body">
Try again later.
</p>
<p class="usa-body">
You can check our <a class="usa-link"
href="https://status.notifications.service.gov.uk/">system status</a> page to see if there are any known
issues.<br />To report a problem, email <a
href="mailto:gov-uk-notify-support@digital.cabinet-office.gov.uk">gov-uk-notify-support@digital.cabinet-office.gov.uk</a>
<p>To report a problem you can email us at <a class="usa-link" href="mailto:notify-support@gsa.gov">notify-support@gsa.gov</a>.</p>
<p>You can expect a response within one business day.</p>
</div>
</div>
</main>

View File

@@ -64,7 +64,7 @@
.padding(0.1);
// Adjust the y-axis domain to add some space above the tallest bar
const maxY = d3.max(deliveredData.map((d, i) => d + (failedData[i] || 0)));
const y = d3.scaleLinear()
const y = d3.scaleSqrt()
.domain([0, maxY + 2]) // Add 2 units of space at the top
.nice()
.range([height, 0]);
@@ -201,6 +201,8 @@
deliveredData = [];
failedData = [];
let totalMessages = 0;
for (var dateString in data) {
if (data.hasOwnProperty(dateString)) {
const dateParts = dateString.split('-');
@@ -209,11 +211,38 @@
labels.push(formattedDate);
deliveredData.push(data[dateString].sms.delivered);
failedData.push(data[dateString].sms.failure);
// Calculate the total number of messages
totalMessages += data[dateString].sms.delivered + data[dateString].sms.failure;
}
}
createChart('#weeklyChart', labels, deliveredData, failedData);
createTable('weeklyTable', 'activityChart', labels, deliveredData, failedData);
// Check if there are no messages sent
const subTitle = document.querySelector(`#activityChartContainer .chart-subtitle`);
if (totalMessages === 0) {
// Remove existing chart and render the alert message
d3.select('#weeklyChart').selectAll('*').remove();
d3.select('#weeklyChart')
.append('div')
.html(`
<div class="usa-alert usa-alert--info usa-alert--slim">
<div class="usa-alert__body">
<p class="usa-alert__text">
No messages sent in the last 7 days
</p>
</div>
</div>
`);
// Hide the subtitle
if (subTitle) {
subTitle.style.display = 'none';
}
} else {
// If there are messages, create the chart and table
createChart('#weeklyChart', labels, deliveredData, failedData);
createTable('weeklyTable', 'activityChart', labels, deliveredData, failedData);
}
return data;
})
.catch(error => console.error('Error fetching daily stats:', error));

View File

@@ -14,7 +14,7 @@
document.getElementById('message').innerText = `${sms_sent.toLocaleString()} sent / ${sms_remaining_messages.toLocaleString()} remaining`;
// Calculate minimum width for "Messages Sent" as 1% of the total chart width
var minSentPercentage = 0.02; // Minimum width as a percentage of total messages (1% in this case)
var minSentPercentage = (sms_sent === 0) ? 0 : 0.02;
var minSentValue = totalMessages * minSentPercentage;
var displaySent = Math.max(sms_sent, minSentValue);
var displayRemaining = totalMessages - displaySent;

View File

@@ -0,0 +1,4 @@
document.addEventListener('DOMContentLoaded', function() {
var timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
document.cookie = `timezone=${timeZone}; path=/`;
})

View File

@@ -9,6 +9,9 @@ $failed: color('gray-cool-20');
&.usage {
height: units(4);
}
svg {
overflow: visible;
}
}
#totalMessageChartContainer {

View File

@@ -34,6 +34,11 @@ $path: '/static/images/';
// Dependencies from GOV.UK Frontend, packaged to be specific to this application
@import './govuk-frontend/all';
// Custom overrides
.govuk-link {
font-weight: bold;
}
// Specific to this application
@import 'local/typography';
@import 'grids';

View File

@@ -8,6 +8,7 @@ from notifications_utils import DAILY_MESSAGE_LIMIT
class Config(object):
SIMULATED_SMS_NUMBERS = ("+14254147755", "+14254147167")
NOTIFY_APP_NAME = "admin"
NOTIFY_ENVIRONMENT = getenv("NOTIFY_ENVIRONMENT", "development")
API_HOST_NAME = getenv("API_HOST_NAME", "localhost")

View File

@@ -14,7 +14,7 @@ Learn how to [personalize messages](/using-notify/guidance) to increase response
Learn about message _parts_ and [how limits are calculated](/using-notify/pricing).
5. ## Start sending messages
To remove the restrictions of Trial Mode and begin sending messages to clients complete the [Live Campaign Form](https://airtable.com/appe4n7jYOALPLcyU/shrIPWnLTw9U1fclL).
To remove the restrictions of Trial Mode and begin sending messages to clients complete the <a class="usa-link usa-link--external" href="https://docs.google.com/forms/d/1fnaBtxuGf3q-OdGVyt2LqBKvp9_P21kmKJa0yIK8rWM/edit">Go-Live Form</a>.
Well respond within one business day.
### Questions?

View File

@@ -16,6 +16,7 @@ from app import (
)
from app.formatters import format_date_numeric, format_datetime_numeric, get_time_left
from app.main import main
from app.main.views.user_profile import set_timezone
from app.statistics_utils import get_formatted_percentage
from app.utils import (
DELIVERED_STATUSES,
@@ -39,6 +40,7 @@ def old_service_dashboard(service_id):
@main.route("/services/<uuid:service_id>")
@user_has_permissions()
def service_dashboard(service_id):
if session.get("invited_user_id"):
session.pop("invited_user_id", None)
session["service_id"] = service_id
@@ -323,13 +325,19 @@ def aggregate_template_usage(template_statistics, sort_key="count"):
key=lambda x: x["template_id"],
):
template_stats = list(v)
first_stat = template_stats[0] if template_stats else None
templates.append(
{
"template_id": k,
"template_name": template_stats[0]["template_name"],
"template_type": template_stats[0]["template_type"],
"template_name": first_stat.get("template_name"),
"template_type": first_stat.get("template_type"),
"count": sum(s["count"] for s in template_stats),
"created_by": first_stat.get("created_by"),
"created_by_id": first_stat.get("created_by_id"),
"last_used": first_stat.get("last_used"),
"status": first_stat.get("status"),
"template_folder": first_stat.get("template_folder"),
"template_folder_id": first_stat.get("template_folder_id"),
}
)
@@ -402,11 +410,13 @@ def get_dashboard_partials(service_id):
def get_dashboard_totals(statistics):
for msg_type in statistics.values():
msg_type["failed_percentage"] = get_formatted_percentage(
msg_type["failed"], msg_type["requested"]
)
msg_type["show_warning"] = float(msg_type["failed_percentage"]) > 3
return statistics
@@ -465,6 +475,8 @@ def get_months_for_financial_year(year, time_format="%B"):
def get_current_month_for_financial_year(year):
# Setting the timezone here because we need to set it somewhere.
set_timezone()
current_month = datetime.now().month
return current_month

View File

@@ -1,6 +1,15 @@
import os
import secrets
from flask import abort, current_app, redirect, render_template, request, url_for
from flask import (
abort,
current_app,
redirect,
render_template,
request,
session,
url_for,
)
from flask_login import current_user
from app import status_api_client
@@ -23,8 +32,12 @@ def index():
)
url = os.getenv("LOGIN_DOT_GOV_INITIAL_SIGNIN_URL")
# handle unit tests
nonce = secrets.token_urlsafe()
session["nonce"] = nonce
if url is not None:
url = url.replace("NONCE", token)
url = url.replace("NONCE", nonce)
url = url.replace("STATE", token)
return render_template(
"views/signedout.html",

View File

@@ -5,7 +5,16 @@ from collections import OrderedDict
from datetime import datetime
from io import StringIO
from flask import Response, abort, flash, render_template, request, url_for
from flask import (
Response,
abort,
current_app,
flash,
render_template,
request,
session,
url_for,
)
from notifications_python_client.errors import HTTPError
from app import (
@@ -25,6 +34,7 @@ from app.main.forms import (
DateFilterForm,
RequiredDateFilterForm,
)
from app.main.views.send import _send_notification
from app.statistics_utils import (
get_formatted_percentage,
get_formatted_percentage_two_dp,
@@ -771,3 +781,80 @@ def _get_user_row(r):
row.append(r["password_changed_at"])
row.append(r["state"])
return row
@main.route(
"/platform-admin/load-test",
methods=["POST", "GET"],
)
@user_is_platform_admin
def load_test():
"""
The load test assumes that a service called 'Test service' exists. It will make
the platform admin a member of this service if the platform is not already. All
messagese will be sent in this service.
"""
service = _find_load_test_service()
_prepare_load_test_service(service)
example_template = _find_example_template(service)
# Simulated success
for _ in range(0, 250):
session["recipient"] = current_app.config["SIMULATED_SMS_NUMBERS"][0]
session["placeholders"] = {
"day of week": "Monday",
"color": "blue",
"phone number": current_app.config["SIMULATED_SMS_NUMBERS"][0],
}
_send_notification(service["id"], example_template["id"])
# Simulated failure
for _ in range(0, 250):
session["recipient"] = current_app.config["SIMULATED_SMS_NUMBERS"][1]
session["placeholders"] = {
"day of week": "Wednesday",
"color": "orange",
"phone number": current_app.config["SIMULATED_SMS_NUMBERS"][1],
}
_send_notification(service["id"], example_template["id"])
# For now, just redirect to the splash page so we know it's done
return render_template(
"views/platform-admin/splash-page.html",
)
def _find_example_template(service):
templates = service_api_client.get_service_templates(service["id"])
templates = templates["data"]
for template in templates:
# template = json.loads(template)
if template["name"] == "Example text message template":
return template
raise Exception("Could not find example template for load test")
def _find_load_test_service():
services = service_api_client.find_services_by_name("Test service")
services = services["data"]
for service in services:
if service["name"] == "Test service":
return service
raise Exception("Could not find 'Test service' for load test")
def _prepare_load_test_service(service):
users = user_api_client.get_all_users()
for user in users:
if user["platform_admin"] == "t":
try:
user_api_client.add_user_to_service(
service["id"], user["id"], ["send messages"]
)
except Exception:
current_app.logger.exception(
"Couldnt add user, may already be part of service"
)
pass

View File

@@ -1,3 +1,4 @@
import os
import time
import uuid
from string import ascii_uppercase
@@ -33,6 +34,7 @@ from app.main.forms import (
SetSenderForm,
get_placeholder_form_instance,
)
from app.main.views.user_profile import set_timezone
from app.models.user import Users
from app.s3_client.s3_csv_client import (
get_csv_metadata,
@@ -800,9 +802,15 @@ def get_skip_link(step_index, template):
)
@user_has_permissions("send_messages", restrict_admin_usage=True)
def send_one_off_to_myself(service_id, template_id):
db_template = current_service.get_template_with_user_permission_or_403(
template_id, current_user
)
current_app.logger.info("Send one off to myself")
try:
db_template = current_service.get_template_with_user_permission_or_403(
template_id, current_user
)
except Exception:
current_app.logger.exception("Couldnt get template for one off")
# Use 406 just because we're limited to certain codes here and it will point us back to a problem here
abort(406)
if db_template["template_type"] not in ("sms", "email"):
abort(404)
@@ -941,8 +949,8 @@ def preview_notification(service_id, template_id):
)
@user_has_permissions("send_messages", restrict_admin_usage=True)
def send_notification(service_id, template_id):
scheduled_for = session.pop("scheduled_for", "")
recipient = get_recipient()
if not recipient:
return redirect(
url_for(
@@ -951,53 +959,10 @@ def send_notification(service_id, template_id):
template_id=template_id,
)
)
upload_id = _send_notification(service_id, template_id)
keys = []
values = []
for k, v in session["placeholders"].items():
keys.append(k)
values.append(v)
data = ",".join(keys)
vals = ",".join(values)
data = f"{data}\r\n{vals}"
filename = (
f"one-off-{uuid.uuid4()}.csv" # {current_user.name} removed from filename
)
my_data = {"filename": filename, "template_id": template_id, "data": data}
upload_id = s3upload(service_id, my_data)
# To debug messages that the user reports have not been sent, we log
# the csv filename and the job id. The user will give us the file name,
# so we can search on that to obtain the job id, which we can use elsewhere
# on the API side to find out what happens to the message.
current_app.logger.info(
hilite(
f"One-off file: {filename} job_id: {upload_id} s3 location: service-{service_id}-notify/{upload_id}.csv"
)
)
form = CsvUploadForm()
form.file.data = my_data
form.file.name = filename
check_message_output = check_messages(service_id, template_id, upload_id, 2)
if "You cannot send to" in check_message_output:
return check_messages(service_id, template_id, upload_id, 2)
job_api_client.create_job(
upload_id,
service_id,
scheduled_for=scheduled_for,
template_id=template_id,
original_file_name=filename,
notification_count=1,
valid="True",
)
session.pop("recipient")
session.pop("placeholders")
session.pop("recipient", "")
session.pop("placeholders", "")
# We have to wait for the job to run and create the notification in the database
time.sleep(0.1)
@@ -1045,6 +1010,63 @@ def send_notification(service_id, template_id):
)
def _send_notification(service_id, template_id):
scheduled_for = session.pop("scheduled_for", "")
keys = []
values = []
# Guarantee that the real phone number comes last, because some
# users will have placeholders like "add your second phone number"
# or something like as custom placeholders.
for k, v in session["placeholders"].items():
if k != "phone number":
keys.append(k)
values.append(v)
if "phone number" in session["placeholders"].keys():
keys.append("phone number")
values.append(session["placeholders"]["phone number"])
data = ",".join(keys)
vals = ",".join(values)
data = f"{data}\r\n{vals}"
filename = (
f"one-off-{uuid.uuid4()}.csv" # {current_user.name} removed from filename
)
my_data = {"filename": filename, "template_id": template_id, "data": data}
upload_id = s3upload(service_id, my_data)
# To debug messages that the user reports have not been sent, we log
# the csv filename and the job id. The user will give us the file name,
# so we can search on that to obtain the job id, which we can use elsewhere
# on the API side to find out what happens to the message.
current_app.logger.info(
hilite(
f"One-off file: {filename} job_id: {upload_id} s3 location: {service_id}-service-notify/{upload_id}.csv"
)
)
# For load testing we want to skip these checks. They are doing some fine-grained
# comparison about what is in the preview, but the load test just blast messages
# and doesn't care about the preview.
if os.getenv("NOTIFY_ENVIRONMENT") not in ("development", "staging", "demo"):
form = CsvUploadForm()
form.file.data = my_data
form.file.name = filename
check_message_output = check_messages(service_id, template_id, upload_id, 2)
if "You cannot send to" in check_message_output:
return check_messages(service_id, template_id, upload_id, 2)
job_api_client.create_job(
upload_id,
service_id,
scheduled_for=scheduled_for,
template_id=template_id,
original_file_name=filename,
notification_count=1,
valid="True",
)
return upload_id
def get_email_reply_to_address_from_session():
if session.get("sender_id"):
return current_service.get_email_reply_to_address(session["sender_id"])[
@@ -1075,6 +1097,7 @@ def get_spreadsheet_column_headings_from_template(template):
def get_recipient():
set_timezone()
if {"recipient", "placeholders"} - set(session.keys()):
return None

View File

@@ -1,4 +1,6 @@
import json
import os
import secrets
import time
import uuid
@@ -12,6 +14,7 @@ from flask import (
redirect,
render_template,
request,
session,
url_for,
)
from flask_login import current_user
@@ -28,7 +31,7 @@ from app.utils.user import is_gov_user
from notifications_utils.url_safe_token import generate_token
def _reformat_keystring(orig):
def _reformat_keystring(orig): # pragma: no cover
arr = orig.split("-----")
begin = arr[1]
end = arr[3]
@@ -37,9 +40,10 @@ def _reformat_keystring(orig):
return new_keystring
def _get_access_token(code, state):
def _get_access_token(code, state): # pragma: no cover
client_id = os.getenv("LOGIN_DOT_GOV_CLIENT_ID")
access_token_url = os.getenv("LOGIN_DOT_GOV_ACCESS_TOKEN_URL")
certs_url = os.getenv("LOGIN_DOT_GOV_CERTS_URL")
keystring = os.getenv("LOGIN_PEM")
if " " in keystring:
keystring = _reformat_keystring(keystring)
@@ -60,17 +64,47 @@ def _get_access_token(code, state):
url = f"{base_url}{cli_assert}&{cli_assert_type}&{code_param}&grant_type=authorization_code"
headers = {"Authorization": "Bearer %s" % token}
response = requests.post(url, headers=headers)
if response.json().get("access_token") is None:
# Capture the response json here so it hopefully shows up in error reports
current_app.logger.error(
response_json = response.json()
try:
encoded_id_token = response_json["id_token"]
except KeyError as e:
current_app.logger.exception(f"Error when getting id token {response_json}")
raise KeyError(f"'access_token' {response.json()}") from e
# Getting Login.gov signing keys for unpacking the id_token correctly.
jwks = requests.get(certs_url).json()
public_keys = {
jwk["kid"]: {
"key": jwt.algorithms.RSAAlgorithm.from_jwk(json.dumps(jwk)),
"algo": jwk["alg"],
}
for jwk in jwks["keys"]
}
kid = jwt.get_unverified_header(encoded_id_token)["kid"]
pub_key = public_keys[kid]["key"]
algo = public_keys[kid]["algo"]
id_token = jwt.decode(
encoded_id_token, pub_key, audience=client_id, algorithms=[algo]
)
nonce = id_token["nonce"]
saved_nonce = session.pop("nonce")
if nonce != saved_nonce:
current_app.logger.error(f"Nonce Error: {nonce} != {saved_nonce}")
abort(403)
try:
access_token = response_json["access_token"]
except KeyError as e:
current_app.logger.exception(
f"Error when getting access token {response.json()} #notify-admin-1505"
)
raise KeyError(f"'access_token' {response.json()}")
access_token = response.json()["access_token"]
raise KeyError(f"'access_token' {response.json()}") from e
return access_token
def _get_user_email_and_uuid(access_token):
def _get_user_email_and_uuid(access_token): # pragma: no cover
headers = {"Authorization": "Bearer %s" % access_token}
user_info_url = os.getenv("LOGIN_DOT_GOV_USER_INFO_URL")
user_attributes = requests.get(
@@ -82,7 +116,7 @@ def _get_user_email_and_uuid(access_token):
return user_email, user_uuid
def _do_login_dot_gov():
def _do_login_dot_gov(): # $ pragma: no cover
# start login.gov
code = request.args.get("code")
state = request.args.get("state")
@@ -124,12 +158,13 @@ def _do_login_dot_gov():
except BaseException as be: # noqa B036
current_app.logger.error(f"Error signing in: {be} #notify-admin-1505 ")
error(401)
return redirect(url_for("main.show_accounts_or_dashboard", next=redirect_url))
# end login.gov
def verify_email(user, redirect_url):
def verify_email(user, redirect_url): # pragma: no cover
user_api_client.send_verify_code(user["id"], "email", None, redirect_url)
title = "Email resent" if request.args.get("email_resent") else "Check your email"
redirect_url = request.args.get("next")
@@ -138,19 +173,41 @@ def verify_email(user, redirect_url):
)
def _handle_e2e_tests(redirect_url):
current_app.logger.warning("E2E TESTS ARE ENABLED.")
current_app.logger.warning(
"If you are getting a 404 on signin, comment out E2E vars in .env file!"
)
user = user_api_client.get_user_by_email(os.getenv("NOTIFY_E2E_TEST_EMAIL"))
activate_user(user["id"])
return redirect(url_for("main.show_accounts_or_dashboard", next=redirect_url))
def _handle_e2e_tests(redirect_url): # pragma: no cover
try:
current_app.logger.warning("E2E TESTS ARE ENABLED.")
current_app.logger.warning(
"If you are getting a 404 on signin, comment out E2E vars in .env file!"
)
user = user_api_client.get_user_by_email(os.getenv("NOTIFY_E2E_TEST_EMAIL"))
activate_user(user["id"])
# Check if the redirect URL is present and safe before proceeding further
if redirect_url and is_safe_redirect_url(redirect_url):
return redirect(redirect_url)
return redirect(
url_for(
"main.show_accounts_or_dashboard",
next="EMAIL_IS_OK",
)
)
except Exception as e:
stre = str(e)
stre = stre.replace(" ", "_")
# Trying to get a message back to playwright somehow since we can't raise an error
return redirect(url_for(f"https://{stre}"))
@main.route("/sign-in", methods=(["GET", "POST"]))
@hide_from_search_engines
def sign_in():
def sign_in(): # pragma: no cover
redirect_url = request.args.get("next")
if os.getenv("NOTIFY_E2E_TEST_EMAIL"):
return _handle_e2e_tests(redirect_url)
# If we have to revalidated the email, send the message
# via email and redirect to the "verify your email page"
# and don't proceed further with login
@@ -162,11 +219,6 @@ def sign_in():
):
return email_verify_template
redirect_url = request.args.get("next")
if os.getenv("NOTIFY_E2E_TEST_EMAIL"):
return _handle_e2e_tests(redirect_url)
if current_user and current_user.is_authenticated:
if redirect_url and is_safe_redirect_url(redirect_url):
return redirect(redirect_url)
@@ -178,10 +230,15 @@ def sign_in():
current_app.config["DANGEROUS_SALT"],
)
url = os.getenv("LOGIN_DOT_GOV_INITIAL_SIGNIN_URL")
nonce = secrets.token_urlsafe()
session["nonce"] = nonce
# handle unit tests
if url is not None:
url = url.replace("NONCE", token)
url = url.replace("NONCE", nonce)
url = url.replace("STATE", token)
return render_template(
"views/signin.html",
again=bool(redirect_url),
@@ -190,5 +247,5 @@ def sign_in():
@login_manager.unauthorized_handler
def sign_in_again():
def sign_in_again(): # pragma: no cover
return redirect(url_for("main.sign_in", next=request.path))

View File

@@ -29,6 +29,7 @@ from app.main.forms import (
TwoFactorForm,
)
from app.models.user import User
from app.utils import hilite
from app.utils.user import user_is_gov_user, user_is_logged_in
from notifications_utils.url_safe_token import check_token
@@ -189,32 +190,19 @@ def user_profile_mobile_number_delete():
@main.route("/user-profile/mobile-number/authenticate", methods=["GET", "POST"])
@user_is_logged_in
def user_profile_mobile_number_authenticate():
# Validate password for form
def _check_password(pwd):
return user_api_client.verify_password(current_user.id, pwd)
form = ConfirmPasswordForm(_check_password)
if NEW_MOBILE not in session:
return redirect(url_for(".user_profile_mobile_number"))
if form.validate_on_submit():
session[NEW_MOBILE_PASSWORD_CONFIRMED] = True
current_user.send_verify_code(to=session[NEW_MOBILE])
create_mobile_number_change_event(
user_id=current_user.id,
updated_by_id=current_user.id,
original_mobile_number=current_user.mobile_number,
new_mobile_number=session[NEW_MOBILE],
)
return redirect(url_for(".user_profile_mobile_number_confirm"))
return render_template(
"views/user-profile/authenticate.html",
thing="mobile number",
form=form,
back_link=url_for(".user_profile_mobile_number_confirm"),
session[NEW_MOBILE_PASSWORD_CONFIRMED] = True
current_user.send_verify_code(to=session[NEW_MOBILE])
create_mobile_number_change_event(
user_id=current_user.id,
updated_by_id=current_user.id,
original_mobile_number=current_user.mobile_number,
new_mobile_number=session[NEW_MOBILE],
)
return redirect(url_for(".user_profile_mobile_number_confirm"))
@main.route("/user-profile/mobile-number/confirm", methods=["GET", "POST"])
@@ -288,3 +276,15 @@ def user_profile_disable_platform_admin_view():
return render_template(
"views/user-profile/disable-platform-admin-view.html", form=form
)
def set_timezone():
# Cookie is set in dashboard.html on page load
try:
timezone = request.cookies.get("timezone", "US/Eastern")
current_app.logger.debug(hilite(f"User's timezone is {timezone}"))
serialized_user = current_user.serialize()
if serialized_user["preferred_timezone"] is not timezone:
current_user.update(preferred_timezone=timezone)
except Exception:
current_app.logger.exception(hilite("Can't get timezone"))

View File

@@ -1,3 +1,4 @@
import os
from datetime import datetime
from flask import abort, current_app, request, session
@@ -58,6 +59,7 @@ class User(JSONModel, UserMixin):
super().__init__(_dict)
self.permissions = _dict.get("permissions", {})
self._platform_admin = _dict["platform_admin"]
self.preferred_timezone = _dict.get("preferred_timezone", "America/New_York")
@classmethod
def from_id(cls, user_id):
@@ -199,7 +201,7 @@ class User(JSONModel, UserMixin):
@property
def is_gov_user(self):
is_gov = is_gov_user(self.email_address)
current_app.logger.info(f"User {self.id} is_gov_user: {is_gov}")
# current_app.logger.info(f"User {self.id} is_gov_user: {is_gov}")
return is_gov
@property
@@ -208,9 +210,9 @@ class User(JSONModel, UserMixin):
@property
def platform_admin(self):
current_app.logger.warn(
f"Checking User {self.id} for platform admin: {self._platform_admin}"
)
# current_app.logger.warning(
# f"Checking User {self.id} for platform admin: {self._platform_admin}"
# )
return self._platform_admin and not session.get(
"disable_platform_admin_view", False
)
@@ -218,6 +220,14 @@ class User(JSONModel, UserMixin):
def has_permissions(
self, *permissions, restrict_admin_usage=False, allow_org_user=False
):
# TODO need this for load test, but breaks unit tests
if self.platform_admin and os.getenv("NOTIFY_ENVIRONMENT") in (
"development",
"staging",
"demo",
):
return True
unknown_permissions = set(permissions) - all_ui_permissions
if unknown_permissions:
raise TypeError(
@@ -232,26 +242,31 @@ class User(JSONModel, UserMixin):
# we shouldn't have any pages that require permissions, but don't specify a service or organization.
# use @user_is_platform_admin for platform admin only pages
# raise NotImplementedError
current_app.logger.warn(f"VIEW ARGS ARE {request.view_args}")
# current_app.logger.warning(f"VIEW ARGS ARE {request.view_args}")
pass
log_msg = f"has_permissions user: {self.id} service: {service_id}"
# platform admins should be able to do most things (except eg send messages, or create api keys)
if self.platform_admin and not restrict_admin_usage:
current_app.logger.warn(f"{log_msg} true because user is platform_admin")
current_app.logger.debug(
"has_permissions is true because user is platform_admin"
)
return True
if org_id:
value = self.belongs_to_organization(org_id)
current_app.logger.warn(f"{log_msg} org: {org_id} returning {value}")
current_app.logger.debug(
f"has_permissions returns org: {org_id} returning {value}"
)
return value
if not permissions and self.belongs_to_service(service_id):
current_app.logger.warn(f"{log_msg} True because belongs_to_service")
current_app.logger.debug("has_permissions True because belongs_to_service")
return True
if any(self.permissions_for_service(service_id) & set(permissions)):
current_app.logger.warn(f"{log_msg} permissions valid")
current_app.logger.debug(
"has_permissions returns True because permissions valid"
)
return True
from app.models.service import Service
@@ -259,7 +274,7 @@ class User(JSONModel, UserMixin):
org_value = allow_org_user and self.belongs_to_organization(
Service.from_id(service_id).organization_id
)
current_app.logger.warn(f"{log_msg} returning {org_value}")
current_app.logger.debug(f"has_permissions returning {org_value}")
return org_value
def permissions_for_service(self, service_id):
@@ -267,7 +282,7 @@ class User(JSONModel, UserMixin):
def has_permission_for_service(self, service_id, permission):
has_permission = permission in self.permissions_for_service(service_id)
current_app.logger.warn(
current_app.logger.debug(
f"has_permission_for_service user: {self.id} service: {service_id} "
f"permission: {permission} retuning {has_permission}"
)
@@ -548,17 +563,17 @@ class InvitedUser(JSONModel):
return cls.by_id(invited_user_id) if invited_user_id else None
def has_permissions(self, *permissions):
current_app.logger.warn(
f"Checking invited user {self.id} for permissions: {permissions}"
)
# current_app.logger.warning(
# f"Checking invited user {self.id} for permissions: {permissions}"
# )
if self.status == "cancelled":
return False
return set(self.permissions) > set(permissions)
def has_permission_for_service(self, service_id, permission):
current_app.logger.warn(
f"Checking invited user {self.id} for permission: {permission} on service {service_id}"
)
# current_app.logger.warn(
# f"Checking invited user {self.id} for permission: {permission} on service {service_id}"
# )
if self.status == "cancelled":
return False
return self.service == service_id and permission in self.permissions

View File

@@ -2,6 +2,7 @@ from flask import current_app
from notifications_python_client.errors import HTTPError
from app.notify_client import NotifyAdminAPIClient, cache
from app.utils import hilite
from app.utils.user_permissions import translate_permissions_from_ui_to_db
ALLOWED_ATTRIBUTES = {
@@ -109,13 +110,14 @@ class UserApiClient(NotifyAdminAPIClient):
raise
def send_verify_code(self, user_id, code_type, to, next_string=None):
data = {"to": to}
if next_string:
data["next"] = next_string
if code_type == "email":
data["email_auth_link_host"] = self.admin_url
endpoint = "/user/{0}/{1}-code".format(user_id, code_type)
current_app.logger.warn(f"Sending verify_code {code_type} to {user_id}")
current_app.logger.warn(hilite(f"Sending verify_code {code_type} to {user_id}"))
self.post(endpoint, data=data)
def send_verify_email(self, user_id, to):

View File

@@ -29,7 +29,10 @@ def get_s3_object(
aws_secret_access_key=secret_key,
region_name=region,
)
s3 = session.resource("s3", config=AWS_CLIENT_CONFIG)
s3 = session.resource(
"s3",
config=AWS_CLIENT_CONFIG,
)
obj = s3.Object(bucket_name, filename)
# This 'proves' that use of moto in the relevant tests in test_send.py
# mocks everything related to S3. What you will see in the logs is:

View File

@@ -1,3 +1,4 @@
import os
import uuid
from flask import current_app
@@ -10,13 +11,13 @@ from app.s3_client import (
)
from notifications_utils.s3 import s3upload as utils_s3upload
FILE_LOCATION_STRUCTURE = "service-{}-notify/{}.csv"
NEW_FILE_LOCATION_STRUCTURE = "{}-service-notify/{}.csv"
def get_csv_location(service_id, upload_id):
return (
current_app.config["CSV_UPLOAD_BUCKET"]["bucket"],
FILE_LOCATION_STRUCTURE.format(service_id, upload_id),
NEW_FILE_LOCATION_STRUCTURE.format(service_id, upload_id),
current_app.config["CSV_UPLOAD_BUCKET"]["access_key_id"],
current_app.config["CSV_UPLOAD_BUCKET"]["secret_access_key"],
current_app.config["CSV_UPLOAD_BUCKET"]["region"],
@@ -33,6 +34,14 @@ def s3upload(service_id, filedata):
bucket_name, file_location, access_key, secret_key, region = get_csv_location(
service_id, upload_id
)
if bucket_name == "":
exp_bucket = current_app.config["CSV_UPLOAD_BUCKET"]["bucket"]
exp_region = current_app.config["CSV_UPLOAD_BUCKET"]["region"]
tier = os.getenv("NOTIFY_ENVIRONMENT")
raise Exception(
f"NO BUCKET NAME SHOULD BE: {exp_bucket} WITH REGION {exp_region} TIER {tier}"
)
utils_s3upload(
filedata=filedata["data"],
region=region,

View File

@@ -10,7 +10,7 @@
{% block per_page_title %}{% endblock %} Notify.gov
{% endblock %}
</title>
{% include "new/components/head.html" %}
{% include "components/head.html" %}
</head>
<body class="usa-template__body {{ bodyClasses }}">
<script nonce="{{ csp_nonce() }}">document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');</script>
@@ -32,8 +32,8 @@
{% block header %}
{% include 'new/components/usa_banner.html' %}
{% include 'new/components/header.html' %}
{% include 'components/usa_banner.html' %}
{% include 'components/header.html' %}
{% endblock %}
{% block main %}
@@ -47,7 +47,7 @@
{% endblock %}
{% block content %}
{% block flash_messages %}
{% include 'new/components/flash_messages.html' %}
{% include 'components/flash_messages.html' %}
{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
@@ -78,7 +78,7 @@
{% set meta_suffix = "Built by the " + long_link + commit_hash %}
{% endif %}
{% include "new/components/footer.html" %}
{% include "components/footer.html" %}
{% if current_user.is_authenticated %}
{% block sessionUserWarning %}

View File

@@ -1,2 +1,4 @@
<a href="{%- if params.href %}{{ params.href }}{% else %}#{% endif -%}" class="usa-link usa-back-link display-inline-flex margin-bottom-3 {%- if params.classes %} {{ params.classes }}{% endif -%}"
{%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>{{ (params.html | safe if params.html else (params.text if params.text else 'Back')) }}</a>
<nav class="usa-breadcrumb" aria-label="Breadcrumb">
<a href="{{ params.href or '#' }}" class="usa-link usa-back-link display-inline-flex {{ params.classes or '' }}"
{%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}" {% endfor %}>{{ params.html | safe or params.text or 'Back' }}</a>
</nav>

View File

@@ -1,15 +0,0 @@
# Footer
## Installation
See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component.
## Guidance and Examples
Find out when to use the footer component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/footer).
## Component options
Use options to customize the appearance, content and behavior of a component when using a macro, for example, changing the text.
See [options table](https://design-system.service.gov.uk/components/footer/#options-example-default) for details.

View File

@@ -1,115 +0,0 @@
[
{
"name": "meta",
"type": "object",
"required": false,
"description": "Object containing options for the meta navigation.",
"params": [
{
"name": "visuallyHiddenTitle",
"type": "string",
"description": "Title for a meta item section, which defaults to Support links"
},
{
"name": "html",
"type": "string",
"description": "HTML to add to the meta section of the footer, which will appear below any links specified using meta.items."
},
{
"name": "text",
"type": "string",
"description": "Text to add to the meta section of the footer, which will appear below any links specified using meta.items. If meta.html is specified, this option is ignored."
},
{
"name": "items",
"type": "array",
"required": false,
"description": "Array of items for use in the meta section of the footer.",
"params": [
{
"name": "text",
"type": "string",
"required": false,
"description": "List item text in the meta section of the footer."
},
{
"name": "href",
"type": "string",
"required": false,
"description": "List item href attribute in the meta section of the footer."
},
{
"name": "attributes",
"type": "object",
"required": false,
"description": "HTML attributes (for example data attributes) to add to the anchor in the footer meta section."
}
]
}
]
},
{
"name": "navigation",
"type": "array",
"required": false,
"description": "Array of items for use in the navigation section of the footer.",
"params": [
{
"name": "title",
"type": "string",
"required": false,
"description": "Title for a section"
},
{
"name": "columns",
"type": "integer",
"required": false,
"description": "Amount of columns to display items in navigation section of the footer."
},
{
"name": "items",
"type": "array",
"required": false,
"description": "Array of items to display in the list in navigation section of the footer.",
"params": [
{
"name": "text",
"type": "string",
"required": false,
"description": "List item text in the navigation section of the footer."
},
{
"name": "href",
"type": "string",
"required": false,
"description": "List item href attribute in the navigation section of the footer. Both `text` and `href` attributes need to be present to create a link."
},
{
"name": "attributes",
"type": "object",
"required": false,
"description": "HTML attributes (for example data attributes) to add to the anchor in the footer navigation section."
}
]
}
]
},
{
"name": "containerClasses",
"type": "string",
"required": false,
"description": "Classes that can be added to the inner container, useful if you want to make the footer full width."
},
{
"name": "classes",
"type": "string",
"required": false,
"description": "Classes to add to the footer component container."
},
{
"name": "attributes",
"type": "object",
"required": false,
"description": "HTML attributes (for example data attributes) to add to the footer component container."
}
]

View File

@@ -1,3 +0,0 @@
{% macro usaFooter(params) %}
{%- include "./template.njk" -%}
{% endmacro %}

View File

@@ -1,85 +0,0 @@
<footer class="usa-footer usa-footer--big">
{# <div class="grid-container usa-footer__return-to-top">
<a href="#">Return to top</a>
</div> #}
<div class="usa-footer__primary-section">
<div class="grid-container">
<div class="padding-y-1">
{% if params.meta %}
<h2 class="usa-sr-only">{{ params.meta.visuallyHiddenTitle | default("Support links") }}</h2>
{% if params.meta.items %}
{% for item in params.meta.items %}
<a class="usa-footer__link" href="{{ item.href }}" {% for attribute, value in item.attributes %}
{{attribute}}="{{value}}" {% endfor %}>
{{ item.text }}
</a>
{% endfor %}
{% endif %}
{% if params.meta.text or params.meta.html %}
<div>
{{ params.meta.html | safe if params.meta.html else params.meta.text }}
</div>
{% endif %}
{% endif %}
</div>
</div>
</div>
</div>
</footer>
<div class="usa-identifier site-identifier">
<section class="usa-identifier__section usa-identifier__section--masthead" aria-label="Agency identifier,,,,,,">
<div class="usa-identifier__container">
<div class="usa-identifier__logos"><a href="javascript:void(0);" class="usa-identifier__logo">
<img class="usa-identifier__logo-img" src="{{ params.assetsPath | default('/static/images') }}/gsa-logo.svg" alt="GSA Logo" role="img" width="48"
height="48">
</a></div>
<section class="usa-identifier__identity" aria-label="Agency description">
<p class="usa-identifier__identity-domain">beta.notify.gov</p>
<p class="usa-identifier__identity-disclaimer">An official website of the <a href="https://gsa.gov">General
Services Administration</a></p>
</section>
</div>
</section>
<nav class="usa-identifier__section usa-identifier__section--required-links" aria-label="Important links">
<div class="usa-identifier__container">
<ul class="usa-identifier__required-links-list">
<li class="usa-identifier__required-links-item">
<a href="https://www.gsa.gov/about-us" class="usa-identifier__required-link">About GSA</a>
</li>
<li class="usa-identifier__required-links-item">
<a href="https://www.gsa.gov/website-information/accessibility-aids"
class="usa-identifier__required-link">Accessibility support</a>
</li>
<li class="usa-identifier__required-links-item">
<a href="https://www.gsa.gov/reference/freedom-of-information-act-foia"
class="usa-identifier__required-link">FOIA requests</a>
</li>
<li class="usa-identifier__required-links-item">
<a href="https://www.gsa.gov/reference/civil-rights-programs/notification-and-federal-employee-antidiscrimination-and-retaliation-act-of-2002"
class="usa-identifier__required-link">No FEAR Act data</a>
</li>
<li class="usa-identifier__required-links-item">
<a href="https://www.gsaig.gov/" class="usa-identifier__required-link">Office of the Inspector General</a>
</li>
<li class="usa-identifier__required-links-item">
<a href="https://www.gsa.gov/reference/reports/budget-performance"
class="usa-identifier__required-link">Performance reports</a>
</li>
<li class="usa-identifier__required-links-item">
<a href="https://www.gsa.gov/website-information/website-policies"
class="usa-identifier__required-link">Privacy policy</a>
</li>
</ul>
</div>
</nav>
<section class="usa-identifier__section usa-identifier__section--usagov"
aria-label="Government information and services">
<div class="usa-identifier__container">
<div class="usa-identifier__usagov-description">
Looking for U.S. government information and services?
</div>
<a href="https://www.usa.gov/" class="usa-link">Visit USA.gov</a>
</div>
</section>
</div>

View File

@@ -1,15 +0,0 @@
# Header
## Installation
See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component.
## Guidance and Examples
Find out when to use the header component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/header).
## Component options
Use options to customize the appearance, content and behavior of a component when using a macro, for example, changing the text.
See [options table](https://design-system.service.gov.uk/components/header/#options-example-default) for details.

View File

@@ -1,88 +0,0 @@
[
{
"name": "homepageUrl",
"type": "string",
"required": false,
"description": "The url of the homepage. Defaults to /"
},
{
"name": "assetsPath",
"type": "string",
"required": false,
"description": "The public path for the assets folder. If not provided it defaults to /assets/images"
},
{
"name": "productName",
"type": "string",
"required": false,
"description": "Header title that is placed next to GOV.UK. Used for product names (i.e. Pay, Verify)"
},
{
"name": "serviceName",
"type": "string",
"required": false,
"description": "Header title that is placed next to GOV.UK. Used for product names (i.e. Pay, Verify)"
},
{
"name": "serviceUrl",
"type": "string",
"required": false,
"description": "Url for the service name anchor."
},
{
"name": "navigation",
"type": "array",
"required": false,
"description": "An array of navigation item objects.",
"params": [
{
"name": "text",
"type": "string",
"required": false,
"description": "Text of the navigation item."
},
{
"name": "href",
"type": "string",
"required": false,
"description": "Url of the navigation item anchor. Both `href` and `text` attributes for navigation items need to be provided to create an item."
},
{
"name": "active",
"type": "boolean",
"required": false,
"description": "Flag to mark the navigation item as active or not."
},
{
"name": "attributes",
"type": "object",
"required": false,
"description": "HTML attributes (for example data attributes) to add to the navigation item anchor."
}
]
},
{
"name": "navigationClasses",
"type": "string",
"required": false,
"description": "Classes for the navigation section of the header."
},
{
"name": "containerClasses",
"type": "string",
"required": false,
"description": "Classes for the container, useful if you want to make the header fixed width."
},
{
"name": "classes",
"type": "string",
"required": false,
"description": "Classes to add to the header container."
},
{
"name": "attributes",
"type": "object",
"required": false,
"description": "HTML attributes (for example data attributes) to add to the header container."
}
]

View File

@@ -1,3 +0,0 @@
{% macro usaHeader(params) %}
{%- include "./template.njk" -%}
{% endmacro %}

View File

@@ -1,105 +0,0 @@
<!-- usa banner -->
<section class="usa-banner site-banner" aria-label="Official website of the United States government,,,,,,">
<div class="usa-accordion">
<header class="usa-banner__header">
<div class="usa-banner__inner">
<div class="grid-col-auto">
<img aria-hidden="true" class="usa-banner__header-flag" src="/static/img/us_flag_small.png" alt="" />
</div>
<div class="grid-col-fill tablet:grid-col-auto" aria-hidden="true">
<p class="usa-banner__header-text">An official website of the United States government</p>
<p class="usa-banner__header-action">Heres how you know</p>
</div>
<button type="button" class="usa-accordion__button usa-banner__button" aria-expanded="false" aria-controls="gov-banner">
<span class="usa-banner__button-text">Heres how you know</span>
</button>
</div>
</header>
<div class="usa-banner__content usa-accordion__content" id="gov-banner" hidden="">
<div class="grid-row grid-gap-lg">
<div class="usa-banner__guidance tablet:grid-col-6">
<img class="usa-banner__icon usa-media-block__img" src="/static/img/icon-dot-gov.svg" role="img" alt="" aria-hidden="true">
<div class="usa-media-block__body">
<p>
<strong>Official websites use .gov</strong>
<br>
A <strong>.gov</strong> website belongs to an official government organization in the United States.
</p>
</div>
</div>
<div class="usa-banner__guidance tablet:grid-col-6">
<img class="usa-banner__icon usa-media-block__img" src="/static/img/icon-https.svg" role="img" alt="" aria-hidden="true">
<div class="usa-media-block__body">
<p>
<strong>Secure .gov websites use HTTPS</strong>
<br>
A <strong>lock</strong> ( <span class="icon-lock"><svg xmlns="http://www.w3.org/2000/svg" width="52" height="64" viewBox="0 0 52 64" class="usa-banner__lock-image" role="img" aria-labelledby="banner-lock-description" focusable="false"><title id="banner-lock-title">Lock</title><desc id="banner-lock-description">Locked padlock</desc><path fill="#000000" fill-rule="evenodd" d="M26 0c10.493 0 19 8.507 19 19v9h3a4 4 0 0 1 4 4v28a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V32a4 4 0 0 1 4-4h3v-9C7 8.507 15.507 0 26 0zm0 8c-5.979 0-10.843 4.77-10.996 10.712L15 19v9h22v-9c0-6.075-4.925-11-11-11z"></path></svg></span> ) or <strong>https://</strong> means youve safely connected to the .gov website. Share sensitive information only on official, secure websites.
</p>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- usa header -->
<header class="usa-header usa-header--extended">
<div class="usa-nav-container">
<div class="usa-navbar">
<div class="usa-logo display-flex flex-align-center flex-justify" id="-logo">
<div class="logo-img display-flex">
<a href="/">
<span class="usa-sr-only">Notify.gov logo</span>
<image src="{{ params.assetsPath | default('/static/images') }}/notify-logo.png" alt="Notify.gov logo" xlink:href=""
class="usa-flag-logo margin-right-1"></image>
</a>
</div>
{% if params.navigation %}
<button type="button" class="usa-menu-btn">Menu</button>
{% endif %}
</div>
</div>
<nav aria-label="Primary navigation" class="usa-nav">
<div class="usa-nav__inner">
<button type="button" class="usa-nav__close">
<img src="/static/images/usa-icons/close.svg" role="img" alt="Close" />
</button>
<ul class="usa-nav__primary usa-accordion margin-right-1">
{% for item in params.navigation %}
{% if item.href and item.text %}
<li class="usa-nav__primary-item{{ ' is-current' if item.active }}">
<a class="usa-nav__link {{ ' usa-current' if item.active }}" href="{{ item.href }}" {% for attribute, value in
item.attributes %} {{attribute}}="{{value}}" {% endfor %}>
<span>{{ item.text }}</span>
</a>
</li>
{% endif %}
{% endfor %}
</ul>
<div class="usa-nav__secondary margin-bottom-6">
<ul class="usa-nav__secondary-links">
{% for item in params.secondaryNavigation %}
{% if item.href and item.text %}
<li class="usa-nav__secondary-item{{ ' is-current' if item.active }}">
<a class="usa-nav__link {{ ' usa-current' if item.active }}" href="{{ item.href }}" {% for attribute, value in
item.attributes %} {{attribute}}="{{value}}" {% endfor %}>
<span>{{ item.text }}</span>
</a>
</li>
{% endif %}
{% endfor %}
</ul>
<!-- <section aria-label="Search component">
<form class="usa-search usa-search--small margin-bottom-2" role="search">
<label class="usa-sr-only" for="search-field">Search</label>
<input class="usa-input" id="search-field" type="search" name="search" />
<button class="usa-button" type="submit">
<img src="/static/images/usa-icons-bg/search--white.svg" class="usa-search__submit-icon" alt="Search" />
</button>
</form>
</section> -->
</div>
</div>
</nav>
</div>
</header>

View File

@@ -1,7 +1,3 @@
<a href="{{ params.href | default('#content') }}" class="usa-skipnav{%- if params.classes %} {{ params.classes }}{% endif -%}"{%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
{{- params.html | safe if params.html else params.text -}}
</a>
<a class="usa-skipnav " href="#main-content">
Skip to main content
</a>

View File

@@ -16,7 +16,7 @@
<link rel="icon" type="image/png" sizes="16x16" href="{{ assetPath | default('/static') }}/images/favicon-16x16.png" />
<link rel="mask-icon" href="{{ assetPath | default('/static') }}/images/safari-pinned-tab.svg" color="#5bbad5">
<link rel="apple-touch-icon" sizes="180x180" href="{{ assetPath | default('/static') }}/images/apple-touch-icon.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="manifest" href="{{ asset_url('images/site.webmanifest') }}">
<meta name="msapplication-TileColor" content="#da532c">
<link href="{{ assetPath | default('/static') }}/images/notify-dark-favicon.png" rel="icon" media="(prefers-color-scheme: dark)">
<meta name="theme-color" content="#ffffff">
@@ -30,7 +30,7 @@
<meta property="og:image" content="/static/images/notify-og-image.png">
{# google #}
<script type="text/javascript" src="{{ asset_url('js/gtm_head.js') }}"></script>
<meta name="google-site-verification" content="niWnSqImOWz6mVQTYqNb5tFK8HaKSB4b3ED4Z9gtUQ0" />
<meta name="google-site-verification" content="niWnSqImOWz6mVQTYqNb5tFK8HaKSB4b3ED4Z9gtUQ0" /> {# pragma: allowlist secret #}
{% if g.hide_from_search_engines %}
<meta name="robots" content="noindex" />
{% endif %}

View File

@@ -1,4 +1,3 @@
{# setting navigation and secondarynavigation #}
{% if current_user.is_authenticated %}
{% set navigation = [
{"href": url_for("main.show_accounts_or_dashboard"), "text": "Current service", "active": header_navigation.is_selected('accounts-or-dashboard')},
@@ -30,7 +29,6 @@
{% endif %}
{% endif %}
{# usa header #}
<header class="usa-header usa-header--extended">
<div class="usa-nav-container">
<div class="usa-navbar">
@@ -50,7 +48,7 @@
<nav aria-label="Primary navigation" class="usa-nav">
<div class="usa-nav__inner">
<button type="button" class="usa-nav__close">
<img src="/static/images/usa-icons/close.svg" role="img" alt="Close" />
<img src="{{ asset_url('img/usa-icons/close.svg') }}" role="img" alt="Close" />
</button>
<ul class="usa-nav__primary usa-accordion margin-right-1">
{% for item in navigation %}

View File

@@ -1,7 +1,7 @@
{% if help %}
{% include 'partials/tour.html' %}
{% else %}
<nav class="nav margin-bottom-4">
<nav id="nav-main-nav" aria-label="Main navigation" class="nav margin-bottom-4">
<a class="usa-button margin-top-1 margin-bottom-5 width-full"
href="{{ url_for('.choose_template', service_id=current_service.id) }}">Send messages</a>
<ul class="usa-sidenav">
@@ -13,15 +13,6 @@
{% if not current_user.has_permissions('view_activity') %}
<li class="usa-sidenav__item"><a class="{{ casework_navigation.is_selected('sent-messages') }}" href="{{ url_for('.view_notifications', service_id=current_service.id, status='sending,delivered,failed') }}">Sent messages</a></li>
{% endif %}
{% if current_user.has_permissions('manage_service', allow_org_user=True) %}
{# <li class="usa-sidenav__item"><a class="{{ main_navigation.is_selected('usage') }}" href="{{ url_for('.usage', service_id=current_service.id) }}">Usage</a></li> #}
{% endif %}
<!-- {% if current_user.has_permissions('manage_api_keys', 'manage_service') %}
<li class="usa-sidenav__item"><a class="{{ main_navigation.is_selected('settings') }}" href="{{ url_for('.service_settings', service_id=current_service.id) }}">Settings</a></li>
{% endif %} -->
{% if current_user.has_permissions('manage_api_keys') %}
<!-- <li><a class="usa-link{{ main_navigation.is_selected('api-integration') }}" href="{{ url_for('.api_integration', service_id=current_service.id) }}">API integration</a></li> -->
{% endif %}
{% elif current_user.has_permissions(allow_org_user=True) %}
<li class="usa-sidenav__item"><a class="usa-link{{ main_navigation.is_selected('usage') }}" href="{{ url_for('.usage', service_id=current_service.id) }}">Usage</a></li>
<li class="usa-sidenav__item"><a class="usa-link{{ main_navigation.is_selected('team-members') }}" href="{{ url_for('.manage_users', service_id=current_service.id) }}">Team members</a></li>

View File

@@ -1,4 +1,4 @@
<nav class="nav margin-bottom-4">
<nav id="nav-org-nav" aria-label="Organization navigation" class="nav margin-bottom-4">
<ul class="usa-sidenav">
<li class="usa-sidenav__item"><a class="usa-link{{ org_navigation.is_selected('dashboard') }}" href="{{ url_for('.organization_dashboard', org_id=current_org.id) }}">Usage</a></li>
<li class="usa-sidenav__item"><a class="usa-link{{ org_navigation.is_selected('team-members') }}" href="{{ url_for('.manage_org_users', org_id=current_org.id) }}">Team members</a></li>

View File

@@ -1,3 +1,4 @@
<nav id="nav-service-nav" aria-label="Service navigation">
<div class="navigation-service margin-top-5 display-flex flex-align-end flex-justify border-bottom padding-bottom-1">
{% if current_service.organization_id %}
{% if current_user.platform_admin or
@@ -13,3 +14,4 @@
</div>
<a href="{{ url_for('main.choose_account') }}" class="usa-link">Switch service</a>
</div>
</nav>

View File

@@ -1,5 +1,3 @@
{# usa banner #}
<section class="usa-banner site-banner" aria-label="Official website of the United States government,,,,,,">
<div class="usa-accordion">
<header class="usa-banner__header">

View File

@@ -1,302 +0,0 @@
{% extends "main_template.html" %}
{% from "components/banner.html" import banner %}
{% block headIcons %}
<link rel="shortcut icon" sizes="16x16 32x32 48x48" href="{{ asset_url('images/favicon.ico') }}" type="image/x-icon" />
<link rel="mask-icon" href="{{ asset_url('images/usa-mask-icon.svg') }}" color="{{ themeColor | default('#F0F0F0') }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ asset_url('images/apple-touch-icon.png') }}">
<link rel="apple-touch-icon" href="{{ asset_url('images/apple-touch-icon.png') }}">
{% endblock %}
{% block head %}
<link rel="stylesheet" media="screen" href="{{ asset_url('css/styles.css') }}" />
{% block extra_stylesheets %}
{% endblock %}
{% if g.hide_from_search_engines %}
<meta name="robots" content="noindex" />
{% endif %}
<meta name="google-site-verification" content="niWnSqImOWz6mVQTYqNb5tFK8HaKSB4b3ED4Z9gtUQ0" />
{% block meta_format_detection %}
<meta name="format-detection" content="telephone=no">
{% endblock %}
{% block meta %}
<meta property="og:site_name" content="Notify.gov">
<meta property="og:image" content="{{ asset_url('images/notify-og-image.png') }}">
{% endblock %}
<script type="text/javascript" src="{{ asset_url('js/gtm_head.js') }}"></script>
{% endblock %}
{% block pageTitle %}
{% block per_page_title %}{% endblock %} Notify.gov
{% endblock %}
{% block bodyStart %}
{% block extra_javascripts_before_body %}
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WX5NGWF"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
{% endblock %}
{% endblock %}
{% block header %}
{% if current_user.is_authenticated %}
{% if current_user.platform_admin %}
{% set navigation = [
{
"href": url_for("main.show_accounts_or_dashboard"),
"text": "Current service",
"active": header_navigation.is_selected('accounts-or-dashboard')
},
{
"href": url_for('main.get_started'),
"text": "Using Notify",
"active": header_navigation.is_selected('using_notify')
},
{
"href": url_for('main.features'),
"text": "Features",
"active": header_navigation.is_selected('features')
},
{
"href": url_for('main.platform_admin_splash_page'),
"text": "Platform admin",
"active": header_navigation.is_selected('platform-admin')
},
{
"href": url_for('main.support'),
"text": "Contact us",
"active": header_navigation.is_selected('support')
}
] %}
{% if current_service %}
{% set secondaryNavigation = [
{
"href": url_for('main.service_settings', service_id=current_service.id),
"text": "Settings",
"active": secondary_navigation.is_selected('settings')
},
{
"href": url_for('main.sign_out'),
"text": "Sign out"
}
] %}
{% else %}
{% set secondaryNavigation = [
{
"href": url_for('main.sign_out'),
"text": "Sign out"
}
] %}
{% endif %}
{% else %}
{% set navigation = [
{
"href": url_for("main.show_accounts_or_dashboard"),
"text": "Current service",
"active": header_navigation.is_selected('accounts-or-dashboard')
},
{
"href": url_for('main.get_started'),
"text": "Using Notify",
"active": header_navigation.is_selected('using_notify')
},
{
"href": url_for('main.features'),
"text": "Features",
"active": header_navigation.is_selected('features')
},
{
"href": url_for('main.support'),
"text": "Contact us",
"active": header_navigation.is_selected('support')
},
{
"href": url_for('main.user_profile'),
"text": "User profile",
"active": header_navigation.is_selected('user-profile')
}
] %}
{% if current_service %}
{% set secondaryNavigation = [
{
"href": url_for('main.service_settings', service_id=current_service.id),
"text": "Settings",
"active": secondary_navigation.is_selected('settings')
},
{
"href": url_for('main.sign_out'),
"text": "Sign out"
}
] %}
{% else %}
{% set secondaryNavigation = [
{
"href": url_for('main.sign_out'),
"text": "Sign out"
}
] %}
{% endif %}
{% endif %}
{% else %}
<!-- Add navigation back after pilot -->
{# {% set navigation = [
{
"href": url_for('main.get_started'),
"text": "Using Notify",
"active": header_navigation.is_selected('using_notify')
},
{
"href": url_for('main.features'),
"text": "Features",
"active": header_navigation.is_selected('features')
},
{
"href": url_for('main.support'),
"text": "Contact us",
"active": header_navigation.is_selected('support')
},
{
"href": url_for('main.sign_in'),
"text": "Sign in",
"active": header_navigation.is_selected('sign-in')
}
] %} #}
{% endif %}
{{ usaHeader({
"homepageUrl": url_for('main.show_accounts_or_dashboard'),
"productName": "Notify",
"navigation": navigation,
"navigationClasses": "govuk-header__navigation--end",
"secondaryNavigation": secondaryNavigation,
"assetsPath": asset_path + "images"
}) }}
{% endblock %}
{% block footer %}
<!-- lines 179 - 251 can all be deleted and replaced with {% include "new/components/footer.html" %} -->
{% if current_service and current_service.research_mode %}
{% set meta_suffix = 'Built by the <a href="https://www.gsa.gov/about-us/organization/federal-acquisition-service/technology-transformation-services/tts-solutions" class="usa-link">Technology Transformation Services</a><span id="research-mode" class="research-mode">research mode</span>' %}
{% else %}
{% set commit_hash = ", Latest version: " + config['COMMIT_HASH'] %}
{% set long_link = '<a href="https://www.gsa.gov/about-us/organization/federal-acquisition-service/technology-transformation-services/tts-solutions" class="usa-link">Technology Transformation Services</a>' %}
{% set meta_suffix = "Built by the " + long_link + commit_hash %}
{% endif %}
{{ usaFooter({
"classes": "js-footer",
"navigation": [
{
"title": "About Notify",
"columns": 1,
"items": [
{
"href": url_for("main.features"),
"text": "Features"
},
{
"href": url_for("main.roadmap"),
"text": "Roadmap"
},
{
"href": url_for("main.security"),
"text": "Security"
},
]
},
{
"title": "Using Notify",
"columns": 1,
"items": [
{
"href": url_for("main.get_started"),
"text": "Get started"
},
{
"href": url_for("main.pricing"),
"text": "Pricing"
},
{
"href": url_for("main.trial_mode_new"),
"text": "Trial mode"
},
{
"href": url_for("main.message_status"),
"text": "Delivery status"
},
{
"href": url_for("main.guidance_index"),
"text": "Guidance"
},
{
"href": url_for("main.documentation"),
"text": "API documentation"
}
]
},
{
"title": "Support",
"columns": 1,
"items": [
{
"href": url_for('main.support'),
"text": "Contact us"
}
]
},
],
"meta": {
"items": meta_items,
"html": meta_suffix
}
}) }}
{% if current_user.is_authenticated %}
{% block sessionUserWarning %}
<dialog class="usa-modal" id="sessionTimer" aria-labelledby="sessionTimerHeading" aria-describedby="timerWarning">
<div class="usa-modal__content">
<div class="usa-modal__main">
<h2 class="usa-modal__heading" id="sessionTimerHeading">
Your session will end soon.
<span class="usa-sr-only">Please choose to extend your session or sign out. Your session will expire in 5 minutes or less.</span>
</h2>
<div class="usa-prose">
<p>You have been inactive for too long.
Your session will expire in <span id="timeLeft" role="timer"></span>.
</p>
</div>
<div class="usa-modal__footer">
<ul class="usa-button-group">
<li class="usa-button-group__item">
<button type="button" class="usa-button" id="extendSessionTimer" data-close-modal>
Extend Session
</button>
</li>
<li class="usa-button-group__item">
<button type="button" class="usa-button usa-button--unstyled padding-105 text-center" id="logOutTimer"
data-close-modal>
Sign out
</button>
</li>
</ul>
</div>
</div>
</div>
</dialog>
{% endblock %}
{% endif %}
{% endblock %}
{% block bodyEnd %}
{% block extra_javascripts %}
{% endblock %}
<!--[if gt IE 8]><!-->
<script type="text/javascript" src="{{ asset_url('javascripts/all.js') }}"></script>
<script type="text/javascript" src="{{ asset_url('js/uswds.min.js') }}"></script>
<!--<![endif]-->
{% endblock %}

View File

@@ -1,28 +0,0 @@
{% extends "base.html" %}
{% from "components/sub-navigation.html" import sub_navigation %}
{% from "components/page-header.html" import page_header %}
{% block per_page_title %}
{{ content_page_title }}
{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
{% if navigation_links %}
<div class="tablet:grid-col-2 margin-bottom-4">
{{ sub_navigation(navigation_links) }}
</div>
<div class="tablet:grid-col-10 tablet:padding-left-4 usa-prose site-prose">
{% else %}
<div class="tablet:grid-col-10">
{% endif %}
{% block content_column_content %}
{% endblock %}
</div>
</div>
{% endblock %}

View File

@@ -1,32 +0,0 @@
{# This template is an old version #}
{% if help %}
{% include 'partials/tour.html' %}
{% else %}
<nav class="nav margin-bottom-4">
<a class="usa-button margin-top-1 margin-bottom-5 width-full"
href="{{ url_for('.choose_template', service_id=current_service.id) }}">Send messages</a>
<ul class="usa-sidenav">
{% if current_user.has_permissions() %}
{% if current_user.has_permissions('view_activity') %}
<li class="usa-sidenav__item"><a class="{{ main_navigation.is_selected('dashboard') }}" href="{{ url_for('.service_dashboard', service_id=current_service.id) }}">Dashboard</a></li>
{% endif %}
{# <li class="usa-sidenav__item"><a class="{{ main_navigation.is_selected('templates') }}" href="{{ url_for('.choose_template', service_id=current_service.id) }}">Send messages</a></li> #}
{% if not current_user.has_permissions('view_activity') %}
<li class="usa-sidenav__item"><a class="{{ casework_navigation.is_selected('sent-messages') }}" href="{{ url_for('.view_notifications', service_id=current_service.id, status='sending,delivered,failed') }}">Sent messages</a></li>
{% endif %}
{% if current_user.has_permissions('manage_service', allow_org_user=True) %}
{# <li class="usa-sidenav__item"><a class="{{ main_navigation.is_selected('usage') }}" href="{{ url_for('.usage', service_id=current_service.id) }}">Usage</a></li> #}
{% endif %}
<!-- {% if current_user.has_permissions('manage_api_keys', 'manage_service') %}
<li class="usa-sidenav__item"><a class="{{ main_navigation.is_selected('settings') }}" href="{{ url_for('.service_settings', service_id=current_service.id) }}">Settings</a></li>
{% endif %} -->
{% if current_user.has_permissions('manage_api_keys') %}
<!-- <li><a class="usa-link{{ main_navigation.is_selected('api-integration') }}" href="{{ url_for('.api_integration', service_id=current_service.id) }}">API integration</a></li> -->
{% endif %}
{% elif current_user.has_permissions(allow_org_user=True) %}
<li class="usa-sidenav__item"><a class="usa-link{{ main_navigation.is_selected('usage') }}" href="{{ url_for('.usage', service_id=current_service.id) }}">Usage</a></li>
<li class="usa-sidenav__item"><a class="usa-link{{ main_navigation.is_selected('team-members') }}" href="{{ url_for('.manage_users', service_id=current_service.id) }}">Team members</a></li>
{% endif %}
</ul>
</nav>
{% endif %}

View File

@@ -1,70 +0,0 @@
{% from "./components/components/skip-link/macro.njk" import usaSkipLink -%}
{% from "./components/components/header/macro.njk" import usaHeader -%}
{% from "./components/components/footer/macro.njk" import usaFooter -%}
{# specify absolute url for the static assets folder e.g. http://wwww.domain.com/assets #}
{%- set assetUrl = assetUrl | default(assetPath) -%}
<!DOCTYPE html>
<html lang="{{ htmlLang | default('en') }}" class="{{ htmlClasses }}">
<head>
<meta charset="utf-8" />
<title>{% block pageTitle %}Notify.gov{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="f0f0f0" />
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="1b1b1b" />
{% if config['NR_MONITOR_ON'] %}
{% include "partials/newrelic.html" -%}
{% endif %}
{# Ensure that older IE versions always render with the correct rendering engine #}
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
{% block headIcons %}
<link rel="shortcut icon" href="{{ assetPath | default('/static') }}/images/favicon.ico" />
<link rel="icon" type="image/png" sizes="32x32"href="{{ assetPath | default('/static') }}/images/favicon-32x32.png"/>
<link rel="icon" type="image/png" sizes="16x16" href="{{ assetPath | default('/static') }}/images/favicon-16x16.png" />
<link rel="mask-icon" href="{{ assetPath | default('/static') }}/images/safari-pinned-tab.svg" color="#5bbad5">
<link rel="apple-touch-icon" sizes="180x180" href="{{ assetPath | default('/static') }}/images/apple-touch-icon.png">
<link rel="manifest" href="/site.webmanifest">
<meta name="msapplication-TileColor" content="#da532c">
<link href="{{ assetPath | default('/static') }}/images/notify-dark-favicon.png" rel="icon" media="(prefers-color-scheme: dark)">
<meta name="theme-color" content="#ffffff">
{% endblock %}
{% block head %}{% endblock %}
{# The default og:image is added below head so that scrapers see any custom metatags first, and this is just a fallback #}
{% block meta %}
<meta property="og:site_name" content="Notify.gov">
<meta property="og:image" content="{{ asset_url('images/notify-og-image.png') }}">
{% endblock %}
</head>
<body class="usa-template__body {{ bodyClasses }}">
<script nonce="{{ csp_nonce() }}">document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');</script>
{% block bodyStart %}{% endblock %}
{% block skipLink %}
{{ usaSkipLink({
"href": '#main-content',
"text": 'Skip to main content'
}) }}
{% endblock %}
{% block header %}
{{ usaHeader({}) }}
{% endblock %}
{% block main %}
<div class="grid-container">
{% block beforeContent %}{% endblock %}
<main class="{{ mainClasses }}" id="main-content" role="main">
{% block content %}{% endblock %}
</main>
</div>
{% endblock %}
{% block footer %}
{{ usaFooter({}) }}
{% endblock %}
{% block bodyEnd %}{% endblock %}
</body>
</html>

View File

@@ -1,12 +0,0 @@
{# This template is an old version #}
<nav class="navigation">
<ul>
<li><a class="usa-link{{ org_navigation.is_selected('dashboard') }}" href="{{ url_for('.organization_dashboard', org_id=current_org.id) }}">Usage</a></li>
<li><a class="usa-link{{ org_navigation.is_selected('team-members') }}" href="{{ url_for('.manage_org_users', org_id=current_org.id) }}">Team members</a></li>
{% if current_user.platform_admin %}
<li><a class="usa-link{{ org_navigation.is_selected('settings') }}" href="{{ url_for('.organization_settings', org_id=current_org.id) }}">Settings</a></li>
<li><a class="usa-link{{ org_navigation.is_selected('trial-services') }}" href="{{ url_for('.organization_trial_mode_services', org_id=current_org.id) }}">Trial mode services</a></li>
<li><a class="usa-link{{ org_navigation.is_selected('billing') }}" href="{{ url_for('.organization_billing', org_id=current_org.id) }}">Billing</a></li>
{% endif %}
</ul>
</nav>

View File

@@ -1,35 +0,0 @@
{% extends "base.html" %}
{% block per_page_title %}
{% block org_page_title %}{% endblock %} {{ current_org.name }}
{% endblock %}
{% block main %}
<div class="grid-container">
<div class="navigation-service usa-breadcrumb">
{% if current_user.platform_admin %}
<a href="{{ url_for('.organizations') }}" class="usa-link navigation-organization-link">Organizations</a>
{% endif %}
<div class="navigation-service">
{{ current_org.name }}
</div>
<a href="{{ url_for('main.choose_account') }}" class="usa-link navigation-service">Switch service</a>
</div>
<div class="grid-row">
<div class="grid-col-3">
{% include "org_nav.html" %}
</div>
<div class="grid-col-9">
{% block beforeContent %}
{% block backLink %}{% endblock %}
{% endblock %}
<main class="main" id="main-content" role="main" >
{% block content %}
{% include 'flash_messages.html' %}
{% block maincolumn_content %}{% endblock %}
{% endblock %}
</main>
</div>
</div>
</div>
{% endblock %}

View File

@@ -1,20 +0,0 @@
{# This template is an old version #}
{% macro navigation_service_name(service) %}
<div class="font-body-2xl text-bold">
{{ service.name }}
{% if not service.active %}
<span class="navigation-service-name navigation-service-type--suspended">Suspended</span>
{% endif %}
</div>
{% endmacro %}
<div class="navigation-service margin-top-5 display-flex flex-align-end flex-justify border-bottom padding-bottom-1">
{% if current_service.organization_id %}
{% if current_user.platform_admin or
(current_user.belongs_to_organization(current_service.organization_id) and current_service.live) %}
<a href="{{ url_for('.organization_dashboard', org_id=current_service.organization_id) }}" class="usa-link navigation-organization-link">{{ current_service.organization_name }}</a>
{% endif %}
{% endif %}
{{ navigation_service_name(current_service) }}
<a href="{{ url_for('main.choose_account') }}" class="usa-link">Switch service</a>
</div>

View File

@@ -1,17 +0,0 @@
{# This template is an old version #}
{% if help %}
{% include 'partials/tour.html' %}
{% else %}
<nav class="nav">
<ul class="usa-sidenav">
{# {% if current_user.has_permissions() %} #}
<li class="usa-sidenav__item"><a class="{{ main_navigation.is_selected('settings') }}"
href="{{ url_for('main.service_settings', service_id=current_service.id) }}">General</a></li>
<li class="usa-sidenav__item"><a class="{{ main_navigation.is_selected('user-profile') }}"
href="{{ url_for('main.user_profile', service_id=current_service.id) }}">User profile</a></li>
<li class="usa-sidenav__item"><a class="{{ main_navigation.is_selected('team-members') }}"
href="{{ url_for('main.manage_users', service_id=current_service.id) }}">Team members</a></li>
{# {% endif %} #}
</ul>
</nav>
{% endif %}

View File

@@ -1,35 +0,0 @@
{# This template is an old version #}
{% extends "admin_template.html" %}
{% block per_page_title %}
{% block service_page_title %}{% endblock %} {{ current_service.name }}
{% endblock %}
{% block main %}
<div class="grid-container">
<div class="grid-row margin-top-5">
{% if help %}
<div class="tablet:grid-col-3">
{% else %}
<div class="tablet:grid-col-3 margin-bottom-4">
{% endif %}
{% include "settings_nav.html" %}
</div>
{% if help %}
<div class="tablet:grid-col-8">
{% else %}
<div class="tablet:grid-col-9 tablet:padding-left-4">
{% endif %}
{% block beforeContent %}
{% block backLink %}{% endblock %}
{% endblock %}
<main id="main-content" role="main" class="usa-prose site-prose margin-bottom-10">
{% block content %}
{% include 'flash_messages.html' %}
{% block maincolumn_content %}{% endblock %}
{% endblock %}
</main>
</div>
</div>
</div>
{% endblock %}

View File

@@ -1,36 +0,0 @@
{# This template is an old version #}
{% extends "admin_template.html" %}
{% block per_page_title %}
{% block service_page_title %}{% endblock %} {{ current_service.name }}
{% endblock %}
{% block main %}
<div class="grid-container">
{% include "service_navigation.html" %}
<div class="grid-row margin-top-5">
{% if help %}
<div class="tablet:grid-col-3">
{% else %}
<div class="tablet:grid-col-3">
{% endif %}
{% include "main_nav.html" %}
</div>
{% if help %}
<div class="grid-col-8">
{% else %}
<div class="tablet:grid-col-9 tablet:padding-left-4">
{% endif %}
{% block beforeContent %}
{% block backLink %}{% endblock %}
{% endblock %}
<main id="main-content" role="main" class="usa-prose site-prose margin-bottom-10">
{% block content %}
{% include 'flash_messages.html' %}
{% block maincolumn_content %}{% endblock %}
{% endblock %}
</main>
</div>
</div>
</div>
{% endblock %}

View File

@@ -1,17 +0,0 @@
{% extends "base.html" %}
{% set mainClasses = "margin-top-5 padding-bottom-5" %}
{% block beforeContent %}
{% if current_service and current_service.active and current_user.is_authenticated and current_user.belongs_to_service(current_service.id) %}
<!-- <div class="navigation-service usa-breadcrumb">
<a href="{{ url_for('main.show_accounts_or_dashboard') }}" class="usa-link usa-breadcrumb__link usa-breadcrumb-back-to">Back to {{ current_service.name }}</a>
</div> -->
{% endif %}
{% block backLink %}{% endblock %}
{% endblock %}
{% block content %}
{% include 'flash_messages.html' %}
{% block maincolumn_content %}{% endblock %}
{% endblock %}

View File

@@ -25,7 +25,7 @@
{% if job.scheduled_for %}
<div class="usa-alert usa-alert--info">
<div class="usa-alert__body">
<h4 class="usa-alert__heading">Your text has been scheduled</h4>
<h2 class="usa-alert__heading">Your text has been scheduled</h2>
<p class="usa-alert__text">
{{ job.template_name }} - {{ current_service.name }} was scheduled on {{ job.scheduled_for|format_datetime_normal }} by {{ job.created_by.name }}
</p>
@@ -35,7 +35,7 @@
{% else %}
<div class="usa-alert usa-alert--success">
<div class="usa-alert__body">
<h4 class="usa-alert__heading">Your text has been sent</h4>
<h2 class="usa-alert__heading">Your text has been sent</h2>
<p class="usa-alert__text">
{{ job.template_name }} - {{ current_service.name }} was sent on {% if job.processing_started %}
{{ job.processing_started|format_datetime_table }} {% else %}

View File

@@ -35,11 +35,6 @@
</a>
</li>
{% endif %}
{% if page == 3 and pagination.last > 4 %}
<li class="usa-pagination__item usa-pagination__overflow" aria-label="ellipsis indicating non-visible pages">
<span></span>
</li>
{% endif %}
{% endfor %}
{% endif %}
{% if next_page %}
@@ -58,7 +53,6 @@
</nav>
{% endif %}
{% endset %}
{% block maincolumn_content %}
<div class="margin-bottom-8">
<h1 class="usa-sr-only">All activity</h1>
@@ -110,7 +104,7 @@
<td class="table-field report">
{% if job.time_left != "Data no longer available" %}
<a href="{{ job.download_link }}"><img src="{{ url_for('static', filename='img/material-icons/file_download.svg') }}" alt="File Download Icon"></a>
{% elif job %}
{% else %}
<span>N/A</span>
{% endif %}
</td>
@@ -120,9 +114,9 @@
{% endfor %}
{% else %}
<tr class="table-row">
<td class="table-empty-message" colspan="10">No batched job messages found (messages are kept for {{ service_data_retention_days }} days).</td>
<td class="table-empty-message" colspan="10">No messages found</td>
</tr>
{% endif %}
{% endif %}
</tbody>
</table>
<div class="usa-sr-only usa-table__announcement-region" aria-live="polite"></div>

View File

@@ -1,3 +1,5 @@
{% extends "withnav_template.html" %}
{% from "components/table.html" import list_table, field, text_field, link_field, right_aligned_field_heading, hidden_field_heading, row_heading, notification_status_field, notification_carrier_field, notification_carrier_message_field %}
@@ -8,6 +10,8 @@
{% endblock %}
{% block maincolumn_content %}
<script type="text/javascript" src="{{ asset_url('js/setTimezone.js') }}"></script>
<div class="dashboard margin-bottom-2">
@@ -29,9 +33,7 @@
</div>
<div id="totalMessageTable" class="margin-0"></div>
<h2 class="line-height-sans-2 margin-bottom-0 margin-top-4">
Activity snapshot
</h2>
<h2 class="line-height-sans-2 margin-bottom-0 margin-top-4">Recent activity</h2>
<div id="activityChartContainer">
<form class="usa-form">
<label class="usa-label" for="options">Account</label>
@@ -44,7 +46,7 @@
<div id="activityChart">
<div class="chart-header">
<div class="chart-subtitle">{{ current_service.name }} - last 7 days</div>
<div class="chart-legend" aria-label="Legend"></div>
<div class="chart-legend" role="region" aria-label="Legend"></div>
</div>
<div class="chart-container" id="weeklyChart"></div>
<table id="weeklyTable" class="usa-sr-only usa-table"></table>

View File

@@ -1,35 +1,45 @@
{% from "components/table.html" import list_table, field, right_aligned_field_heading, row_heading, spark_bar_field %}
<div class="ajax-block-container">
{% if template_statistics|length > 0 %}
<h2 class="margin-top-4 margin-bottom-1">Recent templates</h2>
<div class='template-statistics-table table-overflow-x-auto'>
{% call(item, row_number) list_table(
template_statistics,
caption="Messages sent by template",
caption_visible=False,
border_visible=True,
empty_message='',
field_headings=[
'Template',
'Messages sent'
],
field_headings_visible=False
) %}
{% call row_heading() %}
<a class="usa-link template-statistics-table-template-name" href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.template_id) }}">{{ item.template_name }}</a>
<span class="template-statistics-table-hint">
{{ 1|message_count_label(item.template_type, suffix='template')|capitalize }}
</span>
{% endcall %}
{{ spark_bar_field(item.count, most_used_template_count, id=item.template_id) }}
{% endcall %}
<a
href="{{ url_for('.template_usage', service_id=current_service.id) }}"
class="usa-link show-more-no-border"
><span>See templates used by month</span></a>
{% if template_statistics|length > 1 %}
<h2 class="margin-top-4 margin-bottom-1">Most Used Templates</h2>
<div class="template-statistics-table table-overflow-x-auto">
<table class="usa-table width-full">
<caption class="font-body-lg table-heading usa-sr-only">
Messages sent by template
</caption>
<thead class="table-field-headings">
<tr>
<th class="table-field-heading-first" width="">
<span>Template name</span>
</th>
<th class="table-field-heading" width="">
<span>Folder</span>
</th>
<th class="table-field-heading" width="">
<span>Last used</span>
</th>
<th class="table-field-heading" width="">
<span>Created by</span>
</th>
<th class="table-field-heading" width="">
<span># Times used</span>
</th>
</tr>
</thead>
<tbody>
{% for item in template_statistics[:8] %}
<tr class="table-row">
<td>
<a class="usa-link template-statistics-table-template-name" href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.template_id) }}">{{ item.template_name }}</a>
</td>
<td><p>{{ item.template_folder }}</p></td>
<td><p>{{ item.last_used|format_datetime_table}}</p></td>
<td><p>{{ item.created_by }}</p></td>
<td><p>{{ item.count }}</p></td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="/services/78409625-0c0a-485e-b82c-b19c8f4b1bdb/template-usage" class="usa-link show-more-no-border"><span>See templates by month</span></a>
</div>
{% endif %}
</div>

View File

@@ -10,7 +10,7 @@
{% block serviceNavigation %}{% endblock %}
{% block sideNavigation %}
{% include "/new/components/settings_nav.html" %}
{% include "components/settings_nav.html" %}
{% endblock %}
{% block maincolumn_content %}

View File

@@ -45,7 +45,7 @@
{% block backLink %}{% endblock %}
<main id="main-content" role="main">
{% block content %}
{% include 'new/components/flash_messages.html' %}
{% include 'components/flash_messages.html' %}
{% block platform_admin_content %}{% endblock %}
{% endblock %}
</main>

View File

@@ -28,6 +28,10 @@
{% if not service['active'] %}
<span class="heading-medium hint">&ensp;Archived</span>
{% endif %}
{% if service['name'] == 'Test service' %}
<a class="usa-link" href="{{ url_for('main.load_test') }}">Load Test</a>
{% endif %}
{% endcall %}
{% endcall %}

View File

@@ -4,6 +4,7 @@
{% from "components/file-upload.html" import file_upload %}
{% from "components/table.html" import list_table, text_field, index_field, index_field_heading %}
{% from "components/components/back-link/macro.njk" import usaBackLink %}
<script type="text/javascript" src="{{ asset_url('js/setTimezone.js') }}"></script>
{% block service_page_title %}
Upload a list of {{ 999|recipient_count_label(template.template_type) }}

View File

@@ -9,7 +9,7 @@
{% block serviceNavigation %}{% endblock %}
{% block sideNavigation %}
{% include "/new/components/settings_nav.html" %}
{% include "components/settings_nav.html" %}
{% endblock %}
{% block maincolumn_content %}

View File

@@ -21,7 +21,7 @@
{% endif %}
</p>
{% else %}
<nav id="template-list">
<nav id="template-list" aria-label="Template list">
{% set checkboxes_data = [] %}
{% if not current_user.has_permissions('manage_templates') %}

View File

@@ -37,7 +37,7 @@
{{ live_search(target_selector='#template-list .template-list-item', show=True, form=search_form) }}
<nav id="template-list">
<nav id="template-list" aria-label="Choose reply">
<ul>
{% for item in templates_and_folders %}
<li class="template-list-item {% if item.ancestors %}template-list-item-hidden-by-default{% endif %} {% if not item.ancestors %}template-list-item-without-ancestors{% endif %}">

View File

@@ -25,7 +25,7 @@
form=search_form,
autofocus=True
) }}
<nav id="template-list">
<nav id="template-list" aria-label="Copy template list">
<ul>
{% for item in services_templates_and_folders %}

View File

@@ -63,24 +63,29 @@
href="{{ url_for('.view_template_versions', service_id=current_service.id, template_id=template.id) }}">See previous
versions</a>
</li>
</ul>
{% endif %}
{% if current_user.has_permissions('manage_templates') and user_has_template_permission %}
{% if not template._template.archived %}
<ul class="usa-list usa-list--unstyled">
<li>
<a class="usa-link margin-right-3"
href="{{ url_for('.delete_service_template', service_id=current_service.id, template_id=template.id) }}">Delete this
template</a>
</li>
</ul>
{% endif %}
{% if not template._template.redact_personalisation %}
<ul class="usa-list usa-list--unstyled">
<li>
<a class="usa-link" href="{{ url_for('.confirm_redact_template', service_id=current_service.id, template_id=template.id) }}">Hide all personalized and conditional content after sending</a> for increased privacy protection
</li>
</ul>
{% else %}
<p class="hint">Personalization is hidden after sending</p>
{% endif %}
{% endif %}
</ul>
</div>
<!--<div class="">

View File

@@ -33,7 +33,7 @@
<h3 class="font-body-lg">Going Live</h3>
<p>To remove the restrictions of Trial Mode and begin sending messages to clients complete the <a href="https://airtable.com/appe4n7jYOALPLcyU/shrIPWnLTw9U1fclL">Live Campaign Form</a>.</p>
<p>To remove the restrictions of Trial Mode and begin sending messages to clients complete the <a class="usa-link usa-link--external" href="https://docs.google.com/forms/d/1fnaBtxuGf3q-OdGVyt2LqBKvp9_P21kmKJa0yIK8rWM/edit">Go-Live Form</a>.</p>
<p>We'll get back to you within one working day. </p>
{% endblock %}

View File

@@ -9,7 +9,7 @@
{% block serviceNavigation %}{% endblock %}
{% block sideNavigation %}
{% include "/new/components/settings_nav.html" %}
{% include "components/settings_nav.html" %}
{% endblock %}
{% block maincolumn_content %}
@@ -45,14 +45,9 @@
{% endcall %}
{% call row() %}
{{ text_field('Preferred Timezone') }}
{{ text_field('Preferred timezone') }}
{{ optional_text_field(current_user.preferred_timezone) }}
{{ edit_field(
'Change',
url_for('.user_profile_preferred_timezone'),
suffix='preferred timezone'
)
}}
{{ text_field('Set automatically') }}
{% endcall %}
{% if current_user.platform_admin or session.get('disable_platform_admin_view') %}

View File

@@ -13,35 +13,20 @@
{% block serviceNavigation %}
{% if current_org.name %}
{% else %}
{% include "new/components/service_nav.html" %}
{% include "components/service_nav.html" %}
{% endif %}
{% endblock %}
{#
The withnav_template can serve as a replacement for both settings_template and org_template.html.
The file service_navigation.html is included only in withnav_template. It's not used in settings_template. That is one out of the two differences between settings template and withnav template. As a result, when other templates extend settings_template, they include the serviceNavigation block but keep it empty. The settings_template.html is specifically used for these pages in the app: manage-users.html, service-settings.html, and user-profile.html.
In addition, serviceNavigation should be empty on templates that previously extended org_template. For templates that previously extended org_template.html, there's an addition of the orgNavBreadcrumb block.
{% block orgNavBreadcrumb %}
{% include "/new/components/org_nav_breadcrumb.html" %}
{% endblock %}
#}
{% if current_org.name %}
{% block orgNavBreadcrumb %}{% include "/new/components/org_nav_breadcrumb.html" %}{% endblock %}
{% block orgNavBreadcrumb %}{% include "components/org_nav_breadcrumb.html" %}{% endblock %}
{% endif %}
<div class="grid-row margin-top-5">
<div class="tablet:grid-col-2">
{% block sideNavigation %}
{% if current_org.name %}
{% include "/new/components/org_nav.html" %}
{% include "components/org_nav.html" %}
{% else %}
{% include "/new/components/main_nav.html" %}
{% include "components/main_nav.html" %}
{% endif %}
{#
Include settings_nav.html for child templates that previously extended settings_template.
Include "org_nav.html" for child templates that previously extended org_template html
#}
{% endblock %}
</div>
<div class="tablet:grid-col-10 tablet:padding-left-4">
@@ -50,7 +35,7 @@
{% endblock %}
<main id="main-content" role="main" class="usa-prose site-prose margin-bottom-10">
{% block content %}
{% include 'new/components/flash_messages.html' %}
{% include 'components/flash_messages.html' %}
{% block maincolumn_content %}{% endblock %}
{% endblock %}
</main>

View File

@@ -9,9 +9,8 @@ from app.utils.csv import get_user_preferred_timezone
def get_current_financial_year():
preferred_tz = pytz.timezone(get_user_preferred_timezone())
now = datetime.now(preferred_tz)
current_month = int(now.strftime("%-m"))
current_year = int(now.strftime("%Y"))
return current_year if current_month < 10 else current_year + 1
return current_year
def is_less_than_days_ago(date_from_db, number_of_days):

61
backstop.config.js Normal file
View File

@@ -0,0 +1,61 @@
const { urls, baseUrl } = require('./urls');
const MISMATCH_THRESHOLD = 0.2;
const SCREENSHOT_DELAY = 2000;
const createScenariosFromUrls = (urls, delay = SCREENSHOT_DELAY) => {
return Object.keys(urls).map((label) => ({
label,
url: urls[label],
selectors: ['document'],
misMatchThreshold: MISMATCH_THRESHOLD,
requireSameDimensions: true,
delay,
}));
};
module.exports = {
id: 'backstop_test',
viewports: [
{
label: 'desktop',
width: 1024,
height: 768,
},
],
scenarios: [
...createScenariosFromUrls(urls),
{
label: 'Choose Service - Accounts',
url: `${baseUrl}/accounts`,
selectors: ['h1.heading-large', 'a.usa-button[href="/add-service"]'],
misMatchThreshold: MISMATCH_THRESHOLD,
requireSameDimensions: true,
delay: SCREENSHOT_DELAY,
},
// example page with script
{
label: 'Get Started Page - Highlight Trial Mode',
url: `${baseUrl}/using-notify/get-started`,
selectors: ['document'],
misMatchThreshold: MISMATCH_THRESHOLD,
requireSameDimensions: true,
onBeforeScript: 'puppeteer/countFeatureLinks.js',
delay: SCREENSHOT_DELAY,
},
],
paths: {
bitmaps_reference: 'backstop_data/bitmaps_reference',
bitmaps_test: 'backstop_data/bitmaps_test',
engine_scripts: 'backstop_data/engine_scripts',
html_report: 'backstop_data/html_report',
ci_report: 'backstop_data/ci_report',
},
engine: 'puppeteer',
engineOptions: {
browser: 'chromium',
timeout: 30000,
},
report: ['browser'],
debug: false,
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 908 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

View File

@@ -0,0 +1,18 @@
module.exports = async (page, scenario) => {
await page.goto(scenario.url, { waitUntil: 'networkidle2' });
console.log('Page loaded.');
// Count the number of items in the side navigation and log their text
const navItems = await page.$$eval('nav ul li.usa-sidenav__item a', (items) =>
items.map((item) => item.textContent.trim())
);
console.log(`Found ${navItems.length} navigation items:`);
navItems.forEach((itemText, index) => {
console.log(`${index + 1}: ${itemText}`);
});
// Wait a moment for the logging to complete
await new Promise((resolve) => setTimeout(resolve, 1000));
};

65
docs/backstop.md Normal file
View File

@@ -0,0 +1,65 @@
# BackstopJS Getting Started Guide
## Overview
BackstopJS is currently optional in this project and is used for visual regression testing to ensure consistency in the UI. To get started with BackstopJS, follow the steps below. The official guide can be found at the [BackstopJS GitHub Repository](https://github.com/garris/BackstopJS).
## Goal
Eventually BackstopJS will be implemented in the pipeline process to help catch errors before they make their way to higher environments.
## Prerequisites
Before running BackstopJS, ensure the following:
- Both the API and Admin projects must be running.
- In the .env file of both the API and Admin projects, make sure the following environment variables are uncommented and set to matching values:
- `NOTIFY_E2E_TEST_EMAIL`
- `NOTIFY_E2E_TEST_PASSWORD`
Example:
```bash
NOTIFY_E2E_TEST_EMAIL=your-email@example.com
NOTIFY_E2E_TEST_PASSWORD=your-password
```
### How to Run BackstopJS
#### Step 1: Install Gulp Globally
First, make sure all dependencies are installed and updated:
```
make bootstrap
```
#### Step 2: Run the Gulp Test Task
To run the visual regression tests, use the following command:
```
gulp backstopTest
```
If there are new expected changes in the UI, one will need to update the reference images before testing. To do this, run the following command:
```
gulp backstopReference
```
**_Note: After running the `gulp backstopReference` command, immediately running the test (`gulp backstopTest`) should pass all tests, assuming the changes are expected._**
### Adding New Tests
The entry point for BackstopJS configuration can be found in the `backstop.config.js` file.
To add a new feature or page to be tested, modify the `scenarios` array. Refer to the [official documentation](https://github.com/garris/BackstopJS) for details on the structure of the object.
In most cases, one will be testing entire pages instead of individual components. To reduce redundancy, helper functions were created with our default settings that will be applied to every URL in the `urls.js` file. To add a new URL, one would add an object like such:
```
{ label: 'Support', path: '/support' }
```
For unique cases that involve UI interaction, scripts linked to the `engine_scripts/puppeteer` directory can be used to simulate user interactions during tests. An example can be found with `countFeatureLinks.js`

View File

@@ -100,7 +100,8 @@ To get involved, email us at [tts-benefits-studio@gsa.gov](mailto:tts-benefits-s
## Notify.gov Demo
https://github.com/GSA/notifications-admin/assets/6556888/b87e12a3-6963-4fab-8124-7d0d2bb59901
https://github.com/user-attachments/assets/e0bc4c61-6154-46b5-8b40-380ecd868b58

View File

@@ -5,8 +5,8 @@ const rollupPluginNodeResolve = require('@rollup/plugin-node-resolve');
const source = require('vinyl-source-stream');
const buffer = require('vinyl-buffer');
const gulpMerge = require('gulp-merge');
const uswds = require("@uswds/compile");
const uswds = require('@uswds/compile');
const { exec } = require('child_process');
const plugins = {};
plugins.addSrc = require('gulp-add-src');
plugins.babel = require('gulp-babel');
@@ -21,7 +21,7 @@ const paths = {
dist: 'app/static/',
npm: 'node_modules/',
toolkit: 'node_modules/govuk_frontend_toolkit/',
govuk_frontend: 'node_modules/govuk-frontend/'
govuk_frontend: 'node_modules/govuk-frontend/',
};
const javascripts = () => {
@@ -29,28 +29,30 @@ const javascripts = () => {
input: paths.src + 'javascripts/modules/all.mjs',
plugins: [
rollupPluginNodeResolve({
mainFields: ['module', 'main']
mainFields: ['module', 'main'],
}),
rollupPluginCommonjs({
include: 'node_modules/**'
})
include: 'node_modules/**',
}),
],
output: {
format: 'iife',
name: 'GOVUK'
}
name: 'GOVUK',
},
})
.pipe(source('all.mjs'))
.pipe(buffer())
.pipe(plugins.addSrc.prepend([
paths.npm + 'hogan.js/dist/hogan-3.0.2.js',
paths.npm + 'jquery/dist/jquery.min.js',
paths.npm + 'query-command-supported/dist/queryCommandSupported.min.js',
paths.npm + 'timeago/jquery.timeago.js',
paths.npm + 'textarea-caret/index.js',
paths.npm + 'cbor-js/cbor.js',
paths.npm + 'd3/dist/d3.min.js'
]));
.pipe(
plugins.addSrc.prepend([
paths.npm + 'hogan.js/dist/hogan-3.0.2.js',
paths.npm + 'jquery/dist/jquery.min.js',
paths.npm + 'query-command-supported/dist/queryCommandSupported.min.js',
paths.npm + 'timeago/jquery.timeago.js',
paths.npm + 'textarea-caret/index.js',
paths.npm + 'cbor-js/cbor.js',
paths.npm + 'd3/dist/d3.min.js',
])
);
const local = src([
paths.toolkit + 'javascripts/govuk/modules.js',
@@ -81,9 +83,11 @@ const javascripts = () => {
paths.src + 'javascripts/activityChart.js',
])
.pipe(plugins.prettyerror())
.pipe(plugins.babel({
presets: ['@babel/preset-env']
}));
.pipe(
plugins.babel({
presets: ['@babel/preset-env'],
})
);
return gulpMerge(vendored, local)
.pipe(plugins.uglify())
@@ -93,17 +97,21 @@ const javascripts = () => {
// Task to copy `gtm_head.js`
const copyGtmHead = () => {
return src(paths.src + 'js/gtm_head.js')
.pipe(dest(paths.dist + 'js/'));
return src(paths.src + 'js/gtm_head.js').pipe(dest(paths.dist + 'js/'));
};
// Task to copy `setTimezone.js`
const copySetTimezone = () => {
return src(paths.src + 'js/setTimezone.js').pipe(dest(paths.dist + 'js/'));
};
// Task to copy images
const copyImages = () => {
return src(paths.src + 'images/**/*', { encoding: false })
.pipe(dest(paths.dist + 'images/'));
return src(paths.src + 'images/**/*', { encoding: false }).pipe(
dest(paths.dist + 'images/')
);
};
// Configure USWDS paths
uswds.settings.version = 3;
uswds.paths.dist.css = paths.dist + 'css';
@@ -122,4 +130,40 @@ const copyAssets = async () => {
await uswds.copyAssets();
};
exports.default = series(styles, javascripts, copyGtmHead, copyImages, copyAssets);
// Optional backstopJS task
// Install gulp globally and run `gulp backstopTest`
const backstopTest = (done) => {
exec(
'npx backstop test --configPath=backstop.config.js',
(err, stdout, stderr) => {
console.log(stdout);
console.error(stderr);
done(err);
}
);
};
// Optional backstopJS reference task
// Install gulp globally and run `gulp backstopReference`
const backstopReference = (done) => {
exec(
'npx backstop reference --configPath=backstop.config.js',
(err, stdout, stderr) => {
console.log(stdout);
console.error(stderr);
done(err);
}
);
};
// Export tasks
exports.default = series(
styles,
javascripts,
copyGtmHead,
copySetTimezone,
copyImages,
copyAssets
);
exports.backstopTest = backstopTest;
exports.backstopReference = backstopReference;

View File

@@ -36,7 +36,6 @@ applications:
API_HOST_NAME: https://notify-api-((env)).apps.internal:61443
# Credentials variables
ADMIN_CLIENT_SECRET: ((ADMIN_CLIENT_SECRET))
ADMIN_CLIENT_USERNAME: ((ADMIN_CLIENT_USERNAME))
DANGEROUS_SALT: ((DANGEROUS_SALT))
@@ -60,3 +59,4 @@ applications:
LOGIN_DOT_GOV_BASE_LOGOUT_URL: ((LOGIN_DOT_GOV_BASE_LOGOUT_URL))
LOGIN_DOT_GOV_SIGNOUT_REDIRECT: ((LOGIN_DOT_GOV_SIGNOUT_REDIRECT))
LOGIN_DOT_GOV_INITIAL_SIGNIN_URL: ((LOGIN_DOT_GOV_INITIAL_SIGNIN_URL))
LOGIN_DOT_GOV_CERTS_URL: ((LOGIN_DOT_GOV_CERTS_URL))

View File

@@ -37,7 +37,10 @@ def s3upload(
aws_secret_access_key=secret_key,
region_name=region,
)
_s3 = session.resource("s3", config=AWS_CLIENT_CONFIG)
_s3 = session.resource(
"s3",
config=AWS_CLIENT_CONFIG,
)
# This 'proves' that use of moto in the relevant tests in test_send.py
# mocks everything related to S3. What you will see in the logs is:
# Exception: CREATED AT <MagicMock name='resource().Bucket().creation_date' id='4665562448'>

Some files were not shown because too many files have changed in this diff Show More