From 7b7c3061b2d7c785010d58fc223c16bbeae547cb Mon Sep 17 00:00:00 2001 From: binon Date: Tue, 30 Jan 2024 22:49:27 +0000 Subject: [PATCH 001/576] Create dependabot.yml --- .github/dependabot.yml | 52 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..7add96e24 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,52 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "nuget" + directory: "/" # Location of package manifests + schedule: + interval: "daily" + open-pull-requests-limit: 1 + target-branch: "Automatic_version_update_dependabot" + ignore: + # Ignore updates to packages that start with 'Wildcards' + - dependency-name: "Microsoft.FeatureManagement.AspNetCore*" + # Ignore some updates to the package + - dependency-name: "Microsoft.VisualStudio.Web.CodeGeneration.Design" + versions: [">7.0.0"] + - dependency-name: "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" + versions: [">7.0.0"] + - dependency-name: "Microsoft.AspNetCore.Mvc.Testing" + versions: [">7.0.0"] + - dependency-name: "Selenium.WebDriver.ChromeDriver" + versions: ">=113.0.5672.1278" # Recommended version + # For all packages, ignore all patch updates + #- dependency-name: "*" + # update-types: ["version-update:semver-patch"] + + # Configuration for npm WebUI + - package-ecosystem: "npm" + directory: "LearningHub.Nhs.WebUI/" # Location of package manifests + schedule: + interval: "daily" + target-branch: "Automatic_version_update_dependabot" + # - "dependencies" + open-pull-requests-limit: 1 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + + # Configuration for npm AdminUI + - package-ecosystem: "npm" + directory: "AdminUI/LearningHub.Nhs.AdminUI/" # Location of package manifests + schedule: + interval: "daily" + target-branch: "Automatic_version_update_dependabot" + # - "dependencies" + open-pull-requests-limit: 1 + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] From afbc437d51182b0d800529c85ae5a0f049ed9b76 Mon Sep 17 00:00:00 2001 From: binon Date: Wed, 31 Jan 2024 16:28:31 +0000 Subject: [PATCH 002/576] Update dependabot.yml --- .github/dependabot.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7add96e24..5eb6245af 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,7 +9,7 @@ updates: directory: "/" # Location of package manifests schedule: interval: "daily" - open-pull-requests-limit: 1 + open-pull-requests-limit: 5 target-branch: "Automatic_version_update_dependabot" ignore: # Ignore updates to packages that start with 'Wildcards' @@ -34,7 +34,7 @@ updates: interval: "daily" target-branch: "Automatic_version_update_dependabot" # - "dependencies" - open-pull-requests-limit: 1 + open-pull-requests-limit: 5 ignore: - dependency-name: "*" update-types: ["version-update:semver-major"] @@ -46,7 +46,7 @@ updates: interval: "daily" target-branch: "Automatic_version_update_dependabot" # - "dependencies" - open-pull-requests-limit: 1 + open-pull-requests-limit: 5 ignore: - dependency-name: "*" update-types: ["version-update:semver-major"] From 6c7c5e14ebb05614f876739f7366f1a083e6bdbe Mon Sep 17 00:00:00 2001 From: binon Date: Thu, 1 Feb 2024 11:08:17 +0000 Subject: [PATCH 003/576] Update dependabot.yml --- .github/dependabot.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5eb6245af..7add96e24 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,7 +9,7 @@ updates: directory: "/" # Location of package manifests schedule: interval: "daily" - open-pull-requests-limit: 5 + open-pull-requests-limit: 1 target-branch: "Automatic_version_update_dependabot" ignore: # Ignore updates to packages that start with 'Wildcards' @@ -34,7 +34,7 @@ updates: interval: "daily" target-branch: "Automatic_version_update_dependabot" # - "dependencies" - open-pull-requests-limit: 5 + open-pull-requests-limit: 1 ignore: - dependency-name: "*" update-types: ["version-update:semver-major"] @@ -46,7 +46,7 @@ updates: interval: "daily" target-branch: "Automatic_version_update_dependabot" # - "dependencies" - open-pull-requests-limit: 5 + open-pull-requests-limit: 1 ignore: - dependency-name: "*" update-types: ["version-update:semver-major"] From 6032ebe940e2421092c301484b70373d99b4c4f8 Mon Sep 17 00:00:00 2001 From: binon Date: Wed, 7 Feb 2024 11:47:25 +0000 Subject: [PATCH 004/576] Update dependabot.yml --- .github/dependabot.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7add96e24..55431b82b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,7 +9,7 @@ updates: directory: "/" # Location of package manifests schedule: interval: "daily" - open-pull-requests-limit: 1 + open-pull-requests-limit: 10 target-branch: "Automatic_version_update_dependabot" ignore: # Ignore updates to packages that start with 'Wildcards' @@ -34,7 +34,7 @@ updates: interval: "daily" target-branch: "Automatic_version_update_dependabot" # - "dependencies" - open-pull-requests-limit: 1 + open-pull-requests-limit: 10 ignore: - dependency-name: "*" update-types: ["version-update:semver-major"] @@ -46,7 +46,7 @@ updates: interval: "daily" target-branch: "Automatic_version_update_dependabot" # - "dependencies" - open-pull-requests-limit: 1 + open-pull-requests-limit: 10 ignore: - dependency-name: "*" update-types: ["version-update:semver-major"] From bd01584f41b9236850b7855350d921a1f9ffbf2c Mon Sep 17 00:00:00 2001 From: binon Date: Wed, 7 Feb 2024 14:52:30 +0000 Subject: [PATCH 005/576] Update dependabot.yml --- .github/dependabot.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 55431b82b..a3083dd77 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -14,6 +14,9 @@ updates: ignore: # Ignore updates to packages that start with 'Wildcards' - dependency-name: "Microsoft.FeatureManagement.AspNetCore*" + - dependency-name: "LearningHub.Nhs.Models*" + - dependency-name: "LearningHub.Nhs.Caching*" + - dependency-name: "elfhHub.Nhs.Models*" # Ignore some updates to the package - dependency-name: "Microsoft.VisualStudio.Web.CodeGeneration.Design" versions: [">7.0.0"] From 3b239677f0b9a71225ffb19e2e8eeccd10433b01 Mon Sep 17 00:00:00 2001 From: binon Date: Wed, 7 Feb 2024 15:28:51 +0000 Subject: [PATCH 006/576] Update dependabot.yml --- .github/dependabot.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a3083dd77..95bc92002 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -16,7 +16,8 @@ updates: - dependency-name: "Microsoft.FeatureManagement.AspNetCore*" - dependency-name: "LearningHub.Nhs.Models*" - dependency-name: "LearningHub.Nhs.Caching*" - - dependency-name: "elfhHub.Nhs.Models*" + - dependency-name: "elfhHub.Nhs.Models*" + - dependency-name: "linqtotwitter*" # Ignore some updates to the package - dependency-name: "Microsoft.VisualStudio.Web.CodeGeneration.Design" versions: [">7.0.0"] From f0fafe52b81fe9d57b58f424187c55341ff0179d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Feb 2024 15:49:44 +0000 Subject: [PATCH 007/576] Bump axios from 0.19.1 to 1.6.0 in /LearningHub.Nhs.WebUI Bumps [axios](https://github.com/axios/axios) from 0.19.1 to 1.6.0. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/0.19.1...v1.6.0) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- LearningHub.Nhs.WebUI/package-lock.json | 473 ++++++++---------------- LearningHub.Nhs.WebUI/package.json | 2 +- 2 files changed, 163 insertions(+), 312 deletions(-) diff --git a/LearningHub.Nhs.WebUI/package-lock.json b/LearningHub.Nhs.WebUI/package-lock.json index 6ec364f47..2341df19f 100644 --- a/LearningHub.Nhs.WebUI/package-lock.json +++ b/LearningHub.Nhs.WebUI/package-lock.json @@ -12,7 +12,7 @@ "@ckeditor/ckeditor5-build-classic": "16.0.0", "@ckeditor/ckeditor5-vue": "1.0.1", "@types/uuid": "^8.3.4", - "axios": "^0.19.1", + "axios": "^1.6.0", "babel-polyfill": "^6.26.0", "bootstrap": "^4.6.1", "ckeditor4-vue": "^0.2.0", @@ -246,41 +246,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-compilation-targets/node_modules/browserslist": { - "version": "4.16.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", - "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", - "dev": true, - "dependencies": { - "caniuse-lite": "^1.0.30001219", - "colorette": "^1.2.2", - "electron-to-chromium": "^1.3.723", - "escalade": "^3.1.1", - "node-releases": "^1.1.71" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/caniuse-lite": { - "version": "1.0.30001223", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001223.tgz", - "integrity": "sha512-k/RYs6zc/fjbxTjaWZemeSmOjO0JJV+KguOBA3NwPup8uzxM1cMhR2BD9XmO86GuqaqTCO8CgkgH9Rz//vdDiA==", - "dev": true - }, - "node_modules/@babel/helper-compilation-targets/node_modules/electron-to-chromium": { - "version": "1.3.727", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.727.tgz", - "integrity": "sha512-Mfz4FIB4FSvEwBpDfdipRIrwd6uo8gUDoRDF4QEYb4h4tSuI3ov594OrjU6on042UlFHouIJpClDODGkPcBSbg==", - "dev": true - }, "node_modules/@babel/helper-compilation-targets/node_modules/semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -4228,8 +4193,7 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "node_modules/atob": { "version": "2.1.2", @@ -4244,31 +4208,13 @@ } }, "node_modules/axios": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.1.tgz", - "integrity": "sha512-Yl+7nfreYKaLRvAvjNPkvfjnQHJM1yLBY3zhqAwcJSwR/6ETkanUgylgtIvkvz0xJ+p/vZuNw8X7Hnb7Whsbpw==", - "deprecated": "Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410", - "dependencies": { - "follow-redirects": "1.5.10" - } - }, - "node_modules/axios/node_modules/debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/axios/node_modules/follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", + "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", "dependencies": { - "debug": "=3.1.0" - }, - "engines": { - "node": ">=4.0" + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, "node_modules/babel-code-frame": { @@ -5103,6 +5049,19 @@ "semver": "^5.3.0" } }, + "node_modules/babel-preset-env/node_modules/browserslist": { + "version": "3.2.8", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz", + "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", + "dev": true, + "dependencies": { + "caniuse-lite": "^1.0.30000844", + "electron-to-chromium": "^1.3.47" + }, + "bin": { + "browserslist": "cli.js" + } + }, "node_modules/babel-preset-jest": { "version": "27.0.6", "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.0.6.tgz", @@ -5445,16 +5404,35 @@ "dev": true }, "node_modules/browserslist": { - "version": "3.2.8", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz", - "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", + "version": "4.22.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.3.tgz", + "integrity": "sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "dependencies": { - "caniuse-lite": "^1.0.30000844", - "electron-to-chromium": "^1.3.47" + "caniuse-lite": "^1.0.30001580", + "electron-to-chromium": "^1.4.648", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" }, "bin": { "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, "node_modules/bs-logger": { @@ -5550,10 +5528,24 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30000957", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000957.tgz", - "integrity": "sha512-8wxNrjAzyiHcLXN/iunskqQnJquQQ6VX8JHfW5kLgAPRSiSuKZiNfmIkP5j7jgyXqAQBSoXyJxfnbCFS0ThSiQ==", - "dev": true + "version": "1.0.30001585", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001585.tgz", + "integrity": "sha512-yr2BWR1yLXQ8fMpdS/4ZZXpseBgE7o4g41x3a6AJOqZuOi+iE/WdJYAuZ6Y95i4Ohd2Y+9MzIWRR+uGABH4s3Q==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] }, "node_modules/chalk": { "version": "1.1.3", @@ -5887,7 +5879,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, "dependencies": { "delayed-stream": "~1.0.0" }, @@ -6232,41 +6223,6 @@ "url": "https://opencollective.com/core-js" } }, - "node_modules/core-js-compat/node_modules/browserslist": { - "version": "4.16.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", - "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", - "dev": true, - "dependencies": { - "caniuse-lite": "^1.0.30001219", - "colorette": "^1.2.2", - "electron-to-chromium": "^1.3.723", - "escalade": "^3.1.1", - "node-releases": "^1.1.71" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - } - }, - "node_modules/core-js-compat/node_modules/caniuse-lite": { - "version": "1.0.30001223", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001223.tgz", - "integrity": "sha512-k/RYs6zc/fjbxTjaWZemeSmOjO0JJV+KguOBA3NwPup8uzxM1cMhR2BD9XmO86GuqaqTCO8CgkgH9Rz//vdDiA==", - "dev": true - }, - "node_modules/core-js-compat/node_modules/electron-to-chromium": { - "version": "1.3.727", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.727.tgz", - "integrity": "sha512-Mfz4FIB4FSvEwBpDfdipRIrwd6uo8gUDoRDF4QEYb4h4tSuI3ov594OrjU6on042UlFHouIJpClDODGkPcBSbg==", - "dev": true - }, "node_modules/core-js-compat/node_modules/semver": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", @@ -6871,7 +6827,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true, "engines": { "node": ">=0.4.0" } @@ -7076,9 +7031,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.3.124", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.124.tgz", - "integrity": "sha512-glecGr/kFdfeXUHOHAWvGcXrxNU+1wSO/t5B23tT1dtlvYB26GY8aHzZSWD7HqhqC800Lr+w/hQul6C5AF542w==", + "version": "1.4.659", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.659.tgz", + "integrity": "sha512-sRJ3nV3HowrYpBtPF9bASQV7OW49IgZC01Xiq43WfSE3RTCkK0/JidoCmR73Hyc1mN+l/H4Yqx0eNiomvExFZg==", "dev": true }, "node_modules/emittery": { @@ -7951,7 +7906,6 @@ "version": "1.15.2", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", - "dev": true, "funding": [ { "type": "individual", @@ -7976,6 +7930,19 @@ "node": ">=0.10.0" } }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -11530,6 +11497,12 @@ "node": ">=10" } }, + "node_modules/jquery": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==", + "peer": true + }, "node_modules/js-beautify": { "version": "1.14.0", "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.14.0.tgz", @@ -12100,7 +12073,6 @@ "version": "1.38.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -12109,7 +12081,6 @@ "version": "2.1.22", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", - "dev": true, "dependencies": { "mime-db": "~1.38.0" }, @@ -12226,7 +12197,8 @@ "node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true }, "node_modules/multicast-dns": { "version": "6.2.3", @@ -12393,9 +12365,9 @@ } }, "node_modules/node-releases": { - "version": "1.1.71", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", - "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "node_modules/normalize-path": { @@ -13241,6 +13213,11 @@ "node": ">= 0.10" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "node_modules/prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -15751,9 +15728,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "dev": true, "funding": [ { @@ -16781,60 +16758,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/webpack/node_modules/browserslist": { - "version": "4.21.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", - "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001449", - "electron-to-chromium": "^1.4.284", - "node-releases": "^2.0.8", - "update-browserslist-db": "^1.0.10" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/webpack/node_modules/caniuse-lite": { - "version": "1.0.30001480", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001480.tgz", - "integrity": "sha512-q7cpoPPvZYgtyC4VaBSN0Bt+PJ4c4EYRf0DrduInOz2SkFpHD5p3LnvEpqBp7UnJn+8x1Ogl1s38saUxe+ihQQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, - "node_modules/webpack/node_modules/electron-to-chromium": { - "version": "1.4.368", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.368.tgz", - "integrity": "sha512-e2aeCAixCj9M7nJxdB/wDjO6mbYX+lJJxSJCXDzlr5YPGYVofuJwGN9nKg2o6wWInjX6XmxRinn3AeJMK81ltw==", - "dev": true - }, "node_modules/webpack/node_modules/enhanced-resolve": { "version": "5.12.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", @@ -16881,12 +16804,6 @@ "node": ">= 0.6" } }, - "node_modules/webpack/node_modules/node-releases": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", - "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", - "dev": true - }, "node_modules/webpack/node_modules/schema-utils": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.2.tgz", @@ -17279,31 +17196,6 @@ "semver": "^6.3.0" }, "dependencies": { - "browserslist": { - "version": "4.16.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", - "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001219", - "colorette": "^1.2.2", - "electron-to-chromium": "^1.3.723", - "escalade": "^3.1.1", - "node-releases": "^1.1.71" - } - }, - "caniuse-lite": { - "version": "1.0.30001223", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001223.tgz", - "integrity": "sha512-k/RYs6zc/fjbxTjaWZemeSmOjO0JJV+KguOBA3NwPup8uzxM1cMhR2BD9XmO86GuqaqTCO8CgkgH9Rz//vdDiA==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.727", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.727.tgz", - "integrity": "sha512-Mfz4FIB4FSvEwBpDfdipRIrwd6uo8gUDoRDF4QEYb4h4tSuI3ov594OrjU6on042UlFHouIJpClDODGkPcBSbg==", - "dev": true - }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -20483,8 +20375,7 @@ "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "atob": { "version": "2.1.2", @@ -20493,29 +20384,13 @@ "dev": true }, "axios": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.1.tgz", - "integrity": "sha512-Yl+7nfreYKaLRvAvjNPkvfjnQHJM1yLBY3zhqAwcJSwR/6ETkanUgylgtIvkvz0xJ+p/vZuNw8X7Hnb7Whsbpw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", + "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", "requires": { - "follow-redirects": "1.5.10" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "requires": { - "debug": "=3.1.0" - } - } + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, "babel-code-frame": { @@ -21294,6 +21169,18 @@ "browserslist": "^3.2.6", "invariant": "^2.2.2", "semver": "^5.3.0" + }, + "dependencies": { + "browserslist": { + "version": "3.2.8", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz", + "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000844", + "electron-to-chromium": "^1.3.47" + } + } } }, "babel-preset-jest": { @@ -21594,13 +21481,15 @@ "dev": true }, "browserslist": { - "version": "3.2.8", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz", - "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", + "version": "4.22.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.3.tgz", + "integrity": "sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000844", - "electron-to-chromium": "^1.3.47" + "caniuse-lite": "^1.0.30001580", + "electron-to-chromium": "^1.4.648", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" } }, "bs-logger": { @@ -21678,9 +21567,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30000957", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000957.tgz", - "integrity": "sha512-8wxNrjAzyiHcLXN/iunskqQnJquQQ6VX8JHfW5kLgAPRSiSuKZiNfmIkP5j7jgyXqAQBSoXyJxfnbCFS0ThSiQ==", + "version": "1.0.30001585", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001585.tgz", + "integrity": "sha512-yr2BWR1yLXQ8fMpdS/4ZZXpseBgE7o4g41x3a6AJOqZuOi+iE/WdJYAuZ6Y95i4Ohd2Y+9MzIWRR+uGABH4s3Q==", "dev": true }, "chalk": { @@ -21942,7 +21831,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, "requires": { "delayed-stream": "~1.0.0" } @@ -22200,31 +22088,6 @@ "semver": "7.0.0" }, "dependencies": { - "browserslist": { - "version": "4.16.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", - "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001219", - "colorette": "^1.2.2", - "electron-to-chromium": "^1.3.723", - "escalade": "^3.1.1", - "node-releases": "^1.1.71" - } - }, - "caniuse-lite": { - "version": "1.0.30001223", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001223.tgz", - "integrity": "sha512-k/RYs6zc/fjbxTjaWZemeSmOjO0JJV+KguOBA3NwPup8uzxM1cMhR2BD9XmO86GuqaqTCO8CgkgH9Rz//vdDiA==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.727", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.727.tgz", - "integrity": "sha512-Mfz4FIB4FSvEwBpDfdipRIrwd6uo8gUDoRDF4QEYb4h4tSuI3ov594OrjU6on042UlFHouIJpClDODGkPcBSbg==", - "dev": true - }, "semver": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", @@ -22693,8 +22556,7 @@ "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, "depd": { "version": "2.0.0", @@ -22851,9 +22713,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.124", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.124.tgz", - "integrity": "sha512-glecGr/kFdfeXUHOHAWvGcXrxNU+1wSO/t5B23tT1dtlvYB26GY8aHzZSWD7HqhqC800Lr+w/hQul6C5AF542w==", + "version": "1.4.659", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.659.tgz", + "integrity": "sha512-sRJ3nV3HowrYpBtPF9bASQV7OW49IgZC01Xiq43WfSE3RTCkK0/JidoCmR73Hyc1mN+l/H4Yqx0eNiomvExFZg==", "dev": true }, "emittery": { @@ -23536,8 +23398,7 @@ "follow-redirects": { "version": "1.15.2", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", - "dev": true + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" }, "for-in": { "version": "1.0.2", @@ -23545,6 +23406,16 @@ "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", "dev": true }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, "forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -26244,6 +26115,12 @@ } } }, + "jquery": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==", + "peer": true + }, "js-beautify": { "version": "1.14.0", "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.14.0.tgz", @@ -26699,14 +26576,12 @@ "mime-db": { "version": "1.38.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", - "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==", - "dev": true + "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==" }, "mime-types": { "version": "2.1.22", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", - "dev": true, "requires": { "mime-db": "~1.38.0" } @@ -26797,7 +26672,8 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true }, "multicast-dns": { "version": "6.2.3", @@ -26933,9 +26809,9 @@ "dev": true }, "node-releases": { - "version": "1.1.71", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", - "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "normalize-path": { @@ -27560,6 +27436,11 @@ "ipaddr.js": "1.9.1" } }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -29502,9 +29383,9 @@ "dev": true }, "update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "dev": true, "requires": { "escalade": "^3.1.1", @@ -29898,30 +29779,6 @@ "uri-js": "^4.2.2" } }, - "browserslist": { - "version": "4.21.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", - "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001449", - "electron-to-chromium": "^1.4.284", - "node-releases": "^2.0.8", - "update-browserslist-db": "^1.0.10" - } - }, - "caniuse-lite": { - "version": "1.0.30001480", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001480.tgz", - "integrity": "sha512-q7cpoPPvZYgtyC4VaBSN0Bt+PJ4c4EYRf0DrduInOz2SkFpHD5p3LnvEpqBp7UnJn+8x1Ogl1s38saUxe+ihQQ==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.4.368", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.368.tgz", - "integrity": "sha512-e2aeCAixCj9M7nJxdB/wDjO6mbYX+lJJxSJCXDzlr5YPGYVofuJwGN9nKg2o6wWInjX6XmxRinn3AeJMK81ltw==", - "dev": true - }, "enhanced-resolve": { "version": "5.12.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", @@ -29959,12 +29816,6 @@ "mime-db": "1.52.0" } }, - "node-releases": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", - "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", - "dev": true - }, "schema-utils": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.2.tgz", diff --git a/LearningHub.Nhs.WebUI/package.json b/LearningHub.Nhs.WebUI/package.json index 7f3e4435f..34e1eeb8f 100644 --- a/LearningHub.Nhs.WebUI/package.json +++ b/LearningHub.Nhs.WebUI/package.json @@ -23,7 +23,7 @@ "@ckeditor/ckeditor5-build-classic": "16.0.0", "@ckeditor/ckeditor5-vue": "1.0.1", "@types/uuid": "^8.3.4", - "axios": "^0.19.1", + "axios": "^1.6.0", "babel-polyfill": "^6.26.0", "bootstrap": "^4.6.1", "ckeditor4-vue": "^0.2.0", From 464f531b39d1b65308757721031a21415f2bfe0d Mon Sep 17 00:00:00 2001 From: binon Date: Wed, 7 Feb 2024 16:28:44 +0000 Subject: [PATCH 008/576] Revert "Bump axios from 0.19.1 to 1.6.0 in /LearningHub.Nhs.WebUI" --- LearningHub.Nhs.WebUI/package-lock.json | 473 ++++++++++++++++-------- LearningHub.Nhs.WebUI/package.json | 2 +- 2 files changed, 312 insertions(+), 163 deletions(-) diff --git a/LearningHub.Nhs.WebUI/package-lock.json b/LearningHub.Nhs.WebUI/package-lock.json index 2341df19f..6ec364f47 100644 --- a/LearningHub.Nhs.WebUI/package-lock.json +++ b/LearningHub.Nhs.WebUI/package-lock.json @@ -12,7 +12,7 @@ "@ckeditor/ckeditor5-build-classic": "16.0.0", "@ckeditor/ckeditor5-vue": "1.0.1", "@types/uuid": "^8.3.4", - "axios": "^1.6.0", + "axios": "^0.19.1", "babel-polyfill": "^6.26.0", "bootstrap": "^4.6.1", "ckeditor4-vue": "^0.2.0", @@ -246,6 +246,41 @@ "@babel/core": "^7.0.0" } }, + "node_modules/@babel/helper-compilation-targets/node_modules/browserslist": { + "version": "4.16.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", + "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", + "dev": true, + "dependencies": { + "caniuse-lite": "^1.0.30001219", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.723", + "escalade": "^3.1.1", + "node-releases": "^1.1.71" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/caniuse-lite": { + "version": "1.0.30001223", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001223.tgz", + "integrity": "sha512-k/RYs6zc/fjbxTjaWZemeSmOjO0JJV+KguOBA3NwPup8uzxM1cMhR2BD9XmO86GuqaqTCO8CgkgH9Rz//vdDiA==", + "dev": true + }, + "node_modules/@babel/helper-compilation-targets/node_modules/electron-to-chromium": { + "version": "1.3.727", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.727.tgz", + "integrity": "sha512-Mfz4FIB4FSvEwBpDfdipRIrwd6uo8gUDoRDF4QEYb4h4tSuI3ov594OrjU6on042UlFHouIJpClDODGkPcBSbg==", + "dev": true + }, "node_modules/@babel/helper-compilation-targets/node_modules/semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -4193,7 +4228,8 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true }, "node_modules/atob": { "version": "2.1.2", @@ -4208,13 +4244,31 @@ } }, "node_modules/axios": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", - "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.1.tgz", + "integrity": "sha512-Yl+7nfreYKaLRvAvjNPkvfjnQHJM1yLBY3zhqAwcJSwR/6ETkanUgylgtIvkvz0xJ+p/vZuNw8X7Hnb7Whsbpw==", + "deprecated": "Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410", + "dependencies": { + "follow-redirects": "1.5.10" + } + }, + "node_modules/axios/node_modules/debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/axios/node_modules/follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", "dependencies": { - "follow-redirects": "^1.15.0", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" + "debug": "=3.1.0" + }, + "engines": { + "node": ">=4.0" } }, "node_modules/babel-code-frame": { @@ -5049,19 +5103,6 @@ "semver": "^5.3.0" } }, - "node_modules/babel-preset-env/node_modules/browserslist": { - "version": "3.2.8", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz", - "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", - "dev": true, - "dependencies": { - "caniuse-lite": "^1.0.30000844", - "electron-to-chromium": "^1.3.47" - }, - "bin": { - "browserslist": "cli.js" - } - }, "node_modules/babel-preset-jest": { "version": "27.0.6", "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.0.6.tgz", @@ -5404,35 +5445,16 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.22.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.3.tgz", - "integrity": "sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A==", + "version": "3.2.8", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz", + "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], "dependencies": { - "caniuse-lite": "^1.0.30001580", - "electron-to-chromium": "^1.4.648", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.13" + "caniuse-lite": "^1.0.30000844", + "electron-to-chromium": "^1.3.47" }, "bin": { "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, "node_modules/bs-logger": { @@ -5528,24 +5550,10 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001585", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001585.tgz", - "integrity": "sha512-yr2BWR1yLXQ8fMpdS/4ZZXpseBgE7o4g41x3a6AJOqZuOi+iE/WdJYAuZ6Y95i4Ohd2Y+9MzIWRR+uGABH4s3Q==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] + "version": "1.0.30000957", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000957.tgz", + "integrity": "sha512-8wxNrjAzyiHcLXN/iunskqQnJquQQ6VX8JHfW5kLgAPRSiSuKZiNfmIkP5j7jgyXqAQBSoXyJxfnbCFS0ThSiQ==", + "dev": true }, "node_modules/chalk": { "version": "1.1.3", @@ -5879,6 +5887,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, "dependencies": { "delayed-stream": "~1.0.0" }, @@ -6223,6 +6232,41 @@ "url": "https://opencollective.com/core-js" } }, + "node_modules/core-js-compat/node_modules/browserslist": { + "version": "4.16.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", + "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", + "dev": true, + "dependencies": { + "caniuse-lite": "^1.0.30001219", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.723", + "escalade": "^3.1.1", + "node-releases": "^1.1.71" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + } + }, + "node_modules/core-js-compat/node_modules/caniuse-lite": { + "version": "1.0.30001223", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001223.tgz", + "integrity": "sha512-k/RYs6zc/fjbxTjaWZemeSmOjO0JJV+KguOBA3NwPup8uzxM1cMhR2BD9XmO86GuqaqTCO8CgkgH9Rz//vdDiA==", + "dev": true + }, + "node_modules/core-js-compat/node_modules/electron-to-chromium": { + "version": "1.3.727", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.727.tgz", + "integrity": "sha512-Mfz4FIB4FSvEwBpDfdipRIrwd6uo8gUDoRDF4QEYb4h4tSuI3ov594OrjU6on042UlFHouIJpClDODGkPcBSbg==", + "dev": true + }, "node_modules/core-js-compat/node_modules/semver": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", @@ -6827,6 +6871,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true, "engines": { "node": ">=0.4.0" } @@ -7031,9 +7076,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.659", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.659.tgz", - "integrity": "sha512-sRJ3nV3HowrYpBtPF9bASQV7OW49IgZC01Xiq43WfSE3RTCkK0/JidoCmR73Hyc1mN+l/H4Yqx0eNiomvExFZg==", + "version": "1.3.124", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.124.tgz", + "integrity": "sha512-glecGr/kFdfeXUHOHAWvGcXrxNU+1wSO/t5B23tT1dtlvYB26GY8aHzZSWD7HqhqC800Lr+w/hQul6C5AF542w==", "dev": true }, "node_modules/emittery": { @@ -7906,6 +7951,7 @@ "version": "1.15.2", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "dev": true, "funding": [ { "type": "individual", @@ -7930,19 +7976,6 @@ "node": ">=0.10.0" } }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -11497,12 +11530,6 @@ "node": ">=10" } }, - "node_modules/jquery": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", - "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==", - "peer": true - }, "node_modules/js-beautify": { "version": "1.14.0", "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.14.0.tgz", @@ -12073,6 +12100,7 @@ "version": "1.38.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==", + "dev": true, "engines": { "node": ">= 0.6" } @@ -12081,6 +12109,7 @@ "version": "2.1.22", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", + "dev": true, "dependencies": { "mime-db": "~1.38.0" }, @@ -12197,8 +12226,7 @@ "node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "node_modules/multicast-dns": { "version": "6.2.3", @@ -12365,9 +12393,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "version": "1.1.71", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", + "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", "dev": true }, "node_modules/normalize-path": { @@ -13213,11 +13241,6 @@ "node": ">= 0.10" } }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, "node_modules/prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -15728,9 +15751,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", "dev": true, "funding": [ { @@ -16758,6 +16781,60 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/webpack/node_modules/browserslist": { + "version": "4.21.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", + "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001449", + "electron-to-chromium": "^1.4.284", + "node-releases": "^2.0.8", + "update-browserslist-db": "^1.0.10" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/webpack/node_modules/caniuse-lite": { + "version": "1.0.30001480", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001480.tgz", + "integrity": "sha512-q7cpoPPvZYgtyC4VaBSN0Bt+PJ4c4EYRf0DrduInOz2SkFpHD5p3LnvEpqBp7UnJn+8x1Ogl1s38saUxe+ihQQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/webpack/node_modules/electron-to-chromium": { + "version": "1.4.368", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.368.tgz", + "integrity": "sha512-e2aeCAixCj9M7nJxdB/wDjO6mbYX+lJJxSJCXDzlr5YPGYVofuJwGN9nKg2o6wWInjX6XmxRinn3AeJMK81ltw==", + "dev": true + }, "node_modules/webpack/node_modules/enhanced-resolve": { "version": "5.12.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", @@ -16804,6 +16881,12 @@ "node": ">= 0.6" } }, + "node_modules/webpack/node_modules/node-releases": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", + "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", + "dev": true + }, "node_modules/webpack/node_modules/schema-utils": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.2.tgz", @@ -17196,6 +17279,31 @@ "semver": "^6.3.0" }, "dependencies": { + "browserslist": { + "version": "4.16.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", + "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001219", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.723", + "escalade": "^3.1.1", + "node-releases": "^1.1.71" + } + }, + "caniuse-lite": { + "version": "1.0.30001223", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001223.tgz", + "integrity": "sha512-k/RYs6zc/fjbxTjaWZemeSmOjO0JJV+KguOBA3NwPup8uzxM1cMhR2BD9XmO86GuqaqTCO8CgkgH9Rz//vdDiA==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.727", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.727.tgz", + "integrity": "sha512-Mfz4FIB4FSvEwBpDfdipRIrwd6uo8gUDoRDF4QEYb4h4tSuI3ov594OrjU6on042UlFHouIJpClDODGkPcBSbg==", + "dev": true + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -20375,7 +20483,8 @@ "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true }, "atob": { "version": "2.1.2", @@ -20384,13 +20493,29 @@ "dev": true }, "axios": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", - "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.1.tgz", + "integrity": "sha512-Yl+7nfreYKaLRvAvjNPkvfjnQHJM1yLBY3zhqAwcJSwR/6ETkanUgylgtIvkvz0xJ+p/vZuNw8X7Hnb7Whsbpw==", "requires": { - "follow-redirects": "^1.15.0", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" + "follow-redirects": "1.5.10" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "requires": { + "debug": "=3.1.0" + } + } } }, "babel-code-frame": { @@ -21169,18 +21294,6 @@ "browserslist": "^3.2.6", "invariant": "^2.2.2", "semver": "^5.3.0" - }, - "dependencies": { - "browserslist": { - "version": "3.2.8", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz", - "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30000844", - "electron-to-chromium": "^1.3.47" - } - } } }, "babel-preset-jest": { @@ -21481,15 +21594,13 @@ "dev": true }, "browserslist": { - "version": "4.22.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.3.tgz", - "integrity": "sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A==", + "version": "3.2.8", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz", + "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001580", - "electron-to-chromium": "^1.4.648", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.13" + "caniuse-lite": "^1.0.30000844", + "electron-to-chromium": "^1.3.47" } }, "bs-logger": { @@ -21567,9 +21678,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001585", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001585.tgz", - "integrity": "sha512-yr2BWR1yLXQ8fMpdS/4ZZXpseBgE7o4g41x3a6AJOqZuOi+iE/WdJYAuZ6Y95i4Ohd2Y+9MzIWRR+uGABH4s3Q==", + "version": "1.0.30000957", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000957.tgz", + "integrity": "sha512-8wxNrjAzyiHcLXN/iunskqQnJquQQ6VX8JHfW5kLgAPRSiSuKZiNfmIkP5j7jgyXqAQBSoXyJxfnbCFS0ThSiQ==", "dev": true }, "chalk": { @@ -21831,6 +21942,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, "requires": { "delayed-stream": "~1.0.0" } @@ -22088,6 +22200,31 @@ "semver": "7.0.0" }, "dependencies": { + "browserslist": { + "version": "4.16.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", + "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001219", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.723", + "escalade": "^3.1.1", + "node-releases": "^1.1.71" + } + }, + "caniuse-lite": { + "version": "1.0.30001223", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001223.tgz", + "integrity": "sha512-k/RYs6zc/fjbxTjaWZemeSmOjO0JJV+KguOBA3NwPup8uzxM1cMhR2BD9XmO86GuqaqTCO8CgkgH9Rz//vdDiA==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.727", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.727.tgz", + "integrity": "sha512-Mfz4FIB4FSvEwBpDfdipRIrwd6uo8gUDoRDF4QEYb4h4tSuI3ov594OrjU6on042UlFHouIJpClDODGkPcBSbg==", + "dev": true + }, "semver": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", @@ -22556,7 +22693,8 @@ "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true }, "depd": { "version": "2.0.0", @@ -22713,9 +22851,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.4.659", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.659.tgz", - "integrity": "sha512-sRJ3nV3HowrYpBtPF9bASQV7OW49IgZC01Xiq43WfSE3RTCkK0/JidoCmR73Hyc1mN+l/H4Yqx0eNiomvExFZg==", + "version": "1.3.124", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.124.tgz", + "integrity": "sha512-glecGr/kFdfeXUHOHAWvGcXrxNU+1wSO/t5B23tT1dtlvYB26GY8aHzZSWD7HqhqC800Lr+w/hQul6C5AF542w==", "dev": true }, "emittery": { @@ -23398,7 +23536,8 @@ "follow-redirects": { "version": "1.15.2", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "dev": true }, "for-in": { "version": "1.0.2", @@ -23406,16 +23545,6 @@ "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", "dev": true }, - "form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, "forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -26115,12 +26244,6 @@ } } }, - "jquery": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", - "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==", - "peer": true - }, "js-beautify": { "version": "1.14.0", "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.14.0.tgz", @@ -26576,12 +26699,14 @@ "mime-db": { "version": "1.38.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", - "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==" + "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==", + "dev": true }, "mime-types": { "version": "2.1.22", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", + "dev": true, "requires": { "mime-db": "~1.38.0" } @@ -26672,8 +26797,7 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "multicast-dns": { "version": "6.2.3", @@ -26809,9 +26933,9 @@ "dev": true }, "node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "version": "1.1.71", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", + "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", "dev": true }, "normalize-path": { @@ -27436,11 +27560,6 @@ "ipaddr.js": "1.9.1" } }, - "proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -29383,9 +29502,9 @@ "dev": true }, "update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", "dev": true, "requires": { "escalade": "^3.1.1", @@ -29779,6 +29898,30 @@ "uri-js": "^4.2.2" } }, + "browserslist": { + "version": "4.21.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", + "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001449", + "electron-to-chromium": "^1.4.284", + "node-releases": "^2.0.8", + "update-browserslist-db": "^1.0.10" + } + }, + "caniuse-lite": { + "version": "1.0.30001480", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001480.tgz", + "integrity": "sha512-q7cpoPPvZYgtyC4VaBSN0Bt+PJ4c4EYRf0DrduInOz2SkFpHD5p3LnvEpqBp7UnJn+8x1Ogl1s38saUxe+ihQQ==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.4.368", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.368.tgz", + "integrity": "sha512-e2aeCAixCj9M7nJxdB/wDjO6mbYX+lJJxSJCXDzlr5YPGYVofuJwGN9nKg2o6wWInjX6XmxRinn3AeJMK81ltw==", + "dev": true + }, "enhanced-resolve": { "version": "5.12.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", @@ -29816,6 +29959,12 @@ "mime-db": "1.52.0" } }, + "node-releases": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", + "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", + "dev": true + }, "schema-utils": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.2.tgz", diff --git a/LearningHub.Nhs.WebUI/package.json b/LearningHub.Nhs.WebUI/package.json index 34e1eeb8f..7f3e4435f 100644 --- a/LearningHub.Nhs.WebUI/package.json +++ b/LearningHub.Nhs.WebUI/package.json @@ -23,7 +23,7 @@ "@ckeditor/ckeditor5-build-classic": "16.0.0", "@ckeditor/ckeditor5-vue": "1.0.1", "@types/uuid": "^8.3.4", - "axios": "^1.6.0", + "axios": "^0.19.1", "babel-polyfill": "^6.26.0", "bootstrap": "^4.6.1", "ckeditor4-vue": "^0.2.0", From 76409a19c8118b30e72780b26c5b4b33b3a55c85 Mon Sep 17 00:00:00 2001 From: binon Date: Tue, 20 Feb 2024 17:05:22 +0000 Subject: [PATCH 009/576] TD-2899 - New project accessibilty unit test --- .gitignore | 1 + .../AccessibilityTestsBase.cs | 67 +++++++++ .../BasicAccessibilityTests.cs | 39 +++++ ...rningHub.Nhs.WebUI.AutomatedUiTests.csproj | 55 +++++++ .../SeleniumServerFactory.cs | 138 ++++++++++++++++++ .../TestFixtures/AccessibilityTestsFixture.cs | 55 +++++++ .../AuthenticatedAccessibilityTestsFixture.cs | 37 +++++ .../MyAccountAccessibiltyTests.cs | 63 ++++++++ .../TestHelpers/ConfigurationHelper.cs | 26 ++++ .../TestHelpers/DriverHelper.cs | 111 ++++++++++++++ .../TestHelpers/LoginHelper.cs | 54 +++++++ .../appsettings.json | 7 + LearningHub.Nhs.WebUI.sln | 10 ++ 13 files changed, 663 insertions(+) create mode 100644 LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/AccessibilityTestsBase.cs create mode 100644 LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/BasicAccessibilityTests.cs create mode 100644 LearningHub.Nhs.WebUI.AutomatedUiTests/LearningHub.Nhs.WebUI.AutomatedUiTests.csproj create mode 100644 LearningHub.Nhs.WebUI.AutomatedUiTests/SeleniumServerFactory.cs create mode 100644 LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AccessibilityTestsFixture.cs create mode 100644 LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AuthenticatedAccessibilityTestsFixture.cs create mode 100644 LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/MyAccountAccessibiltyTests.cs create mode 100644 LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/ConfigurationHelper.cs create mode 100644 LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/DriverHelper.cs create mode 100644 LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/LoginHelper.cs create mode 100644 LearningHub.Nhs.WebUI.AutomatedUiTests/appsettings.json diff --git a/.gitignore b/.gitignore index 0afa44753..4119589ad 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,4 @@ obj /WebAPI/LearningHub.Nhs.Database/LearningHub.Nhs.Database.jfm /WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Database/LearningHub.Nhs.Migration.Staging.Database.dbmdl /WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Database/LearningHub.Nhs.Migration.Staging.Database.jfm +/LearningHub.Nhs.WebUI.AutomatedUiTests/appsettings.Development.json diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/AccessibilityTestsBase.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/AccessibilityTestsBase.cs new file mode 100644 index 000000000..2560b4326 --- /dev/null +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/AccessibilityTestsBase.cs @@ -0,0 +1,67 @@ +// +// Copyright (c) HEE.nhs.uk. +// + +namespace LearningHub.Nhs.WebUI.AutomatedUiTests.AccessibilityTests +{ + using FluentAssertions; + using LearningHub.Nhs.WebUI.AutomatedUiTests.TestFixtures; + using LearningHub.Nhs.WebUI.Startup; + using OpenQA.Selenium; + using Selenium.Axe; + using Xunit; + + /// + /// Accessibility Tests Base. + /// + [Collection("Selenium test collection")] + public class AccessibilityTestsBase + { + /// + /// Gets the base URL for the tests. + /// +#pragma warning disable SA1401 // Fields should be private + internal readonly string BaseUrl; +#pragma warning restore SA1401 // Fields should be private + + /// + /// Gets the WebDriver used for the tests. + /// +#pragma warning disable SA1401 // Fields should be private + internal readonly IWebDriver Driver; +#pragma warning restore SA1401 // Fields should be private + + /// + /// Initializes a new instance of the class. + /// + /// fixture. + public AccessibilityTestsBase(AccessibilityTestsFixture fixture) + { + this.BaseUrl = fixture.BaseUrl; + this.Driver = fixture.Driver; + } + + /// + /// Analyze Page Heading And Accessibility. + /// + /// Page Title. + public void AnalyzePageHeadingAndAccessibility(string pageTitle) + { + this.ValidatePageHeading(pageTitle); + + // then + var axeResult = new AxeBuilder(this.Driver).Analyze(); + axeResult.Violations.Should().BeEmpty(); + } + + /// + /// ValidatePageHeading. + /// + /// Page Title. + public void ValidatePageHeading(string pageTitle) + { + var h1Element = this.Driver.FindElement(By.TagName("h1")); + h1Element.Text.Should().BeEquivalentTo(pageTitle); + } + } +} diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/BasicAccessibilityTests.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/BasicAccessibilityTests.cs new file mode 100644 index 000000000..37c3da9a6 --- /dev/null +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/BasicAccessibilityTests.cs @@ -0,0 +1,39 @@ +// +// Copyright (c) HEE.nhs.uk. +// + +namespace LearningHub.Nhs.WebUI.AutomatedUiTests.AccessibilityTests +{ + using LearningHub.Nhs.WebUI.AutomatedUiTests.TestFixtures; + using Xunit; + + /// + /// BasicAccessibilityTests. + /// + public class BasicAccessibilityTests : AccessibilityTestsBase, IClassFixture> + { + /// + /// Initializes a new instance of the class. + /// BasicAccessibilityTests. + /// + /// fixture. + public BasicAccessibilityTests(AccessibilityTestsFixture fixture) + : base(fixture) + { + } + + [Theory] + [InlineData("/Home/Index", "A platform for learning and sharing resources")] + +#pragma warning disable SA1600 // Elements should be documented + public void PageHasNoAccessibilityErrors(string url, string pageTitle) +#pragma warning restore SA1600 // Elements should be documented + { + // when + this.Driver.Navigate().GoToUrl(this.BaseUrl + url); + + // then + this.AnalyzePageHeadingAndAccessibility(pageTitle); + } + } +} diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/LearningHub.Nhs.WebUI.AutomatedUiTests.csproj b/LearningHub.Nhs.WebUI.AutomatedUiTests/LearningHub.Nhs.WebUI.AutomatedUiTests.csproj new file mode 100644 index 000000000..719ae88fb --- /dev/null +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/LearningHub.Nhs.WebUI.AutomatedUiTests.csproj @@ -0,0 +1,55 @@ + + + + net6.0 + enable + enable + + false + + True + + + + + + + + + + PreserveNewest + true + PreserveNewest + + + PreserveNewest + true + PreserveNewest + + + + + + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/SeleniumServerFactory.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/SeleniumServerFactory.cs new file mode 100644 index 000000000..e01df94f3 --- /dev/null +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/SeleniumServerFactory.cs @@ -0,0 +1,138 @@ +// +// Copyright (c) HEE.nhs.uk. +// + +namespace LearningHub.Nhs.WebUI.AutomatedUiTests +{ + using System; + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Linq; + using System.Text; + using System.Threading.Tasks; + using LearningHub.Nhs.WebUI.AutomatedUiTests.TestHelpers; + using LearningHub.Nhs.WebUI.Startup; + using Microsoft.AspNetCore; + using Microsoft.AspNetCore.Hosting; + using Microsoft.AspNetCore.Hosting.Server.Features; + using Microsoft.AspNetCore.Mvc.Testing; + using Microsoft.AspNetCore.TestHost; + using Microsoft.Extensions.Configuration; + using Microsoft.Extensions.Configuration.Json; + using Serilog; + + /// + /// SeleniumServerFactory. + /// + /// TStartup. + public class SeleniumServerFactory : WebApplicationFactory + where TStartup : class + { + /// + /// Root Uri. + /// +#pragma warning disable SA1401 // Fields should be private + public string RootUri; +#pragma warning restore SA1401 // Fields should be private + private IWebHost host; + + /// + /// Initializes a new instance of the class. + /// + public SeleniumServerFactory() + { + IConfiguration configuration = ConfigurationHelper.GetConfiguration(); + this.RootUri = configuration["LearningHubWebUiUrl"]; + + // We are consuming from IIS express + // this.CreateServer(this.CreateWebHostBuilder()); + // this.CreateClient(); + } + + /// + /// Create Server. + /// + /// builder. + /// TestServer. + protected sealed override TestServer CreateServer(IWebHostBuilder builder) + { + // base.ConfigureWebHost(builder); + + // Real TCP port + var host = builder + .UseStartup() + .UseSerilog() + .ConfigureAppConfiguration(configBuilder => + { + configBuilder.AddConfiguration(GetConfigForUiTests()); + }) + .Build(); + + host.Start(); + var rootUri = host.ServerFeatures.Get().Addresses.First(); + + // Fake Server to satisfy the return type + return new TestServer( + new WebHostBuilder() + .UseStartup() + .UseSerilog() + .ConfigureAppConfiguration( + configBuilder => { configBuilder.AddConfiguration(GetConfigForUiTests()); })); + } + + /// + /// Create Web Host Builder. + /// + /// CreateDefaultBuilder. + protected sealed override IWebHostBuilder CreateWebHostBuilder() + { + return WebHost.CreateDefaultBuilder(Array.Empty()) + .UseStartup() + .UseSerilog() + .UseUrls("http://127.0.0.1:0") + .ConfigureAppConfiguration( + configBuilder => + { + var jsonConfigSources = configBuilder.Sources + .Where(source => source.GetType() == typeof(JsonConfigurationSource)) + .ToList(); + + foreach (var jsonConfigSource in jsonConfigSources) + { + configBuilder.Sources.Remove(jsonConfigSource); + } + + configBuilder.AddConfiguration(GetConfigForUiTests()); + }); + } + + /// + /// Dispose implementation. + /// + /// disposing. + protected override void Dispose(bool disposing) + { + base.Dispose(disposing); + if (disposing) + { + this.host?.Dispose(); + } + } + + /// + /// Get Config ForUi Tests. + /// + /// ConfigurationBuilder. + private static IConfigurationRoot GetConfigForUiTests() + { + return new ConfigurationBuilder() + .SetBasePath(Directory.GetCurrentDirectory()) + .AddJsonFile("appsettings.Development.json") + .AddEnvironmentVariables("DlsRefactor_") + .AddUserSecrets(typeof(Program).Assembly) + .Build(); + } + } +} diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AccessibilityTestsFixture.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AccessibilityTestsFixture.cs new file mode 100644 index 000000000..8238b893d --- /dev/null +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AccessibilityTestsFixture.cs @@ -0,0 +1,55 @@ +// +// Copyright (c) HEE.nhs.uk. +// + +namespace LearningHub.Nhs.WebUI.AutomatedUiTests.TestFixtures +{ + using System; + using System.Data.SqlClient; + using LearningHub.Nhs.WebUI.AutomatedUiTests.TestHelpers; + using OpenQA.Selenium; + + /// + /// Represents a fixture for accessibility tests. + /// + /// The type of the startup class. + public class AccessibilityTestsFixture : IDisposable + where TStartup : class + { + /// + /// Gets the base URL for the tests. + /// +#pragma warning disable SA1401 // Fields should be private + internal readonly string BaseUrl; +#pragma warning restore SA1401 // Fields should be private + + /// + /// Gets the WebDriver used for the tests. + /// +#pragma warning disable SA1401 // Fields should be private + internal readonly IWebDriver Driver; +#pragma warning restore SA1401 // Fields should be private + + private readonly SeleniumServerFactory factory; + + /// + /// Initializes a new instance of the class. + /// + public AccessibilityTestsFixture() + { + this.factory = new SeleniumServerFactory(); + this.BaseUrl = this.factory.RootUri; + this.Driver = DriverHelper.CreateHeadlessChromeDriver(); + } + + /// + /// Dispose. + /// + public void Dispose() + { + this.Driver.Quit(); + this.Driver.Dispose(); + this.factory.Dispose(); + } + } +} diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AuthenticatedAccessibilityTestsFixture.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AuthenticatedAccessibilityTestsFixture.cs new file mode 100644 index 000000000..8fc395da5 --- /dev/null +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AuthenticatedAccessibilityTestsFixture.cs @@ -0,0 +1,37 @@ +// +// Copyright (c) HEE.nhs.uk. +// + +namespace LearningHub.Nhs.WebUI.AutomatedUiTests.TestFixtures +{ + using LearningHub.Nhs.WebUI.AutomatedUiTests.TestHelpers; + using Microsoft.Extensions.Configuration; + + /// + /// AuthenticatedAccessibilityTestsFixture. + /// + /// TStartup. + public class AuthenticatedAccessibilityTestsFixture : AccessibilityTestsFixture + where TStartup : class + { + /// + /// Initializes a new instance of the class. + /// + public AuthenticatedAccessibilityTestsFixture() + { + IConfiguration configuration = ConfigurationHelper.GetConfiguration(); + string adminUsername = configuration["AdminUser:Username"]; + string adminPassword = configuration["AdminUser:Password"]; + this.Driver.LogUserInAsAdmin(this.BaseUrl, adminUsername, adminPassword); + } + + /// + /// Dispose. + /// + public new void Dispose() + { + this.Driver.LogOutUser(this.BaseUrl); + base.Dispose(); + } + } +} diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/MyAccountAccessibiltyTests.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/MyAccountAccessibiltyTests.cs new file mode 100644 index 000000000..3d80d035a --- /dev/null +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/MyAccountAccessibiltyTests.cs @@ -0,0 +1,63 @@ +// +// Copyright (c) HEE.nhs.uk. +// + +namespace LearningHub.Nhs.WebUI.AutomatedUiTests.TestFixtures +{ + using FluentAssertions; + using LearningHub.Nhs.WebUI.AutomatedUiTests.AccessibilityTests; + using LearningHub.Nhs.WebUI.AutomatedUiTests.TestHelpers; + using Selenium.Axe; + using Xunit; + + /// + /// MyAccountAccessibiltyTests. + /// + public class MyAccountAccessibiltyTests : AccessibilityTestsBase, + IClassFixture> + { + /// + /// Initializes a new instance of the class. + /// MyAccountAccessibiltyTests. + /// + /// fixture. + public MyAccountAccessibiltyTests(AuthenticatedAccessibilityTestsFixture fixture) + : base(fixture) + { + } + + /// + /// MyAccountPageHasNoAccessibilityErrors. + /// + [Fact] + public void MyAccountPageHasNoAccessibilityErrors() + { + // given + // this.Driver.LogUserInAsAdmin(this.BaseUrl); + const string myaccountsUrl = "/myaccount"; + + // when + this.Driver.Navigate().GoToUrl(this.BaseUrl + myaccountsUrl); + var result = new AxeBuilder(this.Driver).Analyze(); + + // then + CheckAccessibilityResult(result); + } + + private static void CheckAccessibilityResult(AxeResult result) + { + // Expect axe violations caused by having an aria-expanded attribute on two + // radio inputs and one checkbox input. + // The targets #course-filter-type-1, #course-filter-type-2 and #EndDate are + // nhs-tested components so ignore this violation. + result.Violations.Should().HaveCount(5); + + var violation = result.Violations[0]; + + violation.Id.Should().Be("landmark-contentinfo-is-top-level"); + violation.Nodes.Should().HaveCount(1); + violation.Nodes[0].Target.Should().HaveCount(1); + violation.Nodes[0].Target[0].Selector.Should().Be("footer > footer"); + } + } +} diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/ConfigurationHelper.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/ConfigurationHelper.cs new file mode 100644 index 000000000..675564e76 --- /dev/null +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/ConfigurationHelper.cs @@ -0,0 +1,26 @@ +// +// Copyright (c) HEE.nhs.uk. +// + +namespace LearningHub.Nhs.WebUI.AutomatedUiTests.TestHelpers +{ + using Microsoft.Extensions.Configuration; + + /// + /// ConfigurationHelper. + /// + public static class ConfigurationHelper + { + /// + /// GetConfiguration. + /// + /// IConfiguration. + public static IConfiguration GetConfiguration() + { + return new ConfigurationBuilder() + .SetBasePath(Directory.GetCurrentDirectory()) + .AddJsonFile("appsettings.Development.json") + .Build(); + } + } +} diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/DriverHelper.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/DriverHelper.cs new file mode 100644 index 000000000..b1a23d3fb --- /dev/null +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/DriverHelper.cs @@ -0,0 +1,111 @@ +// +// Copyright (c) HEE.nhs.uk. +// + +namespace LearningHub.Nhs.WebUI.AutomatedUiTests.TestHelpers +{ + using OpenQA.Selenium; + using OpenQA.Selenium.Chrome; + using OpenQA.Selenium.Support.UI; + + /// + /// Driver Helper. + /// + public static class DriverHelper + { + /// + /// Create Headless ChromeDriver. + /// + /// Chrome Driver. + public static ChromeDriver CreateHeadlessChromeDriver() + { + var chromeOptions = new ChromeOptions(); + + // chromeOptions.AddArgument("--headless"); + return new ChromeDriver(chromeOptions); + } + + /// + /// Fill Text Input. + /// + /// WebDriver. + /// inputId. + /// inputText. + public static void FillTextInput(this IWebDriver driver, string inputId, string inputText) + { + var answer = driver.FindElement(By.Id(inputId)); + answer.Clear(); + answer.SendKeys(inputText); + } + + /// + /// ClickButtonByText. + /// + /// WebDriver. + /// text. + public static void ClickButtonByText(this IWebDriver driver, string text) + { + var addButton = driver.FindElement(By.XPath($"//button[.='{text}']")); + addButton.Click(); + } + + /// + /// ClickLinkContainingText. + /// + /// WebDriver. + /// text. + public static void ClickLinkContainingText(this IWebDriver driver, string text) + { + var foundLink = driver.FindElement(By.XPath($"//a[contains(., '{text}')]")); + foundLink.Click(); + } + + /// + /// SelectDropdownItemValue. + /// + /// WebDriver. + /// dropdownId. + /// selectedValue. + public static void SelectDropdownItemValue(this IWebDriver driver, string dropdownId, string selectedValue) + { + var dropdown = new SelectElement(driver.FindElement(By.Id(dropdownId))); + dropdown.SelectByValue(selectedValue); + } + + /// + /// SetCheckboxState. + /// + /// WebDriver. + /// inputId. + /// checkState. + public static void SetCheckboxState(this IWebDriver driver, string inputId, bool checkState) + { + var answer = driver.FindElement(By.Id(inputId)); + if (answer.Selected != checkState) + { + answer.Click(); + } + } + + /// + /// Submit Form. + /// + /// WebDriver. + public static void SubmitForm(this IWebDriver driver) + { + var selectPromptForm = driver.FindElement(By.TagName("form")); + selectPromptForm.Submit(); + } + + /// + /// Select Radio Option By Id. + /// + /// WebDriver. + /// radio Id. + public static void SelectRadioOptionById(this IWebDriver driver, string radioId) + { + var radioInput = driver.FindElement(By.Id(radioId)); + radioInput.Click(); + } + } +} diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/LoginHelper.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/LoginHelper.cs new file mode 100644 index 000000000..31aa5087f --- /dev/null +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/LoginHelper.cs @@ -0,0 +1,54 @@ +// +// Copyright (c) HEE.nhs.uk. +// +namespace LearningHub.Nhs.WebUI.AutomatedUiTests.TestHelpers +{ + using OpenQA.Selenium; + using OpenQA.Selenium.Support.UI; + + /// + /// LoginHelper. + /// + public static class LoginHelper + { + /// + /// Get LogUserInAsAdmin. + /// + /// WebDriver. + /// baseUrl. + /// adminName. + /// adminPassword. + public static void LogUserInAsAdmin(this IWebDriver driver, string baseUrl, string adminName, string adminPassword) + { + driver.Navigate().GoToUrl(baseUrl + "/Login"); + var username = driver.FindElement(By.Id("Username")); + username.SendKeys(adminName); + + var password = driver.FindElement(By.Id("Password")); + password.SendKeys(adminPassword); + + var submitButton = driver.FindElement(By.TagName("form")); + submitButton.Submit(); + } + + /// + /// LogOutUser. + /// + /// WebDriver. + /// baseUrl. + public static void LogOutUser(this IWebDriver driver, string baseUrl) + { + driver.Navigate().GoToUrl(baseUrl); + + // Wait for the element to be present on the page + WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); + IWebElement logoutLink = driver.FindElement(By.XPath("//a[@class='nhsuk-account__login--link' and @href='/Home/Logout']")); + + // Perform an action on the element (e.g., click) + logoutLink.Click(); + + // var submitButton = driver.FindElement(By.TagName("form")); + // submitButton.Submit(); + } + } +} diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/appsettings.json b/LearningHub.Nhs.WebUI.AutomatedUiTests/appsettings.json new file mode 100644 index 000000000..223c0c93f --- /dev/null +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/appsettings.json @@ -0,0 +1,7 @@ +{ + "LearningHubWebUiUrl": "", + "AdminUser": { + "Username": "", + "Password": "" + } +} \ No newline at end of file diff --git a/LearningHub.Nhs.WebUI.sln b/LearningHub.Nhs.WebUI.sln index 9cce69d55..5aea6885f 100644 --- a/LearningHub.Nhs.WebUI.sln +++ b/LearningHub.Nhs.WebUI.sln @@ -79,6 +79,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LearningHub.Nhs.ReportApi.S EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LearningHub.Nhs.ReportApi.Shared", "ReportAPI\LearningHub.Nhs.ReportApi.Shared\LearningHub.Nhs.ReportApi.Shared.csproj", "{6167F037-166C-4C5A-81BE-55618E77D4E8}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LearningHub.Nhs.WebUI.AutomatedUiTests", "LearningHub.Nhs.WebUI.AutomatedUiTests\LearningHub.Nhs.WebUI.AutomatedUiTests.csproj", "{A84EC50B-2B01-4819-A2B1-BD867B7595CA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -335,6 +337,14 @@ Global {6167F037-166C-4C5A-81BE-55618E77D4E8}.Release|Any CPU.Build.0 = Release|Any CPU {6167F037-166C-4C5A-81BE-55618E77D4E8}.Release|x64.ActiveCfg = Release|Any CPU {6167F037-166C-4C5A-81BE-55618E77D4E8}.Release|x64.Build.0 = Release|Any CPU + {A84EC50B-2B01-4819-A2B1-BD867B7595CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A84EC50B-2B01-4819-A2B1-BD867B7595CA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A84EC50B-2B01-4819-A2B1-BD867B7595CA}.Debug|x64.ActiveCfg = Debug|Any CPU + {A84EC50B-2B01-4819-A2B1-BD867B7595CA}.Debug|x64.Build.0 = Debug|Any CPU + {A84EC50B-2B01-4819-A2B1-BD867B7595CA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A84EC50B-2B01-4819-A2B1-BD867B7595CA}.Release|Any CPU.Build.0 = Release|Any CPU + {A84EC50B-2B01-4819-A2B1-BD867B7595CA}.Release|x64.ActiveCfg = Release|Any CPU + {A84EC50B-2B01-4819-A2B1-BD867B7595CA}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From a1d8719a34a4186564b0bd9b3065bec91e701732 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 07:41:00 +0000 Subject: [PATCH 010/576] Bump ip from 1.1.8 to 1.1.9 in /AdminUI/LearningHub.Nhs.AdminUI Bumps [ip](https://github.com/indutny/node-ip) from 1.1.8 to 1.1.9. - [Commits](https://github.com/indutny/node-ip/compare/v1.1.8...v1.1.9) --- updated-dependencies: - dependency-name: ip dependency-type: indirect ... Signed-off-by: dependabot[bot] --- .../LearningHub.Nhs.AdminUI/package-lock.json | 350 ++---------------- 1 file changed, 32 insertions(+), 318 deletions(-) diff --git a/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json b/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json index 52b466486..d62ae121f 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json +++ b/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json @@ -8120,9 +8120,9 @@ } }, "node_modules/ip": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz", - "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.9.tgz", + "integrity": "sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ==", "dev": true }, "node_modules/ip-regex": { @@ -8832,15 +8832,6 @@ } } }, - "node_modules/jest-cli/node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-cli/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -8872,17 +8863,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-cli/node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, "node_modules/jest-cli/node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -8901,15 +8881,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/jest-cli/node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, "node_modules/jest-cli/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -8919,41 +8890,6 @@ "node": ">=8" } }, - "node_modules/jest-cli/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-cli/node_modules/string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-cli/node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-cli/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -8966,32 +8902,6 @@ "node": ">=8" } }, - "node_modules/jest-cli/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/jest-cli/node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/jest-cli/node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -10285,15 +10195,6 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-runtime/node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-runtime/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -10325,17 +10226,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-runtime/node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, "node_modules/jest-runtime/node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -10354,15 +10244,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/jest-runtime/node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, "node_modules/jest-runtime/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -10372,15 +10253,6 @@ "node": ">=8" } }, - "node_modules/jest-runtime/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-runtime/node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -10390,32 +10262,6 @@ "node": ">=8" } }, - "node_modules/jest-runtime/node_modules/string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runtime/node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-runtime/node_modules/strip-bom": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", @@ -10437,32 +10283,6 @@ "node": ">=8" } }, - "node_modules/jest-runtime/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/jest-runtime/node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/jest-runtime/node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -11049,6 +10869,12 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/jquery": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==", + "peer": true + }, "node_modules/js-base64": { "version": "2.6.4", "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", @@ -11840,6 +11666,13 @@ "integrity": "sha512-cnAsSVxIDsYt0v7HmC0hWZFwwXSh+E6PgCrREDuN/EsjgLwA5XRmlMHhSiDPrt6HxY1gTivEa/Zh7GtODoLevQ==", "dev": true }, + "node_modules/nan": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", + "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", + "dev": true, + "optional": true + }, "node_modules/nanoid": { "version": "3.1.25", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz", @@ -22830,9 +22663,9 @@ } }, "ip": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz", - "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.9.tgz", + "integrity": "sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ==", "dev": true }, "ip-regex": { @@ -23346,12 +23179,6 @@ "yargs": "^16.0.3" }, "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -23371,17 +23198,6 @@ "supports-color": "^7.1.0" } }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -23397,44 +23213,12 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -23444,23 +23228,6 @@ "has-flag": "^4.0.0" } }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, "yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -24439,12 +24206,6 @@ "yargs": "^16.0.3" }, "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -24464,17 +24225,6 @@ "supports-color": "^7.1.0" } }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -24490,50 +24240,18 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, "strip-bom": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", @@ -24549,23 +24267,6 @@ "has-flag": "^4.0.0" } }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, "yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -25006,6 +24707,12 @@ } } }, + "jquery": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==", + "peer": true + }, "js-base64": { "version": "2.6.4", "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", @@ -25648,6 +25355,13 @@ "integrity": "sha512-cnAsSVxIDsYt0v7HmC0hWZFwwXSh+E6PgCrREDuN/EsjgLwA5XRmlMHhSiDPrt6HxY1gTivEa/Zh7GtODoLevQ==", "dev": true }, + "nan": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", + "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", + "dev": true, + "optional": true + }, "nanoid": { "version": "3.1.25", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz", From 21d1a689c8d1a36f98a583d1c85a3ca7b8123a87 Mon Sep 17 00:00:00 2001 From: binon Date: Tue, 27 Feb 2024 12:37:28 +0000 Subject: [PATCH 011/576] Refactored some of the code --- .../AccessibilityTestsBase.cs | 2 +- .../BasicAccessibilityTests.cs | 6 +- .../MyAccountAccessibiltyTests.cs | 21 ++-- .../SeleniumServerFactory.cs | 96 +------------------ .../TestFixtures/AccessibilityTestsFixture.cs | 13 +-- .../AuthenticatedAccessibilityTestsFixture.cs | 5 +- .../TestHelpers/LoginHelper.cs | 42 ++++++-- 7 files changed, 58 insertions(+), 127 deletions(-) rename LearningHub.Nhs.WebUI.AutomatedUiTests/{TestFixtures => AccessibilityTests}/MyAccountAccessibiltyTests.cs (69%) diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/AccessibilityTestsBase.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/AccessibilityTestsBase.cs index 2560b4326..28a445e13 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/AccessibilityTestsBase.cs +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/AccessibilityTestsBase.cs @@ -35,7 +35,7 @@ public class AccessibilityTestsBase /// Initializes a new instance of the class. /// /// fixture. - public AccessibilityTestsBase(AccessibilityTestsFixture fixture) + public AccessibilityTestsBase(AccessibilityTestsFixture fixture) { this.BaseUrl = fixture.BaseUrl; this.Driver = fixture.Driver; diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/BasicAccessibilityTests.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/BasicAccessibilityTests.cs index 37c3da9a6..7a4352353 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/BasicAccessibilityTests.cs +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/BasicAccessibilityTests.cs @@ -10,14 +10,14 @@ namespace LearningHub.Nhs.WebUI.AutomatedUiTests.AccessibilityTests /// /// BasicAccessibilityTests. /// - public class BasicAccessibilityTests : AccessibilityTestsBase, IClassFixture> + public class BasicAccessibilityTests : AccessibilityTestsBase, IClassFixture { /// /// Initializes a new instance of the class. /// BasicAccessibilityTests. /// /// fixture. - public BasicAccessibilityTests(AccessibilityTestsFixture fixture) + public BasicAccessibilityTests(AccessibilityTestsFixture fixture) : base(fixture) { } @@ -34,6 +34,8 @@ public void PageHasNoAccessibilityErrors(string url, string pageTitle) // then this.AnalyzePageHeadingAndAccessibility(pageTitle); + + this.Driver.Dispose(); } } } diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/MyAccountAccessibiltyTests.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/MyAccountAccessibiltyTests.cs similarity index 69% rename from LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/MyAccountAccessibiltyTests.cs rename to LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/MyAccountAccessibiltyTests.cs index 3d80d035a..530ec67d1 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/MyAccountAccessibiltyTests.cs +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/MyAccountAccessibiltyTests.cs @@ -2,10 +2,10 @@ // Copyright (c) HEE.nhs.uk. // -namespace LearningHub.Nhs.WebUI.AutomatedUiTests.TestFixtures +namespace LearningHub.Nhs.WebUI.AutomatedUiTests.AccessibilityTests { using FluentAssertions; - using LearningHub.Nhs.WebUI.AutomatedUiTests.AccessibilityTests; + using LearningHub.Nhs.WebUI.AutomatedUiTests.TestFixtures; using LearningHub.Nhs.WebUI.AutomatedUiTests.TestHelpers; using Selenium.Axe; using Xunit; @@ -14,26 +14,26 @@ namespace LearningHub.Nhs.WebUI.AutomatedUiTests.TestFixtures /// MyAccountAccessibiltyTests. /// public class MyAccountAccessibiltyTests : AccessibilityTestsBase, - IClassFixture> + IClassFixture { /// /// Initializes a new instance of the class. /// MyAccountAccessibiltyTests. /// /// fixture. - public MyAccountAccessibiltyTests(AuthenticatedAccessibilityTestsFixture fixture) + public MyAccountAccessibiltyTests(AuthenticatedAccessibilityTestsFixture fixture) : base(fixture) { } /// - /// MyAccountPageHasNoAccessibilityErrors. + /// MyAccount Page Has Accessibility Errors. /// [Fact] - public void MyAccountPageHasNoAccessibilityErrors() + public void MyAccountPageHasAccessibilityErrors() { // given - // this.Driver.LogUserInAsAdmin(this.BaseUrl); + // this.Driver.LogUserInAsAdmin(this.BaseUrl); const string myaccountsUrl = "/myaccount"; // when @@ -42,14 +42,13 @@ public void MyAccountPageHasNoAccessibilityErrors() // then CheckAccessibilityResult(result); + + this.Driver.LogOutUser(this.BaseUrl); } private static void CheckAccessibilityResult(AxeResult result) { - // Expect axe violations caused by having an aria-expanded attribute on two - // radio inputs and one checkbox input. - // The targets #course-filter-type-1, #course-filter-type-2 and #EndDate are - // nhs-tested components so ignore this violation. + // Expect axe violation result.Violations.Should().HaveCount(5); var violation = result.Violations[0]; diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/SeleniumServerFactory.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/SeleniumServerFactory.cs index e01df94f3..bf1274c84 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/SeleniumServerFactory.cs +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/SeleniumServerFactory.cs @@ -26,113 +26,21 @@ namespace LearningHub.Nhs.WebUI.AutomatedUiTests /// /// SeleniumServerFactory. /// - /// TStartup. - public class SeleniumServerFactory : WebApplicationFactory - where TStartup : class + public class SeleniumServerFactory { /// /// Root Uri. /// #pragma warning disable SA1401 // Fields should be private public string RootUri; -#pragma warning restore SA1401 // Fields should be private - private IWebHost host; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// public SeleniumServerFactory() { IConfiguration configuration = ConfigurationHelper.GetConfiguration(); this.RootUri = configuration["LearningHubWebUiUrl"]; - - // We are consuming from IIS express - // this.CreateServer(this.CreateWebHostBuilder()); - // this.CreateClient(); - } - - /// - /// Create Server. - /// - /// builder. - /// TestServer. - protected sealed override TestServer CreateServer(IWebHostBuilder builder) - { - // base.ConfigureWebHost(builder); - - // Real TCP port - var host = builder - .UseStartup() - .UseSerilog() - .ConfigureAppConfiguration(configBuilder => - { - configBuilder.AddConfiguration(GetConfigForUiTests()); - }) - .Build(); - - host.Start(); - var rootUri = host.ServerFeatures.Get().Addresses.First(); - - // Fake Server to satisfy the return type - return new TestServer( - new WebHostBuilder() - .UseStartup() - .UseSerilog() - .ConfigureAppConfiguration( - configBuilder => { configBuilder.AddConfiguration(GetConfigForUiTests()); })); - } - - /// - /// Create Web Host Builder. - /// - /// CreateDefaultBuilder. - protected sealed override IWebHostBuilder CreateWebHostBuilder() - { - return WebHost.CreateDefaultBuilder(Array.Empty()) - .UseStartup() - .UseSerilog() - .UseUrls("http://127.0.0.1:0") - .ConfigureAppConfiguration( - configBuilder => - { - var jsonConfigSources = configBuilder.Sources - .Where(source => source.GetType() == typeof(JsonConfigurationSource)) - .ToList(); - - foreach (var jsonConfigSource in jsonConfigSources) - { - configBuilder.Sources.Remove(jsonConfigSource); - } - - configBuilder.AddConfiguration(GetConfigForUiTests()); - }); - } - - /// - /// Dispose implementation. - /// - /// disposing. - protected override void Dispose(bool disposing) - { - base.Dispose(disposing); - if (disposing) - { - this.host?.Dispose(); - } - } - - /// - /// Get Config ForUi Tests. - /// - /// ConfigurationBuilder. - private static IConfigurationRoot GetConfigForUiTests() - { - return new ConfigurationBuilder() - .SetBasePath(Directory.GetCurrentDirectory()) - .AddJsonFile("appsettings.Development.json") - .AddEnvironmentVariables("DlsRefactor_") - .AddUserSecrets(typeof(Program).Assembly) - .Build(); } } } diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AccessibilityTestsFixture.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AccessibilityTestsFixture.cs index 8238b893d..eac8a6d68 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AccessibilityTestsFixture.cs +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AccessibilityTestsFixture.cs @@ -4,17 +4,13 @@ namespace LearningHub.Nhs.WebUI.AutomatedUiTests.TestFixtures { - using System; - using System.Data.SqlClient; using LearningHub.Nhs.WebUI.AutomatedUiTests.TestHelpers; using OpenQA.Selenium; /// /// Represents a fixture for accessibility tests. /// - /// The type of the startup class. - public class AccessibilityTestsFixture : IDisposable - where TStartup : class + public class AccessibilityTestsFixture { /// /// Gets the base URL for the tests. @@ -30,14 +26,14 @@ public class AccessibilityTestsFixture : IDisposable internal readonly IWebDriver Driver; #pragma warning restore SA1401 // Fields should be private - private readonly SeleniumServerFactory factory; + private readonly SeleniumServerFactory factory; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// public AccessibilityTestsFixture() { - this.factory = new SeleniumServerFactory(); + this.factory = new SeleniumServerFactory(); this.BaseUrl = this.factory.RootUri; this.Driver = DriverHelper.CreateHeadlessChromeDriver(); } @@ -49,7 +45,6 @@ public void Dispose() { this.Driver.Quit(); this.Driver.Dispose(); - this.factory.Dispose(); } } } diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AuthenticatedAccessibilityTestsFixture.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AuthenticatedAccessibilityTestsFixture.cs index 8fc395da5..6cb3a442f 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AuthenticatedAccessibilityTestsFixture.cs +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AuthenticatedAccessibilityTestsFixture.cs @@ -11,11 +11,10 @@ namespace LearningHub.Nhs.WebUI.AutomatedUiTests.TestFixtures /// AuthenticatedAccessibilityTestsFixture. /// /// TStartup. - public class AuthenticatedAccessibilityTestsFixture : AccessibilityTestsFixture - where TStartup : class + public class AuthenticatedAccessibilityTestsFixture : AccessibilityTestsFixture { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// public AuthenticatedAccessibilityTestsFixture() { diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/LoginHelper.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/LoginHelper.cs index 31aa5087f..84846b6d7 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/LoginHelper.cs +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/LoginHelper.cs @@ -40,15 +40,43 @@ public static void LogOutUser(this IWebDriver driver, string baseUrl) { driver.Navigate().GoToUrl(baseUrl); - // Wait for the element to be present on the page - WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); - IWebElement logoutLink = driver.FindElement(By.XPath("//a[@class='nhsuk-account__login--link' and @href='/Home/Logout']")); + try + { + // Maximum time to wait for the element in seconds + int maxWaitTimeInSeconds = 10; - // Perform an action on the element (e.g., click) - logoutLink.Click(); + // Find the element using XPath + IWebElement logoutLink = null; - // var submitButton = driver.FindElement(By.TagName("form")); - // submitButton.Submit(); + for (int i = 0; i < maxWaitTimeInSeconds; i++) + { + try + { + logoutLink = driver.FindElement(By.XPath("//a[@class='nhsuk-account__login--link' and @href='/Home/Logout']")); + if (logoutLink.Displayed) + { + break; // Exit the loop if element is found and displayed + } + } + catch (NoSuchElementException) + { + // Element not found yet, wait for a second and try again + Thread.Sleep(1000); + } + } + + // Check if the element is found and displayed + if (logoutLink != null && logoutLink.Displayed) + { + // Perform an action on the element (e.g., click) + logoutLink.Click(); + } + } + finally + { + // Close the browser window + driver.Quit(); + } } } } From bfc8d58f43795c0c38d85daf1adf41ff5f56a519 Mon Sep 17 00:00:00 2001 From: binon Date: Tue, 27 Feb 2024 14:18:18 +0000 Subject: [PATCH 012/576] Td-2899 Minor updated chrome driver configuration --- .../AccessibilityTests/MyAccountAccessibiltyTests.cs | 2 +- .../TestHelpers/DriverHelper.cs | 2 +- .../TestHelpers/LoginHelper.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/MyAccountAccessibiltyTests.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/MyAccountAccessibiltyTests.cs index 530ec67d1..ca2f2127e 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/MyAccountAccessibiltyTests.cs +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/MyAccountAccessibiltyTests.cs @@ -33,7 +33,6 @@ public MyAccountAccessibiltyTests(AuthenticatedAccessibilityTestsFixture fixture public void MyAccountPageHasAccessibilityErrors() { // given - // this.Driver.LogUserInAsAdmin(this.BaseUrl); const string myaccountsUrl = "/myaccount"; // when @@ -43,6 +42,7 @@ public void MyAccountPageHasAccessibilityErrors() // then CheckAccessibilityResult(result); + // Dispose driver this.Driver.LogOutUser(this.BaseUrl); } diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/DriverHelper.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/DriverHelper.cs index b1a23d3fb..cf1e771f6 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/DriverHelper.cs +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/DriverHelper.cs @@ -21,7 +21,7 @@ public static ChromeDriver CreateHeadlessChromeDriver() { var chromeOptions = new ChromeOptions(); - // chromeOptions.AddArgument("--headless"); + chromeOptions.AddArgument("--headless"); return new ChromeDriver(chromeOptions); } diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/LoginHelper.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/LoginHelper.cs index 84846b6d7..ebdabb30b 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/LoginHelper.cs +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/LoginHelper.cs @@ -52,7 +52,7 @@ public static void LogOutUser(this IWebDriver driver, string baseUrl) { try { - logoutLink = driver.FindElement(By.XPath("//a[@class='nhsuk-account__login--link' and @href='/Home/Logout']")); + logoutLink = driver.FindElement(By.CssSelector("a.nhsuk-account__login--link[href='/Home/Logout']")); if (logoutLink.Displayed) { break; // Exit the loop if element is found and displayed From 95d550f50dd3bc91ecfba9f0212b87e30d18c3e4 Mon Sep 17 00:00:00 2001 From: binon Date: Wed, 28 Feb 2024 13:13:53 +0000 Subject: [PATCH 013/576] TD-2899, Merged changes from CI, removed copyright and suppressed warning (globally) --- .../AccessibilityTests/AccessibilityTestsBase.cs | 8 -------- .../AccessibilityTests/BasicAccessibilityTests.cs | 8 +------- .../MyAccountAccessibiltyTests.cs | 10 +++------- .../GlobalSuppressions.cs | 13 +++++++++++++ .../SeleniumServerFactory.cs | 7 +------ .../TestFixtures/AccessibilityTestsFixture.cs | 8 -------- .../AuthenticatedAccessibilityTestsFixture.cs | 4 ---- .../TestHelpers/ConfigurationHelper.cs | 6 +----- .../TestHelpers/DriverHelper.cs | 6 +----- .../TestHelpers/LoginHelper.cs | 5 +---- 10 files changed, 21 insertions(+), 54 deletions(-) create mode 100644 LearningHub.Nhs.WebUI.AutomatedUiTests/GlobalSuppressions.cs diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/AccessibilityTestsBase.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/AccessibilityTestsBase.cs index 28a445e13..c8409d921 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/AccessibilityTestsBase.cs +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/AccessibilityTestsBase.cs @@ -1,7 +1,3 @@ -// -// Copyright (c) HEE.nhs.uk. -// - namespace LearningHub.Nhs.WebUI.AutomatedUiTests.AccessibilityTests { using FluentAssertions; @@ -20,16 +16,12 @@ public class AccessibilityTestsBase /// /// Gets the base URL for the tests. /// -#pragma warning disable SA1401 // Fields should be private internal readonly string BaseUrl; -#pragma warning restore SA1401 // Fields should be private /// /// Gets the WebDriver used for the tests. /// -#pragma warning disable SA1401 // Fields should be private internal readonly IWebDriver Driver; -#pragma warning restore SA1401 // Fields should be private /// /// Initializes a new instance of the class. diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/BasicAccessibilityTests.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/BasicAccessibilityTests.cs index 7a4352353..eac9ac28a 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/BasicAccessibilityTests.cs +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/BasicAccessibilityTests.cs @@ -1,8 +1,4 @@ -// -// Copyright (c) HEE.nhs.uk. -// - -namespace LearningHub.Nhs.WebUI.AutomatedUiTests.AccessibilityTests +namespace LearningHub.Nhs.WebUI.AutomatedUiTests.AccessibilityTests { using LearningHub.Nhs.WebUI.AutomatedUiTests.TestFixtures; using Xunit; @@ -25,9 +21,7 @@ public BasicAccessibilityTests(AccessibilityTestsFixture fixture) [Theory] [InlineData("/Home/Index", "A platform for learning and sharing resources")] -#pragma warning disable SA1600 // Elements should be documented public void PageHasNoAccessibilityErrors(string url, string pageTitle) -#pragma warning restore SA1600 // Elements should be documented { // when this.Driver.Navigate().GoToUrl(this.BaseUrl + url); diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/MyAccountAccessibiltyTests.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/MyAccountAccessibiltyTests.cs index ca2f2127e..7990f0fa8 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/MyAccountAccessibiltyTests.cs +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/AccessibilityTests/MyAccountAccessibiltyTests.cs @@ -1,8 +1,4 @@ -// -// Copyright (c) HEE.nhs.uk. -// - -namespace LearningHub.Nhs.WebUI.AutomatedUiTests.AccessibilityTests +namespace LearningHub.Nhs.WebUI.AutomatedUiTests.AccessibilityTests { using FluentAssertions; using LearningHub.Nhs.WebUI.AutomatedUiTests.TestFixtures; @@ -49,9 +45,9 @@ public void MyAccountPageHasAccessibilityErrors() private static void CheckAccessibilityResult(AxeResult result) { // Expect axe violation - result.Violations.Should().HaveCount(5); + result.Violations.Should().HaveCount(6); - var violation = result.Violations[0]; + var violation = result.Violations[1]; violation.Id.Should().Be("landmark-contentinfo-is-top-level"); violation.Nodes.Should().HaveCount(1); diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/GlobalSuppressions.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/GlobalSuppressions.cs new file mode 100644 index 000000000..01866c145 --- /dev/null +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/GlobalSuppressions.cs @@ -0,0 +1,13 @@ +// This file is used by Code Analysis to maintain SuppressMessage +// attributes that are applied to this project. +// Project-level suppressions either have no target or are given +// a specific target and scoped to a namespace, type, member, etc. + +using System.Diagnostics.CodeAnalysis; + +[assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1401:Fields should be private", Justification = "Allowed", Scope = "member", Target = "~F:LearningHub.Nhs.WebUI.AutomatedUiTests.SeleniumServerFactory.RootUri")] +[assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1401:Fields should be private", Justification = "Allowed", Scope = "member", Target = "~F:LearningHub.Nhs.WebUI.AutomatedUiTests.TestFixtures.AccessibilityTestsFixture.Driver")] +[assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1401:Fields should be private", Justification = "Allowed", Scope = "member", Target = "~F:LearningHub.Nhs.WebUI.AutomatedUiTests.TestFixtures.AccessibilityTestsFixture.BaseUrl")] +[assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1401:Fields should be private", Justification = "Allowed", Scope = "member", Target = "~F:LearningHub.Nhs.WebUI.AutomatedUiTests.AccessibilityTests.AccessibilityTestsBase.BaseUrl")] +[assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1401:Fields should be private", Justification = "Allowed", Scope = "member", Target = "~F:LearningHub.Nhs.WebUI.AutomatedUiTests.AccessibilityTests.AccessibilityTestsBase.Driver")] +[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:Elements should be documented", Justification = "Regions allowed", Scope = "member", Target = "~M:LearningHub.Nhs.WebUI.AutomatedUiTests.AccessibilityTests.BasicAccessibilityTests.PageHasNoAccessibilityErrors(System.String,System.String)")] diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/SeleniumServerFactory.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/SeleniumServerFactory.cs index bf1274c84..19edcdaef 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/SeleniumServerFactory.cs +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/SeleniumServerFactory.cs @@ -1,8 +1,4 @@ -// -// Copyright (c) HEE.nhs.uk. -// - -namespace LearningHub.Nhs.WebUI.AutomatedUiTests +namespace LearningHub.Nhs.WebUI.AutomatedUiTests { using System; using System; @@ -31,7 +27,6 @@ public class SeleniumServerFactory /// /// Root Uri. /// -#pragma warning disable SA1401 // Fields should be private public string RootUri; /// diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AccessibilityTestsFixture.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AccessibilityTestsFixture.cs index eac8a6d68..9ad27df2a 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AccessibilityTestsFixture.cs +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AccessibilityTestsFixture.cs @@ -1,7 +1,3 @@ -// -// Copyright (c) HEE.nhs.uk. -// - namespace LearningHub.Nhs.WebUI.AutomatedUiTests.TestFixtures { using LearningHub.Nhs.WebUI.AutomatedUiTests.TestHelpers; @@ -15,16 +11,12 @@ public class AccessibilityTestsFixture /// /// Gets the base URL for the tests. /// -#pragma warning disable SA1401 // Fields should be private internal readonly string BaseUrl; -#pragma warning restore SA1401 // Fields should be private /// /// Gets the WebDriver used for the tests. /// -#pragma warning disable SA1401 // Fields should be private internal readonly IWebDriver Driver; -#pragma warning restore SA1401 // Fields should be private private readonly SeleniumServerFactory factory; diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AuthenticatedAccessibilityTestsFixture.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AuthenticatedAccessibilityTestsFixture.cs index 6cb3a442f..130e05036 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AuthenticatedAccessibilityTestsFixture.cs +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestFixtures/AuthenticatedAccessibilityTestsFixture.cs @@ -1,7 +1,3 @@ -// -// Copyright (c) HEE.nhs.uk. -// - namespace LearningHub.Nhs.WebUI.AutomatedUiTests.TestFixtures { using LearningHub.Nhs.WebUI.AutomatedUiTests.TestHelpers; diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/ConfigurationHelper.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/ConfigurationHelper.cs index 675564e76..660575162 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/ConfigurationHelper.cs +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/ConfigurationHelper.cs @@ -1,8 +1,4 @@ -// -// Copyright (c) HEE.nhs.uk. -// - -namespace LearningHub.Nhs.WebUI.AutomatedUiTests.TestHelpers +namespace LearningHub.Nhs.WebUI.AutomatedUiTests.TestHelpers { using Microsoft.Extensions.Configuration; diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/DriverHelper.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/DriverHelper.cs index cf1e771f6..9d467b946 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/DriverHelper.cs +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/DriverHelper.cs @@ -1,8 +1,4 @@ -// -// Copyright (c) HEE.nhs.uk. -// - -namespace LearningHub.Nhs.WebUI.AutomatedUiTests.TestHelpers +namespace LearningHub.Nhs.WebUI.AutomatedUiTests.TestHelpers { using OpenQA.Selenium; using OpenQA.Selenium.Chrome; diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/LoginHelper.cs b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/LoginHelper.cs index ebdabb30b..8f9786d27 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/LoginHelper.cs +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/TestHelpers/LoginHelper.cs @@ -1,7 +1,4 @@ -// -// Copyright (c) HEE.nhs.uk. -// -namespace LearningHub.Nhs.WebUI.AutomatedUiTests.TestHelpers +namespace LearningHub.Nhs.WebUI.AutomatedUiTests.TestHelpers { using OpenQA.Selenium; using OpenQA.Selenium.Support.UI; From 01cf6785861158033c9723d11e67af2c8d966c6c Mon Sep 17 00:00:00 2001 From: Dalin Akrasi Date: Fri, 31 May 2024 11:38:06 +0100 Subject: [PATCH 014/576] Fix text exiting box constraints when font size changes --- LearningHub.Nhs.WebUI/Styles/nhsuk/pages/landing_page.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LearningHub.Nhs.WebUI/Styles/nhsuk/pages/landing_page.scss b/LearningHub.Nhs.WebUI/Styles/nhsuk/pages/landing_page.scss index 3fef36177..46035670d 100644 --- a/LearningHub.Nhs.WebUI/Styles/nhsuk/pages/landing_page.scss +++ b/LearningHub.Nhs.WebUI/Styles/nhsuk/pages/landing_page.scss @@ -19,7 +19,7 @@ top: 2rem; left: min(50vw - 3.75rem,100vw - 37.5rem); width: 37.5rem; - height: 14rem; + //height: 14rem; padding: 2rem; font-size: 1.5rem; From 257dc659bf9de0ed89b10ebbc1b1faea27334e37 Mon Sep 17 00:00:00 2001 From: Dalin Akrasi Date: Tue, 4 Jun 2024 16:33:21 +0100 Subject: [PATCH 015/576] Remove alternative back button for Role search page --- .../Views/Account/CreateAccountSearchRole.cshtml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Views/Account/CreateAccountSearchRole.cshtml b/LearningHub.Nhs.WebUI/Views/Account/CreateAccountSearchRole.cshtml index c74b7ee0e..21c3e60b7 100644 --- a/LearningHub.Nhs.WebUI/Views/Account/CreateAccountSearchRole.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Account/CreateAccountSearchRole.cshtml @@ -15,16 +15,8 @@
- @if (Model.CountryId == "1") - { - - - } - else - { - - - } + + @if (errorHasOccurred) { From 3591fd9e3984a9f6d40a21cff617c02ef508c7e6 Mon Sep 17 00:00:00 2001 From: Dalin Akrasi Date: Mon, 10 Jun 2024 11:39:09 +0100 Subject: [PATCH 016/576] Add non breaking space symbol to symulate space-bar space. Separate names with normal space. --- .../Views/MyAccount/Index.cshtml | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Views/MyAccount/Index.cshtml b/LearningHub.Nhs.WebUI/Views/MyAccount/Index.cshtml index cd3cde3ac..d9677b2d5 100644 --- a/LearningHub.Nhs.WebUI/Views/MyAccount/Index.cshtml +++ b/LearningHub.Nhs.WebUI/Views/MyAccount/Index.cshtml @@ -53,7 +53,7 @@
- Change firstname + Change first name
@@ -70,7 +70,7 @@
- Change lastname + Change last name
@@ -86,7 +86,7 @@
- Change preferredname + Change preferred name
@@ -108,7 +108,7 @@
- Change country + Change country
@@ -127,7 +127,7 @@
- Change region + Change region
@@ -159,7 +159,7 @@
- Change primaryemail + Change primary email
@@ -177,7 +177,7 @@
- Change secondryemail + Change secondry email
@@ -209,7 +209,7 @@
- Change password + Change password
@@ -227,7 +227,7 @@
- Change security question 1 + Change security question 1
@@ -244,7 +244,7 @@
- Change security question 2 + Change security question 2
@@ -260,7 +260,7 @@
@Model.JobRole
- Change current role + Change current role
@@ -272,7 +272,7 @@
@Model.MedicalCouncilNo
- Change professional registration number + Change professional registration number
@@ -284,7 +284,7 @@
@Model.Grade
- Change grade + Change grade
@@ -294,7 +294,7 @@
@Model.PrimarySpecialty
- Change primary specialty + Change primary specialty
@@ -304,7 +304,7 @@
@Model.JobStartDate?.ToString("dd MMMM yyyy")
- Change start date + Change start date
@@ -314,7 +314,7 @@
@Html.Raw(Model.PlaceOfWork)
- Change place of work + Change place of work
From 1752d7e772f8e93bd0b95b1af987a97b3aa343cb Mon Sep 17 00:00:00 2001 From: Dalin Akrasi Date: Mon, 10 Jun 2024 12:42:56 +0100 Subject: [PATCH 017/576] Remove external footer tag --- .../Views/Shared/Tenant/LearningHub/_Layout.cshtml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Views/Shared/Tenant/LearningHub/_Layout.cshtml b/LearningHub.Nhs.WebUI/Views/Shared/Tenant/LearningHub/_Layout.cshtml index dbacc093d..881907ad9 100644 --- a/LearningHub.Nhs.WebUI/Views/Shared/Tenant/LearningHub/_Layout.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Shared/Tenant/LearningHub/_Layout.cshtml @@ -96,9 +96,8 @@ @* Inject form here *@ -
- -
+ + @* @if (Model != null) @@ -53,7 +50,7 @@ } *@
- diff --git a/LearningHub.Nhs.WebUI/Views/ContributeResource/ContributeResource.cshtml b/LearningHub.Nhs.WebUI/Views/ContributeResource/ContributeResource.cshtml index 292cbe141..0c421eb93 100644 --- a/LearningHub.Nhs.WebUI/Views/ContributeResource/ContributeResource.cshtml +++ b/LearningHub.Nhs.WebUI/Views/ContributeResource/ContributeResource.cshtml @@ -2,7 +2,7 @@ ViewData["Title"] = "Contribute a Resource"; } @section styles { - + @* *@ }
@@ -12,5 +12,5 @@ @section Scripts{ - + @* *@ } diff --git a/LearningHub.Nhs.WebUI/Views/CovidTesting/_CovidTestingLayout.cshtml b/LearningHub.Nhs.WebUI/Views/CovidTesting/_CovidTestingLayout.cshtml index 09d7e46cb..2bcdb92f2 100644 --- a/LearningHub.Nhs.WebUI/Views/CovidTesting/_CovidTestingLayout.cshtml +++ b/LearningHub.Nhs.WebUI/Views/CovidTesting/_CovidTestingLayout.cshtml @@ -9,7 +9,7 @@ - + @* *@ @@ -69,7 +69,7 @@ - + @* *@ @RenderSection("Scripts", required: false) diff --git a/LearningHub.Nhs.WebUI/Views/Home/GenericTray.cshtml b/LearningHub.Nhs.WebUI/Views/Home/GenericTray.cshtml index a3ff92079..cae74c3a1 100644 --- a/LearningHub.Nhs.WebUI/Views/Home/GenericTray.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Home/GenericTray.cshtml @@ -3,7 +3,7 @@ } @section styles { - + @* *@ }
@@ -12,7 +12,7 @@ @section Scripts{ - + @* *@ @* @if (Model != null) @@ -50,7 +53,7 @@ } *@
- \ No newline at end of file diff --git a/LearningHub.Nhs.WebUI/Views/Shared/Tenant/LearningHub/_Layout.cshtml b/LearningHub.Nhs.WebUI/Views/Shared/Tenant/LearningHub/_Layout.cshtml index 146164a7e..a0aa46f2a 100644 --- a/LearningHub.Nhs.WebUI/Views/Shared/Tenant/LearningHub/_Layout.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Shared/Tenant/LearningHub/_Layout.cshtml @@ -148,6 +148,7 @@ @RenderSection("Scripts", required: false) + diff --git a/LearningHub.Nhs.WebUI/wwwroot/js/mkplayer-ui-custom.js b/LearningHub.Nhs.WebUI/wwwroot/js/mkplayer-ui-custom.js new file mode 100644 index 000000000..78f402919 --- /dev/null +++ b/LearningHub.Nhs.WebUI/wwwroot/js/mkplayer-ui-custom.js @@ -0,0 +1,75 @@ +/** + * Constructs and configures the control bar for the UI. + * + * This function performs the following tasks: + * 1. Selects the titlebar and controlbar elements from the DOM. + * 2. Creates a playback toggle button with an initial "Play" state and appends it to the controlbar. + * 3. Adds an event listener to the playback toggle button to handle play/pause functionality. + * 4. Retrieves all buttons from the titlebar, aligns them to the right (except for the "Mute" button), and appends them to the controlbar. + * 5. Selects the UI container element and sets up a MutationObserver to monitor changes in the container's class attribute. + * 6. Updates the playback toggle button state based on the player's state (playing or paused) when the container's class changes. + */ + +function buildControlbar(id) { + var mediacontainerId = 'mediaContainer-' + id; + + // Select the titlebar and controlbar elements from the DOM + let titlebar = document.querySelector(`#${mediacontainerId} .bmpui-ui-titlebar`); + let controlbar = document.querySelector(`#${mediacontainerId} .bmpui-ui-controlbar`); + debugger; + // Check if both titlebar and controlbar elements exist + if (titlebar && controlbar) { + + // Create a playback toggle button and set its initial state and appearance + let playbackToggleButton = document.createElement('button'); + playbackToggleButton.classList.add('bmpui-ui-playbacktogglebutton', 'bmpui-off'); + playbackToggleButton.setAttribute('aria-label', 'Play'); + playbackToggleButton.innerHTML = 'Play'; + controlbar.appendChild(playbackToggleButton); + + // Add an event listener to the playback toggle button + playbackToggleButton.addEventListener('click', function () { + // Toggle playback state based on the current state + if (player.isPlaying()) { + player.pause(); + playbackToggleButton.classList.add('bmpui-off'); + playbackToggleButton.classList.remove('bmpui-on'); + playbackToggleButton.innerHTML = 'Play'; + } else { + player.play(); + playbackToggleButton.classList.add('bmpui-on'); + playbackToggleButton.classList.remove('bmpui-off'); + playbackToggleButton.innerHTML = 'Pause'; + } + }); + + // Get all button elements from the titlebar + let buttons = titlebar.querySelectorAll('button'); + + // Reverse the button list and append each button to the controlbar + Array.from(buttons).reverse().forEach(button => { + if (button.textContent != "Mute") { + button.classList.add('control-right'); // Add a class to align buttons to the right + } + controlbar.appendChild(button); // Append the button to the controlbar + }); + + // Select the UI container element + let uiContainerElement = document.querySelector(`#${mediacontainerId} .bmpui-ui-uicontainer`); + + uiContainerElement.addEventListener('click', function () { + // Update the playback toggle button state based on the player's state + if (uiContainerElement.classList.contains('bmpui-player-state-paused')) { + playbackToggleButton.classList.add('bmpui-off'); + playbackToggleButton.classList.remove('bmpui-on'); + } else { + playbackToggleButton.classList.add('bmpui-on'); + playbackToggleButton.classList.remove('bmpui-off'); + } + }); + + } + else { + console.error('UI container element not found'); + } +} From bafb166334d455287f7cc5878c737df8670fe41e Mon Sep 17 00:00:00 2001 From: binon Date: Fri, 13 Sep 2024 10:15:22 +0100 Subject: [PATCH 079/576] New player UI, sorted play pause issuse --- .../Views/Home/_CmsVideo.cshtml | 9 +++++--- .../wwwroot/js/mkplayer-ui-custom.js | 23 ++++++++++--------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Views/Home/_CmsVideo.cshtml b/LearningHub.Nhs.WebUI/Views/Home/_CmsVideo.cshtml index 2a6990458..37da5280a 100644 --- a/LearningHub.Nhs.WebUI/Views/Home/_CmsVideo.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Home/_CmsVideo.cshtml @@ -56,7 +56,7 @@ diff --git a/LearningHub.Nhs.WebUI/wwwroot/js/mkplayer-ui-custom.js b/LearningHub.Nhs.WebUI/wwwroot/js/mkplayer-ui-custom.js index 78f402919..031e2c705 100644 --- a/LearningHub.Nhs.WebUI/wwwroot/js/mkplayer-ui-custom.js +++ b/LearningHub.Nhs.WebUI/wwwroot/js/mkplayer-ui-custom.js @@ -10,13 +10,13 @@ * 6. Updates the playback toggle button state based on the player's state (playing or paused) when the container's class changes. */ -function buildControlbar(id) { +function buildControlbar(id, player) { var mediacontainerId = 'mediaContainer-' + id; // Select the titlebar and controlbar elements from the DOM let titlebar = document.querySelector(`#${mediacontainerId} .bmpui-ui-titlebar`); let controlbar = document.querySelector(`#${mediacontainerId} .bmpui-ui-controlbar`); - debugger; + // Check if both titlebar and controlbar elements exist if (titlebar && controlbar) { @@ -25,6 +25,7 @@ function buildControlbar(id) { playbackToggleButton.classList.add('bmpui-ui-playbacktogglebutton', 'bmpui-off'); playbackToggleButton.setAttribute('aria-label', 'Play'); playbackToggleButton.innerHTML = 'Play'; + playbackToggleButton.id = 'playback-toggle-btn-' + id; controlbar.appendChild(playbackToggleButton); // Add an event listener to the playback toggle button @@ -32,13 +33,13 @@ function buildControlbar(id) { // Toggle playback state based on the current state if (player.isPlaying()) { player.pause(); - playbackToggleButton.classList.add('bmpui-off'); playbackToggleButton.classList.remove('bmpui-on'); + playbackToggleButton.classList.add('bmpui-off'); playbackToggleButton.innerHTML = 'Play'; } else { player.play(); - playbackToggleButton.classList.add('bmpui-on'); playbackToggleButton.classList.remove('bmpui-off'); + playbackToggleButton.classList.add('bmpui-on'); playbackToggleButton.innerHTML = 'Pause'; } }); @@ -55,16 +56,16 @@ function buildControlbar(id) { }); // Select the UI container element - let uiContainerElement = document.querySelector(`#${mediacontainerId} .bmpui-ui-uicontainer`); - - uiContainerElement.addEventListener('click', function () { + let uiOverlayElement = document.querySelector(`#${mediacontainerId} .bmpui-ui-playbacktoggle-overlay`); + uiOverlayElement.addEventListener('click', function () { + let uiContainerElement = document.querySelector(`#${mediacontainerId} .bmpui-ui-uicontainer`); // Update the playback toggle button state based on the player's state if (uiContainerElement.classList.contains('bmpui-player-state-paused')) { - playbackToggleButton.classList.add('bmpui-off'); - playbackToggleButton.classList.remove('bmpui-on'); - } else { - playbackToggleButton.classList.add('bmpui-on'); playbackToggleButton.classList.remove('bmpui-off'); + playbackToggleButton.classList.add('bmpui-on'); + } else { + playbackToggleButton.classList.remove('bmpui-on'); + playbackToggleButton.classList.add('bmpui-off'); } }); From 05e2515603d9d2760b5e0b2c7c89c093919605cd Mon Sep 17 00:00:00 2001 From: binon Date: Fri, 13 Sep 2024 23:09:27 +0100 Subject: [PATCH 080/576] MKPLayer implementation in Admin page --- .../Scripts/vuesrc/content/cmsPageRow.vue | 54 ++++++++++++- .../Scripts/vuesrc/mkioplayer-controlbar.ts | 77 +++++++++++++++++++ 2 files changed, 129 insertions(+), 2 deletions(-) create mode 100644 AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/mkioplayer-controlbar.ts diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/cmsPageRow.vue b/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/cmsPageRow.vue index dd02810f7..ae3ee9e39 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/cmsPageRow.vue +++ b/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/cmsPageRow.vue @@ -71,6 +71,8 @@ import { AzureMediaAssetModel } from '../models/content/videoAssetModel'; import { MKPlayer } from '@mediakind/mkplayer'; import { MKPlayerType, MKStreamType } from '../MKPlayerConfigEnum'; + //import { getPlayerConfig, getSourceConfig, initializePlayer } from '../mkiomediaplayer'; + import { buildControlbar } from '../mkioplayer-controlbar'; export default Vue.extend({ props: { @@ -91,7 +93,7 @@ mkioKey: '', }; }, - async created(): Promise { + async created(): Promise { await this.getMKIOPlayerKey(); this.load(); this.getDisplayAVFlag(); @@ -168,11 +170,36 @@ this.audioVideoUnavailableView = response; }); }, + onSubtitleAdded() { + this.player.subtitles.enable("subtitle" + this.section.id.toString()); + }, onPlayerReady() { const videoElement = document.getElementById("bitmovinplayer-video-" + this.getPlayerUniqueId) as HTMLVideoElement; if (videoElement) { videoElement.controls = true; } + + var subtitleTrack; + //if (this.pageSectionDetail.videoAsset.azureMediaAsset && this.pageSectionDetail.videoAsset.closedCaptionsFile) { + // const captionsInfo = this.pageSectionDetail.videoAsset.closedCaptionsFile; + // var srcPath = "file/download/" + captionsInfo.filePath + "/" + captionsInfo.fileName; + // //srcPath = '@requestURL' + srcPath; + // srcPath = "https://bitdash-a.akamaihd.net/content/sintel/subtitles/subtitles_en.vtt"; + + // subtitleTrack = { + // id: "subtitle" + this.section.id.toString(), + // lang: "en", + // label: "english", + // url: srcPath, + // kind: "subtitle" + // }; + //}; + + //this.player.addSubtitle(subtitleTrack); + + var contanierId = this.section.id.toString();; + var uniquePlayer = this.player;// (player_@Model.Id); + buildControlbar(contanierId, uniquePlayer); }, async getMKIOPlayerKey(): Promise { this.mkioKey = await contentData.getMKPlayerKey(); @@ -189,7 +216,7 @@ // Grab the video container this.videoContainer = document.getElementById(this.getPlayerUniqueId); - if(!this.mkioKey) { + if (!this.mkioKey) { this.getMKIOPlayerKey(); } @@ -205,15 +232,34 @@ theme: "dark", events: { ready: this.onPlayerReady, + subtitleadded: this.onSubtitleAdded, } }; // Initialize the player with video container and player configuration this.player = new MKPlayer(this.videoContainer, playerConfig); + //var subtitleTrack; + //debugger; + //if (this.pageSectionDetail.videoAsset.azureMediaAsset && this.pageSectionDetail.videoAsset.closedCaptionsFile) { + // const captionsInfo = this.pageSectionDetail.videoAsset.closedCaptionsFile; + // var srcPath = "file/download/" + captionsInfo.filePath + "/" + captionsInfo.fileName; + // //srcPath = '@requestURL' + srcPath; + // srcPath = "https://bitdash-a.akamaihd.net/content/sintel/subtitles/subtitles_en.vtt"; + + // subtitleTrack = { + // id: "subtitle" + this.section.id.toString(), + // lang: "en", + // label: "english", + // url: srcPath, + // kind: "subtitle" + // }; + //}; + // Load source const sourceConfig = { hls: this.getMediaPlayUrl(this.pageSectionDetail.videoAsset.azureMediaAsset.locatorUri), + //subtitleTracks: subtitleTrack, drm: { clearkey: { LA_URL: "HLS_AES", @@ -318,4 +364,8 @@ video[id^="bitmovinplayer-video"] { width: 100%; } + + .bmpui-ui-controlbar .control-right { + float: right; + } \ No newline at end of file diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/mkioplayer-controlbar.ts b/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/mkioplayer-controlbar.ts new file mode 100644 index 000000000..a9db5fb13 --- /dev/null +++ b/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/mkioplayer-controlbar.ts @@ -0,0 +1,77 @@ +/** + * Constructs and configures the control bar for the UI. + * + * This function performs the following tasks: + * 1. Selects the titlebar and controlbar elements from the DOM. + * 2. Creates a playback toggle button with an initial "Play" state and appends it to the controlbar. + * 3. Adds an event listener to the playback toggle button to handle play/pause functionality. + * 4. Retrieves all buttons from the titlebar, aligns them to the right (except for the "Mute" button), and appends them to the controlbar. + * 5. Selects the UI container element and sets up a MutationObserver to monitor changes in the container's class attribute. + * 6. Updates the playback toggle button state based on the player's state (playing or paused) when the container's class changes. + */ + +function buildControlbar(id: string, player: { isPlaying: () => boolean; pause: () => void; play: () => void; }): void { + const mediacontainerId = 'videoContainer_' + id; + + // Select the titlebar and controlbar elements from the DOM + const titlebar = document.querySelector(`#${mediacontainerId} .bmpui-ui-titlebar`) as HTMLElement; + const controlbar = document.querySelector(`#${mediacontainerId} .bmpui-ui-controlbar`) as HTMLElement; + + // Check if both titlebar and controlbar elements exist + if (titlebar && controlbar) { + + // Create a playback toggle button and set its initial state and appearance + const playbackToggleButton = document.createElement('button'); + playbackToggleButton.classList.add('bmpui-ui-playbacktogglebutton', 'bmpui-off'); + playbackToggleButton.setAttribute('aria-label', 'Play'); + playbackToggleButton.innerHTML = 'Play'; + playbackToggleButton.id = 'playback-toggle-btn-' + id; + controlbar.appendChild(playbackToggleButton); + + // Add an event listener to the playback toggle button + playbackToggleButton.addEventListener('click', function () { + // Toggle playback state based on the current state + if (player.isPlaying()) { + player.pause(); + playbackToggleButton.classList.remove('bmpui-on'); + playbackToggleButton.classList.add('bmpui-off'); + playbackToggleButton.innerHTML = 'Play'; + } else { + player.play(); + playbackToggleButton.classList.remove('bmpui-off'); + playbackToggleButton.classList.add('bmpui-on'); + playbackToggleButton.innerHTML = 'Pause'; + } + }); + + // Get all button elements from the titlebar + const buttons = titlebar.querySelectorAll('button'); + + // Reverse the button list and append each button to the controlbar + Array.from(buttons).reverse().forEach(button => { + if (button.textContent !== "Mute") { + button.classList.add('control-right'); // Add a class to align buttons to the right + } + controlbar.appendChild(button); // Append the button to the controlbar + }); + + // Select the UI container element + const uiOverlayElement = document.querySelector(`#${mediacontainerId} .bmpui-ui-playbacktoggle-overlay`) as HTMLElement; + uiOverlayElement.addEventListener('click', function () { + const uiContainerElement = document.querySelector(`#${mediacontainerId} .bmpui-ui-uicontainer`) as HTMLElement; + // Update the playback toggle button state based on the player's state + if (uiContainerElement.classList.contains('bmpui-player-state-playing')) { + playbackToggleButton.classList.remove('bmpui-on'); + playbackToggleButton.classList.add('bmpui-off'); + } else { + playbackToggleButton.classList.remove('bmpui-off'); + playbackToggleButton.classList.add('bmpui-on'); + } + }); + + } else { + console.error('UI container element not found'); + } +} + +export { buildControlbar }; \ No newline at end of file From ca95e97572a66d39a9a60a5241b5d4b44973e509 Mon Sep 17 00:00:00 2001 From: binon Date: Sat, 14 Sep 2024 02:06:10 +0100 Subject: [PATCH 081/576] New MKPlayer Changes in Resource page --- .../Scripts/vuesrc/mkioplayer-controlbar.ts | 75 +++++++++++++++++++ .../vuesrc/resource/ResourceContent.vue | 8 +- .../wwwroot/js/mkplayer-ui-custom.js | 2 +- 3 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 LearningHub.Nhs.WebUI/Scripts/vuesrc/mkioplayer-controlbar.ts diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/mkioplayer-controlbar.ts b/LearningHub.Nhs.WebUI/Scripts/vuesrc/mkioplayer-controlbar.ts new file mode 100644 index 000000000..68cecf3f5 --- /dev/null +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/mkioplayer-controlbar.ts @@ -0,0 +1,75 @@ +/** + * Constructs and configures the control bar for the UI. + * + * This function performs the following tasks: + * 1. Selects the titlebar and controlbar elements from the DOM. + * 2. Creates a playback toggle button with an initial "Play" state and appends it to the controlbar. + * 3. Adds an event listener to the playback toggle button to handle play/pause functionality. + * 4. Retrieves all buttons from the titlebar, aligns them to the right (except for the "Mute" button), and appends them to the controlbar. + * 5. Selects the UI container element and sets up a MutationObserver to monitor changes in the container's class attribute. + * 6. Updates the playback toggle button state based on the player's state (playing or paused) when the container's class changes. + */ + +function MKPlayerControlbar(playerContainerId: string, player: { isPlaying: () => boolean; pause: () => void; play: () => void; }): void { + // Select the titlebar and controlbar elements from the DOM + const titlebar = document.querySelector(`#${playerContainerId} .bmpui-ui-titlebar`) as HTMLElement; + const controlbar = document.querySelector(`#${playerContainerId} .bmpui-ui-controlbar`) as HTMLElement; + + // Check if both titlebar and controlbar elements exist + if (titlebar && controlbar) { + + // Create a playback toggle button and set its initial state and appearance + const playbackToggleButton = document.createElement('button'); + playbackToggleButton.classList.add('bmpui-ui-playbacktogglebutton', 'bmpui-off'); + playbackToggleButton.setAttribute('aria-label', 'Play'); + playbackToggleButton.innerHTML = 'Play'; + playbackToggleButton.id = 'playback-toggle-btn-' + playerContainerId; + controlbar.appendChild(playbackToggleButton); + + // Add an event listener to the playback toggle button + playbackToggleButton.addEventListener('click', function () { + // Toggle playback state based on the current state + if (player.isPlaying()) { + player.pause(); + playbackToggleButton.classList.remove('bmpui-on'); + playbackToggleButton.classList.add('bmpui-off'); + playbackToggleButton.innerHTML = 'Play'; + } else { + player.play(); + playbackToggleButton.classList.remove('bmpui-off'); + playbackToggleButton.classList.add('bmpui-on'); + playbackToggleButton.innerHTML = 'Pause'; + } + }); + + // Get all button elements from the titlebar + const buttons = titlebar.querySelectorAll('button'); + + // Reverse the button list and append each button to the controlbar + Array.from(buttons).reverse().forEach(button => { + if (button.textContent !== "Mute") { + button.classList.add('control-right'); // Add a class to align buttons to the right + } + controlbar.appendChild(button); // Append the button to the controlbar + }); + + // Select the UI container element + const uiOverlayElement = document.querySelector(`#${playerContainerId} .bmpui-ui-playbacktoggle-overlay`) as HTMLElement; + uiOverlayElement.addEventListener('click', function () { + const uiContainerElement = document.querySelector(`#${playerContainerId} .bmpui-ui-uicontainer`) as HTMLElement; + // Update the playback toggle button state based on the player's state + if (uiContainerElement.classList.contains('bmpui-player-state-playing')) { + playbackToggleButton.classList.remove('bmpui-on'); + playbackToggleButton.classList.add('bmpui-off'); + } else { + playbackToggleButton.classList.remove('bmpui-off'); + playbackToggleButton.classList.add('bmpui-on'); + } + }); + + } else { + console.error('UI container element not found'); + } +} + +export { MKPlayerControlbar }; \ No newline at end of file diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/ResourceContent.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/ResourceContent.vue index 73dc8e5c1..00e382b47 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/ResourceContent.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/ResourceContent.vue @@ -101,6 +101,7 @@ import { setResourceCetificateLink } from './helpers/resourceCertificateHelper'; import { MKPlayer } from '@mediakind/mkplayer'; import { MKPlayerType, MKStreamType } from '../MKPlayerConfigEnum'; + import { MKPlayerControlbar } from '../mkioplayer-controlbar'; Vue.use(Vuelidate as any); @@ -255,6 +256,8 @@ // } //} + MKPlayerControlbar("mediacontainer", this.player); + this.checkForAutoplay(this.player); }, onpause() { @@ -837,6 +840,9 @@ // NOTE: Not `scoped` because we want this section to apply to children @use '../../../Styles/abstracts/all' as *; + .bmpui-ui-controlbar .control-right { + float: right; + } .accessible-link:focus { outline: none; text-decoration: none; @@ -851,7 +857,7 @@ overflow: hidden; position: relative; padding-top: 56.25%;*/ /* 16:9 aspect ratio */ - /*background-color: #000; + /*background-color: #000; } video { diff --git a/LearningHub.Nhs.WebUI/wwwroot/js/mkplayer-ui-custom.js b/LearningHub.Nhs.WebUI/wwwroot/js/mkplayer-ui-custom.js index 031e2c705..6fe5871a8 100644 --- a/LearningHub.Nhs.WebUI/wwwroot/js/mkplayer-ui-custom.js +++ b/LearningHub.Nhs.WebUI/wwwroot/js/mkplayer-ui-custom.js @@ -60,7 +60,7 @@ function buildControlbar(id, player) { uiOverlayElement.addEventListener('click', function () { let uiContainerElement = document.querySelector(`#${mediacontainerId} .bmpui-ui-uicontainer`); // Update the playback toggle button state based on the player's state - if (uiContainerElement.classList.contains('bmpui-player-state-paused')) { + if (uiContainerElement.classList.contains('bmpui-player-state-playing')) { playbackToggleButton.classList.remove('bmpui-off'); playbackToggleButton.classList.add('bmpui-on'); } else { From 47663a9061690901b3e3876c1923f653287761fa Mon Sep 17 00:00:00 2001 From: binon Date: Mon, 16 Sep 2024 08:58:23 +0100 Subject: [PATCH 082/576] New Player update in case/assement page --- .../components/MKIOVideoPlayer.vue | 65 ++++++++++++++++++- .../Scripts/vuesrc/mkioplayer-controlbar.ts | 5 +- .../vuesrc/resource/ResourceContent.vue | 2 +- 3 files changed, 67 insertions(+), 5 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/MKIOVideoPlayer.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/MKIOVideoPlayer.vue index fe5b69ba3..94fce13e8 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/MKIOVideoPlayer.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/MKIOVideoPlayer.vue @@ -34,6 +34,7 @@ import { MKPlayer } from '@mediakind/mkplayer'; import { resourceData } from '../../data/resource'; import { MKPlayerType, MKStreamType } from '../../MKPlayerConfigEnum'; + import { MKPlayerControlbar } from '../../mkioplayer-controlbar'; //import { MKPlayerType } from '@mediakind/mkplayer/types/enums/MKPlayerType.d'; //import { MKStreamType } from '@mediakind/mkplayer/types/enums/MKStreamType.d'; export default Vue.extend({ @@ -58,6 +59,7 @@ }, methods: { onPlayerReady() { + MKPlayerControlbar(this.player.videoContainer.id, this.player); const videoElement = document.getElementById("bitmovinplayer-video-" + this.getPlayerUniqueId) as HTMLVideoElement; if (videoElement) { videoElement.controls = true; @@ -94,7 +96,6 @@ // Grab the video container this.videoContainer = document.getElementById(this.getPlayerUniqueId); - if (!this.mkioKey) { this.getMKIOPlayerKey(); } @@ -102,7 +103,7 @@ // Prepare the player configuration const playerConfig = { key: this.mkioKey, - ui: false, + ui: true, theme: "dark", playback: { muted: false, @@ -196,4 +197,64 @@ video[id^="bitmovinplayer-video"] { width: 100%; } + + .bmpui-ui-controlbar .control-right { + float: right; + } + + /* Base styles for video container */ + .video-container { + width: 100%; + margin: auto; + position: relative; + --min-width: 0px; /* default value */ + } + + /* Media queries to set different min-width values */ + @media (min-width: 576px) { + .video-container { + --min-width: 576px; + } + } + + @media (min-width: 768px) { + .video-container { + --min-width: 768px; + } + } + + @media (min-width: 992px) { + .video-container { + --min-width: 992px; + } + } + + @media (min-width: 1024px) { + .video-container { + --min-width: 1024px; + } + } + + /* Applying min-width to the video container using the CSS variable */ + .video-container { + min-width: var(--min-width) !important; + } + + /* Targeting specific div with dynamic ID pattern */ + [id^="videoContainer_"] { + min-width: var(--min-width) !important; /* Inheriting min-width */ + } + + /* Example child element inheriting min-width from video container */ + .video-container .child-element { + min-width: var(--min-width) !important; + padding: 10px; + text-align: center; + } + + /* Style for the video element */ + .video-container video { + width: 100%; + height: auto; + } diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/mkioplayer-controlbar.ts b/LearningHub.Nhs.WebUI/Scripts/vuesrc/mkioplayer-controlbar.ts index 68cecf3f5..d1e0223e5 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/mkioplayer-controlbar.ts +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/mkioplayer-controlbar.ts @@ -9,9 +9,10 @@ * 5. Selects the UI container element and sets up a MutationObserver to monitor changes in the container's class attribute. * 6. Updates the playback toggle button state based on the player's state (playing or paused) when the container's class changes. */ - -function MKPlayerControlbar(playerContainerId: string, player: { isPlaying: () => boolean; pause: () => void; play: () => void; }): void { +import { MKPlayer, MKPlayerConfig } from '@mediakind/mkplayer'; +function MKPlayerControlbar(playerContainerId: string, player: MKPlayer): void { // Select the titlebar and controlbar elements from the DOM + const titlebar = document.querySelector(`#${playerContainerId} .bmpui-ui-titlebar`) as HTMLElement; const controlbar = document.querySelector(`#${playerContainerId} .bmpui-ui-controlbar`) as HTMLElement; diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/ResourceContent.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/ResourceContent.vue index 00e382b47..29dc93a98 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/ResourceContent.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/ResourceContent.vue @@ -256,7 +256,7 @@ // } //} - MKPlayerControlbar("mediacontainer", this.player); + MKPlayerControlbar(this.player.videoContainer.id, this.player); this.checkForAutoplay(this.player); }, From 2fae38d3115ffae7340b551cc5a5ed875d3c2606 Mon Sep 17 00:00:00 2001 From: binon Date: Mon, 16 Sep 2024 15:08:54 +0100 Subject: [PATCH 083/576] Fixed some of the resolution issues --- .../Scripts/vuesrc/content/cmsPageRow.vue | 49 ++++++++++--------- .../vuesrc/resource/ResourceContent.vue | 43 +++++++--------- 2 files changed, 45 insertions(+), 47 deletions(-) diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/cmsPageRow.vue b/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/cmsPageRow.vue index ae3ee9e39..ae0ea6c25 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/cmsPageRow.vue +++ b/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/cmsPageRow.vue @@ -91,6 +91,7 @@ player: null, videoContainer: null, mkioKey: '', + requestURL: '' }; }, async created(): Promise { @@ -99,6 +100,9 @@ this.getDisplayAVFlag(); this.getAudioVideoUnavailableView(); }, + mounted() { + this.requestURL = window.location.origin; + }, computed: { getStyle() { console.log("getLinkStyle", (this.pageSectionDetail || {}).draftHidden); @@ -170,16 +174,16 @@ this.audioVideoUnavailableView = response; }); }, - onSubtitleAdded() { - this.player.subtitles.enable("subtitle" + this.section.id.toString()); - }, + //onSubtitleAdded() { + // this.player.subtitles.enable("subtitle" + this.section.id.toString()); + //}, onPlayerReady() { const videoElement = document.getElementById("bitmovinplayer-video-" + this.getPlayerUniqueId) as HTMLVideoElement; if (videoElement) { videoElement.controls = true; } - var subtitleTrack; + // var subtitleTrack; //if (this.pageSectionDetail.videoAsset.azureMediaAsset && this.pageSectionDetail.videoAsset.closedCaptionsFile) { // const captionsInfo = this.pageSectionDetail.videoAsset.closedCaptionsFile; // var srcPath = "file/download/" + captionsInfo.filePath + "/" + captionsInfo.fileName; @@ -197,7 +201,7 @@ //this.player.addSubtitle(subtitleTrack); - var contanierId = this.section.id.toString();; + var contanierId = this.section.id.toString(); var uniquePlayer = this.player;// (player_@Model.Id); buildControlbar(contanierId, uniquePlayer); }, @@ -232,34 +236,33 @@ theme: "dark", events: { ready: this.onPlayerReady, - subtitleadded: this.onSubtitleAdded, + //subtitleadded: this.onSubtitleAdded, } }; // Initialize the player with video container and player configuration this.player = new MKPlayer(this.videoContainer, playerConfig); - //var subtitleTrack; - //debugger; - //if (this.pageSectionDetail.videoAsset.azureMediaAsset && this.pageSectionDetail.videoAsset.closedCaptionsFile) { - // const captionsInfo = this.pageSectionDetail.videoAsset.closedCaptionsFile; - // var srcPath = "file/download/" + captionsInfo.filePath + "/" + captionsInfo.fileName; - // //srcPath = '@requestURL' + srcPath; - // srcPath = "https://bitdash-a.akamaihd.net/content/sintel/subtitles/subtitles_en.vtt"; - - // subtitleTrack = { - // id: "subtitle" + this.section.id.toString(), - // lang: "en", - // label: "english", - // url: srcPath, - // kind: "subtitle" - // }; - //}; + var subtitleTrack = null; + var sectionId = this.section.id.toString(); + if (this.pageSectionDetail.videoAsset.azureMediaAsset && this.pageSectionDetail.videoAsset.closedCaptionsFile) { + var captionsInfo = this.pageSectionDetail.videoAsset.closedCaptionsFile;; + if (captionsInfo) { + var srcPath = "/file/download/" + captionsInfo.filePath + "/" + captionsInfo.fileName; + subtitleTrack = { + id: "subtitle" + sectionId, + lang: "en", + label: "english", + url: this.requestURL + srcPath, + kind: "subtitle" + }; + } + } // Load source const sourceConfig = { hls: this.getMediaPlayUrl(this.pageSectionDetail.videoAsset.azureMediaAsset.locatorUri), - //subtitleTracks: subtitleTrack, + subtitleTracks: [subtitleTrack], drm: { clearkey: { LA_URL: "HLS_AES", diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/ResourceContent.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/ResourceContent.vue index 29dc93a98..484d0b09d 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/ResourceContent.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/resource/ResourceContent.vue @@ -146,7 +146,8 @@ playBackDashUrl: '', sourceLoaded: true, playerConfig: { - } + }, + requestURL: '' } }, computed: { @@ -231,8 +232,8 @@ beforeDestroy(): void { window.clearInterval(this.mediaPlayingTimer); }, - mounted() { - + mounted() { + this.requestURL =window.location.origin; }, methods: { onPlayerReady() { @@ -312,10 +313,25 @@ } }; + var subtitleTrack = null; + var captionsInfo = this.resourceItem.videoDetails.closedCaptionsFile; + + if (captionsInfo) { + var srcPath = this.getFileLink(captionsInfo.filePath, captionsInfo.fileName); + subtitleTrack = { + id: "subtitle", + lang: "en", + label: "english", + url: this.requestURL + srcPath, + kind: "subtitle" + }; + } + // Load source const sourceConfig = { hls: this.playBackUrl, //dash: this.playBackDashUrl, + subtitleTracks: [subtitleTrack], drm: { clearkey: clearKeyConfig } @@ -850,25 +866,4 @@ background-color: $govuk-focus-highlight-yellow; box-shadow: 0 -2px $govuk-focus-highlight-yellow,0 4px $nhsuk-black; } - - /*.video-container { - height: 0; - width: 100%; - overflow: hidden; - position: relative; - padding-top: 56.25%;*/ /* 16:9 aspect ratio */ - /*background-color: #000; - } - - video { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - } - - video[id^="bitmovinplayer-video"] { - width: 100%; - }*/ From 9f054c7b4194857706fe22238f06235fc6d7c142 Mon Sep 17 00:00:00 2001 From: binon Date: Tue, 17 Sep 2024 09:35:07 +0100 Subject: [PATCH 084/576] Firefox fix --- .../Scripts/vuesrc/content/cmsPageRow.vue | 17 ++++---- .../components/MKIOVideoPlayer.vue | 41 +++++++++++-------- .../wwwroot/js/mkplayer-ui-custom.js | 6 +-- 3 files changed, 35 insertions(+), 29 deletions(-) diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/cmsPageRow.vue b/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/cmsPageRow.vue index ae0ea6c25..cb5971ad4 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/cmsPageRow.vue +++ b/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/cmsPageRow.vue @@ -178,10 +178,15 @@ // this.player.subtitles.enable("subtitle" + this.section.id.toString()); //}, onPlayerReady() { - const videoElement = document.getElementById("bitmovinplayer-video-" + this.getPlayerUniqueId) as HTMLVideoElement; - if (videoElement) { - videoElement.controls = true; - } + var contanierId = this.section.id.toString(); + var uniquePlayer = this.player;// (player_@Model.Id); + buildControlbar(contanierId, uniquePlayer); + + // [BY] When we set UI to false we need to manually add the controls to the video element + //const videoElement = document.getElementById("bitmovinplayer-video-" + this.getPlayerUniqueId) as HTMLVideoElement; + //if (videoElement) { + // videoElement.controls = true; + //} // var subtitleTrack; //if (this.pageSectionDetail.videoAsset.azureMediaAsset && this.pageSectionDetail.videoAsset.closedCaptionsFile) { @@ -200,10 +205,6 @@ //}; //this.player.addSubtitle(subtitleTrack); - - var contanierId = this.section.id.toString(); - var uniquePlayer = this.player;// (player_@Model.Id); - buildControlbar(contanierId, uniquePlayer); }, async getMKIOPlayerKey(): Promise { this.mkioKey = await contentData.getMKPlayerKey(); diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/MKIOVideoPlayer.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/MKIOVideoPlayer.vue index 94fce13e8..9e39e343a 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/MKIOVideoPlayer.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/MKIOVideoPlayer.vue @@ -60,24 +60,27 @@ methods: { onPlayerReady() { MKPlayerControlbar(this.player.videoContainer.id, this.player); - const videoElement = document.getElementById("bitmovinplayer-video-" + this.getPlayerUniqueId) as HTMLVideoElement; - if (videoElement) { - videoElement.controls = true; - // Add the track element - var captionsInfo = this.captionsTrackAvailable; - if (captionsInfo) { - const trackElement = document.createElement('track'); - var srcPath = this.captionsUrl; - trackElement.kind = 'captions'; - trackElement.label = 'english'; - trackElement.srclang = 'en'; - trackElement.src = srcPath; + // [BY] When we set UI to false we need to manually add the controls to the video element + //const videoElement = document.getElementById("bitmovinplayer-video-" + this.getPlayerUniqueId) as HTMLVideoElement; - // Append the track to the video element - videoElement.appendChild(trackElement); - } - } + //if (videoElement) { + // videoElement.controls = true; + + // // Add the track element + // var captionsInfo = this.captionsTrackAvailable; + // if (captionsInfo) { + // const trackElement = document.createElement('track'); + // var srcPath = this.captionsUrl; + // trackElement.kind = 'captions'; + // trackElement.label = 'english'; + // trackElement.srclang = 'en'; + // trackElement.src = srcPath; + + // // Append the track to the video element + // videoElement.appendChild(trackElement); + // } + //} }, onSubtitleAdded() { @@ -201,7 +204,9 @@ .bmpui-ui-controlbar .control-right { float: right; } + + + \ No newline at end of file diff --git a/LearningHub.Nhs.WebUI/Views/Shared/Components/NavigationItems/Searchbar.cshtml b/LearningHub.Nhs.WebUI/Views/Shared/Components/NavigationItems/Searchbar.cshtml index c325c0f5a..2ae4c0d7d 100644 --- a/LearningHub.Nhs.WebUI/Views/Shared/Components/NavigationItems/Searchbar.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Shared/Components/NavigationItems/Searchbar.cshtml @@ -19,6 +19,7 @@ @* *@ +
    + diff --git a/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj b/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj index 073baa1ff..67c025df9 100644 --- a/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj +++ b/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj @@ -27,7 +27,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj b/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj index 722cefdee..4be0eeb12 100644 --- a/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj +++ b/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj @@ -9,7 +9,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj b/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj index d47e3d417..063b86205 100644 --- a/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj +++ b/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj @@ -11,7 +11,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj b/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj index 35d70c810..22ee37034 100644 --- a/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj +++ b/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj @@ -9,7 +9,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj b/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj index 5e7e65365..0c1aed810 100644 --- a/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj +++ b/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj @@ -9,7 +9,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj b/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj index 5d2f278d4..41178c7f4 100644 --- a/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj +++ b/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj @@ -16,7 +16,7 @@ - + all diff --git a/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj b/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj index 9869ac4be..65fe0dcc3 100644 --- a/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj +++ b/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj @@ -13,7 +13,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj b/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj index 44fefe844..ae225e64c 100644 --- a/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj +++ b/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj @@ -13,7 +13,7 @@ - + diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj index de8df1a58..fdfb3d5d8 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj @@ -24,7 +24,7 @@ - + all diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj index 52929fbd8..279defe85 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj @@ -9,7 +9,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj index a3951c927..1aae28941 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj @@ -10,7 +10,7 @@ - + all diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj index 7efd53fab..217743117 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj @@ -9,7 +9,7 @@ - + diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj index ad73a25cc..14710ab84 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj @@ -10,7 +10,7 @@ - + diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj index 861270f13..58db5c448 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj @@ -12,7 +12,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From c1799c5dac8750162b69a1ec53ac531eac0d1db0 Mon Sep 17 00:00:00 2001 From: Arunima George Date: Tue, 17 Sep 2024 12:06:57 +0100 Subject: [PATCH 087/576] TD-4461: Auto Complete - As a learner, I want to the system to auto complete my search term --- .../Controllers/SearchController.cs | 6 +- .../Services/SearchService.cs | 50 ++--- .../Styles/nhsuk/layout.scss | 58 ++++-- .../Views/Search/_AutoComplete.cshtml | 45 ++++ .../Views/Search/_SearchBar.cshtml | 196 ++++-------------- .../NavigationItems/Searchbar.cshtml | 147 +++---------- .../LearningHub.Nhs.Services/SearchService.cs | 4 +- 7 files changed, 187 insertions(+), 319 deletions(-) create mode 100644 LearningHub.Nhs.WebUI/Views/Search/_AutoComplete.cshtml diff --git a/LearningHub.Nhs.WebUI/Controllers/SearchController.cs b/LearningHub.Nhs.WebUI/Controllers/SearchController.cs index c596d68e3..bfa441aae 100644 --- a/LearningHub.Nhs.WebUI/Controllers/SearchController.cs +++ b/LearningHub.Nhs.WebUI/Controllers/SearchController.cs @@ -297,12 +297,12 @@ public async Task Image(string name) /// GetAutoSuggestion returns the auto suggestion options. ///
    /// search term. - /// Json. + /// ActionResult. [HttpGet("GetAutoSuggestion")] - public async Task GetAutoSuggestion(string term) + public async Task GetAutoSuggestion(string term) { var autoSuggestions = await this.searchService.GetAutoSuggestionList(term); - return this.Json(autoSuggestions); + return this.PartialView("_AutoComplete", autoSuggestions); } } } \ No newline at end of file diff --git a/LearningHub.Nhs.WebUI/Services/SearchService.cs b/LearningHub.Nhs.WebUI/Services/SearchService.cs index f8405b199..ea7207ceb 100644 --- a/LearningHub.Nhs.WebUI/Services/SearchService.cs +++ b/LearningHub.Nhs.WebUI/Services/SearchService.cs @@ -588,31 +588,6 @@ public async Task CreateCatalogueSearchTermEventAsync(CatalogueSearchReques } } - /// - /// The GetAutoSuggestionList. - /// - /// The term. - /// The auto suggestion list. - public async Task GetAutoSuggestionList(string term) - { - var client = await this.LearningHubHttpClient.GetClientAsync(); - var request = $"Search/GetAutoSuggestionResult/{term}"; - var response = await client.GetAsync(request).ConfigureAwait(false); - - var viewModel = new AutoSuggestionModel(); - if (response.IsSuccessStatusCode) - { - var result = response.Content.ReadAsStringAsync().Result; - viewModel = JsonConvert.DeserializeObject(result); - } - else if (response.StatusCode == System.Net.HttpStatusCode.Unauthorized || response.StatusCode == System.Net.HttpStatusCode.Forbidden) - { - throw new Exception("AccessDenied"); - } - - return viewModel; - } - /// /// GetAllCatalogueSearchResultAsync. /// @@ -660,6 +635,31 @@ public async Task GetAllCatalogueSearchResultAsync( } } + /// + /// The GetAutoSuggestionList. + /// + /// The term. + /// The auto suggestion list. + public async Task GetAutoSuggestionList(string term) + { + var client = await this.LearningHubHttpClient.GetClientAsync(); + var request = $"Search/GetAutoSuggestionResult/{term}"; + var response = await client.GetAsync(request).ConfigureAwait(false); + + var viewModel = new AutoSuggestionModel(); + if (response.IsSuccessStatusCode) + { + var result = response.Content.ReadAsStringAsync().Result; + viewModel = JsonConvert.DeserializeObject(result); + } + else if (response.StatusCode == System.Net.HttpStatusCode.Unauthorized || response.StatusCode == System.Net.HttpStatusCode.Forbidden) + { + throw new Exception("AccessDenied"); + } + + return viewModel; + } + /// /// The RemoveHtmlTags. /// diff --git a/LearningHub.Nhs.WebUI/Styles/nhsuk/layout.scss b/LearningHub.Nhs.WebUI/Styles/nhsuk/layout.scss index e403a2bdb..c8935fd80 100644 --- a/LearningHub.Nhs.WebUI/Styles/nhsuk/layout.scss +++ b/LearningHub.Nhs.WebUI/Styles/nhsuk/layout.scss @@ -184,21 +184,17 @@ } .autosuggestion-menu { - padding: 0; - padding-left: 0; - background-color: #fff; - border-bottom: 1px solid #d8dde0; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - border-left: 1px solid #d8dde0; - border-right: 1px solid #d8dde0; - box-shadow: 0 0 3px 0 rgba(66, 84, 98, .5); + padding: 16px 16px 0px 16px; + background-color: $color_nhsuk-white; + border-bottom: 1px solid $color_nhsuk-grey-4; + border-radius: 0px 0px 4px 4px; + border-left: 1px solid $color_nhsuk-grey-4; + border-right: 1px solid $color_nhsuk-grey-4; + box-shadow: 0px 2px 3px 0px $color_nhsuk-grey-4; list-style: none; - margin-top: 2px; overflow-x: hidden; overflow-y: auto; position: absolute; - top: 100%; width: 100%; z-index: 1; margin-bottom: 0; @@ -206,16 +202,38 @@ .autosuggestion-option { margin-bottom: 0; - padding: 16px; - border-bottom: 1px solid #f0f4f5; - color: #005eb8; + border-bottom: 1px solid $color_nhsuk-grey-4; + color: $color_nhsuk-blue; cursor: pointer; font-size: 16px; padding-bottom: 12px; text-align: left; + text-decoration: none; +} + +.autosuggestion-option .autosuggestion-icon { + fill: $color_nhsuk-grey-3 !important; + float: left; + height: 20px; + margin: 2px 8px 0 0; + width: 16px; +} + +.autosuggestion-option .autosuggestion-subtext { + color: $color_nhsuk-grey-2 !important; + padding-left: 24px; + margin: 0px; +} + +.autosuggestion-option .autosuggestion-link { + display: flex; + margin-bottom: 0px; text-decoration: underline; } +li.autosuggestion-option:last-of-type { + border-bottom: none !important; +} /* large desktop */ @media (min-width: px2rem(990)) { @@ -347,6 +365,10 @@ box-shadow: 0 0 0 2px white; z-index: 10; } + + .autosuggestion-menu { + top: 100%; + } } /* tablet */ @@ -365,6 +387,10 @@ .nhsuk-header__menu .nhsuk-header__not-mobile { display: none; } + + .autosuggestion-menu { + top: 100%; + } } /* mobile */ @@ -463,4 +489,8 @@ .nhsuk-width-container.nhsuk-header__container.app-width-container { padding-bottom: 0; } + + .autosuggestion-menu { + top: 100%; + } } \ No newline at end of file diff --git a/LearningHub.Nhs.WebUI/Views/Search/_AutoComplete.cshtml b/LearningHub.Nhs.WebUI/Views/Search/_AutoComplete.cshtml new file mode 100644 index 000000000..ba031ab0e --- /dev/null +++ b/LearningHub.Nhs.WebUI/Views/Search/_AutoComplete.cshtml @@ -0,0 +1,45 @@ +@model LearningHub.Nhs.Models.Search.AutoSuggestionModel; +@{ + var counter = 0; + var counter_res = 0; +} +@if (Model != null) +{ + @foreach (var item in Model.ConceptDocument.ConceptDocumentList) + { + counter++; +
  • + + + + + + +
  • + } + @foreach (var item in Model.ResourceDocument.ResourceDocumentList) + { + counter_res++; +
  • + + + + + +

    Resource

    +
    +
  • + } + @foreach (var item in Model.CatalogueDocument.CatalogueDocumentList) + { +
  • + + + + + +

    Catalogue

    +
    +
  • + } +} \ No newline at end of file diff --git a/LearningHub.Nhs.WebUI/Views/Search/_SearchBar.cshtml b/LearningHub.Nhs.WebUI/Views/Search/_SearchBar.cshtml index 19d4d594f..f205da1ce 100644 --- a/LearningHub.Nhs.WebUI/Views/Search/_SearchBar.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Search/_SearchBar.cshtml @@ -5,6 +5,7 @@ @* *@ +
    /// The term. /// The . - public async Task GetAutoSuggestionResultsAsync(string term = null) + public async Task GetAutoSuggestionResultsAsync(string term) { var viewmodel = new AutoSuggestionModel(); @@ -612,8 +612,6 @@ public async Task GetAutoSuggestionResultsAsync(string term { var result = response.Content.ReadAsStringAsync().Result; viewmodel = JsonConvert.DeserializeObject(result); - - // searchRequestModel.TotalNumberOfHits = viewmodel.Stats.TotalHits; } else if (response.StatusCode == System.Net.HttpStatusCode.Unauthorized || response.StatusCode == System.Net.HttpStatusCode.Forbidden) { From 10f62008372873b84a56c1ccfd81185a944727a5 Mon Sep 17 00:00:00 2001 From: Arunima George Date: Tue, 17 Sep 2024 12:25:32 +0100 Subject: [PATCH 088/576] TD-4461: removed blank spaces and added findwise settings for auto suggestion --- LearningHub.Nhs.WebUI/Services/SearchService.cs | 1 - LearningHub.Nhs.WebUI/Views/Search/_SearchBar.cshtml | 1 - .../Shared/Components/NavigationItems/Searchbar.cshtml | 2 +- .../LearningHub.Nhs.API/Controllers/SearchController.cs | 1 - WebAPI/LearningHub.Nhs.API/appsettings.json | 9 +++++---- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Services/SearchService.cs b/LearningHub.Nhs.WebUI/Services/SearchService.cs index ea7207ceb..22f98dcdb 100644 --- a/LearningHub.Nhs.WebUI/Services/SearchService.cs +++ b/LearningHub.Nhs.WebUI/Services/SearchService.cs @@ -16,7 +16,6 @@ namespace LearningHub.Nhs.WebUI.Services using LearningHub.Nhs.WebUI.Helpers; using LearningHub.Nhs.WebUI.Interfaces; using LearningHub.Nhs.WebUI.Models.Search; - using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Newtonsoft.Json; diff --git a/LearningHub.Nhs.WebUI/Views/Search/_SearchBar.cshtml b/LearningHub.Nhs.WebUI/Views/Search/_SearchBar.cshtml index f205da1ce..7ec19feef 100644 --- a/LearningHub.Nhs.WebUI/Views/Search/_SearchBar.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Search/_SearchBar.cshtml @@ -3,7 +3,6 @@
    - @* *@ +
    @@ -131,6 +131,7 @@ endGuidance: "", initialGuidance: "", guidanceValid: true, + IsVisible: false, } }, watch: { @@ -139,7 +140,7 @@ { this.assessmentDetails.endGuidance.addBlock(BlockTypeEnum.Text); } - this.assessmentDetails.endGuidance.blocks[0].textBlock.content = this.endGuidance; + this.assessmentDetails.endGuidance.blocks[0].textBlock.content = this.endGuidance; }, ["assessmentDetails.passMark"](value){ this.assessmentDetails.passMark = this.capNumberFieldBy(value, 100)}, ["assessmentDetails.maximumAttempts"](value){ this.assessmentDetails.maximumAttempts = this.capNumberFieldBy(value, 10)}, @@ -156,6 +157,14 @@ } this.assessmentDetails.assessmentSettingsAreValid = settingsAreValid; + + if (this.endGuidance != "") { + this.IsVisible = true; + } + else { + this.IsVisible = false; + } + return settingsAreValid; }, }, @@ -169,9 +178,23 @@ { this.endGuidance = description; } + + if (this.endGuidance != "") { + this.IsVisible = true; + } + else { + this.IsVisible = false; + } }, setGuidanceValidity(valid: boolean) { - this.guidanceValid = valid; + if (this.endGuidance == "") { + this.guidanceValid = false; + this.IsVisible = false; + } + else { + this.guidanceValid = valid; + this.IsVisible = true; + } } } }); From 9d4bc518cf5b3ef44854c839d8d2f5384e9a244b Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Thu, 3 Oct 2024 11:41:13 +0100 Subject: [PATCH 111/576] TD-4819: LH-Issue showing 'Certificates' section blank on 'My accessed learning' tray --- .../LearningHub.Nhs.Database.sqlproj | 1 + ...LearningCertificatesDashboardResources.sql | 101 ++++++++++++++++++ .../Resources/ResourceVersionRepository.cs | 2 +- 3 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 WebAPI/LearningHub.Nhs.Database/Stored Procedures/Resources/GetMyLearningCertificatesDashboardResources.sql diff --git a/WebAPI/LearningHub.Nhs.Database/LearningHub.Nhs.Database.sqlproj b/WebAPI/LearningHub.Nhs.Database/LearningHub.Nhs.Database.sqlproj index 48f35761f..477a48869 100644 --- a/WebAPI/LearningHub.Nhs.Database/LearningHub.Nhs.Database.sqlproj +++ b/WebAPI/LearningHub.Nhs.Database/LearningHub.Nhs.Database.sqlproj @@ -525,6 +525,7 @@ + diff --git a/WebAPI/LearningHub.Nhs.Database/Stored Procedures/Resources/GetMyLearningCertificatesDashboardResources.sql b/WebAPI/LearningHub.Nhs.Database/Stored Procedures/Resources/GetMyLearningCertificatesDashboardResources.sql new file mode 100644 index 000000000..986e25423 --- /dev/null +++ b/WebAPI/LearningHub.Nhs.Database/Stored Procedures/Resources/GetMyLearningCertificatesDashboardResources.sql @@ -0,0 +1,101 @@ +------------------------------------------------------------------------------- +-- Author OA +-- Created 24 JUN 2024 Nov 2020 +-- Purpose Break down the GetDashboardResources SP to smaller SP for a specific data type +-- +-- Modification History +-- +-- 24 Jun 2024 OA Initial Revision +------------------------------------------------------------------------------- + +CREATE PROCEDURE [resources].[GetMyLearningCertificatesDashboardResources] + @UserId INT, + @PageNumber INT = 1, + @TotalRecords INT OUTPUT +AS +BEGIN + DECLARE @MaxPageNumber INT = 4 + + IF @PageNumber > 4 + BEGIN + SET @PageNumber = @MaxPageNumber + END + + DECLARE @FetchRows INT = 3 + DECLARE @MaxRows INT = @MaxPageNUmber * @FetchRows + DECLARE @OffsetRows INT = (@PageNumber - 1) * @FetchRows + + DECLARE @MyActivity TABLE (ResourceId [int] NOT NULL PRIMARY KEY, ResourceActivityId [int] NOT NULL); + DECLARE @Resources TABLE (ResourceId [int] NOT NULL PRIMARY KEY, ResourceActivityCount [int] NOT NULL); + + INSERT INTO @MyActivity + SELECT TOP (@MaxRows) ra.ResourceId, MAX(ra.Id) ResourceActivityId + FROM + activity.ResourceActivity ra + JOIN [resources].[Resource] r ON ra.ResourceId = r.Id + JOIN [resources].[ResourceVersion] rv ON rv.Id = ra.ResourceVersionId + LEFT JOIN [resources].[AssessmentResourceVersion] arv ON arv.ResourceVersionId = ra.ResourceVersionId + LEFT JOIN [activity].[AssessmentResourceActivity] ara ON ara.ResourceActivityId = ra.Id + LEFT JOIN [activity].[MediaResourceActivity] mar ON mar.ResourceActivityId = ra.Id + LEFT JOIN [activity].[ScormActivity] sa ON sa.ResourceActivityId = ra.Id + WHERE ra.UserId = @UserId AND rv.CertificateEnabled = 1 + AND ( + (r.ResourceTypeId IN (2, 7) AND ra.ActivityStatusId = 3 OR ra.ActivityStart < '2020-09-07 00:00:00 +00:00' OR mar.Id IS NOT NULL AND mar.PercentComplete = 100) + OR (r.ResourceTypeId = 6 AND (sa.CmiCoreLesson_status IN(3,5) OR (ra.ActivityStatusId IN(3, 5)))) + OR ((r.ResourceTypeId = 11 AND arv.AssessmentType = 2) AND (ara.Score >= arv.PassMark OR ra.ActivityStatusId IN(3, 5))) + OR ((r.ResourceTypeId = 11 AND arv.AssessmentType =1) AND (ara.Score >= arv.PassMark AND ra.ActivityStatusId IN(3, 5,7))) + OR (r.ResourceTypeId IN (1, 5, 8, 9, 10, 12) AND ra.ActivityStatusId = 3)) + GROUP BY ra.ResourceId + ORDER BY ResourceActivityId DESC + + SELECT r.Id AS ResourceId + ,( SELECT TOP 1 rr.OriginalResourceReferenceId + FROM [resources].[ResourceReference] rr + JOIN hierarchy.NodePath np on np.id = rr.NodePathId and np.NodeId = n.Id and np.Deleted = 0 + WHERE rr.ResourceId = rv.ResourceId AND rr.Deleted = 0 + ) AS ResourceReferenceID + ,r.CurrentResourceVersionId AS ResourceVersionId + ,r.ResourceTypeId AS ResourceTypeId + ,rv.Title + ,rv.Description + ,CASE + WHEN r.ResourceTypeId = 7 THEN + (SELECT vrv.DurationInMilliseconds from [resources].[VideoResourceVersion] vrv WHERE vrv.[ResourceVersionId] = r.CurrentResourceVersionId) + WHEN r.ResourceTypeId = 2 THEN + (SELECT vrv.DurationInMilliseconds from [resources].[AudioResourceVersion] vrv WHERE vrv.[ResourceVersionId] = r.CurrentResourceVersionId) + ELSE + NULL + END AS DurationInMilliseconds + ,CASE WHEN n.id = 1 THEN NULL ELSE cnv.Name END AS CatalogueName + ,cnv.Url AS Url + ,CASE WHEN n.id = 1 THEN NULL ELSE cnv.BadgeUrl END AS BadgeUrl + ,cnv.RestrictedAccess + ,CAST(CASE WHEN cnv.RestrictedAccess = 1 AND auth.CatalogueNodeId IS NULL THEN 0 ELSE 1 END AS bit) AS HasAccess + ,ub.Id AS BookMarkId + ,CAST(ISNULL(ub.[Deleted], 1) ^ 1 AS BIT) AS IsBookmarked + ,rvrs.AverageRating + ,rvrs.RatingCount +FROM @MyActivity ma +JOIN activity.ResourceActivity ra ON ra.id = ma.ResourceActivityId +JOIN resources.resourceversion rv ON rv.id = ra.ResourceVersionId AND rv.Deleted = 0 +JOIN Resources.Resource r ON r.Id = rv.ResourceId +JOIN hierarchy.Publication p ON rv.PublicationId = p.Id AND p.Deleted = 0 +JOIN resources.ResourceVersionRatingSummary rvrs ON rv.Id = rvrs.ResourceVersionId AND rvrs.Deleted = 0 +JOIN hierarchy.NodeResource nr ON r.Id = nr.ResourceId AND nr.Deleted = 0 +JOIN hierarchy.Node n ON n.Id = nr.NodeId AND n.Hidden = 0 AND n.Deleted = 0 +JOIN hierarchy.NodePath np ON np.NodeId = n.Id AND np.Deleted = 0 AND np.IsActive = 1 +JOIN hierarchy.NodeVersion nv ON nv.NodeId = np.CatalogueNodeId AND nv.VersionStatusId = 2 AND nv.Deleted = 0 +JOIN hierarchy.CatalogueNodeVersion cnv ON cnv.NodeVersionId = nv.Id AND cnv.Deleted = 0 +LEFT JOIN hub.UserBookmark ub ON ub.UserId = @UserId AND ub.ResourceReferenceId = (SELECT TOP 1 rr.OriginalResourceReferenceId + FROM [resources].[ResourceReference] rr + JOIN hierarchy.NodePath np on np.id = rr.NodePathId and np.NodeId = n.Id and np.Deleted = 0 + WHERE rr.ResourceId = rv.ResourceId AND rr.Deleted = 0) +LEFT JOIN ( SELECT DISTINCT CatalogueNodeId + FROM [hub].[RoleUserGroupView] rug JOIN hub.UserUserGroup uug ON rug.UserGroupId = uug.UserGroupId + WHERE rug.ScopeTypeId = 1 and rug.RoleId in (1,2,3) and uug.Deleted = 0 and uug.UserId = @userId) auth ON n.Id = auth.CatalogueNodeId +ORDER BY ma.ResourceActivityId DESC, rv.Title +OFFSET @OffsetRows ROWS +FETCH NEXT @FetchRows ROWS ONLY + + SELECT @TotalRecords = CASE WHEN COUNT(*) > 12 THEN @MaxRows ELSE COUNT(*) END FROM @MyActivity +END \ No newline at end of file diff --git a/WebAPI/LearningHub.Nhs.Repository/Resources/ResourceVersionRepository.cs b/WebAPI/LearningHub.Nhs.Repository/Resources/ResourceVersionRepository.cs index 584da6344..cee3e6a07 100644 --- a/WebAPI/LearningHub.Nhs.Repository/Resources/ResourceVersionRepository.cs +++ b/WebAPI/LearningHub.Nhs.Repository/Resources/ResourceVersionRepository.cs @@ -690,7 +690,7 @@ public List GetContributions(int userId, ResourceContri switch (dashboardType) { case "my-certificates": - dashboardResources = this.DbContext.DashboardResourceDto.FromSqlRaw("resources.GetMyCertificatesDashboardResources @userId, @pageNumber, @totalRows output", param0, param1, param2).ToList(); + dashboardResources = this.DbContext.DashboardResourceDto.FromSqlRaw("resources.GetMyLearningCertificatesDashboardResources @userId, @pageNumber, @totalRows output", param0, param1, param2).ToList(); break; case "my-recent-completed": dashboardResources = this.DbContext.DashboardResourceDto.FromSqlRaw("resources.GetMyRecentCompletedDashboardResources @userId, @pageNumber, @totalRows output", param0, param1, param2).ToList(); From a1c3ea1b3d14ac21db81776ee1194a3cdb2ccb55 Mon Sep 17 00:00:00 2001 From: binon Date: Thu, 3 Oct 2024 14:00:29 +0100 Subject: [PATCH 112/576] MKIO iphone fix --- .../Scripts/vuesrc/content/cmsPageRow.vue | 14 ++ .../Api/MediaManifestProxyController.cs | 124 ++++++++++++++++++ .../components/MKIOVideoPlayer.vue | 11 ++ .../Views/Home/_CmsVideo.cshtml | 10 ++ 4 files changed, 159 insertions(+) diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/cmsPageRow.vue b/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/cmsPageRow.vue index ec21a1ba4..5d51f5b20 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/cmsPageRow.vue +++ b/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/cmsPageRow.vue @@ -89,6 +89,7 @@ player: null, videoContainer: null, mkioKey: '', + isIphone: false }; }, async created(): Promise { @@ -97,6 +98,9 @@ this.getDisplayAVFlag(); this.getAudioVideoUnavailableView(); }, + mounted() { + this.checkIfIphone(); + }, computed: { getStyle() { console.log("getLinkStyle", (this.pageSectionDetail || {}).draftHidden); @@ -282,8 +286,18 @@ }, getMediaPlayUrl(url: string): string { let sourceUrl = url.substring(0, url.lastIndexOf("manifest")) + "manifest(format=m3u8-cmaf,encryption=cbc)"; + + if (this.isIphone) { + var token = this.pageSectionDetail.videoAsset.azureMediaAsset.authenticationToken; + sourceUrl = "/Media/MediaManifest?playBackUrl=" + sourceUrl + "&token=" + token; + } + return sourceUrl; }, + checkIfIphone() { + const userAgent = navigator.userAgent || navigator.vendor; + this.isIphone = /iPhone/i.test(userAgent); + }, }, watch: { section() { diff --git a/LearningHub.Nhs.WebUI/Controllers/Api/MediaManifestProxyController.cs b/LearningHub.Nhs.WebUI/Controllers/Api/MediaManifestProxyController.cs index 14ffd452a..e922c68e1 100644 --- a/LearningHub.Nhs.WebUI/Controllers/Api/MediaManifestProxyController.cs +++ b/LearningHub.Nhs.WebUI/Controllers/Api/MediaManifestProxyController.cs @@ -5,8 +5,11 @@ using System.IO; using System.Net; using System.Net.Cache; + using System.Net.Http; + using System.Text; using System.Text.RegularExpressions; using Microsoft.AspNetCore.Authorization; + using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; @@ -42,6 +45,8 @@ public string Get(string playBackUrl, string token) var httpRequest = (HttpWebRequest)WebRequest.Create(new Uri(playBackUrl)); httpRequest.CachePolicy = new HttpRequestCachePolicy(HttpRequestCacheLevel.NoCacheNoStore); httpRequest.Timeout = 30000; + httpRequest.Headers.Add("Access-Control-Request-Headers", "authorization"); + httpRequest.Headers.Add("Access-Control-Request-Method", "GET"); var httpResponse = httpRequest.GetResponse(); @@ -65,6 +70,9 @@ public string Get(string playBackUrl, string token) var content = reader.ReadToEnd(); + content = ReplaceUrisWithProxy(content, baseUrl); + + // content = ReplaceMediaUriWithProxy(content, baseUrl); var newContent = Regex.Replace(content, urlRegex, match => { string baseUrlWithQuery = match.Groups[1].Value; // URL including the query string @@ -90,6 +98,8 @@ public string Get(string playBackUrl, string token) } return newContent; + + // response.Content = new StringContent(newContent, Encoding.Default, "application/vnd.apple.mpegurl"); } } } @@ -104,5 +114,119 @@ public string Get(string playBackUrl, string token) return null; } + + private static string ReplaceUrisWithProxy(string playlistContent, string proxyUrl) + { + // Split the playlist content into lines + var lines = playlistContent.Split(new[] { "\r\n", "\n" }, StringSplitOptions.None); + + // Process each line to replace media or map URIs + for (int i = 0; i < lines.Length; i++) + { + if (lines[i].StartsWith("#EXT-X-MAP:URI=", StringComparison.OrdinalIgnoreCase)) + { + // Extract the URI from the current line for EXT-X-MAP + var existingUri = lines[i].Substring(lines[i].IndexOf('=') + 1).Trim('"'); + var newUri = $"{proxyUrl}/{existingUri}"; + lines[i] = lines[i].Replace(existingUri, newUri); + } + else if (lines[i].StartsWith("#EXTINF:", StringComparison.OrdinalIgnoreCase) && i + 1 < lines.Length) + { + // Get the URI from the next line for EXTINF + var existingUri = lines[i + 1].Trim(); + var newUri = $"{proxyUrl}/{existingUri}"; + lines[i + 1] = newUri; + } + } + + // Join the modified lines back into a single string + return string.Join("\r\n", lines); + } + + private static string ReplaceMediaUriWithProxy(string playlistContent, string proxyUrl) + { + // Split the playlist content into lines + var lines = playlistContent.Split(new[] { "\r\n", "\n" }, StringSplitOptions.None); + + // Process each line to replace media URIs + for (int i = 0; i < lines.Length; i++) + { + // Check if the line starts with #EXTINF + if (lines[i].StartsWith("#EXTINF:", StringComparison.OrdinalIgnoreCase)) + { + // Check if there is a next line (media URI) + if (i + 1 < lines.Length) + { + // Get the media URI line + var mediaUriLine = lines[i + 1]; + + // Extract the existing URI (removing any quotes) + var existingUri = mediaUriLine.Trim(); + + // Create the new URI with the proxy URL + var newUri = $"{proxyUrl}/{existingUri}"; + + // Replace the media URI line with the new proxy URI + lines[i + 1] = newUri; + } + } + } + + // Join the modified lines back into a single string + return string.Join("\r\n", lines); + } + + private static string ReplaceMapUriWithProxy(string playlistContent, string proxyUrl) + { + // Split the content into lines + var lines = playlistContent.Split(new[] { "\r\n", "\n" }, StringSplitOptions.None); + + // Process each line and replace the relevant URIs + for (int i = 0; i < lines.Length; i++) + { + if (lines[i].StartsWith("#EXT-X-MAP:URI=", StringComparison.OrdinalIgnoreCase)) + { + // Extract the existing URI + var existingUri = lines[i].Substring(lines[i].IndexOf('=') + 1).Trim('"'); + + // Create the new URI with the proxy URL + // Assuming the proxy URL should be the base URL for the video segments + var newUri = $"{proxyUrl}/{existingUri}"; + + // Replace the line with the new URI + lines[i] = lines[i].Replace(existingUri, newUri); + } + } + + // Join the modified lines back together + return string.Join("\r\n", lines); + } + + private static string ReplaceMediaAndMapUrisWithProxy(string playlistContent, string proxyUrl) + { + // Split the content into lines + var lines = playlistContent.Split(new[] { "\r\n", "\n" }, StringSplitOptions.None); + + // Process each line and replace relevant URIs + for (int i = 0; i < lines.Length; i++) + { + // Check for media URI line + if (lines[i].StartsWith("#EXTINF:", StringComparison.OrdinalIgnoreCase) && i + 1 < lines.Length) + { + // Replace the media URI + lines[i + 1] = $"{proxyUrl}/{lines[i + 1].Trim()}"; + } + + // Check for map URI line + if (lines[i].StartsWith("#EXT-X-MAP:URI=", StringComparison.OrdinalIgnoreCase)) + { + // Replace the map URI + lines[i] = lines[i].Replace(lines[i].Substring(lines[i].IndexOf('=') + 1).Trim('"'), $"{proxyUrl}/"); + } + } + + // Join the modified lines back together + return string.Join("\r\n", lines); + } } } diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/MKIOVideoPlayer.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/MKIOVideoPlayer.vue index fe5b69ba3..0090f81d6 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/MKIOVideoPlayer.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/MKIOVideoPlayer.vue @@ -49,6 +49,7 @@ mkioKey: '', playBackUrl: '', sourceLoaded: true, + isIphone: false }; }, async created() { @@ -56,6 +57,9 @@ this.getMediaPlayUrl(); this.load(); }, + mounted() { + this.checkIfIphone(); + }, methods: { onPlayerReady() { const videoElement = document.getElementById("bitmovinplayer-video-" + this.getPlayerUniqueId) as HTMLVideoElement; @@ -89,6 +93,13 @@ getMediaPlayUrl() { this.playBackUrl = this.videoFile.locatorUri; this.playBackUrl = this.playBackUrl.substring(0, this.playBackUrl.lastIndexOf("manifest")) + "manifest(format=m3u8-cmaf,encryption=cbc)"; + if (this.isIphone) { + this.playBackUrl = "/Media/MediaManifest?playBackUrl=" + this.playBackUrl + "&token=" + this.azureMediaServicesToken; + } + }, + checkIfIphone() { + const userAgent = navigator.userAgent || navigator.vendor; + this.isIphone = /iPhone/i.test(userAgent); }, load() { // Grab the video container diff --git a/LearningHub.Nhs.WebUI/Views/Home/_CmsVideo.cshtml b/LearningHub.Nhs.WebUI/Views/Home/_CmsVideo.cshtml index 1f6275efe..d0af1e05d 100644 --- a/LearningHub.Nhs.WebUI/Views/Home/_CmsVideo.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Home/_CmsVideo.cshtml @@ -185,6 +185,11 @@ var url = model.videoAsset.azureMediaAsset.locatorUri; url = url.substring(0, url.lastIndexOf("manifest")) + "manifest(format=m3u8-cmaf,encryption=cbc)"; + if (checkIfIphone()) { + var token = model.videoAsset.azureMediaAsset.authenticationToken; + url = "https://lh-web.dev.local/Media/MediaManifest?playBackUrl=" + url + "&token=" + token; + } + var sourceConfig = { hls: url, // Custom subtitle track @@ -217,6 +222,11 @@ function onUnmute(data) { console.log("Audio unmuted!"); } + + function checkIfIphone() { + const userAgent = navigator.userAgent || navigator.vendor; + return /iPhone/i.test(userAgent); + } \ No newline at end of file From 289181831e48b54e839177d152867dc751e3f810 Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Tue, 5 Nov 2024 10:32:43 +0000 Subject: [PATCH 168/576] Revert "CSS fixes" This reverts commit 693c1c5b5404dac56e533aa127002c007960afda. --- .../Scripts/vuesrc/content/pageSectionToolbar.vue | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/pageSectionToolbar.vue b/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/pageSectionToolbar.vue index 52202c8ec..45eddd45b 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/pageSectionToolbar.vue +++ b/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/pageSectionToolbar.vue @@ -219,6 +219,7 @@ left:10px; top: 2px; z-index: 1; + width:fit-content; } .warningTriangle { @@ -270,14 +271,4 @@ .toolBarButton i .fa, .fas { font-weight: 100; } - @media(max-width: 767px) { - .toolBarBox { - position: absolute; - right: 12px; - left: 10px; - top: 2px; - z-index: 1; - width: fit-content; - } - } \ No newline at end of file From b33c73798c281db21448b3cb74196b5d221b5975 Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Tue, 5 Nov 2024 10:37:50 +0000 Subject: [PATCH 169/576] Design fixes for the admin UI --- .../Scripts/vuesrc/content/pageSectionToolbar.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/pageSectionToolbar.vue b/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/pageSectionToolbar.vue index 45eddd45b..a23c8be3e 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/pageSectionToolbar.vue +++ b/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/pageSectionToolbar.vue @@ -219,7 +219,6 @@ left:10px; top: 2px; z-index: 1; - width:fit-content; } .warningTriangle { @@ -270,5 +269,15 @@ .toolBarButton i .fa, .fas { font-weight: 100; + } + @media (max-width: 767px) { + .toolBarBox { + position: absolute; + right: 12px; + left: 10px; + top: 2px; + z-index: 1; + width: fit-content; + } } \ No newline at end of file From 3339cff3231e80a4ae02212962461f3d8f83741a Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Tue, 5 Nov 2024 10:54:26 +0000 Subject: [PATCH 170/576] Footer design fixes --- .../Scripts/vuesrc/content/pageSectionToolbar.vue | 4 ++-- .../Styles/Layout/_footer.scss | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/pageSectionToolbar.vue b/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/pageSectionToolbar.vue index a23c8be3e..4d1faf9b0 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/pageSectionToolbar.vue +++ b/AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/content/pageSectionToolbar.vue @@ -269,8 +269,8 @@ .toolBarButton i .fa, .fas { font-weight: 100; - } - @media (max-width: 767px) { + } + @media (max-width: 420px) { .toolBarBox { position: absolute; right: 12px; diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Styles/Layout/_footer.scss b/AdminUI/LearningHub.Nhs.AdminUI/Styles/Layout/_footer.scss index 3423503ae..c372b4b21 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Styles/Layout/_footer.scss +++ b/AdminUI/LearningHub.Nhs.AdminUI/Styles/Layout/_footer.scss @@ -28,9 +28,13 @@ .footer-primary, .footer-secondary { - font-size: 17px; - line-height: 28px; - padding-top: 30px; + font-size: 17px; + line-height: 28px; + padding-top: 30px; + + @media (max-width: 420px) { + padding-top: 20px !important; + } } .footer-primary { @@ -63,7 +67,7 @@ padding-right: 15px; @media (max-width: 420px) { - padding-top: 10px !important; + padding-top: 0px !important; text-align: left !important; } } From d64b641ac693aa0ce7fca18d5f576cb5016edb2c Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Wed, 6 Nov 2024 10:31:48 +0000 Subject: [PATCH 171/576] TD-4079: Form elements should have an id attribute --- .../ContributeAssessmentSettings.vue | 12 +++++++----- .../contribute-resource/ContributeAuthorsTab.vue | 6 +++--- .../contribute-resource/ContributeLicenceTab.vue | 6 +++--- .../components/CatalogueSelector.vue | 2 +- .../components/SensitiveContentTickBox.vue | 4 ++-- .../components/questions/AllowReveal.vue | 8 ++++---- .../components/questions/SingleChoiceAnswer.vue | 2 +- .../Scripts/vuesrc/contribute/CatalogueSelect.vue | 2 +- .../Scripts/vuesrc/contribute/Content.vue | 4 ++-- .../Scripts/vuesrc/contribute/ContentCommon.vue | 8 ++++---- .../Scripts/vuesrc/contribute/ContentVideo.vue | 2 +- .../Scripts/vuesrc/learningsessions/ScormViewer.vue | 2 +- 12 files changed, 30 insertions(+), 28 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeAssessmentSettings.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeAssessmentSettings.vue index 3c01b6050..088f74c90 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeAssessmentSettings.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeAssessmentSettings.vue @@ -23,12 +23,12 @@
    Allow the learner to work through the assessment pages in any order.
    -
    @@ -74,7 +74,9 @@ + :initialValue="endGuidance" + :for="guidance" + :id="guidance"/>

    Tip

    diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeAuthorsTab.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeAuthorsTab.vue index 9881f3e42..7970c5263 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeAuthorsTab.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeAuthorsTab.vue @@ -14,16 +14,16 @@
    Add author
    -
    diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeLicenceTab.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeLicenceTab.vue index 5c0ffe391..04f60d05d 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeLicenceTab.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeLicenceTab.vue @@ -8,9 +8,9 @@ More information on licences
    - + + diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/CatalogueSelector.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/CatalogueSelector.vue index eb7981f31..f3354ab8d 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/CatalogueSelector.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/CatalogueSelector.vue @@ -5,7 +5,7 @@
    -
    -
    diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/questions/AllowReveal.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/questions/AllowReveal.vue index 078994fe2..9cdb8d3f9 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/questions/AllowReveal.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/questions/AllowReveal.vue @@ -6,13 +6,13 @@
    -
    - + diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/CatalogueSelect.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/CatalogueSelect.vue index f7f91cd55..1d132cf5f 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/CatalogueSelect.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/CatalogueSelect.vue @@ -36,7 +36,7 @@
    -
    -
    @@ -69,12 +70,13 @@ id="@Model.MonthId" name="@Model.MonthId" value="@Model.MonthValue" - type="number" + type="text" pattern="[0-9]*" min="1" max="12" step="1" - inputmode="numeric" /> + inputmode="numeric" + aria-describedby="date-error" aria-invalid="false" />
    @@ -84,14 +86,50 @@ id="@Model.YearId" name="@Model.YearId" value="@Model.YearValue" - type="number" + type="text" pattern="[0-9]*" min="1900" max="9999" step="1" - inputmode="numeric" /> + inputmode="numeric" + aria-describedby="date-error" aria-invalid="false" />
    + + diff --git a/LearningHub.Nhs.WebUI/Views/Shared/Components/ErrorSummary/Default.cshtml b/LearningHub.Nhs.WebUI/Views/Shared/Components/ErrorSummary/Default.cshtml index 269b174f8..7f438d581 100644 --- a/LearningHub.Nhs.WebUI/Views/Shared/Components/ErrorSummary/Default.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Shared/Components/ErrorSummary/Default.cshtml @@ -21,6 +21,10 @@ + } else { diff --git a/LearningHub.Nhs.WebUI/Views/Shared/Components/RadioList/Default.cshtml b/LearningHub.Nhs.WebUI/Views/Shared/Components/RadioList/Default.cshtml index 05eb26699..2bcd6dae9 100644 --- a/LearningHub.Nhs.WebUI/Views/Shared/Components/RadioList/Default.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Shared/Components/RadioList/Default.cshtml @@ -44,7 +44,7 @@ @if (Model.Required && !Model.HasError) { -
    + } @@ -131,5 +131,19 @@
    + \ No newline at end of file From 35a4d8553dd5ee8c655b3430f9998eca2d813187 Mon Sep 17 00:00:00 2001 From: AnjuJose011 <154979799+AnjuJose011@users.noreply.github.com> Date: Wed, 27 Nov 2024 16:25:34 +0000 Subject: [PATCH 185/576] fixes --- .../Views/Shared/Tenant/LearningHub/_Layout.cshtml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Views/Shared/Tenant/LearningHub/_Layout.cshtml b/LearningHub.Nhs.WebUI/Views/Shared/Tenant/LearningHub/_Layout.cshtml index 3465856d9..9127802e9 100644 --- a/LearningHub.Nhs.WebUI/Views/Shared/Tenant/LearningHub/_Layout.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Shared/Tenant/LearningHub/_Layout.cshtml @@ -72,12 +72,12 @@ +
    BETA @@ -102,7 +102,9 @@
    - +
    + +
    - + \ No newline at end of file From 5c078474105aaf1a53e2d5495f26f38f94c8525e Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Fri, 6 Dec 2024 14:15:59 +0000 Subject: [PATCH 201/576] TD-5085: Showing few issues when creating an account on 'Create new account' flow screens --- .../Controllers/AccountController.cs | 71 ++++++++++++------- .../Account/CreateAccountSearchRole.cshtml | 11 ++- .../_AccountCreationGradePaging.cshtml | 3 - .../_AccountCreationJobRolePaging.cshtml | 4 -- .../_AccountCreationRegionPaging.cshtml | 3 - .../_AccountCreationSpecialtyPaging.cshtml | 3 - .../_AccountCreationWorkPlacePaging.cshtml | 3 - 7 files changed, 54 insertions(+), 44 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Controllers/AccountController.cs b/LearningHub.Nhs.WebUI/Controllers/AccountController.cs index 179850674..1281d1d18 100644 --- a/LearningHub.Nhs.WebUI/Controllers/AccountController.cs +++ b/LearningHub.Nhs.WebUI/Controllers/AccountController.cs @@ -469,41 +469,53 @@ public async Task CreateAccountRegionSelection(AccountCreationVie { var countryCheck = int.TryParse(accountCreationViewModel.CountryId, out int countryId); var accountCreation = await this.multiPageFormService.GetMultiPageFormData(MultiPageFormDataFeature.AddRegistrationPrompt, this.TempData); - if (string.IsNullOrWhiteSpace(accountCreationViewModel.CountryId) || !countryCheck) + if (accountCreationViewModel.CountryId != null) + { + accountCreation.CountryId = accountCreationViewModel.CountryId; + } + + if (accountCreation.CountryId == "1") + { + var regionData = await this.regionService.GetAllPagedAsync(accountCreationViewModel.CurrentPageIndex, UserRegistrationContentPageSize); + return this.View(new AccountCreationListViewModel { Region = regionData.Item2, AccountCreationPaging = new AccountCreationPagingModel { TotalItems = regionData.Item1, PageSize = UserRegistrationContentPageSize, HasItems = regionData.Item1 > 0, CurrentPage = accountCreationViewModel.CurrentPageIndex }, RegionId = accountCreation.RegionId, ReturnToConfirmation = accountCreationViewModel.ReturnToConfirmation }); + } + else if (string.IsNullOrWhiteSpace(accountCreationViewModel.CountryId) || !countryCheck) { this.ModelState.AddModelError("CountryId", CommonValidationErrorMessages.CountryRequired); var countries = await this.countryService.GetFilteredAsync(accountCreationViewModel.FilterText); return this.View("CreateAccountCountrySelection", new AccountCreationListViewModel { FilterText = accountCreationViewModel.FilterText, CountryList = countries.ToList(), ReturnToConfirmation = accountCreationViewModel.ReturnToConfirmation }); } - - accountCreation.CountryId = accountCreationViewModel.CountryId; - await this.multiPageFormService.SetMultiPageFormData(accountCreation, MultiPageFormDataFeature.AddRegistrationPrompt, this.TempData); - if (countryId != 1) + else { - accountCreationViewModel.RegionId = string.Empty; - accountCreation.RegionId = string.Empty; + accountCreation.CountryId = accountCreationViewModel.CountryId; await this.multiPageFormService.SetMultiPageFormData(accountCreation, MultiPageFormDataFeature.AddRegistrationPrompt, this.TempData); - - if (accountCreation.IsLoginWizard) + if (countryId != 1) { - return this.CheckConfirmationUpdate() ? this.RedirectToAction("AccountConfirmation", "LoginWizard") : this.RedirectToAction("NextStage", "LoginWizard"); - } + accountCreationViewModel.RegionId = string.Empty; + accountCreation.RegionId = string.Empty; + await this.multiPageFormService.SetMultiPageFormData(accountCreation, MultiPageFormDataFeature.AddRegistrationPrompt, this.TempData); - return this.CheckConfirmationUpdate() ? this.RedirectToAction("CreateAccountConfirmation", new AccountCreationViewModel { LocationId = accountCreation.LocationId }) : this.RedirectToAction("CreateAccountSearchRole", accountCreationViewModel); - } + if (accountCreation.IsLoginWizard) + { + return this.CheckConfirmationUpdate() ? this.RedirectToAction("AccountConfirmation", "LoginWizard") : this.RedirectToAction("NextStage", "LoginWizard"); + } - switch (accountCreationViewModel.AccountCreationPagingEnum) - { - case AccountCreationPagingEnum.NextPageChange: - accountCreationViewModel.CurrentPageIndex += 1; - break; + return this.CheckConfirmationUpdate() ? this.RedirectToAction("CreateAccountConfirmation", new AccountCreationViewModel { LocationId = accountCreation.LocationId }) : this.RedirectToAction("CreateAccountSearchRole", accountCreationViewModel); + } - case AccountCreationPagingEnum.PreviousPageChange: - accountCreationViewModel.CurrentPageIndex -= 1; - break; - case AccountCreationPagingEnum.Default: - accountCreationViewModel.CurrentPageIndex = 1; - break; + switch (accountCreationViewModel.AccountCreationPagingEnum) + { + case AccountCreationPagingEnum.NextPageChange: + accountCreationViewModel.CurrentPageIndex += 1; + break; + + case AccountCreationPagingEnum.PreviousPageChange: + accountCreationViewModel.CurrentPageIndex -= 1; + break; + case AccountCreationPagingEnum.Default: + accountCreationViewModel.CurrentPageIndex = 1; + break; + } } var region = await this.regionService.GetAllPagedAsync(accountCreationViewModel.CurrentPageIndex, UserRegistrationContentPageSize); @@ -533,6 +545,11 @@ public async Task CreateAccountSubmitRegionSelection(AccountCreat } } + if (accountCreationViewModel.CountryId != null) + { + accountCreation.CountryId = accountCreationViewModel.CountryId; + } + accountCreation.RegionId = accountCreationViewModel.RegionId; await this.multiPageFormService.SetMultiPageFormData(accountCreation, MultiPageFormDataFeature.AddRegistrationPrompt, this.TempData); @@ -546,7 +563,7 @@ public async Task CreateAccountSubmitRegionSelection(AccountCreat return this.CheckConfirmationUpdate() ? this.RedirectToAction("AccountConfirmation", "LoginWizard") : this.RedirectToAction("NextStage", "LoginWizard"); } - return this.CheckConfirmationUpdate() ? this.RedirectToAction("CreateAccountConfirmation", new AccountCreationViewModel { LocationId = accountCreation.LocationId }) : this.RedirectToAction("CreateAccountSearchRole", new AccountCreationViewModel() { CountryId = accountCreation.CountryId }); + return this.CheckConfirmationUpdate() ? this.RedirectToAction("CreateAccountConfirmation", new AccountCreationViewModel { LocationId = accountCreation.LocationId }) : this.RedirectToAction("CreateAccountSearchRole", new AccountCreationViewModel() { CountryId = accountCreation.CountryId, RegionId = accountCreation.RegionId }); } /// @@ -581,7 +598,7 @@ public async Task CreateAccountCurrentRole(AccountCreationViewMod if (string.IsNullOrWhiteSpace(filterText)) { this.ModelState.AddModelError("FilterText", CommonValidationErrorMessages.SearchTermRequired); - return this.View("CreateAccountSearchRole", new AccountCreationViewModel { RegionId = accountCreation.RegionId, ReturnToConfirmation = accountCreationViewModel.ReturnToConfirmation }); + return this.View("CreateAccountSearchRole", new AccountCreationViewModel { CountryId = accountCreation.CountryId, RegionId = accountCreation.RegionId, ReturnToConfirmation = accountCreationViewModel.ReturnToConfirmation }); } } @@ -598,7 +615,7 @@ public async Task CreateAccountCurrentRole(AccountCreationViewMod else { this.ModelState.AddModelError("FilterText", CommonValidationErrorMessages.SearchTermRequired); - return this.View("CreateAccountSearchRole", new AccountCreationViewModel { RegionId = accountCreation.RegionId, ReturnToConfirmation = accountCreationViewModel.ReturnToConfirmation }); + return this.View("CreateAccountSearchRole", new AccountCreationViewModel { CountryId = accountCreation.CountryId, RegionId = accountCreation.RegionId, ReturnToConfirmation = accountCreationViewModel.ReturnToConfirmation }); } } diff --git a/LearningHub.Nhs.WebUI/Views/Account/CreateAccountSearchRole.cshtml b/LearningHub.Nhs.WebUI/Views/Account/CreateAccountSearchRole.cshtml index c8b48178e..e42fd6f45 100644 --- a/LearningHub.Nhs.WebUI/Views/Account/CreateAccountSearchRole.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Account/CreateAccountSearchRole.cshtml @@ -15,7 +15,16 @@
    - + @if (Model.CountryId == "1") + { + + + } + else + { + + + } @if (errorHasOccurred) { diff --git a/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationGradePaging.cshtml b/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationGradePaging.cshtml index 003a78163..27c856aee 100644 --- a/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationGradePaging.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationGradePaging.cshtml @@ -24,8 +24,6 @@ } } -@if (showPaging == true) -{ -} diff --git a/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationJobRolePaging.cshtml b/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationJobRolePaging.cshtml index 9232336fb..a8bc8a9ae 100644 --- a/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationJobRolePaging.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationJobRolePaging.cshtml @@ -24,8 +24,6 @@ } } -@if (showPaging == true) -{ -} - diff --git a/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationRegionPaging.cshtml b/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationRegionPaging.cshtml index 3a3ea02f8..47a4aded4 100644 --- a/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationRegionPaging.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationRegionPaging.cshtml @@ -24,8 +24,6 @@ } } -@if (showPaging == true) -{ -} diff --git a/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationSpecialtyPaging.cshtml b/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationSpecialtyPaging.cshtml index 0c5f04028..6227b3773 100644 --- a/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationSpecialtyPaging.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationSpecialtyPaging.cshtml @@ -24,8 +24,6 @@ } } -@if (showPaging == true) -{ -} diff --git a/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationWorkPlacePaging.cshtml b/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationWorkPlacePaging.cshtml index ac9518fe8..de4830446 100644 --- a/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationWorkPlacePaging.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationWorkPlacePaging.cshtml @@ -24,8 +24,6 @@ } } -@if (showPaging == true) -{ -} From 81f6fa51d9173e0b9c70270fb5dfd920476307f9 Mon Sep 17 00:00:00 2001 From: Arunima George Date: Fri, 6 Dec 2024 15:05:21 +0000 Subject: [PATCH 202/576] TD-4193: Corrected the page titles. --- .../Scripts/vuesrc/notification/notifications.vue | 2 +- .../Views/Account/CreateAccountConfirmation.cshtml | 4 ++-- LearningHub.Nhs.WebUI/Views/Bookmark/Index.cshtml | 4 ++-- LearningHub.Nhs.WebUI/Views/MyAccount/Index.cshtml | 4 ++-- LearningHub.Nhs.WebUI/Views/Notification/Index.cshtml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notifications.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notifications.vue index 8801a8eb5..15229ade7 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notifications.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notifications.vue @@ -2,7 +2,7 @@
    -

    System Notifications

    +

    System notifications

    settings @{ - ViewData["Title"] = "Confirmation"; + ViewData["Title"] = "Check your details"; var errorHasOccurred = !ViewData.ModelState.IsValid; AccountCreationTypeEnum accountCreationType = ViewBag.AccountCreationType; } @@ -19,7 +19,7 @@ { } -

    Check your details

    +

    @ViewData["Title"]

    diff --git a/LearningHub.Nhs.WebUI/Views/Bookmark/Index.cshtml b/LearningHub.Nhs.WebUI/Views/Bookmark/Index.cshtml index 95edf55ba..13cd985c2 100644 --- a/LearningHub.Nhs.WebUI/Views/Bookmark/Index.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Bookmark/Index.cshtml @@ -7,7 +7,7 @@ } @{ - ViewData["Title"] = "My bookmarks"; + ViewData["Title"] = "Bookmarked learning"; var folders = Model.Where(m => m.BookmarkTypeId == 1).ToDictionary(t => t.Id, t => t.Title); @@ -30,7 +30,7 @@
    -

    Bookmarked learning

    +

    @ViewData["Title"]

    diff --git a/LearningHub.Nhs.WebUI/Views/MyAccount/Index.cshtml b/LearningHub.Nhs.WebUI/Views/MyAccount/Index.cshtml index 502e2966d..15e78e763 100644 --- a/LearningHub.Nhs.WebUI/Views/MyAccount/Index.cshtml +++ b/LearningHub.Nhs.WebUI/Views/MyAccount/Index.cshtml @@ -1,14 +1,14 @@ @model LearningHub.Nhs.WebUI.Models.UserProfile.UserProfileSummaryViewModel @{ - ViewData["Title"] = "My Account"; + ViewData["Title"] = "My account details"; var isgeneralUser = User.IsInRole("BasicUser"); }
    -

    My account details

    +

    @ViewData["Title"]

    @if (isgeneralUser) {
    diff --git a/LearningHub.Nhs.WebUI/Views/Notification/Index.cshtml b/LearningHub.Nhs.WebUI/Views/Notification/Index.cshtml index cfa88c09c..14b3369df 100644 --- a/LearningHub.Nhs.WebUI/Views/Notification/Index.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Notification/Index.cshtml @@ -1,5 +1,5 @@ @{ - ViewData["Title"] = "Notifications"; + ViewData["Title"] = "System notifications"; }
    From 95a24a5ddb8eaa8e55a4c78e8895a29a804cf9fb Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Mon, 9 Dec 2024 09:31:29 +0000 Subject: [PATCH 203/576] TD-2396: SIT fixes for the DevId implementaion. --- .../Controllers/ResourceController.cs | 6 +++++- .../Views/Resource/Details.cshtml | 10 ++++++++-- .../Views/Resource/_DevIdDetails.cshtml | 16 ++++++++++++---- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Controllers/ResourceController.cs b/AdminUI/LearningHub.Nhs.AdminUI/Controllers/ResourceController.cs index 1a662d524..3850c2c1b 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Controllers/ResourceController.cs +++ b/AdminUI/LearningHub.Nhs.AdminUI/Controllers/ResourceController.cs @@ -164,7 +164,11 @@ public async Task GetDevIdDetails(int resourceVersionId) public async Task UpdateDevIdDetails(ResourceVersionDevIdViewModel model) { var message = string.Empty; - if (await this.resourceService.DoesDevIdExistsAsync(model.DevId)) + if (string.IsNullOrEmpty(model.DevId)) + { + message = "Enter a Dev id for the resource"; + } + else if (await this.resourceService.DoesDevIdExistsAsync(model.DevId)) { message = "Duplicate"; } diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/Details.cshtml b/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/Details.cshtml index 44b2f9b11..5c7b99069 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/Details.cshtml +++ b/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/Details.cshtml @@ -651,13 +651,19 @@ {
    -
    Successfully updated the details
    +
    Successfully added the Dev ID.
    } @if (this.ViewBag.Status == "Duplicate") {
    -
    Dev Id already exists.
    +
    Dev ID already exists.
    +
    + } + else if (this.ViewBag.Status == "Enter a Dev id for the resource") + { +
    +
    You must enter a Dev ID.
    }
    diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/_DevIdDetails.cshtml b/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/_DevIdDetails.cshtml index 7e6c5bf71..1af9e2808 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/_DevIdDetails.cshtml +++ b/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/_DevIdDetails.cshtml @@ -8,15 +8,23 @@
    - - +
    +
    +
    Dev ID:
    +
    + @Html.DisplayFor(model => model.DevId) +
    +
    +
    + +
    - -
    + +
    \ No newline at end of file From 6f201c5b2c354c63d8a5b6eebafb815db9ab382d Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Mon, 9 Dec 2024 12:29:34 +0000 Subject: [PATCH 204/576] Td-4179: DIG253: A landmark is present on the page but it has no content --- .../Views/Account/_AccountCreationGradePaging.cshtml | 5 +++-- .../Views/Account/_AccountCreationJobRolePaging.cshtml | 4 +++- .../Views/Account/_AccountCreationRegionPaging.cshtml | 4 +++- .../Views/Account/_AccountCreationSpecialtyPaging.cshtml | 4 +++- .../Views/Account/_AccountCreationWorkPlacePaging.cshtml | 4 +++- .../Views/MyAccount/_UserJobRolePaging.cshtml | 2 +- .../Views/MyAccount/_UserPrimarySpecialtyPaging.cshtml | 2 +- .../Views/MyAccount/_UserWorkPlacePaging.cshtml | 2 +- .../Views/MyLearning/_ActivityTablePaging.cshtml | 2 +- 9 files changed, 19 insertions(+), 10 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationGradePaging.cshtml b/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationGradePaging.cshtml index 27c856aee..03d66e1a2 100644 --- a/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationGradePaging.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationGradePaging.cshtml @@ -23,7 +23,8 @@ } } } - +@if(pagingModel.TotalPages >1) +{ - +} \ No newline at end of file diff --git a/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationJobRolePaging.cshtml b/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationJobRolePaging.cshtml index a8bc8a9ae..2b469af6b 100644 --- a/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationJobRolePaging.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationJobRolePaging.cshtml @@ -23,7 +23,8 @@ } } } - +@if(pagingModel.TotalPages >1) +{ +} \ No newline at end of file diff --git a/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationRegionPaging.cshtml b/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationRegionPaging.cshtml index 47a4aded4..f3f1c7506 100644 --- a/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationRegionPaging.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationRegionPaging.cshtml @@ -23,7 +23,8 @@ } } } - +@if(pagingModel.TotalPages >1) +{ +} diff --git a/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationSpecialtyPaging.cshtml b/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationSpecialtyPaging.cshtml index 6227b3773..ddeb89483 100644 --- a/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationSpecialtyPaging.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationSpecialtyPaging.cshtml @@ -23,7 +23,8 @@ } } } - +@if(pagingModel.TotalPages >1) +{ +} diff --git a/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationWorkPlacePaging.cshtml b/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationWorkPlacePaging.cshtml index de4830446..11080dada 100644 --- a/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationWorkPlacePaging.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Account/_AccountCreationWorkPlacePaging.cshtml @@ -23,7 +23,8 @@ } } } - +@if(pagingModel.TotalPages >1) +{ +} diff --git a/LearningHub.Nhs.WebUI/Views/MyAccount/_UserJobRolePaging.cshtml b/LearningHub.Nhs.WebUI/Views/MyAccount/_UserJobRolePaging.cshtml index 9f5a28e14..19ae7d819 100644 --- a/LearningHub.Nhs.WebUI/Views/MyAccount/_UserJobRolePaging.cshtml +++ b/LearningHub.Nhs.WebUI/Views/MyAccount/_UserJobRolePaging.cshtml @@ -22,7 +22,7 @@ } } -@if (showPaging == true) +@if (pagingModel.TotalPages > 1) {
    From cca8e104d38d1502205e3ca41d74112854f657ac Mon Sep 17 00:00:00 2001 From: AnjuJose011 <154979799+AnjuJose011@users.noreply.github.com> Date: Thu, 27 Feb 2025 12:58:59 +0000 Subject: [PATCH 468/576] TD-5304-Fix --- .../Scripts/vuesrc/notification/notifications.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notifications.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notifications.vue index db21937fd..0a338d282 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notifications.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notifications.vue @@ -68,8 +68,7 @@

    - - +
    From 5dcd8b058038482a2ed3e7a8ddf4c7e8fbe49508 Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Fri, 28 Feb 2025 11:34:24 +0000 Subject: [PATCH 469/576] TD-3732: Missing Security Headers --- OpenAPI/LearningHub.Nhs.OpenApi/Startup.cs | 11 +++++++++++ ReportAPI/LearningHub.Nhs.ReportApi/Program.cs | 11 +++++++++++ WebAPI/LearningHub.Nhs.API/Program.cs | 11 +++++++++++ 3 files changed, 33 insertions(+) diff --git a/OpenAPI/LearningHub.Nhs.OpenApi/Startup.cs b/OpenAPI/LearningHub.Nhs.OpenApi/Startup.cs index d9a3a757b..518b7d373 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi/Startup.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi/Startup.cs @@ -190,6 +190,17 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) c.OAuthUsePkce(); }); + app.Use(async (context, next) => + { + context.Response.Headers.Add("content-security-policy", "default-src 'self'; " + $"script-src 'self' 'nonce-random772362' https://script.hotjar.com https://www.google-analytics.com https://static.hotjar.com https://www.googletagmanager.com https://cdnjs.cloudflare.com 'unsafe-hashes' 'sha256-oywvD6W6okwID679n4cvPJtWLowSS70Pz87v1ryS0DU=' 'sha256-kbHtQyYDQKz4SWMQ8OHVol3EC0t3tHEJFPCSwNG9NxQ' 'sha256-YoDy5WvNzQHMq2kYTFhDYiGnEgPrvAY5Il6eUu/P4xY=' 'sha256-/n13APBYdqlQW71ZpWflMB/QoXNSUKDxZk1rgZc+Jz8=' 'sha256-+6WnXIl4mbFTCARd8N3COQmT3bJJmo32N8q8ZSQAIcU=' 'sha256-VQKp2qxuvQmMpqE/U/ASQ0ZQ0pIDvC3dgQPPCqDlvBo=';" + "style-src 'self' 'unsafe-inline' https://use.fontawesome.com; " + "font-src https://script.hotjar.com https://assets.nhs.uk/; " + "connect-src 'self' http: ws:; " + "img-src 'self' data: https:; " + "frame-src 'self' https:"); + context.Response.Headers.Add("Referrer-Policy", "no-referrer"); + context.Response.Headers.Add("Strict-Transport-Security", "max-age=31536000; includeSubDomains"); + context.Response.Headers.Add("X-Content-Type-Options", "nosniff"); + context.Response.Headers.Add("X-Frame-Options", "deny"); + context.Response.Headers.Add("X-XSS-protection", "0"); + await next(); + }); + app.UseHttpsRedirection(); app.UseRouting(); diff --git a/ReportAPI/LearningHub.Nhs.ReportApi/Program.cs b/ReportAPI/LearningHub.Nhs.ReportApi/Program.cs index d3de44e97..20111f0e3 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi/Program.cs +++ b/ReportAPI/LearningHub.Nhs.ReportApi/Program.cs @@ -20,6 +20,17 @@ var app = builder.Build(); + app.Use(async (context, next) => + { + context.Response.Headers.Add("content-security-policy", "default-src 'self'; " + $"script-src 'self' 'nonce-random772362' https://script.hotjar.com https://www.google-analytics.com https://static.hotjar.com https://www.googletagmanager.com https://cdnjs.cloudflare.com 'unsafe-hashes' 'sha256-oywvD6W6okwID679n4cvPJtWLowSS70Pz87v1ryS0DU=' 'sha256-kbHtQyYDQKz4SWMQ8OHVol3EC0t3tHEJFPCSwNG9NxQ' 'sha256-YoDy5WvNzQHMq2kYTFhDYiGnEgPrvAY5Il6eUu/P4xY=' 'sha256-/n13APBYdqlQW71ZpWflMB/QoXNSUKDxZk1rgZc+Jz8=' 'sha256-+6WnXIl4mbFTCARd8N3COQmT3bJJmo32N8q8ZSQAIcU=' 'sha256-VQKp2qxuvQmMpqE/U/ASQ0ZQ0pIDvC3dgQPPCqDlvBo=';" + "style-src 'self' 'unsafe-inline' https://use.fontawesome.com; " + "font-src https://script.hotjar.com https://assets.nhs.uk/; " + "connect-src 'self' http: ws:; " + "img-src 'self' data: https:; " + "frame-src 'self' https:"); + context.Response.Headers.Add("Referrer-Policy", "no-referrer"); + context.Response.Headers.Add("Strict-Transport-Security", "max-age=31536000; includeSubDomains"); + context.Response.Headers.Add("X-Content-Type-Options", "nosniff"); + context.Response.Headers.Add("X-Frame-Options", "deny"); + context.Response.Headers.Add("X-XSS-protection", "0"); + await next(); + }); + app.UseRouting(); app.UseAuthorization(); diff --git a/WebAPI/LearningHub.Nhs.API/Program.cs b/WebAPI/LearningHub.Nhs.API/Program.cs index 1bf33805f..103202673 100644 --- a/WebAPI/LearningHub.Nhs.API/Program.cs +++ b/WebAPI/LearningHub.Nhs.API/Program.cs @@ -38,6 +38,17 @@ app.UseMiddleware(); + app.Use(async (context, next) => + { + context.Response.Headers.Add("content-security-policy", "default-src 'self'; " + $"script-src 'self' 'nonce-random772362' https://script.hotjar.com https://www.google-analytics.com https://static.hotjar.com https://www.googletagmanager.com https://cdnjs.cloudflare.com 'unsafe-hashes' 'sha256-oywvD6W6okwID679n4cvPJtWLowSS70Pz87v1ryS0DU=' 'sha256-kbHtQyYDQKz4SWMQ8OHVol3EC0t3tHEJFPCSwNG9NxQ' 'sha256-YoDy5WvNzQHMq2kYTFhDYiGnEgPrvAY5Il6eUu/P4xY=' 'sha256-/n13APBYdqlQW71ZpWflMB/QoXNSUKDxZk1rgZc+Jz8=' 'sha256-+6WnXIl4mbFTCARd8N3COQmT3bJJmo32N8q8ZSQAIcU=' 'sha256-VQKp2qxuvQmMpqE/U/ASQ0ZQ0pIDvC3dgQPPCqDlvBo=';" + "style-src 'self' 'unsafe-inline' https://use.fontawesome.com; " + "font-src https://script.hotjar.com https://assets.nhs.uk/; " + "connect-src 'self' http: ws:; " + "img-src 'self' data: https:; " + "frame-src 'self' https:"); + context.Response.Headers.Add("Referrer-Policy", "no-referrer"); + context.Response.Headers.Add("Strict-Transport-Security", "max-age=31536000; includeSubDomains"); + context.Response.Headers.Add("X-Content-Type-Options", "nosniff"); + context.Response.Headers.Add("X-Frame-Options", "deny"); + context.Response.Headers.Add("X-XSS-protection", "0"); + await next(); + }); + app.UseEndpoints(endpoints => endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}")); app.Run(); From f38fc15e1b6af417252c73248ff789d09f7fc77f Mon Sep 17 00:00:00 2001 From: Arunima George Date: Fri, 28 Feb 2025 15:00:32 +0000 Subject: [PATCH 470/576] TD-5001: Word support placement --- .../Update LH email content.sql | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/WebAPI/LearningHub.Nhs.Database/Scripts/ELFH Database Scripts/Update LH email content.sql b/WebAPI/LearningHub.Nhs.Database/Scripts/ELFH Database Scripts/Update LH email content.sql index 7715d73bc..02425a833 100644 --- a/WebAPI/LearningHub.Nhs.Database/Scripts/ELFH Database Scripts/Update LH email content.sql +++ b/WebAPI/LearningHub.Nhs.Database/Scripts/ELFH Database Scripts/Update LH email content.sql @@ -28,7 +28,7 @@ Note that this link has a time limit of [TimeLimit]. If you select the link afte To log in at any other time go to [TenantUrl], enter your username and password and select the Sign in button.

    When you first log in you will be guided through a series of steps to complete your registration. Providing correct information means that we can offer you a better learning experience.

    Please do not reply to this email.

    -
    1. For more information on how to log in, access learning resources and contribute resources, visit the Learning Hub Support pages.
    2. If you have any problems or further questions, contact us using the following Support Form.
    3. You can also use our Live Chat service which will connect you to the Support team. Look for the Live Chat icon in the bottom right of your browser when you visit the Learning Hub.
    Thanks again for creating an account and we hope you enjoy your learning experience.

    +For support:
    • Visit the Support pages for login guidance, learning resources, and contribution options.
    • If you have any issues or questions, contact us via the Support Form.
    • Use Live Chat (look for the icon in the bottom right of your browser) to connect directly with the Support Team.
    Thank you for registering, we hope you enjoy your learning experience.

    The Learning Hub Support Team
    NHS England

    This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received.

    @@ -47,9 +47,7 @@ In the unlikely event that selecting the above link does not work, please copy a Note that this link has a time limit of [TimeLimit]. If you select the link after this time you will receive instructions on how to generate a new one.

    Once you have reset your password you will be given a link to log in with your new password.

    Please do not reply to this email.

    -
    1. For more information on how to log in, access learning resources and contribute resources, visit the Learning Hub Support pages.
    2. -
    3. If you have any problems or further questions, contact us using the following Support Form.
    4. -
    5. You can also use our Live Chat service which will connect you to the Support team. Look for the Live Chat icon in the bottom right of your browser when you visit the Learning Hub.
    +For support:
    • Visit the Support pages for login guidance, learning resources, and contribution options.
    • If you have any issues or questions, contact us via the Support Form.
    • Use Live Chat (look for the icon in the bottom right of your browser) to connect directly with the Support Team.
    We hope you enjoy your learning experience.

    The Learning Hub Support Team
    NHS England

    This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received.

    @@ -66,10 +64,8 @@ We received a request to retrieve your username for the Learning Hub.

    If this was not you, contact us using the following Support Form.

    The username registered to this email address is: [UserName]

    If you know your password, you can log in straight away or do you need a password reminder password reminder?

    -Please do not reply to this email.

      -
    1. For more information on how to log in, access learning resources and contribute resources, visit the Learning Hub Support pages.
    2. -
    3. If you have any problems or further questions, contact us using the following Support Form.
    4. -
    5. You can also use our Live Chat service which will connect you to the Support team. Look for the Live Chat icon in the bottom right of your browser when you visit the Learning Hub.
    +Please do not reply to this email.

    +For support:
    • Visit the Support pages for login guidance, learning resources, and contribution options.
    • If you have any issues or questions, contact us via the Support Form.
    • Use Live Chat (look for the icon in the bottom right of your browser) to connect directly with the Support Team.
    We hope you enjoy your learning experience.

    The Learning Hub Support Team
    NHS England

    From b79cf5bbc57d059d0a91c4897212fc341741d281 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 09:38:10 +0000 Subject: [PATCH 471/576] Bump @types/lodash in /AdminUI/LearningHub.Nhs.AdminUI (#1013) Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.17.15 to 4.17.16. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash) --- updated-dependencies: - dependency-name: "@types/lodash" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- AdminUI/LearningHub.Nhs.AdminUI/package-lock.json | 8 ++++---- AdminUI/LearningHub.Nhs.AdminUI/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json b/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json index 7a76a3553..6bda526bb 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json +++ b/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json @@ -49,7 +49,7 @@ "@types/jquery": "^3.3.32", "@types/jquery-match-height": "^0.7.8", "@types/js-cookie": "2.2.1", - "@types/lodash": "4.17.15", + "@types/lodash": "4.17.16", "@types/openseadragon": "^2.4.5", "@types/sanitize-html": "^2.13.0", "@types/vuelidate": "^0.7.22", @@ -3955,9 +3955,9 @@ "dev": true }, "node_modules/@types/lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-w/P33JFeySuhN6JLkysYUK2gEmy9kHHFN7E8ro0tkfmlDOgxBDzWEZ/J8cWA+fHqFevpswDTFZnDx+R9lbL6xw==", + "version": "4.17.16", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.16.tgz", + "integrity": "sha512-HX7Em5NYQAXKW+1T+FiuG27NGwzJfCX3s1GjOa7ujxZa52kjJLOr4FUxT+giF6Tgxv1e+/czV/iTtBw27WTU9g==", "dev": true, "license": "MIT" }, diff --git a/AdminUI/LearningHub.Nhs.AdminUI/package.json b/AdminUI/LearningHub.Nhs.AdminUI/package.json index ae36244f0..f36235a04 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/package.json +++ b/AdminUI/LearningHub.Nhs.AdminUI/package.json @@ -61,7 +61,7 @@ "@types/jquery": "^3.3.32", "@types/jquery-match-height": "^0.7.8", "@types/js-cookie": "2.2.1", - "@types/lodash": "4.17.15", + "@types/lodash": "4.17.16", "@types/openseadragon": "^2.4.5", "@types/sanitize-html": "^2.13.0", "@types/vuelidate": "^0.7.22", From e73bdf9f45c697681723fbf5919258153e29ec60 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 09:39:09 +0000 Subject: [PATCH 472/576] Bump core-js from 3.40.0 to 3.41.0 in /AdminUI/LearningHub.Nhs.AdminUI (#1012) Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.40.0 to 3.41.0. - [Release notes](https://github.com/zloirock/core-js/releases) - [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/zloirock/core-js/commits/v3.41.0/packages/core-js) --- updated-dependencies: - dependency-name: core-js dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- AdminUI/LearningHub.Nhs.AdminUI/package-lock.json | 9 +++++---- AdminUI/LearningHub.Nhs.AdminUI/package.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json b/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json index 6bda526bb..21a362d26 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json +++ b/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json @@ -16,7 +16,7 @@ "bootstrap": "^4.6.2", "ckeditor4-vue": "^0.2.0", "concurrently": "^7.6.0", - "core-js": "^3.40.0", + "core-js": "^3.41.0", "js-cookie": "2.2.1", "lodash": "4.17.21", "moment": "^2.30.1", @@ -7287,10 +7287,11 @@ } }, "node_modules/core-js": { - "version": "3.40.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.40.0.tgz", - "integrity": "sha512-7vsMc/Lty6AGnn7uFpYT56QesI5D2Y/UkgKounk87OP9Z2H9Z8kj6jzcSGAxFmUtDOS0ntK6lbQz+Nsa0Jj6mQ==", + "version": "3.41.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.41.0.tgz", + "integrity": "sha512-SJ4/EHwS36QMJd6h/Rg+GyR4A5xE0FSI3eZ+iBVpfqf1x0eTSg1smWLHrA+2jQThZSh97fmSgFSU8B61nxosxA==", "hasInstallScript": true, + "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/core-js" diff --git a/AdminUI/LearningHub.Nhs.AdminUI/package.json b/AdminUI/LearningHub.Nhs.AdminUI/package.json index f36235a04..2b5f1780e 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/package.json +++ b/AdminUI/LearningHub.Nhs.AdminUI/package.json @@ -28,7 +28,7 @@ "bootstrap": "^4.6.2", "ckeditor4-vue": "^0.2.0", "concurrently": "^7.6.0", - "core-js": "^3.40.0", + "core-js": "^3.41.0", "js-cookie": "2.2.1", "lodash": "4.17.21", "moment": "^2.30.1", From faabfb5ef8712bf77778c446815260655dfcb587 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 09:42:15 +0000 Subject: [PATCH 473/576] Bump @types/lodash from 4.17.15 to 4.17.16 in /LearningHub.Nhs.WebUI (#1014) Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.17.15 to 4.17.16. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash) --- updated-dependencies: - dependency-name: "@types/lodash" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- LearningHub.Nhs.WebUI/package-lock.json | 8 ++++---- LearningHub.Nhs.WebUI/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/LearningHub.Nhs.WebUI/package-lock.json b/LearningHub.Nhs.WebUI/package-lock.json index b629f63e4..ef1c89eb0 100644 --- a/LearningHub.Nhs.WebUI/package-lock.json +++ b/LearningHub.Nhs.WebUI/package-lock.json @@ -53,7 +53,7 @@ "@types/jquery": "^3.3.32", "@types/jquery-match-height": "^0.7.8", "@types/js-cookie": "2.2.1", - "@types/lodash": "4.17.15", + "@types/lodash": "4.17.16", "@types/openseadragon": "^2.4.5", "@types/sanitize-html": "^2.13.0", "@types/vuelidate": "^0.7.22", @@ -4622,9 +4622,9 @@ "license": "MIT" }, "node_modules/@types/lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-w/P33JFeySuhN6JLkysYUK2gEmy9kHHFN7E8ro0tkfmlDOgxBDzWEZ/J8cWA+fHqFevpswDTFZnDx+R9lbL6xw==", + "version": "4.17.16", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.16.tgz", + "integrity": "sha512-HX7Em5NYQAXKW+1T+FiuG27NGwzJfCX3s1GjOa7ujxZa52kjJLOr4FUxT+giF6Tgxv1e+/czV/iTtBw27WTU9g==", "dev": true, "license": "MIT" }, diff --git a/LearningHub.Nhs.WebUI/package.json b/LearningHub.Nhs.WebUI/package.json index 8e98c4b2c..4440690e2 100644 --- a/LearningHub.Nhs.WebUI/package.json +++ b/LearningHub.Nhs.WebUI/package.json @@ -65,7 +65,7 @@ "@types/jquery": "^3.3.32", "@types/jquery-match-height": "^0.7.8", "@types/js-cookie": "2.2.1", - "@types/lodash": "4.17.15", + "@types/lodash": "4.17.16", "@types/openseadragon": "^2.4.5", "@types/sanitize-html": "^2.13.0", "@types/vuelidate": "^0.7.22", From 80b14af4facb8320ec9e685c4938e1482bafeac4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 09:43:12 +0000 Subject: [PATCH 474/576] Bump core-js from 3.40.0 to 3.41.0 in /LearningHub.Nhs.WebUI (#1015) Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.40.0 to 3.41.0. - [Release notes](https://github.com/zloirock/core-js/releases) - [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/zloirock/core-js/commits/v3.41.0/packages/core-js) --- updated-dependencies: - dependency-name: core-js dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- LearningHub.Nhs.WebUI/package-lock.json | 9 +++++---- LearningHub.Nhs.WebUI/package.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/LearningHub.Nhs.WebUI/package-lock.json b/LearningHub.Nhs.WebUI/package-lock.json index ef1c89eb0..7c8e916ad 100644 --- a/LearningHub.Nhs.WebUI/package-lock.json +++ b/LearningHub.Nhs.WebUI/package-lock.json @@ -17,7 +17,7 @@ "bootstrap": "^4.6.2", "ckeditor4-vue": "^0.2.0", "concurrently": "^7.6.0", - "core-js": "^3.40.0", + "core-js": "^3.41.0", "js-cookie": "2.2.1", "lodash": "4.17.21", "moment": "^2.30.1", @@ -7857,10 +7857,11 @@ } }, "node_modules/core-js": { - "version": "3.40.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.40.0.tgz", - "integrity": "sha512-7vsMc/Lty6AGnn7uFpYT56QesI5D2Y/UkgKounk87OP9Z2H9Z8kj6jzcSGAxFmUtDOS0ntK6lbQz+Nsa0Jj6mQ==", + "version": "3.41.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.41.0.tgz", + "integrity": "sha512-SJ4/EHwS36QMJd6h/Rg+GyR4A5xE0FSI3eZ+iBVpfqf1x0eTSg1smWLHrA+2jQThZSh97fmSgFSU8B61nxosxA==", "hasInstallScript": true, + "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/core-js" diff --git a/LearningHub.Nhs.WebUI/package.json b/LearningHub.Nhs.WebUI/package.json index 4440690e2..0ccc3d885 100644 --- a/LearningHub.Nhs.WebUI/package.json +++ b/LearningHub.Nhs.WebUI/package.json @@ -29,7 +29,7 @@ "bootstrap": "^4.6.2", "ckeditor4-vue": "^0.2.0", "concurrently": "^7.6.0", - "core-js": "^3.40.0", + "core-js": "^3.41.0", "js-cookie": "2.2.1", "lodash": "4.17.21", "moment": "^2.30.1", From cfd477296ce9196560e6121419f2249b149e253d Mon Sep 17 00:00:00 2001 From: AnjuJose011 <154979799+AnjuJose011@users.noreply.github.com> Date: Mon, 3 Mar 2025 13:53:16 +0000 Subject: [PATCH 475/576] fixes --- .../ELFH Database Scripts/Update LH email content.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WebAPI/LearningHub.Nhs.Database/Scripts/ELFH Database Scripts/Update LH email content.sql b/WebAPI/LearningHub.Nhs.Database/Scripts/ELFH Database Scripts/Update LH email content.sql index 02425a833..7d7050d02 100644 --- a/WebAPI/LearningHub.Nhs.Database/Scripts/ELFH Database Scripts/Update LH email content.sql +++ b/WebAPI/LearningHub.Nhs.Database/Scripts/ELFH Database Scripts/Update LH email content.sql @@ -28,7 +28,7 @@ Note that this link has a time limit of [TimeLimit]. If you select the link afte To log in at any other time go to [TenantUrl], enter your username and password and select the Sign in button.

    When you first log in you will be guided through a series of steps to complete your registration. Providing correct information means that we can offer you a better learning experience.

    Please do not reply to this email.

    -For support:
    • Visit the Support pages for login guidance, learning resources, and contribution options.
    • If you have any issues or questions, contact us via the Support Form.
    • Use Live Chat (look for the icon in the bottom right of your browser) to connect directly with the Support Team.
    Thank you for registering, we hope you enjoy your learning experience.

    +For support:
    • Visit the Support pages for login guidance, learning resources, and contribution options.
    • If you have any issues or questions, contact us via the Support Form.
    • Use Live Chat (look for the icon in the bottom right of your browser) to connect directly with the Support Team.
    Thank you for registering, we hope you enjoy your learning experience.

    The Learning Hub Support Team
    NHS England

    This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received.

    @@ -47,7 +47,7 @@ In the unlikely event that selecting the above link does not work, please copy a Note that this link has a time limit of [TimeLimit]. If you select the link after this time you will receive instructions on how to generate a new one.

    Once you have reset your password you will be given a link to log in with your new password.

    Please do not reply to this email.

    -For support:
    • Visit the Support pages for login guidance, learning resources, and contribution options.
    • If you have any issues or questions, contact us via the Support Form.
    • Use Live Chat (look for the icon in the bottom right of your browser) to connect directly with the Support Team.
    +For support:
    • Visit the Support pages for login guidance, learning resources, and contribution options.
    • If you have any issues or questions, contact us via the Support Form.
    • Use Live Chat (look for the icon in the bottom right of your browser) to connect directly with the Support Team.
    We hope you enjoy your learning experience.

    The Learning Hub Support Team
    NHS England

    This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received.

    @@ -65,7 +65,7 @@ If this was not you, contact us using the following S The username registered to this email address is: [UserName]

    If you know your password, you can log in straight away or do you need a
    password reminder password reminder?

    Please do not reply to this email.

    -For support:
    • Visit the Support pages for login guidance, learning resources, and contribution options.
    • If you have any issues or questions, contact us via the Support Form.
    • Use Live Chat (look for the icon in the bottom right of your browser) to connect directly with the Support Team.
    +For support:
    • Visit the Support pages for login guidance, learning resources, and contribution options.
    • If you have any issues or questions, contact us via the Support Form.
    • Use Live Chat (look for the icon in the bottom right of your browser) to connect directly with the Support Team.
    We hope you enjoy your learning experience.

    The Learning Hub Support Team
    NHS England

    From 3721852aa6482c157cd5f476b7cbc7a147faca31 Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Mon, 3 Mar 2025 14:28:30 +0000 Subject: [PATCH 476/576] TD-3730: error Screen modified --- LearningHub.Nhs.WebUI/Controllers/HomeController.cs | 11 +++++++++-- .../Views/Shared/TooManyRequests.cshtml | 13 ++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Controllers/HomeController.cs b/LearningHub.Nhs.WebUI/Controllers/HomeController.cs index 5b28dd9d7..ea18e6cd4 100644 --- a/LearningHub.Nhs.WebUI/Controllers/HomeController.cs +++ b/LearningHub.Nhs.WebUI/Controllers/HomeController.cs @@ -15,13 +15,13 @@ namespace LearningHub.Nhs.WebUI.Controllers using LearningHub.Nhs.WebUI.Helpers; using LearningHub.Nhs.WebUI.Interfaces; using LearningHub.Nhs.WebUI.Models; - using Microsoft.ApplicationInsights.AspNetCore; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication.Cookies; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Diagnostics; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; + using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.FeatureManagement; @@ -39,6 +39,7 @@ public class HomeController : BaseController private readonly IDashboardService dashboardService; private readonly IContentService contentService; private readonly IFeatureManager featureManager; + private readonly Microsoft.Extensions.Configuration.IConfiguration configuration; /// /// Initializes a new instance of the class. @@ -53,6 +54,7 @@ public class HomeController : BaseController /// Dashboard service. /// Content service. /// featureManager. + /// config. public HomeController( IHttpClientFactory httpClientFactory, IWebHostEnvironment hostingEnvironment, @@ -63,7 +65,8 @@ public HomeController( LearningHubAuthServiceConfig authConfig, IDashboardService dashboardService, IContentService contentService, - IFeatureManager featureManager) + IFeatureManager featureManager, + Microsoft.Extensions.Configuration.IConfiguration configuration) : base(hostingEnvironment, httpClientFactory, logger, settings.Value) { this.authConfig = authConfig; @@ -72,6 +75,7 @@ public HomeController( this.dashboardService = dashboardService; this.contentService = contentService; this.featureManager = featureManager; + this.configuration = configuration; } /// @@ -168,6 +172,9 @@ public IActionResult Error(int? httpStatusCode) { if (originalPath == "/TooManyRequests") { + this.ViewBag.Period = this.configuration["IpRateLimiting:GeneralRules:0:Period"]; + this.ViewBag.Limit = this.configuration["IpRateLimiting:GeneralRules:0:Limit"]; + return this.View("TooManyRequests"); } else diff --git a/LearningHub.Nhs.WebUI/Views/Shared/TooManyRequests.cshtml b/LearningHub.Nhs.WebUI/Views/Shared/TooManyRequests.cshtml index 0abe33b6c..b0b967408 100644 --- a/LearningHub.Nhs.WebUI/Views/Shared/TooManyRequests.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Shared/TooManyRequests.cshtml @@ -1,13 +1,20 @@ @{ - ViewData["Title"] = "Too many requests"; + ViewData["Title"] = "Reset limit reached"; + // Get the value from ViewBag + var period = ViewBag.Period.ToString(); + + // Remove the last character (if the string is not empty) + if (!string.IsNullOrEmpty(period) && period.Length > 0) + { + period = period.Substring(0, period.Length - 1); + } }

    @ViewData["Title"]

    -

    Too many requests have been made.

    -

    If you need help, please contact the support team.

    +

    You've requested the maximum number of password resets (@ViewBag.Limit). Please wait @period minutes before trying again or contact the support team.

    @DateTimeOffset.Now.ToString("d MMMM yyyy HH:mm:ss")

    From e59c9d3322e10e2a1aa23201867852ca31cf0e7e Mon Sep 17 00:00:00 2001 From: OluwatobiAwe Date: Tue, 4 Mar 2025 10:34:12 +0000 Subject: [PATCH 477/576] removal of unnecessary using references --- .../Repositories/IProviderRepository.cs | 2 -- .../Repositories/Resources/IBlockCollectionRepository.cs | 1 - .../Resources/IGenericFileResourceVersionRepository.cs | 1 - .../Repositories/ResourceRepository.cs | 3 --- .../Services/IResourceService.cs | 1 - .../Services/CatalogueService.cs | 1 - .../Services/Findwise/FindwiseApiFacade.cs | 1 - .../LearningHub.Nhs.OpenApi.Services/Services/SearchService.cs | 1 - .../LearningHub.Nhs.OpenApi.Services/Services/UserService.cs | 1 - .../LearningHub.Nhs.OpenApi/Controllers/ResourceController.cs | 1 - 10 files changed, 13 deletions(-) diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/Repositories/IProviderRepository.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/Repositories/IProviderRepository.cs index 2c797be4f..3e3e5ed7d 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/Repositories/IProviderRepository.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/Repositories/IProviderRepository.cs @@ -1,10 +1,8 @@ namespace LearningHub.Nhs.OpenApi.Repositories.Interface.Repositories { - using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using LearningHub.Nhs.Models.Entities; - using LearningHub.Nhs.Models.Entities.Resource; /// /// The ProviderRepository interface. diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/Repositories/Resources/IBlockCollectionRepository.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/Repositories/Resources/IBlockCollectionRepository.cs index 33762762b..cadadd20b 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/Repositories/Resources/IBlockCollectionRepository.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/Repositories/Resources/IBlockCollectionRepository.cs @@ -1,6 +1,5 @@ namespace LearningHub.Nhs.OpenApi.Repositories.Interface.Repositories.Resources { - using System; using System.Collections.Generic; using System.Threading.Tasks; using LearningHub.Nhs.Models.Entities.Resource.Blocks; diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/Repositories/Resources/IGenericFileResourceVersionRepository.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/Repositories/Resources/IGenericFileResourceVersionRepository.cs index e4e449b9d..28eabdede 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/Repositories/Resources/IGenericFileResourceVersionRepository.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/Repositories/Resources/IGenericFileResourceVersionRepository.cs @@ -2,7 +2,6 @@ { using System.Threading.Tasks; using LearningHub.Nhs.Models.Entities.Resource; - using LearningHub.Nhs.Models.Resource; /// /// The GenericFileResourceVersionRepository interface. diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/Repositories/ResourceRepository.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/Repositories/ResourceRepository.cs index 83fd0884a..35547fd4f 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/Repositories/ResourceRepository.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/Repositories/ResourceRepository.cs @@ -2,12 +2,9 @@ namespace LearningHub.Nhs.OpenApi.Repositories.Repositories { using System; using System.Collections.Generic; - using System.ComponentModel; using System.Data; using System.Linq; using System.Threading.Tasks; - using LearningHub.Nhs.Models.Dashboard; - using LearningHub.Nhs.Models.Entities; using LearningHub.Nhs.Models.Entities.Activity; using LearningHub.Nhs.Models.Entities.Resource; using LearningHub.Nhs.Models.Enums; diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/Services/IResourceService.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/Services/IResourceService.cs index 9bddc3141..6c0b59eb8 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/Services/IResourceService.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/Services/IResourceService.cs @@ -2,7 +2,6 @@ namespace LearningHub.Nhs.OpenApi.Services.Interface.Services { using System.Collections.Generic; using System.Threading.Tasks; - using LearningHub.Nhs.Models.Content; using LearningHub.Nhs.Models.Entities.Resource; using LearningHub.Nhs.Models.Resource; using LearningHub.Nhs.Models.Resource.Contribute; diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/CatalogueService.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/CatalogueService.cs index aa4987c6e..158f94e23 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/CatalogueService.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/CatalogueService.cs @@ -17,7 +17,6 @@ using LearningHub.Nhs.Models.Search; using LearningHub.Nhs.Models.Validation; using LearningHub.Nhs.OpenApi.Models.Configuration; - // using LearningHub.Nhs.OpenApi.Models.ViewModels; using LearningHub.Nhs.OpenApi.Repositories.Interface.Repositories; using LearningHub.Nhs.OpenApi.Repositories.Interface.Repositories.Activity; using LearningHub.Nhs.OpenApi.Repositories.Interface.Repositories.Hierarchy; diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/Findwise/FindwiseApiFacade.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/Findwise/FindwiseApiFacade.cs index e6d1439ec..139c9e41c 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/Findwise/FindwiseApiFacade.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/Findwise/FindwiseApiFacade.cs @@ -8,7 +8,6 @@ using System.Threading.Tasks; using LearningHub.Nhs.Models.Search; using LearningHub.Nhs.OpenApi.Models.Configuration; - using LearningHub.Nhs.OpenApi.Services.HttpClients; using LearningHub.Nhs.OpenApi.Services.Interface.HttpClients; using LearningHub.Nhs.OpenApi.Services.Interface.Services; using Microsoft.Extensions.Logging; diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/SearchService.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/SearchService.cs index 12cd36e4e..bd1f14a07 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/SearchService.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/SearchService.cs @@ -7,7 +7,6 @@ namespace LearningHub.Nhs.OpenApi.Services.Services using System.Web; using LearningHub.Nhs.Models.Entities.Activity; using LearningHub.Nhs.Models.Entities.Resource; - using LearningHub.Nhs.Models.Resource; using LearningHub.Nhs.Models.Search; using LearningHub.Nhs.Models.ViewModels.Helpers; using LearningHub.Nhs.OpenApi.Models.Configuration; diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/UserService.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/UserService.cs index 09255e8eb..70153fd24 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/UserService.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/UserService.cs @@ -5,7 +5,6 @@ using System.Threading.Tasks; using AutoMapper; using LearningHub.Nhs.Models.Common; - using LearningHub.Nhs.Models.Common.Interfaces; using LearningHub.Nhs.Models.Constants; using LearningHub.Nhs.Models.Entities; using LearningHub.Nhs.Models.Enums; diff --git a/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/ResourceController.cs b/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/ResourceController.cs index 12e44d4da..9efd333aa 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/ResourceController.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/ResourceController.cs @@ -1,7 +1,6 @@ namespace LearningHub.NHS.OpenAPI.Controllers { using System; - using System.Collections; using System.Collections.Generic; using System.Linq; using System.Net; From 79c4f006c17d2e1f6c96dc6ead4c24c6dabac748 Mon Sep 17 00:00:00 2001 From: OluwatobiAwe Date: Tue, 4 Mar 2025 12:51:07 +0000 Subject: [PATCH 478/576] resolve conflict --- .../LearningHub.Nhs.OpenApi.Services.Interface.csproj | 2 +- .../LearningHub.Nhs.OpenApi.Services.csproj | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj index 1f82b6ebf..a638b299a 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj @@ -17,7 +17,7 @@ - + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj index 3e884bc9d..73791a171 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj @@ -25,17 +25,17 @@ - + - - - + + + - + From 8425a8b113c802dc088c9b9c2e40ed1e0e6f36bf Mon Sep 17 00:00:00 2001 From: OluwatobiAwe Date: Tue, 4 Mar 2025 14:03:29 +0000 Subject: [PATCH 479/576] addition of LearningHubTenantId value as it is in the API project --- OpenAPI/LearningHub.Nhs.OpenApi/appsettings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenAPI/LearningHub.Nhs.OpenApi/appsettings.json b/OpenAPI/LearningHub.Nhs.OpenApi/appsettings.json index 13658ec61..92f23e650 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi/appsettings.json +++ b/OpenAPI/LearningHub.Nhs.OpenApi/appsettings.json @@ -65,7 +65,7 @@ "ContentServerUrl": "https://content.learninghub.nhs.uk/", "LaunchResourceEndpoint": "Resource/", "EmailConfirmationTokenExpiryMinutes": 30, - "LearningHubTenantId": "", + "LearningHubTenantId": "10", "SupportPages": "https://support.learninghub.nhs.uk/", "SupportForm": "https://support.learninghub.nhs.uk/support/tickets/new", "UseRedisCache": true, From dfd7ff22455c7d4f1e2a420b7393beac9848da20 Mon Sep 17 00:00:00 2001 From: OluwatobiAwe Date: Tue, 4 Mar 2025 14:35:50 +0000 Subject: [PATCH 480/576] package update --- .../LearningHub.Nhs.OpenApi.Services.csproj | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj index e7d2147af..0826cefa5 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj @@ -26,14 +26,14 @@ - - - - + + + + - + From e368fc952a2fe44815badd97a6c5f09d9a46dc4f Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Wed, 5 Mar 2025 11:32:00 +0000 Subject: [PATCH 481/576] TD-3731: Invalidated Current User Session on Password Change. --- .../Controllers/HomeController.cs | 31 +++++++++++++++---- .../Controllers/MyAccountController.cs | 13 +++++--- .../Home/ChangePasswordAcknowledgement.cshtml | 24 ++++++++++++++ 3 files changed, 58 insertions(+), 10 deletions(-) create mode 100644 LearningHub.Nhs.WebUI/Views/Home/ChangePasswordAcknowledgement.cshtml diff --git a/LearningHub.Nhs.WebUI/Controllers/HomeController.cs b/LearningHub.Nhs.WebUI/Controllers/HomeController.cs index ea18e6cd4..51d6be9db 100644 --- a/LearningHub.Nhs.WebUI/Controllers/HomeController.cs +++ b/LearningHub.Nhs.WebUI/Controllers/HomeController.cs @@ -335,14 +335,19 @@ public IActionResult NhsSites() } /// - /// The Logout. - /// This is directly referenced in the LoginWizardFilter to allow - /// logouts to bypass LoginWizard redirects. - /// If the name is changed, the LoginWizardFilter MUST be updated. + /// The ChangePasswordAcknowledgement. /// /// The . - [AllowAnonymous] - public IActionResult Logout() + public IActionResult ChangePasswordAcknowledgement() + { + return this.View(); + } + + /// + /// StatusUpdate. + /// + /// Actionresult. + public IActionResult UserLogout() { if (!(this.User?.Identity.IsAuthenticated ?? false)) { @@ -352,6 +357,20 @@ public IActionResult Logout() return new SignOutResult(new[] { CookieAuthenticationDefaults.AuthenticationScheme, "oidc" }); } + /// + /// The Logout. + /// This is directly referenced in the LoginWizardFilter to allow + /// logouts to bypass LoginWizard redirects. + /// If the name is changed, the LoginWizardFilter MUST be updated. + /// + /// The . + [AllowAnonymous] + public IActionResult Logout() + { + var redirectUri = $"{this.configuration["LearningHubAuthServiceConfig:Authority"]}/Home/SetIsPasswordUpdate?isLogout=true"; + return this.Redirect(redirectUri); + } + /// /// The SessionTimeout. /// diff --git a/LearningHub.Nhs.WebUI/Controllers/MyAccountController.cs b/LearningHub.Nhs.WebUI/Controllers/MyAccountController.cs index 4494d9463..8711dd817 100644 --- a/LearningHub.Nhs.WebUI/Controllers/MyAccountController.cs +++ b/LearningHub.Nhs.WebUI/Controllers/MyAccountController.cs @@ -21,10 +21,12 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Routing; + using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using NHSUKViewComponents.Web.ViewModels; using ChangePasswordViewModel = LearningHub.Nhs.WebUI.Models.UserProfile.ChangePasswordViewModel; + using IConfiguration = Microsoft.Extensions.Configuration.IConfiguration; /// /// The UserController. @@ -43,6 +45,7 @@ public partial class MyAccountController : BaseController private readonly ISpecialtyService specialtyService; private readonly ILocationService locationService; private readonly ICacheService cacheService; + private readonly IConfiguration configuration; /// /// Initializes a new instance of the class. @@ -61,6 +64,7 @@ public partial class MyAccountController : BaseController /// The locationService. /// The multiPageFormService. /// The cacheService. + /// The cacheService. public MyAccountController( IWebHostEnvironment hostingEnvironment, ILogger logger, @@ -75,7 +79,8 @@ public MyAccountController( ISpecialtyService specialtyService, ILocationService locationService, IMultiPageFormService multiPageFormService, - ICacheService cacheService) + ICacheService cacheService, + IConfiguration configuration) : base(hostingEnvironment, httpClientFactory, logger, settings.Value) { this.userService = userService; @@ -88,6 +93,7 @@ public MyAccountController( this.locationService = locationService; this.multiPageFormService = multiPageFormService; this.cacheService = cacheService; + this.configuration = configuration; } private string LoginWizardCacheKey => $"{this.CurrentUserId}:LoginWizard"; @@ -452,9 +458,8 @@ public async Task UpdatePassword(ChangePasswordViewModel model) if (this.ModelState.IsValid) { await this.userService.UpdatePassword(model.NewPassword); - - this.ViewBag.SuccessMessage = CommonValidationErrorMessages.PasswordSuccessMessage; - return this.View("SuccessMessage"); + var redirectUri = $"{this.configuration["LearningHubAuthServiceConfig:Authority"]}/Home/SetIsPasswordUpdate?isLogout=false"; + return this.Redirect(redirectUri); } else { diff --git a/LearningHub.Nhs.WebUI/Views/Home/ChangePasswordAcknowledgement.cshtml b/LearningHub.Nhs.WebUI/Views/Home/ChangePasswordAcknowledgement.cshtml new file mode 100644 index 000000000..28bf1b66a --- /dev/null +++ b/LearningHub.Nhs.WebUI/Views/Home/ChangePasswordAcknowledgement.cshtml @@ -0,0 +1,24 @@ +@{ + ViewData["Title"] = "Change password Acknowledgement"; +} + +
    +
    +
    +
    +
    +

    Your password has been changed successfully.

    + +

    + You have been logged out. Please log in using your username and new password to explore the Learning Hub. +

    +
    +
    + +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file From a48fd1d5208408270f53674b07461dd7a9a7e7de Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Wed, 5 Mar 2025 14:38:02 +0000 Subject: [PATCH 482/576] TD-3733-TD-3733:Information Disclosures --- OpenAPI/LearningHub.Nhs.OpenApi/Startup.cs | 4 ++-- ReportAPI/LearningHub.Nhs.ReportApi/Program.cs | 4 ++-- WebAPI/LearningHub.Nhs.API/Program.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/OpenAPI/LearningHub.Nhs.OpenApi/Startup.cs b/OpenAPI/LearningHub.Nhs.OpenApi/Startup.cs index 518b7d373..b9c34c9b3 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi/Startup.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi/Startup.cs @@ -192,11 +192,11 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) app.Use(async (context, next) => { - context.Response.Headers.Add("content-security-policy", "default-src 'self'; " + $"script-src 'self' 'nonce-random772362' https://script.hotjar.com https://www.google-analytics.com https://static.hotjar.com https://www.googletagmanager.com https://cdnjs.cloudflare.com 'unsafe-hashes' 'sha256-oywvD6W6okwID679n4cvPJtWLowSS70Pz87v1ryS0DU=' 'sha256-kbHtQyYDQKz4SWMQ8OHVol3EC0t3tHEJFPCSwNG9NxQ' 'sha256-YoDy5WvNzQHMq2kYTFhDYiGnEgPrvAY5Il6eUu/P4xY=' 'sha256-/n13APBYdqlQW71ZpWflMB/QoXNSUKDxZk1rgZc+Jz8=' 'sha256-+6WnXIl4mbFTCARd8N3COQmT3bJJmo32N8q8ZSQAIcU=' 'sha256-VQKp2qxuvQmMpqE/U/ASQ0ZQ0pIDvC3dgQPPCqDlvBo=';" + "style-src 'self' 'unsafe-inline' https://use.fontawesome.com; " + "font-src https://script.hotjar.com https://assets.nhs.uk/; " + "connect-src 'self' http: ws:; " + "img-src 'self' data: https:; " + "frame-src 'self' https:"); + context.Response.Headers.Add("content-security-policy", "object-src 'none'; frame-ancestors 'none'; sandbox allow-forms allow-same-origin allow-scripts allow-popups; base-uri 'self';"); context.Response.Headers.Add("Referrer-Policy", "no-referrer"); context.Response.Headers.Add("Strict-Transport-Security", "max-age=31536000; includeSubDomains"); context.Response.Headers.Add("X-Content-Type-Options", "nosniff"); - context.Response.Headers.Add("X-Frame-Options", "deny"); + context.Response.Headers.Add("X-Frame-Options", "SAMEORIGIN"); context.Response.Headers.Add("X-XSS-protection", "0"); await next(); }); diff --git a/ReportAPI/LearningHub.Nhs.ReportApi/Program.cs b/ReportAPI/LearningHub.Nhs.ReportApi/Program.cs index 20111f0e3..ac23e07ab 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi/Program.cs +++ b/ReportAPI/LearningHub.Nhs.ReportApi/Program.cs @@ -22,11 +22,11 @@ app.Use(async (context, next) => { - context.Response.Headers.Add("content-security-policy", "default-src 'self'; " + $"script-src 'self' 'nonce-random772362' https://script.hotjar.com https://www.google-analytics.com https://static.hotjar.com https://www.googletagmanager.com https://cdnjs.cloudflare.com 'unsafe-hashes' 'sha256-oywvD6W6okwID679n4cvPJtWLowSS70Pz87v1ryS0DU=' 'sha256-kbHtQyYDQKz4SWMQ8OHVol3EC0t3tHEJFPCSwNG9NxQ' 'sha256-YoDy5WvNzQHMq2kYTFhDYiGnEgPrvAY5Il6eUu/P4xY=' 'sha256-/n13APBYdqlQW71ZpWflMB/QoXNSUKDxZk1rgZc+Jz8=' 'sha256-+6WnXIl4mbFTCARd8N3COQmT3bJJmo32N8q8ZSQAIcU=' 'sha256-VQKp2qxuvQmMpqE/U/ASQ0ZQ0pIDvC3dgQPPCqDlvBo=';" + "style-src 'self' 'unsafe-inline' https://use.fontawesome.com; " + "font-src https://script.hotjar.com https://assets.nhs.uk/; " + "connect-src 'self' http: ws:; " + "img-src 'self' data: https:; " + "frame-src 'self' https:"); + context.Response.Headers.Add("content-security-policy", "object-src 'none'; frame-ancestors 'none'; sandbox allow-forms allow-same-origin allow-scripts allow-popups; base-uri 'self';"); context.Response.Headers.Add("Referrer-Policy", "no-referrer"); context.Response.Headers.Add("Strict-Transport-Security", "max-age=31536000; includeSubDomains"); context.Response.Headers.Add("X-Content-Type-Options", "nosniff"); - context.Response.Headers.Add("X-Frame-Options", "deny"); + context.Response.Headers.Add("X-Frame-Options", "SAMEORIGIN"); context.Response.Headers.Add("X-XSS-protection", "0"); await next(); }); diff --git a/WebAPI/LearningHub.Nhs.API/Program.cs b/WebAPI/LearningHub.Nhs.API/Program.cs index 103202673..0303c6397 100644 --- a/WebAPI/LearningHub.Nhs.API/Program.cs +++ b/WebAPI/LearningHub.Nhs.API/Program.cs @@ -40,11 +40,11 @@ app.Use(async (context, next) => { - context.Response.Headers.Add("content-security-policy", "default-src 'self'; " + $"script-src 'self' 'nonce-random772362' https://script.hotjar.com https://www.google-analytics.com https://static.hotjar.com https://www.googletagmanager.com https://cdnjs.cloudflare.com 'unsafe-hashes' 'sha256-oywvD6W6okwID679n4cvPJtWLowSS70Pz87v1ryS0DU=' 'sha256-kbHtQyYDQKz4SWMQ8OHVol3EC0t3tHEJFPCSwNG9NxQ' 'sha256-YoDy5WvNzQHMq2kYTFhDYiGnEgPrvAY5Il6eUu/P4xY=' 'sha256-/n13APBYdqlQW71ZpWflMB/QoXNSUKDxZk1rgZc+Jz8=' 'sha256-+6WnXIl4mbFTCARd8N3COQmT3bJJmo32N8q8ZSQAIcU=' 'sha256-VQKp2qxuvQmMpqE/U/ASQ0ZQ0pIDvC3dgQPPCqDlvBo=';" + "style-src 'self' 'unsafe-inline' https://use.fontawesome.com; " + "font-src https://script.hotjar.com https://assets.nhs.uk/; " + "connect-src 'self' http: ws:; " + "img-src 'self' data: https:; " + "frame-src 'self' https:"); + context.Response.Headers.Add("content-security-policy", "object-src 'none'; frame-ancestors 'none'; sandbox allow-forms allow-same-origin allow-scripts allow-popups; base-uri 'self';"); context.Response.Headers.Add("Referrer-Policy", "no-referrer"); context.Response.Headers.Add("Strict-Transport-Security", "max-age=31536000; includeSubDomains"); context.Response.Headers.Add("X-Content-Type-Options", "nosniff"); - context.Response.Headers.Add("X-Frame-Options", "deny"); + context.Response.Headers.Add("X-Frame-Options", "SAMEORIGIN"); context.Response.Headers.Add("X-XSS-protection", "0"); await next(); }); From e264a6a77c86cdbe5bd1a402e80f83c6aa7dad86 Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Mon, 10 Mar 2025 17:15:24 +0000 Subject: [PATCH 483/576] TD-5406 : Errors are not Getting Logged in Learning Hub Prod logging Database --- AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj | 2 +- LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj | 2 +- .../LearningHub.Nhs.OpenApi.Models.csproj | 2 +- .../LearningHub.Nhs.OpenApi.Repositories.csproj | 2 +- .../LearningHub.Nhs.OpenApi.Services.csproj | 2 +- OpenAPI/LearningHub.Nhs.OpenApi/LearningHub.NHS.OpenAPI.csproj | 2 +- .../LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj | 2 +- WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj b/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj index bc9b08b3f..b7d26718c 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj +++ b/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj @@ -107,7 +107,7 @@ - + diff --git a/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj b/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj index 1461f089a..8e0b11cce 100644 --- a/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj +++ b/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj @@ -141,7 +141,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj index b38489047..440fcb5e7 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj @@ -17,7 +17,7 @@ - + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/LearningHub.Nhs.OpenApi.Repositories.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/LearningHub.Nhs.OpenApi.Repositories.csproj index 01a105d01..b26c815cd 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/LearningHub.Nhs.OpenApi.Repositories.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/LearningHub.Nhs.OpenApi.Repositories.csproj @@ -27,7 +27,7 @@ - + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj index 6db395e63..ec1147aa3 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj @@ -29,7 +29,7 @@ - + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi/LearningHub.NHS.OpenAPI.csproj b/OpenAPI/LearningHub.Nhs.OpenApi/LearningHub.NHS.OpenAPI.csproj index 5c43eac11..83639e186 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi/LearningHub.NHS.OpenAPI.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi/LearningHub.NHS.OpenAPI.csproj @@ -21,7 +21,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj b/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj index 1c812a473..b0c9a1151 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj @@ -26,7 +26,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj b/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj index 5891d8737..9f081a054 100644 --- a/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj +++ b/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj @@ -35,7 +35,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 6a857ba0893df77423a54486b5f869b33c53265d Mon Sep 17 00:00:00 2001 From: Arunima George Date: Tue, 11 Mar 2025 10:17:06 +0000 Subject: [PATCH 484/576] TD-5179: Fixed focus issue on My bookmarks screen --- .../Styles/nhsuk/pages/bookmark.scss | 17 +++++++++++++++++ .../Views/Bookmark/_BookmarkAction.cshtml | 10 +++++----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Styles/nhsuk/pages/bookmark.scss b/LearningHub.Nhs.WebUI/Styles/nhsuk/pages/bookmark.scss index 6378eae15..126c5c35f 100644 --- a/LearningHub.Nhs.WebUI/Styles/nhsuk/pages/bookmark.scss +++ b/LearningHub.Nhs.WebUI/Styles/nhsuk/pages/bookmark.scss @@ -112,6 +112,23 @@ td.col-type { tr.bookmark-item:hover td { background-color: $nhsuk-white; } +.my-bookmark-btn:focus { + outline: none; + text-decoration: none !important; + color: $nhsuk-black !important; + background-color: $nhsuk-yellow !important; + box-shadow: 0 -2px $govuk-focus-highlight-yellow, 0 4px $nhsuk-black; +} + +.my-bookmark-btn:hover { + outline: none; + text-decoration: none !important; +} + +.my-bookmark-btn { + transition: none !important; + border-radius: 0 !important; +} @media (min-width: 768px) { diff --git a/LearningHub.Nhs.WebUI/Views/Bookmark/_BookmarkAction.cshtml b/LearningHub.Nhs.WebUI/Views/Bookmark/_BookmarkAction.cshtml index 5349fbb30..e3b338884 100644 --- a/LearningHub.Nhs.WebUI/Views/Bookmark/_BookmarkAction.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Bookmark/_BookmarkAction.cshtml @@ -6,7 +6,7 @@ @if (Model.IsFirst == false) { - } @@ -15,25 +15,25 @@ @if (Model.IsLast == false) { - } - + @if (Model.IsFolder == false) { - + } - +
    \ No newline at end of file From 5a0f49e1e21d1e41e31fdc160ab0fd0a3a24d06b Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Tue, 11 Mar 2025 12:02:02 +0000 Subject: [PATCH 485/576] Td-3729: Remnoved unuinsed js --- .../wwwroot/js/pagingcontrol.js | 106 ------------------ 1 file changed, 106 deletions(-) delete mode 100644 LearningHub.Nhs.WebUI/wwwroot/js/pagingcontrol.js diff --git a/LearningHub.Nhs.WebUI/wwwroot/js/pagingcontrol.js b/LearningHub.Nhs.WebUI/wwwroot/js/pagingcontrol.js deleted file mode 100644 index 31cd8f56e..000000000 --- a/LearningHub.Nhs.WebUI/wwwroot/js/pagingcontrol.js +++ /dev/null @@ -1,106 +0,0 @@ -var WebUI = WebUI || {}; -WebUI.PagingRequest = { Page: 1, SortColumn: '', SortDirection: '', Filter: [] }; - -WebUI.pagingSetup = function (sortColumn, sortDirection, filter) { - - WebUI.PagingRequest.SortColumn = sortColumn; - WebUI.PagingRequest.SortDirection = sortDirection; - if (!filter) { filter = []; } - WebUI.PagingRequest.Filter = filter; - - // Add Click events to column headers - $('table.lh-datatable th.orderable').attr('onClick', 'WebUI.changeTableOrder(this);'); - - // Add asc & desc class - $('table.lh-datatable th[data-column="' + sortColumn + '"].orderable').addClass(sortDirection === 'D' ? 'desc' : 'asc'); - - // Add filter row - var columns = $('table.lh-datatable.filtered thead tr th'); - if (columns.length > 0) { - row = document.createElement('tr'); - $(row).addClass('filter-row'); - - for (var i = 0; i < columns.length; i++) { - var columnName = $(columns[i]).attr('data-column'); - //var filterColumn = filter.find(x => x.Column === columnName); fails in IE11 - var filterColumn = filter.filter(function (x) { return x.Column === columnName; })[0]; - var filterValue = ''; - if (filterColumn) { filterValue = filterColumn.Value; } - var inputType = 'text'; - if ($(columns[i]).attr('data-type')) { inputType = $(columns[i]).attr('data-type'); }; - - if (columnName) { - $(row).append('
    '); - } else { - $(row).append(''); - } - //console.log('Add cell :' + i); - } - $('table.lh-datatable tbody').prepend(row); - - // Add click event to filter buttons - $('table.lh-datatable tr.filter-row td button').attr('onClick', 'WebUI.filterTable();'); - $('table.lh-datatable tr.filter-row td input').keypress(function (e) { - if (e.which === 13) { - WebUI.filterTable(); - return false; - } - }); - $('table.lh-datatable tr.filter-row td input')[0].focus(); - } -}; - -WebUI.requestPage = function (page) { - WebUI.PagingRequest.Page = page; - WebUI.retrievePage(); -}; - -WebUI.changeTableOrder = function (headerLink) { - var sortDirection = 'A'; - var sortColumn = $(headerLink).attr('data-column'); - var currentSortDirection = $(headerLink).hasClass('asc'); - - if (currentSortDirection) { sortDirection = 'D'; } - - WebUI.PagingRequest.SortDirection = sortDirection; - WebUI.PagingRequest.SortColumn = sortColumn; - - WebUI.retrievePage(); -}; - -WebUI.filterTable = function () { - WebUI.PagingRequest.Filter = []; - $('table.lh-datatable.filtered tbody tr.filter-row td input').each(function (index) { - var filterColumn = $(this).attr('data-column'); - var filterValue = $(this).val(); - if ($(this).val() !== '') { - WebUI.PagingRequest.Filter.push({ Column: filterColumn, Value: filterValue }); - } - }); - WebUI.retrievePage(); -}; - -WebUI.clearFilters = function () { - WebUI.PagingRequest.Page = 1; - WebUI.PagingRequest.Filter = []; - WebUI.retrievePage(); - return false; -}; - -WebUI.retrievePage = function () { - var url = window.location.pathname; - - var form = $(document.createElement('form')); - $(form).attr("action", url); - $(form).attr("method", "POST"); - - var pagingRequestString = JSON.stringify(WebUI.PagingRequest); - var input = $("") - .attr("type", "hidden") - .attr("name", "pagingRequestModel") - .val(pagingRequestString); - - $(form).append($(input)); - form.appendTo(document.body); - $(form).submit(); -}; \ No newline at end of file From 22e7f15ac203a38e14ac59b1c6bbe603d511dc99 Mon Sep 17 00:00:00 2001 From: Oluwatobi Awe Date: Tue, 11 Mar 2025 17:25:26 +0000 Subject: [PATCH 486/576] reverse deleted resource --- .../Scripts/Post-Deploy/Scripts/TD-5358.sql | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 WebAPI/LearningHub.Nhs.Database/Scripts/Post-Deploy/Scripts/TD-5358.sql diff --git a/WebAPI/LearningHub.Nhs.Database/Scripts/Post-Deploy/Scripts/TD-5358.sql b/WebAPI/LearningHub.Nhs.Database/Scripts/Post-Deploy/Scripts/TD-5358.sql new file mode 100644 index 000000000..cc0289efb --- /dev/null +++ b/WebAPI/LearningHub.Nhs.Database/Scripts/Post-Deploy/Scripts/TD-5358.sql @@ -0,0 +1,17 @@ + +BEGIN +--Level 1 path +update [resources].ResourceReference set Deleted=0 where NodePathId=3009 and ResourceId in (10494,4802,10520) +update [hierarchy].[NodeResource] set VersionStatusId=2 where NodeId=1948 and ResourceId in (10494,4802,10520) +update [hierarchy].[NodeResourceLookup] set Deleted=0 where NodeId=1948 and ResourceId in (10494,4802,10520) + + + + + +--Work in progress path +update [hierarchy].[NodeResource] set VersionStatusId=2 where NodeId=1914 and ResourceId in (16717,16718,4085,4091,10522,4086,10479,10491,10496,10481,10523,10519,4083,4087,10483,4079,4093,10510,10485,10484,10482,10518,10500,10515,10511,10508,10521,10493,10497,4089,4090,10480,4084,4088,4080,4081,10501,10517,10503,10476,10504,10502,4082,10486,10488,10478,4096,10514,10507,4076,4094,10499,10509,4180,4077,4092,14736,14631,14630,14592,14593,14737,14738,14922,14923,14924,14966,14967,14969,14968,17439,14970,15000,15001,14596,15428,14595,14629,7646,7645,7644,7640,7643,7641,7647,15129,11221,5455,10822,4919,10567,6552,5453,9622,9621,4298) +update [resources].[ResourceReference] set Deleted = 0 where NodepathId=1781 and ResourceId in (16717,16718,4085,4091,10522,4086,10479,10491,10496,10481,10523,10519,4083,4087,10483,4079,4093,10510,10485,10484,10482,10518,10500,10515,10511,10508,10521,10493,10497,4089,4090,10480,4084,4088,4080,4081,10501,10517,10503,10476,10504,10502,4082,10486,10488,10478,4096,10514,10507,4076,4094,10499,10509,4180,4077,4092,14736,14631,14630,14592,14593,14737,14738,14922,14923,14924,14966,14967,14969,14968,17439,14970,15000,15001,14596,15428,14595,14629,7646,7645,7644,7640,7643,7641,7647,15129,11221,5455,10822,4919,10567,6552,5453,9622,9621,4298) +update [hierarchy].[NodeResourceLookup] set Deleted=0 where NodeId=1914 and ResourceId in (16717,16718,4085,4091,10522,4086,10479,10491,10496,10481,10523,10519,4083,4087,10483,4079,4093,10510,10485,10484,10482,10518,10500,10515,10511,10508,10521,10493,10497,4089,4090,10480,4084,4088,4080,4081,10501,10517,10503,10476,10504,10502,4082,10486,10488,10478,4096,10514,10507,4076,4094,10499,10509,4180,4077,4092,14736,14631,14630,14592,14593,14737,14738,14922,14923,14924,14966,14967,14969,14968,17439,14970,15000,15001,14596,15428,14595,14629,7646,7645,7644,7640,7643,7641,7647,15129,11221,5455,10822,4919,10567,6552,5453,9622,9621,4298) + +END From fe2f1aa1ea9d596d57ef2c75df5504348c69aeee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Mar 2025 08:50:57 +0000 Subject: [PATCH 487/576] Bump @babel/core in /AdminUI/LearningHub.Nhs.AdminUI (#1028) Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.26.9 to 7.26.10. - [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.26.10/packages/babel-core) --- updated-dependencies: - dependency-name: "@babel/core" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../LearningHub.Nhs.AdminUI/package-lock.json | 62 +++++++++---------- AdminUI/LearningHub.Nhs.AdminUI/package.json | 2 +- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json b/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json index 21a362d26..3c4a2dd4e 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json +++ b/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json @@ -40,7 +40,7 @@ "vuex": "^3.6.2" }, "devDependencies": { - "@babel/core": "^7.26.9", + "@babel/core": "^7.26.10", "@babel/preset-env": "^7.26.9", "@types/axios": "^0.14.0", "@types/bootstrap": "4.1.3", @@ -117,22 +117,22 @@ } }, "node_modules/@babel/core": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.9.tgz", - "integrity": "sha512-lWBYIrF7qK5+GjY5Uy+/hEgp8OJWOD/rpy74GplYRhEauvbHDeFB8t5hPOZxCZ0Oxf4Cc36tK51/l3ymJysrKw==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.10.tgz", + "integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.9", + "@babel/generator": "^7.26.10", "@babel/helper-compilation-targets": "^7.26.5", "@babel/helper-module-transforms": "^7.26.0", - "@babel/helpers": "^7.26.9", - "@babel/parser": "^7.26.9", + "@babel/helpers": "^7.26.10", + "@babel/parser": "^7.26.10", "@babel/template": "^7.26.9", - "@babel/traverse": "^7.26.9", - "@babel/types": "^7.26.9", + "@babel/traverse": "^7.26.10", + "@babel/types": "^7.26.10", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -178,14 +178,14 @@ "dev": true }, "node_modules/@babel/generator": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.9.tgz", - "integrity": "sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.10.tgz", + "integrity": "sha512-rRHT8siFIXQrAYOYqZQVsAr8vJ+cBNqcVAY6m5V8/4QqzaPl+zDBe6cLEPRDuNOUf3ww8RfJVlOyQMoSI+5Ang==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.26.9", - "@babel/types": "^7.26.9", + "@babel/parser": "^7.26.10", + "@babel/types": "^7.26.10", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" @@ -485,26 +485,26 @@ } }, "node_modules/@babel/helpers": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.9.tgz", - "integrity": "sha512-Mz/4+y8udxBKdmzt/UjPACs4G3j5SshJJEFFKxlCGPydG4JAHXxjWjAwjd09tf6oINvl1VfMJo+nB7H2YKQ0dA==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.10.tgz", + "integrity": "sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g==", "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.26.9", - "@babel/types": "^7.26.9" + "@babel/types": "^7.26.10" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.9.tgz", - "integrity": "sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz", + "integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==", "license": "MIT", "dependencies": { - "@babel/types": "^7.26.9" + "@babel/types": "^7.26.10" }, "bin": { "parser": "bin/babel-parser.js" @@ -1927,17 +1927,17 @@ } }, "node_modules/@babel/traverse": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.9.tgz", - "integrity": "sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.10.tgz", + "integrity": "sha512-k8NuDrxr0WrPH5Aupqb2LCVURP/S0vBEn5mK6iH+GIYob66U5EtoZvcdudR2jQ4cmTwhEwW1DLB+Yyas9zjF6A==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.9", - "@babel/parser": "^7.26.9", + "@babel/generator": "^7.26.10", + "@babel/parser": "^7.26.10", "@babel/template": "^7.26.9", - "@babel/types": "^7.26.9", + "@babel/types": "^7.26.10", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -1969,9 +1969,9 @@ "dev": true }, "node_modules/@babel/types": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.9.tgz", - "integrity": "sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz", + "integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==", "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.25.9", diff --git a/AdminUI/LearningHub.Nhs.AdminUI/package.json b/AdminUI/LearningHub.Nhs.AdminUI/package.json index 2b5f1780e..af71fa375 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/package.json +++ b/AdminUI/LearningHub.Nhs.AdminUI/package.json @@ -53,7 +53,7 @@ }, "devDependencies": { "@babel/preset-env": "^7.26.9", - "@babel/core": "^7.26.9", + "@babel/core": "^7.26.10", "@types/axios": "^0.14.0", "@types/bootstrap": "4.1.3", "@types/ckeditor": "4.9.10", From a983ccc50cefbc6c852885eb6b3f882da7e9d8c2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Mar 2025 09:08:13 +0000 Subject: [PATCH 488/576] Bump @babel/core from 7.26.9 to 7.26.10 in /LearningHub.Nhs.WebUI (#1029) Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.26.9 to 7.26.10. - [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.26.10/packages/babel-core) --- updated-dependencies: - dependency-name: "@babel/core" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- LearningHub.Nhs.WebUI/package-lock.json | 62 ++++++++++++------------- LearningHub.Nhs.WebUI/package.json | 2 +- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/LearningHub.Nhs.WebUI/package-lock.json b/LearningHub.Nhs.WebUI/package-lock.json index 7c8e916ad..79ef599ea 100644 --- a/LearningHub.Nhs.WebUI/package-lock.json +++ b/LearningHub.Nhs.WebUI/package-lock.json @@ -44,7 +44,7 @@ "vuex": "^3.6.2" }, "devDependencies": { - "@babel/core": "^7.26.9", + "@babel/core": "^7.26.10", "@babel/preset-env": "^7.26.9", "@types/axios": "^0.14.0", "@types/bootstrap": "4.6.1", @@ -139,22 +139,22 @@ } }, "node_modules/@babel/core": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.9.tgz", - "integrity": "sha512-lWBYIrF7qK5+GjY5Uy+/hEgp8OJWOD/rpy74GplYRhEauvbHDeFB8t5hPOZxCZ0Oxf4Cc36tK51/l3ymJysrKw==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.10.tgz", + "integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.9", + "@babel/generator": "^7.26.10", "@babel/helper-compilation-targets": "^7.26.5", "@babel/helper-module-transforms": "^7.26.0", - "@babel/helpers": "^7.26.9", - "@babel/parser": "^7.26.9", + "@babel/helpers": "^7.26.10", + "@babel/parser": "^7.26.10", "@babel/template": "^7.26.9", - "@babel/traverse": "^7.26.9", - "@babel/types": "^7.26.9", + "@babel/traverse": "^7.26.10", + "@babel/types": "^7.26.10", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -223,14 +223,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.9.tgz", - "integrity": "sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.10.tgz", + "integrity": "sha512-rRHT8siFIXQrAYOYqZQVsAr8vJ+cBNqcVAY6m5V8/4QqzaPl+zDBe6cLEPRDuNOUf3ww8RfJVlOyQMoSI+5Ang==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.26.9", - "@babel/types": "^7.26.9", + "@babel/parser": "^7.26.10", + "@babel/types": "^7.26.10", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" @@ -624,26 +624,26 @@ } }, "node_modules/@babel/helpers": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.9.tgz", - "integrity": "sha512-Mz/4+y8udxBKdmzt/UjPACs4G3j5SshJJEFFKxlCGPydG4JAHXxjWjAwjd09tf6oINvl1VfMJo+nB7H2YKQ0dA==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.10.tgz", + "integrity": "sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g==", "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.26.9", - "@babel/types": "^7.26.9" + "@babel/types": "^7.26.10" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.9.tgz", - "integrity": "sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz", + "integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==", "license": "MIT", "dependencies": { - "@babel/types": "^7.26.9" + "@babel/types": "^7.26.10" }, "bin": { "parser": "bin/babel-parser.js" @@ -2057,17 +2057,17 @@ } }, "node_modules/@babel/traverse": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.9.tgz", - "integrity": "sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.10.tgz", + "integrity": "sha512-k8NuDrxr0WrPH5Aupqb2LCVURP/S0vBEn5mK6iH+GIYob66U5EtoZvcdudR2jQ4cmTwhEwW1DLB+Yyas9zjF6A==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.9", - "@babel/parser": "^7.26.9", + "@babel/generator": "^7.26.10", + "@babel/parser": "^7.26.10", "@babel/template": "^7.26.9", - "@babel/types": "^7.26.9", + "@babel/types": "^7.26.10", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -2108,9 +2108,9 @@ "dev": true }, "node_modules/@babel/types": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.9.tgz", - "integrity": "sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz", + "integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==", "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.25.9", diff --git a/LearningHub.Nhs.WebUI/package.json b/LearningHub.Nhs.WebUI/package.json index 0ccc3d885..3805b3e15 100644 --- a/LearningHub.Nhs.WebUI/package.json +++ b/LearningHub.Nhs.WebUI/package.json @@ -56,7 +56,7 @@ "vuex": "^3.6.2" }, "devDependencies": { - "@babel/core": "^7.26.9", + "@babel/core": "^7.26.10", "@babel/preset-env": "^7.26.9", "@types/axios": "^0.14.0", "@types/bootstrap": "4.6.1", From 354f22046d5321aa0e70592352bf9c2942c2ca16 Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Thu, 13 Mar 2025 14:24:54 +0000 Subject: [PATCH 489/576] TD-3743: Concurrent Sessions Allowed --- .../Helpers/InMemoryTicketStore.cs | 104 ++++++++++++++++++ .../Startup/AuthenticationConfiguration.cs | 3 + 2 files changed, 107 insertions(+) create mode 100644 LearningHub.Nhs.WebUI/Helpers/InMemoryTicketStore.cs diff --git a/LearningHub.Nhs.WebUI/Helpers/InMemoryTicketStore.cs b/LearningHub.Nhs.WebUI/Helpers/InMemoryTicketStore.cs new file mode 100644 index 000000000..4d17cc5b7 --- /dev/null +++ b/LearningHub.Nhs.WebUI/Helpers/InMemoryTicketStore.cs @@ -0,0 +1,104 @@ +namespace LearningHub.Nhs.WebUI.Helpers +{ + using System; + using System.Collections.Concurrent; + using System.Linq; + using System.Threading.Tasks; + using Microsoft.AspNetCore.Authentication; + using Microsoft.AspNetCore.Authentication.Cookies; + + /// + /// Defines the . + /// + public class InMemoryTicketStore : ITicketStore + { + private readonly ConcurrentDictionary cache; + + /// + /// Initializes a new instance of the class. + /// The InMemoryTicketStore. + /// + /// the cache. + public InMemoryTicketStore(ConcurrentDictionary cache) + { + this.cache = cache; + } + + /// + /// The StoreAsync. + /// + /// The ticket. + /// The key. + public async Task StoreAsync(AuthenticationTicket ticket) + { + var ticketUserId = ticket.Principal.Claims.Where(c => c.Type == "sub") + .FirstOrDefault() + .Value; + var matchingAuthTicket = this.cache.Values.FirstOrDefault( + t => t.Principal.Claims.FirstOrDefault( + c => c.Type == "sub" + && c.Value == ticketUserId) != null); + if (matchingAuthTicket != null) + { + var cacheKey = this.cache.Where( + entry => entry.Value == matchingAuthTicket) + .Select(entry => entry.Key) + .FirstOrDefault(); + this.cache.TryRemove( + cacheKey, + out _); + } + + var key = Guid + .NewGuid() + .ToString(); + await this.RenewAsync( + key, + ticket); + return key; + } + + /// + /// The RenewAsync. + /// + /// The key. + /// The ticket. + /// The Task. + public Task RenewAsync( + string key, + AuthenticationTicket ticket) + { + this.cache.AddOrUpdate( + key, + ticket, + (_, _) => ticket); + return Task.CompletedTask; + } + + /// + /// The RetrieveAsync. + /// + /// The Key. + /// The Task. + public Task RetrieveAsync(string key) + { + this.cache.TryGetValue( + key, + out var ticket); + return Task.FromResult(ticket); + } + + /// + /// The RemoveAsync. + /// + /// The key. + /// The Task. + public Task RemoveAsync(string key) + { + this.cache.TryRemove( + key, + out _); + return Task.CompletedTask; + } + } +} \ No newline at end of file diff --git a/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs b/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs index 40caab241..bbd39d9e2 100644 --- a/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs +++ b/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs @@ -1,12 +1,14 @@ namespace LearningHub.Nhs.WebUI.Startup { using System; + using System.Collections.Concurrent; using System.Linq; using System.Threading.Tasks; using IdentityModel; using LearningHub.Nhs.Caching; using LearningHub.Nhs.WebUI.Configuration; using LearningHub.Nhs.WebUI.Handlers; + using LearningHub.Nhs.WebUI.Helpers; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication.Cookies; using Microsoft.AspNetCore.Authentication.OpenIdConnect; @@ -41,6 +43,7 @@ public static void ConfigureAuthentication(this IServiceCollection services, Lea options.SlidingExpiration = true; options.EventsType = typeof(CookieEventHandler); options.AccessDeniedPath = "/Home/AccessDenied"; + options.SessionStore = new InMemoryTicketStore(new ConcurrentDictionary()); }) .AddOpenIdConnect(AuthenticationScheme, options => { From fc4c6973f37ade4989ec22fe9991b708bb2f74f0 Mon Sep 17 00:00:00 2001 From: Arunima George Date: Thu, 13 Mar 2025 15:59:47 +0000 Subject: [PATCH 490/576] TD-5170: Fixed console errors on Notifications page. --- .../Scripts/vuesrc/notification/notification.vue | 6 +++--- .../Scripts/vuesrc/notification/notifications.vue | 13 ++++++++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notification.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notification.vue index 6c2a875c8..25ef12656 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notification.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notification.vue @@ -74,8 +74,8 @@   {{ notification.title }}
    - - + +
    @@ -173,7 +173,7 @@ .catch(e => console.log(e)); } }, - async deleteNotification() { + async deleteNotification() { await axios.delete( '/api/notification/' + this.selectedNotification.notificationId + '?userNotificationId=' + this.selectedNotification.id) .catch(e => console.log(e)); diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notifications.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notifications.vue index 15229ade7..b21cb5698 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notifications.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/notification/notifications.vue @@ -87,7 +87,7 @@ @@ -143,6 +143,13 @@ $('#deleteModalButton').modal('hide'); $('#deleteModal').modal(); }, + closeConfirmation() { + if (document.activeElement instanceof HTMLElement) { + document.activeElement.blur(); + } + document.body.focus(); + setTimeout(() => { $('#deleteModal').modal('hide'); }, 10); + }, showNotification(notification: NotificationModel) { this.selectedNotification = notification; this.showMessage = true; @@ -155,7 +162,7 @@ }, async deleteNotification() { await this.getSelectedComponent().deleteNotification(); - $('#deleteModal').modal('hide'); + this.closeConfirmation(); this.showMessage = false; }, notificationTypeContent() { From 5f3b7a02c76207059cc8acf17a05f67d7e4f0d7f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 09:02:22 +0000 Subject: [PATCH 491/576] Bump sass from 1.85.1 to 1.86.0 in /AdminUI/LearningHub.Nhs.AdminUI (#1032) Bumps [sass](https://github.com/sass/dart-sass) from 1.85.1 to 1.86.0. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.85.1...1.86.0) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- AdminUI/LearningHub.Nhs.AdminUI/package-lock.json | 8 ++++---- AdminUI/LearningHub.Nhs.AdminUI/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json b/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json index 3c4a2dd4e..dd199a92a 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json +++ b/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json @@ -63,7 +63,7 @@ "css-loader": "^5.2.4", "file-loader": "^6.2.0", "jest": "^27.5.1", - "sass": "^1.85.1", + "sass": "^1.86.0", "sass-loader": "^11.0.1", "style-loader": "^2.0.0", "ts-jest": "^27.1.5", @@ -16070,9 +16070,9 @@ } }, "node_modules/sass": { - "version": "1.85.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.85.1.tgz", - "integrity": "sha512-Uk8WpxM5v+0cMR0XjX9KfRIacmSG86RH4DCCZjLU2rFh5tyutt9siAXJ7G+YfxQ99Q6wrRMbMlVl6KqUms71ag==", + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.86.0.tgz", + "integrity": "sha512-zV8vGUld/+mP4KbMLJMX7TyGCuUp7hnkOScgCMsWuHtns8CWBoz+vmEhoGMXsaJrbUP8gj+F1dLvVe79sK8UdA==", "dev": true, "license": "MIT", "dependencies": { diff --git a/AdminUI/LearningHub.Nhs.AdminUI/package.json b/AdminUI/LearningHub.Nhs.AdminUI/package.json index af71fa375..e8b76592d 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/package.json +++ b/AdminUI/LearningHub.Nhs.AdminUI/package.json @@ -75,7 +75,7 @@ "css-loader": "^5.2.4", "file-loader": "^6.2.0", "jest": "^27.5.1", - "sass": "^1.85.1", + "sass": "^1.86.0", "sass-loader": "^11.0.1", "style-loader": "^2.0.0", "ts-jest": "^27.1.5", From 73c451d822ae26c8fafb62467f9160075957336d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 09:05:14 +0000 Subject: [PATCH 492/576] Bump sass from 1.85.1 to 1.86.0 in /LearningHub.Nhs.WebUI (#1033) Bumps [sass](https://github.com/sass/dart-sass) from 1.85.1 to 1.86.0. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.85.1...1.86.0) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- LearningHub.Nhs.WebUI/package-lock.json | 8 ++++---- LearningHub.Nhs.WebUI/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/LearningHub.Nhs.WebUI/package-lock.json b/LearningHub.Nhs.WebUI/package-lock.json index 79ef599ea..263333e70 100644 --- a/LearningHub.Nhs.WebUI/package-lock.json +++ b/LearningHub.Nhs.WebUI/package-lock.json @@ -68,7 +68,7 @@ "eslint": "^8.51.0", "file-loader": "^6.2.0", "jest": "^27.5.1", - "sass": "^1.85.1", + "sass": "^1.86.0", "sass-loader": "^11.1.1", "style-loader": "^2.0.0", "ts-jest": "^27.1.5", @@ -16919,9 +16919,9 @@ } }, "node_modules/sass": { - "version": "1.85.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.85.1.tgz", - "integrity": "sha512-Uk8WpxM5v+0cMR0XjX9KfRIacmSG86RH4DCCZjLU2rFh5tyutt9siAXJ7G+YfxQ99Q6wrRMbMlVl6KqUms71ag==", + "version": "1.86.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.86.0.tgz", + "integrity": "sha512-zV8vGUld/+mP4KbMLJMX7TyGCuUp7hnkOScgCMsWuHtns8CWBoz+vmEhoGMXsaJrbUP8gj+F1dLvVe79sK8UdA==", "dev": true, "license": "MIT", "dependencies": { diff --git a/LearningHub.Nhs.WebUI/package.json b/LearningHub.Nhs.WebUI/package.json index 3805b3e15..673640964 100644 --- a/LearningHub.Nhs.WebUI/package.json +++ b/LearningHub.Nhs.WebUI/package.json @@ -80,7 +80,7 @@ "eslint": "^8.51.0", "file-loader": "^6.2.0", "jest": "^27.5.1", - "sass": "^1.85.1", + "sass": "^1.86.0", "sass-loader": "^11.1.1", "style-loader": "^2.0.0", "ts-jest": "^27.1.5", From 354818b401cf4813541c5a1de256346b723d1401 Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Tue, 18 Mar 2025 16:16:51 +0000 Subject: [PATCH 493/576] CSP Changes reverted --- LearningHub.Nhs.WebUI/Scripts/vuesrc/helpers/fileUpload.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/helpers/fileUpload.ts b/LearningHub.Nhs.WebUI/Scripts/vuesrc/helpers/fileUpload.ts index 907438e2b..2b9296669 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/helpers/fileUpload.ts +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/helpers/fileUpload.ts @@ -49,7 +49,7 @@ const MAX_FILE_SIZE = 10 * 1000 * 1000 * 1000; // 10GB // This list should correspond to the disallowed extensions contained in the FileType table const BLOCKED_FILE_EXTENSIONS = ['.app', '.asp', '.aspx', '.dll', '.dmg', '.exe', '.flv', '.f4v', '.js', '.jsp', - '.php', '.shtm', '.shtml', '.swf','.webm']; + '.php', '.shtm', '.shtml', '.swf', '.webm', '.bat', '.cmd', '.vbs', '.msi', '.pif', '.sh', '.tar', '.gz', '.7z', '.rar', '.sys', '.bak', '.iso','.torrent']; const IMAGE_FILE_EXTENSIONS = ['.apng', '.avif', '.bmp', '.cur', '.gif', '.ico', '.jfif', '.jpeg', '.jpg', '.pjp', '.pjpeg', '.png', '.psd', '.svg', '.tif', '.tiff', '.webp']; From 655a467a4cdbebc563934f121e71f1d34b42cfdf Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Tue, 18 Mar 2025 16:17:45 +0000 Subject: [PATCH 494/576] Revert "CSP Changes reverted" This reverts commit 354818b401cf4813541c5a1de256346b723d1401. --- LearningHub.Nhs.WebUI/Scripts/vuesrc/helpers/fileUpload.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/helpers/fileUpload.ts b/LearningHub.Nhs.WebUI/Scripts/vuesrc/helpers/fileUpload.ts index 2b9296669..907438e2b 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/helpers/fileUpload.ts +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/helpers/fileUpload.ts @@ -49,7 +49,7 @@ const MAX_FILE_SIZE = 10 * 1000 * 1000 * 1000; // 10GB // This list should correspond to the disallowed extensions contained in the FileType table const BLOCKED_FILE_EXTENSIONS = ['.app', '.asp', '.aspx', '.dll', '.dmg', '.exe', '.flv', '.f4v', '.js', '.jsp', - '.php', '.shtm', '.shtml', '.swf', '.webm', '.bat', '.cmd', '.vbs', '.msi', '.pif', '.sh', '.tar', '.gz', '.7z', '.rar', '.sys', '.bak', '.iso','.torrent']; + '.php', '.shtm', '.shtml', '.swf','.webm']; const IMAGE_FILE_EXTENSIONS = ['.apng', '.avif', '.bmp', '.cur', '.gif', '.ico', '.jfif', '.jpeg', '.jpg', '.pjp', '.pjpeg', '.png', '.psd', '.svg', '.tif', '.tiff', '.webp']; From 4f7aebbb1e1ef08f9aa04cdb05e5fa8f6551a86c Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Tue, 18 Mar 2025 16:19:49 +0000 Subject: [PATCH 495/576] Reverted CSP changes --- WebAPI/LearningHub.Nhs.API/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebAPI/LearningHub.Nhs.API/Program.cs b/WebAPI/LearningHub.Nhs.API/Program.cs index 0303c6397..4f7f68427 100644 --- a/WebAPI/LearningHub.Nhs.API/Program.cs +++ b/WebAPI/LearningHub.Nhs.API/Program.cs @@ -40,7 +40,7 @@ app.Use(async (context, next) => { - context.Response.Headers.Add("content-security-policy", "object-src 'none'; frame-ancestors 'none'; sandbox allow-forms allow-same-origin allow-scripts allow-popups; base-uri 'self';"); + ////context.Response.Headers.Add("content-security-policy", "object-src 'none'; frame-ancestors 'none'; sandbox allow-forms allow-same-origin allow-scripts allow-popups; base-uri 'self';"); context.Response.Headers.Add("Referrer-Policy", "no-referrer"); context.Response.Headers.Add("Strict-Transport-Security", "max-age=31536000; includeSubDomains"); context.Response.Headers.Add("X-Content-Type-Options", "nosniff"); From eaf3e21699edd5ebf1f0f4a1ba43666ae6902555 Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Tue, 18 Mar 2025 17:34:25 +0000 Subject: [PATCH 496/576] Reverted CSP changes for testing --- WebAPI/LearningHub.Nhs.API/Program.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/WebAPI/LearningHub.Nhs.API/Program.cs b/WebAPI/LearningHub.Nhs.API/Program.cs index 4f7f68427..0ce1978ff 100644 --- a/WebAPI/LearningHub.Nhs.API/Program.cs +++ b/WebAPI/LearningHub.Nhs.API/Program.cs @@ -38,16 +38,16 @@ app.UseMiddleware(); - app.Use(async (context, next) => - { - ////context.Response.Headers.Add("content-security-policy", "object-src 'none'; frame-ancestors 'none'; sandbox allow-forms allow-same-origin allow-scripts allow-popups; base-uri 'self';"); - context.Response.Headers.Add("Referrer-Policy", "no-referrer"); - context.Response.Headers.Add("Strict-Transport-Security", "max-age=31536000; includeSubDomains"); - context.Response.Headers.Add("X-Content-Type-Options", "nosniff"); - context.Response.Headers.Add("X-Frame-Options", "SAMEORIGIN"); - context.Response.Headers.Add("X-XSS-protection", "0"); - await next(); - }); + ////app.Use(async (context, next) => + ////{ + //// ////context.Response.Headers.Add("content-security-policy", "object-src 'none'; frame-ancestors 'none'; sandbox allow-forms allow-same-origin allow-scripts allow-popups; base-uri 'self';"); + //// context.Response.Headers.Add("Referrer-Policy", "no-referrer"); + //// context.Response.Headers.Add("Strict-Transport-Security", "max-age=31536000; includeSubDomains"); + //// context.Response.Headers.Add("X-Content-Type-Options", "nosniff"); + //// context.Response.Headers.Add("X-Frame-Options", "SAMEORIGIN"); + //// context.Response.Headers.Add("X-XSS-protection", "0"); + //// await next(); + ////}); app.UseEndpoints(endpoints => endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}")); From b70aa005fbd0fc463ba5ea1d2dd0a3ee2fc91bf2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 08:26:24 +0000 Subject: [PATCH 497/576] Bump @mediakind/mkplayer from 1.19.0 to 1.20.0 in /LearningHub.Nhs.WebUI (#1040) --- updated-dependencies: - dependency-name: "@mediakind/mkplayer" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- LearningHub.Nhs.WebUI/package-lock.json | 10 +++++----- LearningHub.Nhs.WebUI/package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/LearningHub.Nhs.WebUI/package-lock.json b/LearningHub.Nhs.WebUI/package-lock.json index 263333e70..aaf838cdd 100644 --- a/LearningHub.Nhs.WebUI/package-lock.json +++ b/LearningHub.Nhs.WebUI/package-lock.json @@ -10,7 +10,7 @@ "dependencies": { "@ckeditor/ckeditor5-build-classic": "16.0.0", "@ckeditor/ckeditor5-vue": "1.0.3", - "@mediakind/mkplayer": "1.19.0", + "@mediakind/mkplayer": "1.20.0", "@types/uuid": "^8.3.4", "axios": "^0.29.0", "babel-polyfill": "^6.26.0", @@ -3818,10 +3818,10 @@ } }, "node_modules/@mediakind/mkplayer": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/@mediakind/mkplayer/-/mkplayer-1.19.0.tgz", - "integrity": "sha512-DoRoS+am8/0Chb57DXNR4IPuVTqi5ZBB8rybVqnq4qPvWHGA5l/33iYkToPlLlM5LjJ2Pk3uF7QpFEYoiS0tsA==", - "license": "©2024 Copyright Mediakind Ltd. All Rights Reserved. Including All Downloadable Materials.", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/@mediakind/mkplayer/-/mkplayer-1.20.0.tgz", + "integrity": "sha512-8msi65ezI/MjTSakrO8w78tfIdqIDXP8MgIFBlM5H26OtLCdu7ywvsyvszud2rmBhz0GZSd0Km+Wr8SXikAZtQ==", + "license": "©2025 Copyright Mediakind Ltd. All Rights Reserved. Including All Downloadable Materials.", "dependencies": { "bitmovin-player": "8.193.0", "bitmovin-player-ui": "^3.52.0" diff --git a/LearningHub.Nhs.WebUI/package.json b/LearningHub.Nhs.WebUI/package.json index 673640964..bd5081a65 100644 --- a/LearningHub.Nhs.WebUI/package.json +++ b/LearningHub.Nhs.WebUI/package.json @@ -22,7 +22,7 @@ "dependencies": { "@ckeditor/ckeditor5-build-classic": "16.0.0", "@ckeditor/ckeditor5-vue": "1.0.3", - "@mediakind/mkplayer": "1.19.0", + "@mediakind/mkplayer": "1.20.0", "@types/uuid": "^8.3.4", "axios": "^0.29.0", "babel-polyfill": "^6.26.0", From 6b7dad8e72f69f6f67cc63d7663c52edc3ae77cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 08:29:34 +0000 Subject: [PATCH 498/576] Bump @mediakind/mkplayer in /AdminUI/LearningHub.Nhs.AdminUI (#1041) --- updated-dependencies: - dependency-name: "@mediakind/mkplayer" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- AdminUI/LearningHub.Nhs.AdminUI/package-lock.json | 10 +++++----- AdminUI/LearningHub.Nhs.AdminUI/package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json b/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json index dd199a92a..59acc2e38 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json +++ b/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json @@ -10,7 +10,7 @@ "dependencies": { "@ckeditor/ckeditor5-build-classic": "16.0.0", "@ckeditor/ckeditor5-vue": "1.0.3", - "@mediakind/mkplayer": "^1.19.0", + "@mediakind/mkplayer": "^1.20.0", "axios": "^0.19.1", "babel-polyfill": "^6.26.0", "bootstrap": "^4.6.2", @@ -3373,10 +3373,10 @@ } }, "node_modules/@mediakind/mkplayer": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/@mediakind/mkplayer/-/mkplayer-1.19.0.tgz", - "integrity": "sha512-DoRoS+am8/0Chb57DXNR4IPuVTqi5ZBB8rybVqnq4qPvWHGA5l/33iYkToPlLlM5LjJ2Pk3uF7QpFEYoiS0tsA==", - "license": "©2024 Copyright Mediakind Ltd. All Rights Reserved. Including All Downloadable Materials.", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/@mediakind/mkplayer/-/mkplayer-1.20.0.tgz", + "integrity": "sha512-8msi65ezI/MjTSakrO8w78tfIdqIDXP8MgIFBlM5H26OtLCdu7ywvsyvszud2rmBhz0GZSd0Km+Wr8SXikAZtQ==", + "license": "©2025 Copyright Mediakind Ltd. All Rights Reserved. Including All Downloadable Materials.", "dependencies": { "bitmovin-player": "8.193.0", "bitmovin-player-ui": "^3.52.0" diff --git a/AdminUI/LearningHub.Nhs.AdminUI/package.json b/AdminUI/LearningHub.Nhs.AdminUI/package.json index e8b76592d..c4948c231 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/package.json +++ b/AdminUI/LearningHub.Nhs.AdminUI/package.json @@ -22,7 +22,7 @@ "dependencies": { "@ckeditor/ckeditor5-build-classic": "16.0.0", "@ckeditor/ckeditor5-vue": "1.0.3", - "@mediakind/mkplayer": "^1.19.0", + "@mediakind/mkplayer": "^1.20.0", "axios": "^0.19.1", "babel-polyfill": "^6.26.0", "bootstrap": "^4.6.2", From 7dfaf18d635d320a1509de9bdb0510a31d452008 Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Wed, 19 Mar 2025 09:31:22 +0000 Subject: [PATCH 499/576] Reverted Open API and report API CSP changes also. --- OpenAPI/LearningHub.Nhs.OpenApi/Startup.cs | 20 +++++++++---------- .../LearningHub.Nhs.ReportApi/Program.cs | 20 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/OpenAPI/LearningHub.Nhs.OpenApi/Startup.cs b/OpenAPI/LearningHub.Nhs.OpenApi/Startup.cs index 14e875f62..627401b12 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi/Startup.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi/Startup.cs @@ -211,16 +211,16 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) c.OAuthUsePkce(); }); - app.Use(async (context, next) => - { - context.Response.Headers.Add("content-security-policy", "object-src 'none'; frame-ancestors 'none'; sandbox allow-forms allow-same-origin allow-scripts allow-popups; base-uri 'self';"); - context.Response.Headers.Add("Referrer-Policy", "no-referrer"); - context.Response.Headers.Add("Strict-Transport-Security", "max-age=31536000; includeSubDomains"); - context.Response.Headers.Add("X-Content-Type-Options", "nosniff"); - context.Response.Headers.Add("X-Frame-Options", "SAMEORIGIN"); - context.Response.Headers.Add("X-XSS-protection", "0"); - await next(); - }); + ////app.Use(async (context, next) => + ////{ + //// context.Response.Headers.Add("content-security-policy", "object-src 'none'; frame-ancestors 'none'; sandbox allow-forms allow-same-origin allow-scripts allow-popups; base-uri 'self';"); + //// context.Response.Headers.Add("Referrer-Policy", "no-referrer"); + //// context.Response.Headers.Add("Strict-Transport-Security", "max-age=31536000; includeSubDomains"); + //// context.Response.Headers.Add("X-Content-Type-Options", "nosniff"); + //// context.Response.Headers.Add("X-Frame-Options", "SAMEORIGIN"); + //// context.Response.Headers.Add("X-XSS-protection", "0"); + //// await next(); + ////}); app.UseHttpsRedirection(); diff --git a/ReportAPI/LearningHub.Nhs.ReportApi/Program.cs b/ReportAPI/LearningHub.Nhs.ReportApi/Program.cs index ac23e07ab..de1bb3e40 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi/Program.cs +++ b/ReportAPI/LearningHub.Nhs.ReportApi/Program.cs @@ -20,16 +20,16 @@ var app = builder.Build(); - app.Use(async (context, next) => - { - context.Response.Headers.Add("content-security-policy", "object-src 'none'; frame-ancestors 'none'; sandbox allow-forms allow-same-origin allow-scripts allow-popups; base-uri 'self';"); - context.Response.Headers.Add("Referrer-Policy", "no-referrer"); - context.Response.Headers.Add("Strict-Transport-Security", "max-age=31536000; includeSubDomains"); - context.Response.Headers.Add("X-Content-Type-Options", "nosniff"); - context.Response.Headers.Add("X-Frame-Options", "SAMEORIGIN"); - context.Response.Headers.Add("X-XSS-protection", "0"); - await next(); - }); + ////app.Use(async (context, next) => + ////{ + //// context.Response.Headers.Add("content-security-policy", "object-src 'none'; frame-ancestors 'none'; sandbox allow-forms allow-same-origin allow-scripts allow-popups; base-uri 'self';"); + //// context.Response.Headers.Add("Referrer-Policy", "no-referrer"); + //// context.Response.Headers.Add("Strict-Transport-Security", "max-age=31536000; includeSubDomains"); + //// context.Response.Headers.Add("X-Content-Type-Options", "nosniff"); + //// context.Response.Headers.Add("X-Frame-Options", "SAMEORIGIN"); + //// context.Response.Headers.Add("X-XSS-protection", "0"); + //// await next(); + ////}); app.UseRouting(); app.UseAuthorization(); From 6e6ca6d15e7c7affed882eed79908a3da04a1037 Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Wed, 19 Mar 2025 13:24:02 +0000 Subject: [PATCH 500/576] Reverted IN memeory ticket store --- LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs b/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs index bbd39d9e2..7e8682105 100644 --- a/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs +++ b/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs @@ -43,7 +43,7 @@ public static void ConfigureAuthentication(this IServiceCollection services, Lea options.SlidingExpiration = true; options.EventsType = typeof(CookieEventHandler); options.AccessDeniedPath = "/Home/AccessDenied"; - options.SessionStore = new InMemoryTicketStore(new ConcurrentDictionary()); + //// options.SessionStore = new InMemoryTicketStore(new ConcurrentDictionary()); }) .AddOpenIdConnect(AuthenticationScheme, options => { From 6faaaa028bdb2ba52950090f7f7481ee3a05f67e Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Wed, 19 Mar 2025 15:47:19 +0000 Subject: [PATCH 501/576] Revert "Reverted IN memeory ticket store" This reverts commit 6e6ca6d15e7c7affed882eed79908a3da04a1037. --- LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs b/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs index 7e8682105..bbd39d9e2 100644 --- a/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs +++ b/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs @@ -43,7 +43,7 @@ public static void ConfigureAuthentication(this IServiceCollection services, Lea options.SlidingExpiration = true; options.EventsType = typeof(CookieEventHandler); options.AccessDeniedPath = "/Home/AccessDenied"; - //// options.SessionStore = new InMemoryTicketStore(new ConcurrentDictionary()); + options.SessionStore = new InMemoryTicketStore(new ConcurrentDictionary()); }) .AddOpenIdConnect(AuthenticationScheme, options => { From 537c1bf1f15c0e78590e3c0f8a39b14f00036eb4 Mon Sep 17 00:00:00 2001 From: Arunima George Date: Wed, 19 Mar 2025 16:19:13 +0000 Subject: [PATCH 502/576] Changes made on Automated UI Test project part of build error. --- ...arningHub.Nhs.WebUI.AutomatedUiTests.csproj | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/LearningHub.Nhs.WebUI.AutomatedUiTests.csproj b/LearningHub.Nhs.WebUI.AutomatedUiTests/LearningHub.Nhs.WebUI.AutomatedUiTests.csproj index d4f40f3a1..d6bf3cd0d 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/LearningHub.Nhs.WebUI.AutomatedUiTests.csproj +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/LearningHub.Nhs.WebUI.AutomatedUiTests.csproj @@ -10,24 +10,6 @@ True - - - - - - - - PreserveNewest - true - PreserveNewest - - - PreserveNewest - true - PreserveNewest - - - From 91e17a7e1ff0f636d20ef1fcd227089fc7617032 Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Wed, 19 Mar 2025 17:11:33 +0000 Subject: [PATCH 503/576] Reverted in memmory ticket store --- LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs b/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs index bbd39d9e2..2d193ccc8 100644 --- a/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs +++ b/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs @@ -43,7 +43,7 @@ public static void ConfigureAuthentication(this IServiceCollection services, Lea options.SlidingExpiration = true; options.EventsType = typeof(CookieEventHandler); options.AccessDeniedPath = "/Home/AccessDenied"; - options.SessionStore = new InMemoryTicketStore(new ConcurrentDictionary()); + ////options.SessionStore = new InMemoryTicketStore(new ConcurrentDictionary()); }) .AddOpenIdConnect(AuthenticationScheme, options => { From 7c407a1255bad288074dab0d1eb6d2d9f3a35cf1 Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Wed, 19 Mar 2025 17:55:34 +0000 Subject: [PATCH 504/576] CSP - code added --- WebAPI/LearningHub.Nhs.API/Program.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/WebAPI/LearningHub.Nhs.API/Program.cs b/WebAPI/LearningHub.Nhs.API/Program.cs index 0ce1978ff..0303c6397 100644 --- a/WebAPI/LearningHub.Nhs.API/Program.cs +++ b/WebAPI/LearningHub.Nhs.API/Program.cs @@ -38,16 +38,16 @@ app.UseMiddleware(); - ////app.Use(async (context, next) => - ////{ - //// ////context.Response.Headers.Add("content-security-policy", "object-src 'none'; frame-ancestors 'none'; sandbox allow-forms allow-same-origin allow-scripts allow-popups; base-uri 'self';"); - //// context.Response.Headers.Add("Referrer-Policy", "no-referrer"); - //// context.Response.Headers.Add("Strict-Transport-Security", "max-age=31536000; includeSubDomains"); - //// context.Response.Headers.Add("X-Content-Type-Options", "nosniff"); - //// context.Response.Headers.Add("X-Frame-Options", "SAMEORIGIN"); - //// context.Response.Headers.Add("X-XSS-protection", "0"); - //// await next(); - ////}); + app.Use(async (context, next) => + { + context.Response.Headers.Add("content-security-policy", "object-src 'none'; frame-ancestors 'none'; sandbox allow-forms allow-same-origin allow-scripts allow-popups; base-uri 'self';"); + context.Response.Headers.Add("Referrer-Policy", "no-referrer"); + context.Response.Headers.Add("Strict-Transport-Security", "max-age=31536000; includeSubDomains"); + context.Response.Headers.Add("X-Content-Type-Options", "nosniff"); + context.Response.Headers.Add("X-Frame-Options", "SAMEORIGIN"); + context.Response.Headers.Add("X-XSS-protection", "0"); + await next(); + }); app.UseEndpoints(endpoints => endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}")); From 5c238e55b089ae3f1e5e73a4d99a0895d40e080c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Mar 2025 08:42:26 +0000 Subject: [PATCH 505/576] Bump sanitize-html in /AdminUI/LearningHub.Nhs.AdminUI (#1042) Bumps [sanitize-html](https://github.com/apostrophecms/sanitize-html) from 2.14.0 to 2.15.0. - [Changelog](https://github.com/apostrophecms/sanitize-html/blob/main/CHANGELOG.md) - [Commits](https://github.com/apostrophecms/sanitize-html/compare/2.14.0...2.15.0) --- updated-dependencies: - dependency-name: sanitize-html dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- AdminUI/LearningHub.Nhs.AdminUI/package-lock.json | 9 +++++---- AdminUI/LearningHub.Nhs.AdminUI/package.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json b/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json index 59acc2e38..b640a0051 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json +++ b/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json @@ -23,7 +23,7 @@ "navigator.sendbeacon": "0.0.20", "nhsuk-frontend": "^6.1.2", "openseadragon": "^2.4.2", - "sanitize-html": "^2.14.0", + "sanitize-html": "^2.15.0", "save": "^2.9.0", "ts-debounce": "2.3.0", "tus-js-client": "^2.3.2", @@ -15981,9 +15981,10 @@ "dev": true }, "node_modules/sanitize-html": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-2.14.0.tgz", - "integrity": "sha512-CafX+IUPxZshXqqRaG9ZClSlfPVjSxI0td7n07hk8QO2oO+9JDnlcL8iM8TWeOXOIBFgIOx6zioTzM53AOMn3g==", + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-2.15.0.tgz", + "integrity": "sha512-wIjst57vJGpLyBP8ioUbg6ThwJie5SuSIjHxJg53v5Fg+kUK+AXlb7bK3RNXpp315MvwM+0OBGCV6h5pPHsVhA==", + "license": "MIT", "dependencies": { "deepmerge": "^4.2.2", "escape-string-regexp": "^4.0.0", diff --git a/AdminUI/LearningHub.Nhs.AdminUI/package.json b/AdminUI/LearningHub.Nhs.AdminUI/package.json index c4948c231..7e3925598 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/package.json +++ b/AdminUI/LearningHub.Nhs.AdminUI/package.json @@ -35,7 +35,7 @@ "navigator.sendbeacon": "0.0.20", "nhsuk-frontend": "^6.1.2", "openseadragon": "^2.4.2", - "sanitize-html": "^2.14.0", + "sanitize-html": "^2.15.0", "save": "^2.9.0", "ts-debounce": "2.3.0", "tus-js-client": "^2.3.2", From b4f263e4b0e228c2815cc4ddeac9a1db59185993 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Mar 2025 08:50:45 +0000 Subject: [PATCH 506/576] Bump sanitize-html from 2.14.0 to 2.15.0 in /LearningHub.Nhs.WebUI (#1043) Bumps [sanitize-html](https://github.com/apostrophecms/sanitize-html) from 2.14.0 to 2.15.0. - [Changelog](https://github.com/apostrophecms/sanitize-html/blob/main/CHANGELOG.md) - [Commits](https://github.com/apostrophecms/sanitize-html/compare/2.14.0...2.15.0) --- updated-dependencies: - dependency-name: sanitize-html dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- LearningHub.Nhs.WebUI/package-lock.json | 9 +++++---- LearningHub.Nhs.WebUI/package.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/LearningHub.Nhs.WebUI/package-lock.json b/LearningHub.Nhs.WebUI/package-lock.json index aaf838cdd..663f5149f 100644 --- a/LearningHub.Nhs.WebUI/package-lock.json +++ b/LearningHub.Nhs.WebUI/package-lock.json @@ -25,7 +25,7 @@ "nhsuk-frontend": "^7.1.0", "node": "^14.0.0", "openseadragon": "^2.4.2", - "sanitize-html": "^2.14.0", + "sanitize-html": "^2.15.0", "save": "^2.9.0", "ts-debounce": "2.3.0", "tus-js-client": "^2.3.2", @@ -16887,9 +16887,10 @@ "dev": true }, "node_modules/sanitize-html": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-2.14.0.tgz", - "integrity": "sha512-CafX+IUPxZshXqqRaG9ZClSlfPVjSxI0td7n07hk8QO2oO+9JDnlcL8iM8TWeOXOIBFgIOx6zioTzM53AOMn3g==", + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-2.15.0.tgz", + "integrity": "sha512-wIjst57vJGpLyBP8ioUbg6ThwJie5SuSIjHxJg53v5Fg+kUK+AXlb7bK3RNXpp315MvwM+0OBGCV6h5pPHsVhA==", + "license": "MIT", "dependencies": { "deepmerge": "^4.2.2", "escape-string-regexp": "^4.0.0", diff --git a/LearningHub.Nhs.WebUI/package.json b/LearningHub.Nhs.WebUI/package.json index bd5081a65..ca6f0deb8 100644 --- a/LearningHub.Nhs.WebUI/package.json +++ b/LearningHub.Nhs.WebUI/package.json @@ -37,7 +37,7 @@ "nhsuk-frontend": "^7.1.0", "node": "^14.0.0", "openseadragon": "^2.4.2", - "sanitize-html": "^2.14.0", + "sanitize-html": "^2.15.0", "save": "^2.9.0", "ts-debounce": "2.3.0", "tus-js-client": "^2.3.2", From 62c054a0e4f1c03df2e7a790f88c105a779c4432 Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Thu, 20 Mar 2025 10:06:07 +0000 Subject: [PATCH 507/576] Removed Sandbox CSP --- WebAPI/LearningHub.Nhs.API/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebAPI/LearningHub.Nhs.API/Program.cs b/WebAPI/LearningHub.Nhs.API/Program.cs index 0303c6397..4e2df9499 100644 --- a/WebAPI/LearningHub.Nhs.API/Program.cs +++ b/WebAPI/LearningHub.Nhs.API/Program.cs @@ -40,7 +40,7 @@ app.Use(async (context, next) => { - context.Response.Headers.Add("content-security-policy", "object-src 'none'; frame-ancestors 'none'; sandbox allow-forms allow-same-origin allow-scripts allow-popups; base-uri 'self';"); + context.Response.Headers.Add("content-security-policy", "object-src 'none'; frame-ancestors 'none'; base-uri 'self';"); context.Response.Headers.Add("Referrer-Policy", "no-referrer"); context.Response.Headers.Add("Strict-Transport-Security", "max-age=31536000; includeSubDomains"); context.Response.Headers.Add("X-Content-Type-Options", "nosniff"); From 394baf81ebe10c1c3bc44b78aa633adde02d83ec Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Thu, 20 Mar 2025 12:13:02 +0000 Subject: [PATCH 508/576] Added in memory ticket store --- LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs b/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs index 2d193ccc8..bbd39d9e2 100644 --- a/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs +++ b/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs @@ -43,7 +43,7 @@ public static void ConfigureAuthentication(this IServiceCollection services, Lea options.SlidingExpiration = true; options.EventsType = typeof(CookieEventHandler); options.AccessDeniedPath = "/Home/AccessDenied"; - ////options.SessionStore = new InMemoryTicketStore(new ConcurrentDictionary()); + options.SessionStore = new InMemoryTicketStore(new ConcurrentDictionary()); }) .AddOpenIdConnect(AuthenticationScheme, options => { From b310ed43ed7b27b89dc0422ee4cd1d7f39255077 Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Thu, 20 Mar 2025 14:06:32 +0000 Subject: [PATCH 509/576] Reverted in memory ticket store from RC --- LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs | 1 - WebAPI/LearningHub.Nhs.API/Program.cs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs b/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs index bbd39d9e2..2994bd3b5 100644 --- a/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs +++ b/LearningHub.Nhs.WebUI/Startup/AuthenticationConfiguration.cs @@ -43,7 +43,6 @@ public static void ConfigureAuthentication(this IServiceCollection services, Lea options.SlidingExpiration = true; options.EventsType = typeof(CookieEventHandler); options.AccessDeniedPath = "/Home/AccessDenied"; - options.SessionStore = new InMemoryTicketStore(new ConcurrentDictionary()); }) .AddOpenIdConnect(AuthenticationScheme, options => { diff --git a/WebAPI/LearningHub.Nhs.API/Program.cs b/WebAPI/LearningHub.Nhs.API/Program.cs index 4e2df9499..0303c6397 100644 --- a/WebAPI/LearningHub.Nhs.API/Program.cs +++ b/WebAPI/LearningHub.Nhs.API/Program.cs @@ -40,7 +40,7 @@ app.Use(async (context, next) => { - context.Response.Headers.Add("content-security-policy", "object-src 'none'; frame-ancestors 'none'; base-uri 'self';"); + context.Response.Headers.Add("content-security-policy", "object-src 'none'; frame-ancestors 'none'; sandbox allow-forms allow-same-origin allow-scripts allow-popups; base-uri 'self';"); context.Response.Headers.Add("Referrer-Policy", "no-referrer"); context.Response.Headers.Add("Strict-Transport-Security", "max-age=31536000; includeSubDomains"); context.Response.Headers.Add("X-Content-Type-Options", "nosniff"); From 429d0d63126b7e1e9c330bbaf3b9a9778872c516 Mon Sep 17 00:00:00 2001 From: Arunima George Date: Thu, 20 Mar 2025 16:30:10 +0000 Subject: [PATCH 510/576] TD-5134: Fixed the issue to retain the input text even if error occurs --- .../Controllers/AccountController.cs | 4 +- .../Account/AccountCreationDateViewModel.cs | 60 +++++++++++++++++-- 2 files changed, 56 insertions(+), 8 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Controllers/AccountController.cs b/LearningHub.Nhs.WebUI/Controllers/AccountController.cs index 37813a17c..bdd0cf317 100644 --- a/LearningHub.Nhs.WebUI/Controllers/AccountController.cs +++ b/LearningHub.Nhs.WebUI/Controllers/AccountController.cs @@ -897,7 +897,7 @@ public async Task CreateAccountWorkStartDate(AccountCreationViewM } await this.multiPageFormService.SetMultiPageFormData(accountCreation, MultiPageFormDataFeature.AddRegistrationPrompt, this.TempData); - var dateVM = accountCreation.StartDate.HasValue ? new AccountCreationDateViewModel() { Day = accountCreation.StartDate.Value.Day, Month = accountCreation.StartDate.GetValueOrDefault().Month, Year = accountCreation.StartDate.Value.Year, FilterText = accountCreationViewModel.FilterText, ReturnToConfirmation = accountCreationViewModel.ReturnToConfirmation } : new AccountCreationDateViewModel() { FilterText = accountCreationViewModel.FilterText, ReturnToConfirmation = accountCreationViewModel.ReturnToConfirmation }; + var dateVM = accountCreation.StartDate.HasValue ? new AccountCreationDateViewModel() { Day = accountCreation.StartDate.HasValue ? accountCreation.StartDate.Value.Day.ToString() : string.Empty, Month = accountCreation.StartDate.HasValue ? accountCreation.StartDate.GetValueOrDefault().Month.ToString() : string.Empty, Year = accountCreation.StartDate.HasValue ? accountCreation.StartDate.Value.Year.ToString() : string.Empty, FilterText = accountCreationViewModel.FilterText, ReturnToConfirmation = accountCreationViewModel.ReturnToConfirmation } : new AccountCreationDateViewModel() { FilterText = accountCreationViewModel.FilterText, ReturnToConfirmation = accountCreationViewModel.ReturnToConfirmation }; if (!string.IsNullOrWhiteSpace(accountCreationViewModel.PrimarySpecialtyId) && string.IsNullOrWhiteSpace(accountCreationViewModel.FilterText)) { var specialty = this.specialtyService.GetSpecialtiesAsync().Result.FirstOrDefault(x => x.Id == specialtyId); @@ -959,7 +959,7 @@ public async Task CreateAccountStartDate(bool? returnToConfirmati } } - var dateVM = accountCreation.StartDate.HasValue ? new AccountCreationDateViewModel() { Day = accountCreation.StartDate.Value.Day, Month = accountCreation.StartDate.GetValueOrDefault().Month, Year = accountCreation.StartDate.Value.Year, ReturnToConfirmation = returnToConfirmation } : new AccountCreationDateViewModel() { ReturnToConfirmation = returnToConfirmation }; + var dateVM = accountCreation.StartDate.HasValue ? new AccountCreationDateViewModel() { Day = accountCreation.StartDate.HasValue ? accountCreation.StartDate.Value.Day.ToString() : string.Empty, Month = accountCreation.StartDate.HasValue ? accountCreation.StartDate.GetValueOrDefault().Month.ToString() : string.Empty, Year = accountCreation.StartDate.HasValue ? accountCreation.StartDate.Value.Year.ToString() : string.Empty, ReturnToConfirmation = returnToConfirmation } : new AccountCreationDateViewModel() { ReturnToConfirmation = returnToConfirmation }; return this.View("CreateAccountWorkStartDate", dateVM); } diff --git a/LearningHub.Nhs.WebUI/Models/Account/AccountCreationDateViewModel.cs b/LearningHub.Nhs.WebUI/Models/Account/AccountCreationDateViewModel.cs index c17fad8a9..b97373d84 100644 --- a/LearningHub.Nhs.WebUI/Models/Account/AccountCreationDateViewModel.cs +++ b/LearningHub.Nhs.WebUI/Models/Account/AccountCreationDateViewModel.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; + using System.Linq; using LearningHub.Nhs.WebUI.Helpers; /// @@ -13,17 +14,32 @@ public class AccountCreationDateViewModel : AccountCreationViewModel, IValidatab /// /// Gets or sets the Day. /// - public int? Day { get; set; } + public string Day { get; set; } + + /// + /// Gets or sets the Day Field. + /// + public int? DayInput { get; set; } /// /// Gets or sets the Country. /// - public int? Month { get; set; } + public string Month { get; set; } + + /// + /// Gets or sets the Month input. + /// + public int? MonthInput { get; set; } /// /// Gets or sets the Year. /// - public int? Year { get; set; } + public string Year { get; set; } + + /// + /// Gets or sets YearInput. + /// + public int? YearInput { get; set; } /// /// Gets or sets the GetDate. @@ -31,14 +47,46 @@ public class AccountCreationDateViewModel : AccountCreationViewModel, IValidatab /// DateTime. public DateTime? GetDate() { - return (this.Day.HasValue && this.Month.HasValue && this.Year.HasValue) ? new DateTime(this.Year!.Value, this.Month!.Value, this.Day!.Value) : (DateTime?)null; + return (this.DayInput.HasValue && this.MonthInput.HasValue && this.YearInput.HasValue) ? new DateTime(this.YearInput!.Value, this.MonthInput!.Value, this.DayInput!.Value) : (DateTime?)null; } /// public IEnumerable Validate(ValidationContext validationContext) { - return DateValidator.ValidateDate(this.Day, this.Month, this.Year, "valid start date") - .ToValidationResultList(nameof(this.Day), nameof(this.Month), nameof(this.Year)); + var validationResults = new List(); + int parsedDay = 0; + int parsedMonth = 0; + int parsedYear = 0; + + if (!string.IsNullOrWhiteSpace(this.Day) && !int.TryParse(this.Day, out parsedDay)) + { + validationResults.Add(new ValidationResult( + $"The value '{this.Day}' is not valid for Day.", new[] { nameof(this.Day) })); + } + + if (!string.IsNullOrWhiteSpace(this.Month) && !int.TryParse(this.Month, out parsedMonth)) + { + validationResults.Add(new ValidationResult( + $"The value '{this.Month}' is not valid for Month.", new[] { nameof(this.Month) })); + } + + if (!string.IsNullOrWhiteSpace(this.Year) && !int.TryParse(this.Year, out parsedYear)) + { + validationResults.Add(new ValidationResult( + $"The value '{this.Year}' is not valid for Year.", new[] { nameof(this.Year) })); + } + + if (validationResults.Count > 0) + { + return validationResults; + } + + this.DayInput = parsedDay; + this.MonthInput = parsedMonth; + this.YearInput = parsedYear; + + return DateValidator.ValidateDate(this.DayInput, this.MonthInput, this.YearInput, "valid start date") + .ToValidationResultList(nameof(this.Day), nameof(this.Month), nameof(this.Year)); } } } From 3f030a96cced7a3be38b052552fd2f36a1e197b6 Mon Sep 17 00:00:00 2001 From: Arunima George Date: Thu, 20 Mar 2025 16:34:06 +0000 Subject: [PATCH 511/576] TD-5134: removing unused namesapce --- .../Models/Account/AccountCreationDateViewModel.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/LearningHub.Nhs.WebUI/Models/Account/AccountCreationDateViewModel.cs b/LearningHub.Nhs.WebUI/Models/Account/AccountCreationDateViewModel.cs index b97373d84..68727eb35 100644 --- a/LearningHub.Nhs.WebUI/Models/Account/AccountCreationDateViewModel.cs +++ b/LearningHub.Nhs.WebUI/Models/Account/AccountCreationDateViewModel.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; - using System.Linq; using LearningHub.Nhs.WebUI.Helpers; /// From ee85515d29a65874dc375f458d8bbdd241e37dc5 Mon Sep 17 00:00:00 2001 From: AnjuJose011 <154979799+AnjuJose011@users.noreply.github.com> Date: Tue, 25 Mar 2025 15:47:22 +0000 Subject: [PATCH 512/576] Update ProviderController.cs --- .../LearningHub.Nhs.OpenApi/Controllers/ProviderController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/ProviderController.cs b/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/ProviderController.cs index 57d74f642..48da8b2b8 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/ProviderController.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/ProviderController.cs @@ -52,7 +52,7 @@ public async Task GetAsync(int id) } /// - /// Get providers by user Id. + /// Get providers details by user Id. /// /// The user id. /// The . From 175d83378ab159663e24c17b26120dcbabaf6290 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 Mar 2025 09:08:19 +0000 Subject: [PATCH 513/576] Bump axios from 0.29.0 to 0.30.0 in /LearningHub.Nhs.WebUI (#1046) Bumps [axios](https://github.com/axios/axios) from 0.29.0 to 0.30.0. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v0.30.0/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v0.29.0...v0.30.0) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- LearningHub.Nhs.WebUI/package-lock.json | 9 +++++---- LearningHub.Nhs.WebUI/package.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/LearningHub.Nhs.WebUI/package-lock.json b/LearningHub.Nhs.WebUI/package-lock.json index 663f5149f..c459b48a4 100644 --- a/LearningHub.Nhs.WebUI/package-lock.json +++ b/LearningHub.Nhs.WebUI/package-lock.json @@ -12,7 +12,7 @@ "@ckeditor/ckeditor5-vue": "1.0.3", "@mediakind/mkplayer": "1.20.0", "@types/uuid": "^8.3.4", - "axios": "^0.29.0", + "axios": "^0.30.0", "babel-polyfill": "^6.26.0", "bootstrap": "^4.6.2", "ckeditor4-vue": "^0.2.0", @@ -5858,9 +5858,10 @@ } }, "node_modules/axios": { - "version": "0.29.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.29.0.tgz", - "integrity": "sha512-Kjsq1xisgO5DjjNQwZFsy0gpcU1P2j36dZeQDXVhpIU26GVgkDUnROaHLSuluhMqtDE7aKA2hbKXG5yu5DN8Tg==", + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.30.0.tgz", + "integrity": "sha512-Z4F3LjCgfjZz8BMYalWdMgAQUnEtKDmpwNHjh/C8pQZWde32TF64cqnSeyL3xD/aTIASRU30RHTNzRiV/NpGMg==", + "license": "MIT", "dependencies": { "follow-redirects": "^1.15.4", "form-data": "^4.0.0", diff --git a/LearningHub.Nhs.WebUI/package.json b/LearningHub.Nhs.WebUI/package.json index ca6f0deb8..f07a417de 100644 --- a/LearningHub.Nhs.WebUI/package.json +++ b/LearningHub.Nhs.WebUI/package.json @@ -24,7 +24,7 @@ "@ckeditor/ckeditor5-vue": "1.0.3", "@mediakind/mkplayer": "1.20.0", "@types/uuid": "^8.3.4", - "axios": "^0.29.0", + "axios": "^0.30.0", "babel-polyfill": "^6.26.0", "bootstrap": "^4.6.2", "ckeditor4-vue": "^0.2.0", From 082a4759514fe4a3fe61395d92507ab6e66ac4b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 Mar 2025 09:20:17 +0000 Subject: [PATCH 514/576] Bump axios from 0.19.2 to 0.30.0 in /AdminUI/LearningHub.Nhs.AdminUI (#1047) Bumps [axios](https://github.com/axios/axios) from 0.19.2 to 0.30.0. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v0.30.0/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v0.19.2...v0.30.0) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../LearningHub.Nhs.AdminUI/package-lock.json | 311 ++++++------------ AdminUI/LearningHub.Nhs.AdminUI/package.json | 2 +- 2 files changed, 100 insertions(+), 213 deletions(-) diff --git a/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json b/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json index b640a0051..382c683cb 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json +++ b/AdminUI/LearningHub.Nhs.AdminUI/package-lock.json @@ -11,7 +11,7 @@ "@ckeditor/ckeditor5-build-classic": "16.0.0", "@ckeditor/ckeditor5-vue": "1.0.3", "@mediakind/mkplayer": "^1.20.0", - "axios": "^0.19.1", + "axios": "^0.30.0", "babel-polyfill": "^6.26.0", "bootstrap": "^4.6.2", "ckeditor4-vue": "^0.2.0", @@ -5198,8 +5198,7 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/atob": { "version": "2.1.2", @@ -5214,12 +5213,29 @@ } }, "node_modules/axios": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", - "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", - "deprecated": "Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410", + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.30.0.tgz", + "integrity": "sha512-Z4F3LjCgfjZz8BMYalWdMgAQUnEtKDmpwNHjh/C8pQZWde32TF64cqnSeyL3xD/aTIASRU30RHTNzRiV/NpGMg==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.4", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/axios/node_modules/form-data": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", + "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", + "license": "MIT", "dependencies": { - "follow-redirects": "1.5.10" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" } }, "node_modules/babel-code-frame": { @@ -6636,10 +6652,10 @@ } }, "node_modules/call-bind-apply-helpers": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", - "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", - "dev": true, + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" @@ -6648,15 +6664,6 @@ "node": ">= 0.4" } }, - "node_modules/call-bind-apply-helpers/node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/call-bound": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", @@ -6673,51 +6680,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/call-bound/node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/call-bound/node_modules/get-intrinsic": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", - "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", - "dev": true, - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "function-bind": "^1.1.2", - "get-proto": "^1.0.0", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/call-bound/node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -6976,7 +6938,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, "dependencies": { "delayed-stream": "~1.0.0" }, @@ -7598,14 +7559,6 @@ "node": ">=0.11.0" } }, - "node_modules/debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dependencies": { - "ms": "2.0.0" - } - }, "node_modules/decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", @@ -7867,7 +7820,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, "engines": { "node": ">=0.4.0" } @@ -8053,7 +8005,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "dev": true, "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", @@ -8201,7 +8152,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "dev": true, "engines": { "node": ">= 0.4" } @@ -8210,7 +8160,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, "engines": { "node": ">= 0.4" } @@ -8225,7 +8174,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "dev": true, "dependencies": { "es-errors": "^1.3.0" }, @@ -8233,6 +8181,21 @@ "node": ">= 0.4" } }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es5-ext": { "version": "0.10.53", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", @@ -9222,14 +9185,23 @@ } }, "node_modules/follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "dependencies": { - "debug": "=3.1.0" - }, + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", "engines": { "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } } }, "node_modules/for-in": { @@ -9311,10 +9283,13 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/functions-have-names": { "version": "1.2.3", @@ -9343,14 +9318,24 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "dev": true, + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -9369,7 +9354,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "dev": true, "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" @@ -9473,7 +9457,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -9538,10 +9521,10 @@ } }, "node_modules/has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", - "dev": true, + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -9550,12 +9533,12 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -9637,7 +9620,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, "dependencies": { "function-bind": "^1.1.2" }, @@ -9645,15 +9627,6 @@ "node": ">= 0.4" } }, - "node_modules/hasown/node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -14204,7 +14177,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "dev": true, "engines": { "node": ">= 0.4" } @@ -14398,7 +14370,6 @@ "version": "1.47.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -14407,7 +14378,6 @@ "version": "2.1.30", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", - "dev": true, "dependencies": { "mime-db": "1.47.0" }, @@ -14523,7 +14493,8 @@ "node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true }, "node_modules/multicast-dns": { "version": "6.2.3", @@ -15540,6 +15511,12 @@ "node": ">= 0.10" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, "node_modules/prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -16401,51 +16378,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/side-channel-map/node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-map/node_modules/get-intrinsic": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", - "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", - "dev": true, - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "function-bind": "^1.1.2", - "get-proto": "^1.0.0", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-map/node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/side-channel-map/node_modules/object-inspect": { "version": "1.13.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", @@ -16477,51 +16409,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/side-channel-weakmap/node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-weakmap/node_modules/get-intrinsic": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", - "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", - "dev": true, - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "function-bind": "^1.1.2", - "get-proto": "^1.0.0", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-weakmap/node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/side-channel-weakmap/node_modules/object-inspect": { "version": "1.13.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", diff --git a/AdminUI/LearningHub.Nhs.AdminUI/package.json b/AdminUI/LearningHub.Nhs.AdminUI/package.json index 7e3925598..d65e5e44f 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/package.json +++ b/AdminUI/LearningHub.Nhs.AdminUI/package.json @@ -23,7 +23,7 @@ "@ckeditor/ckeditor5-build-classic": "16.0.0", "@ckeditor/ckeditor5-vue": "1.0.3", "@mediakind/mkplayer": "^1.20.0", - "axios": "^0.19.1", + "axios": "^0.30.0", "babel-polyfill": "^6.26.0", "bootstrap": "^4.6.2", "ckeditor4-vue": "^0.2.0", From 97814e32836039f8870648d263dd00c092fd8989 Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Thu, 27 Mar 2025 11:27:06 +0000 Subject: [PATCH 515/576] TD-3730: No Rate limit Enabled --- .../LearningHub.Nhs.AdminUI.csproj | 2 +- .../Configuration/Settings.cs | 10 ++ .../Controllers/AccountController.cs | 16 +++- .../Controllers/HomeController.cs | 33 ++----- .../Interfaces/IUserService.cs | 9 ++ .../LearningHub.Nhs.WebUI.csproj | 2 +- .../Middleware/LHIPRateLimitMiddleware.cs | 57 ----------- LearningHub.Nhs.WebUI/Program.cs | 1 - .../ServiceCollectionExtension.cs | 14 --- LearningHub.Nhs.WebUI/Services/UserService.cs | 25 +++++ .../TooManyRequests.cshtml | 6 -- LearningHub.Nhs.WebUI/appsettings.json | 15 +-- .../LearningHub.Nhs.OpenApi.Models.csproj | 2 +- ...gHub.Nhs.OpenApi.Services.Interface.csproj | 2 +- .../LearningHub.Nhs.OpenApi.Services.csproj | 2 +- ...ub.Nhs.ReportApi.Services.Interface.csproj | 2 +- ...ub.Nhs.ReportApi.Services.UnitTests.csproj | 2 +- .../LearningHub.Nhs.ReportApi.Services.csproj | 2 +- .../LearningHub.Nhs.ReportApi.Shared.csproj | 2 +- .../LearningHub.Nhs.ReportApi.csproj | 2 +- .../LearningHub.Nhs.ReportApi/web.config | 15 +++ .../Controllers/UserController.cs | 31 ++++++ .../LearningHub.Nhs.Api.csproj | 2 +- .../Startup/ServiceMappings.cs | 3 + .../LearningHub.Nhs.Api.Shared.csproj | 2 +- .../LearningHub.Nhs.Api.UnitTests.csproj | 2 +- .../LearningHub.Nhs.Database.sqlproj | 1 + .../Tables/Hub/PasswordResetRequests.sql | 17 ++++ .../IUserPasswordResetRequestsRepository.cs | 32 +++++++ ...earningHub.Nhs.Repository.Interface.csproj | 2 +- .../LearningHub.Nhs.Repository.csproj | 2 +- .../LearningHubDbContext.cs | 5 + .../Map/PasswordResetRequestsMap.cs | 24 +++++ .../UserPasswordResetRequestsRepository.cs | 86 +++++++++++++++++ .../IUserPasswordResetRequestsService.cs | 33 +++++++ .../LearningHub.Nhs.Services.Interface.csproj | 2 +- .../LearningHub.Nhs.Services.UnitTests.csproj | 2 +- .../LearningHub.Nhs.Services.csproj | 2 +- .../UserPasswordResetRequestsService.cs | 96 +++++++++++++++++++ ...earningHub.Nhs.Migration.ConsoleApp.csproj | 2 +- ...LearningHub.Nhs.Migration.Interface.csproj | 2 +- .../LearningHub.Nhs.Migration.Models.csproj | 2 +- ...ub.Nhs.Migration.Staging.Repository.csproj | 2 +- ...LearningHub.Nhs.Migration.UnitTests.csproj | 2 +- .../LearningHub.Nhs.Migration.csproj | 2 +- 45 files changed, 436 insertions(+), 141 deletions(-) delete mode 100644 LearningHub.Nhs.WebUI/Middleware/LHIPRateLimitMiddleware.cs rename LearningHub.Nhs.WebUI/Views/{Shared => Account}/TooManyRequests.cshtml (79%) create mode 100644 ReportAPI/LearningHub.Nhs.ReportApi/web.config create mode 100644 WebAPI/LearningHub.Nhs.Database/Tables/Hub/PasswordResetRequests.sql create mode 100644 WebAPI/LearningHub.Nhs.Repository.Interface/IUserPasswordResetRequestsRepository.cs create mode 100644 WebAPI/LearningHub.Nhs.Repository/Map/PasswordResetRequestsMap.cs create mode 100644 WebAPI/LearningHub.Nhs.Repository/UserPasswordResetRequestsRepository.cs create mode 100644 WebAPI/LearningHub.Nhs.Services.Interface/IUserPasswordResetRequestsService.cs create mode 100644 WebAPI/LearningHub.Nhs.Services/UserPasswordResetRequestsService.cs diff --git a/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj b/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj index b7d26718c..eba6b6ffa 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj +++ b/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj @@ -89,7 +89,7 @@ - + diff --git a/LearningHub.Nhs.WebUI/Configuration/Settings.cs b/LearningHub.Nhs.WebUI/Configuration/Settings.cs index 9764d293e..ccb06c921 100644 --- a/LearningHub.Nhs.WebUI/Configuration/Settings.cs +++ b/LearningHub.Nhs.WebUI/Configuration/Settings.cs @@ -186,6 +186,16 @@ public Settings() /// public string GoogleAnalyticsId { get; set; } + /// + /// Gets or sets the PasswordRequestLimitingPeriod. + /// + public int PasswordRequestLimitingPeriod { get; set; } + + /// + /// Gets or sets the PasswordRequestLimit. + /// + public int PasswordRequestLimit { get; set; } + /// /// Gets or sets the SupportUrls. /// diff --git a/LearningHub.Nhs.WebUI/Controllers/AccountController.cs b/LearningHub.Nhs.WebUI/Controllers/AccountController.cs index bdd0cf317..b082eaee4 100644 --- a/LearningHub.Nhs.WebUI/Controllers/AccountController.cs +++ b/LearningHub.Nhs.WebUI/Controllers/AccountController.cs @@ -1198,8 +1198,20 @@ public async Task ForgotPassword(Models.Account.ForgotPasswordVie return this.Ok(new { duplicate = true }); } - await this.userService.ForgotPasswordAsync(model.EmailAddress); - return this.View("ForgotPasswordAcknowledgement"); + var passwordRequestLimitingPeriod = this.Settings.PasswordRequestLimitingPeriod; + var passwordRequestLimit = this.Settings.PasswordRequestLimit; + var status = await this.userService.CanRequestPasswordResetAsync(model.EmailAddress, passwordRequestLimitingPeriod, passwordRequestLimit); + if (status) + { + await this.userService.ForgotPasswordAsync(model.EmailAddress); + return this.View("ForgotPasswordAcknowledgement"); + } + else + { + this.ViewBag.Period = passwordRequestLimitingPeriod; + this.ViewBag.Limit = passwordRequestLimit; + return this.View("TooManyRequests"); + } } /// diff --git a/LearningHub.Nhs.WebUI/Controllers/HomeController.cs b/LearningHub.Nhs.WebUI/Controllers/HomeController.cs index 51d6be9db..92d550393 100644 --- a/LearningHub.Nhs.WebUI/Controllers/HomeController.cs +++ b/LearningHub.Nhs.WebUI/Controllers/HomeController.cs @@ -6,7 +6,6 @@ namespace LearningHub.Nhs.WebUI.Controllers using System.Linq; using System.Net.Http; using System.Threading.Tasks; - using elfhHub.Nhs.Models.Common; using LearningHub.Nhs.Models.Content; using LearningHub.Nhs.Models.Enums.Content; using LearningHub.Nhs.Models.Extensions; @@ -21,7 +20,6 @@ namespace LearningHub.Nhs.WebUI.Controllers using Microsoft.AspNetCore.Diagnostics; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; - using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Microsoft.FeatureManagement; @@ -54,7 +52,6 @@ public class HomeController : BaseController /// Dashboard service. /// Content service. /// featureManager. - /// config. public HomeController( IHttpClientFactory httpClientFactory, IWebHostEnvironment hostingEnvironment, @@ -65,8 +62,7 @@ public HomeController( LearningHubAuthServiceConfig authConfig, IDashboardService dashboardService, IContentService contentService, - IFeatureManager featureManager, - Microsoft.Extensions.Configuration.IConfiguration configuration) + IFeatureManager featureManager) : base(hostingEnvironment, httpClientFactory, logger, settings.Value) { this.authConfig = authConfig; @@ -75,7 +71,6 @@ public HomeController( this.dashboardService = dashboardService; this.contentService = contentService; this.featureManager = featureManager; - this.configuration = configuration; } /// @@ -170,26 +165,16 @@ public IActionResult Error(int? httpStatusCode) } else { - if (originalPath == "/TooManyRequests") + this.ViewBag.ErrorHeader = httpStatusCode.Value switch { - this.ViewBag.Period = this.configuration["IpRateLimiting:GeneralRules:0:Period"]; - this.ViewBag.Limit = this.configuration["IpRateLimiting:GeneralRules:0:Limit"]; - - return this.View("TooManyRequests"); - } - else - { - this.ViewBag.ErrorHeader = httpStatusCode.Value switch - { - 401 => "You do not have permission to access this page", - 404 => "We cannot find the page you are looking for", - _ => "We cannot find the page you are looking for", - }; + 401 => "You do not have permission to access this page", + 404 => "We cannot find the page you are looking for", + _ => "We cannot find the page you are looking for", + }; - this.ViewBag.HttpStatusCode = httpStatusCode.Value; - this.ViewBag.HomePageUrl = "/home"; - return this.View("CustomError"); - } + this.ViewBag.HttpStatusCode = httpStatusCode.Value; + this.ViewBag.HomePageUrl = "/home"; + return this.View("CustomError"); } } diff --git a/LearningHub.Nhs.WebUI/Interfaces/IUserService.cs b/LearningHub.Nhs.WebUI/Interfaces/IUserService.cs index 0b9dd4b77..1efd29ad5 100644 --- a/LearningHub.Nhs.WebUI/Interfaces/IUserService.cs +++ b/LearningHub.Nhs.WebUI/Interfaces/IUserService.cs @@ -418,6 +418,15 @@ public interface IUserService /// A representing the result of the asynchronous operation. Task RegenerateEmailChangeValidationTokenAsync(string newPrimaryEmail, bool isUserRoleUpgrade); + /// + /// User Can request for password reset. + /// + /// The email Address. + /// The passwordRequestLimitingPeriod. + /// ThepasswordRequestLimit. + /// A representing the result of the asynchronous operation. + Task CanRequestPasswordResetAsync(string emailAddress, int passwordRequestLimitingPeriod, int passwordRequestLimit); + /// /// GenerateEmailChangeValidationTokenAndSendEmail. /// diff --git a/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj b/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj index 227e516ff..1b4ac83d1 100644 --- a/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj +++ b/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj @@ -113,7 +113,7 @@ - + diff --git a/LearningHub.Nhs.WebUI/Middleware/LHIPRateLimitMiddleware.cs b/LearningHub.Nhs.WebUI/Middleware/LHIPRateLimitMiddleware.cs deleted file mode 100644 index 31f2f62f5..000000000 --- a/LearningHub.Nhs.WebUI/Middleware/LHIPRateLimitMiddleware.cs +++ /dev/null @@ -1,57 +0,0 @@ -namespace LearningHub.Nhs.WebUI.Middleware -{ - using System.Threading.Tasks; - using AspNetCoreRateLimit; - using Microsoft.AspNetCore.Http; - using Microsoft.Extensions.Logging; - using Microsoft.Extensions.Options; - - /// - /// Defines the . - /// - public class LHIPRateLimitMiddleware : IpRateLimitMiddleware - { - /// - /// Initializes a new instance of the class. - /// - /// The next. - /// The processingStrategy. - /// The options. - /// The policyStore. - /// The config. - /// The logger. - public LHIPRateLimitMiddleware( - RequestDelegate next, - IProcessingStrategy processingStrategy, - IOptions options, - IIpPolicyStore policyStore, - IRateLimitConfiguration config, - ILogger logger) - : base( - next, - processingStrategy, - options, - policyStore, - config, - logger) - { - } - - /// - /// The ReturnQuotaExceededResponse method. - /// - /// The httpContext. - /// The rule. - /// The retryAfter. - /// A representing the asynchronous operation. - public override Task ReturnQuotaExceededResponse( - HttpContext httpContext, - RateLimitRule rule, - string retryAfter) - { - httpContext.Response.Headers["Location"] = "/TooManyRequests"; - httpContext.Response.StatusCode = 302; - return httpContext.Response.WriteAsync(string.Empty); - } - } -} diff --git a/LearningHub.Nhs.WebUI/Program.cs b/LearningHub.Nhs.WebUI/Program.cs index 2de0aa053..c24d9057c 100644 --- a/LearningHub.Nhs.WebUI/Program.cs +++ b/LearningHub.Nhs.WebUI/Program.cs @@ -84,7 +84,6 @@ app.UseAuthorization(); app.UseMiddleware(); - app.UseMiddleware(); app.UseStaticFiles(); app.Map(TimezoneInfoMiddleware.TimezoneInfoUrl, b => b.UseMiddleware()); diff --git a/LearningHub.Nhs.WebUI/ServiceCollectionExtension.cs b/LearningHub.Nhs.WebUI/ServiceCollectionExtension.cs index 9adb40e44..5ed5cc926 100644 --- a/LearningHub.Nhs.WebUI/ServiceCollectionExtension.cs +++ b/LearningHub.Nhs.WebUI/ServiceCollectionExtension.cs @@ -111,8 +111,6 @@ public static void ConfigureServices(this IServiceCollection services, IConfigur } }); - ConfigureIpRateLimiting(services, configuration); - // this method setup so httpcontext is available from controllers services.AddHttpContextAccessor(); services.AddSingleton(learningHubAuthSvcConf); @@ -139,17 +137,5 @@ public static void ConfigureServices(this IServiceCollection services, IConfigur services.AddFeatureManagement(); } - - /// - /// ConfigureIpRateLimiting. - /// - /// The services. - /// The configuration. - private static void ConfigureIpRateLimiting(IServiceCollection services, IConfiguration configuration) - { - services.Configure(configuration.GetSection("IpRateLimiting")); - services.AddInMemoryRateLimiting(); - services.AddSingleton(); - } } } \ No newline at end of file diff --git a/LearningHub.Nhs.WebUI/Services/UserService.cs b/LearningHub.Nhs.WebUI/Services/UserService.cs index 83b8f64d8..942360eae 100644 --- a/LearningHub.Nhs.WebUI/Services/UserService.cs +++ b/LearningHub.Nhs.WebUI/Services/UserService.cs @@ -1640,6 +1640,31 @@ public async Task RegenerateEmailChangeVali return viewmodel; } + /// + public async Task CanRequestPasswordResetAsync(string emailAddress, int passwordRequestLimitingPeriod, int passwordRequestLimit) + { + bool status = false; + + var client = await this.LearningHubHttpClient.GetClientAsync(); + + var request = $"User/CanRequestPasswordReset/{emailAddress}/{passwordRequestLimitingPeriod}/{passwordRequestLimit}"; + var response = await client.GetAsync(request).ConfigureAwait(false); + + if (response.IsSuccessStatusCode) + { + var result = await response.Content.ReadAsStringAsync(); + status = JsonConvert.DeserializeObject(result); + } + else if (response.StatusCode == HttpStatusCode.Unauthorized + || + response.StatusCode == HttpStatusCode.Forbidden) + { + throw new Exception("AccessDenied"); + } + + return status; + } + /// public async Task GenerateEmailChangeValidationTokenAndSendEmailAsync(string emailAddress, bool isUserRoleUpgrade) { diff --git a/LearningHub.Nhs.WebUI/Views/Shared/TooManyRequests.cshtml b/LearningHub.Nhs.WebUI/Views/Account/TooManyRequests.cshtml similarity index 79% rename from LearningHub.Nhs.WebUI/Views/Shared/TooManyRequests.cshtml rename to LearningHub.Nhs.WebUI/Views/Account/TooManyRequests.cshtml index b0b967408..fbc8a468d 100644 --- a/LearningHub.Nhs.WebUI/Views/Shared/TooManyRequests.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Account/TooManyRequests.cshtml @@ -2,12 +2,6 @@ ViewData["Title"] = "Reset limit reached"; // Get the value from ViewBag var period = ViewBag.Period.ToString(); - - // Remove the last character (if the string is not empty) - if (!string.IsNullOrEmpty(period) && period.Length > 0) - { - period = period.Substring(0, period.Length - 1); - } }
    diff --git a/LearningHub.Nhs.WebUI/appsettings.json b/LearningHub.Nhs.WebUI/appsettings.json index e50f1ad55..e67ceaa8b 100644 --- a/LearningHub.Nhs.WebUI/appsettings.json +++ b/LearningHub.Nhs.WebUI/appsettings.json @@ -37,6 +37,8 @@ "KeepUserSessionAliveIntervalMins": 15, "SecurityQuestionsToAsk": 2, "Restricted": false, + "PasswordRequestLimitingPeriod": 1, // minutes + "PasswordRequestLimit": 2, "AzureBlobSettings": { "ConnectionString": "", "UploadContainer": "" @@ -158,18 +160,5 @@ "FeatureManagement": { "ContributeAudioVideoResource": true, "DisplayAudioVideoResource": true - }, - "IpRateLimiting": { - "EnableEndpointRateLimiting": true, - "StackBlockedRequests": false, - "RealIpHeader": "X-Real-IP", - "HttpStatusCode": 429, - "GeneralRules": [ - { - "Endpoint": "post:/Account/ForgotPassword", - "Period": "1m", - "Limit": 5 - } - ] } } diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj index 440fcb5e7..f34790d51 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj @@ -16,7 +16,7 @@ - + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj index 01cfe7b6f..20b3a1c06 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj @@ -17,7 +17,7 @@ - + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj index c843ac88c..f84d5121c 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj @@ -30,7 +30,7 @@ - + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi.Services.Interface/LearningHub.Nhs.ReportApi.Services.Interface.csproj b/ReportAPI/LearningHub.Nhs.ReportApi.Services.Interface/LearningHub.Nhs.ReportApi.Services.Interface.csproj index f03e5f430..0a697a51f 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi.Services.Interface/LearningHub.Nhs.ReportApi.Services.Interface.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi.Services.Interface/LearningHub.Nhs.ReportApi.Services.Interface.csproj @@ -16,7 +16,7 @@ - + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi.Services.UnitTests/LearningHub.Nhs.ReportApi.Services.UnitTests.csproj b/ReportAPI/LearningHub.Nhs.ReportApi.Services.UnitTests/LearningHub.Nhs.ReportApi.Services.UnitTests.csproj index 4a17dde71..50e3d7536 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi.Services.UnitTests/LearningHub.Nhs.ReportApi.Services.UnitTests.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi.Services.UnitTests/LearningHub.Nhs.ReportApi.Services.UnitTests.csproj @@ -18,7 +18,7 @@ - + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi.Services/LearningHub.Nhs.ReportApi.Services.csproj b/ReportAPI/LearningHub.Nhs.ReportApi.Services/LearningHub.Nhs.ReportApi.Services.csproj index cf0c17583..55c8a1be4 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi.Services/LearningHub.Nhs.ReportApi.Services.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi.Services/LearningHub.Nhs.ReportApi.Services.csproj @@ -19,7 +19,7 @@ - + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi.Shared/LearningHub.Nhs.ReportApi.Shared.csproj b/ReportAPI/LearningHub.Nhs.ReportApi.Shared/LearningHub.Nhs.ReportApi.Shared.csproj index f05db707a..2f5518784 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi.Shared/LearningHub.Nhs.ReportApi.Shared.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi.Shared/LearningHub.Nhs.ReportApi.Shared.csproj @@ -17,7 +17,7 @@ - + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj b/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj index b0c9a1151..583caa9f2 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj @@ -20,7 +20,7 @@ - + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi/web.config b/ReportAPI/LearningHub.Nhs.ReportApi/web.config new file mode 100644 index 000000000..3c48403e6 --- /dev/null +++ b/ReportAPI/LearningHub.Nhs.ReportApi/web.config @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WebAPI/LearningHub.Nhs.API/Controllers/UserController.cs b/WebAPI/LearningHub.Nhs.API/Controllers/UserController.cs index 838e2e0a2..ec0676a46 100644 --- a/WebAPI/LearningHub.Nhs.API/Controllers/UserController.cs +++ b/WebAPI/LearningHub.Nhs.API/Controllers/UserController.cs @@ -28,6 +28,11 @@ public class UserController : ApiControllerBase ///
    private readonly IUserProfileService userProfileService; + /// + /// The user password reset requets service. + /// + private readonly IUserPasswordResetRequestsService userPasswordResetRequestsService; + /// /// Initializes a new instance of the class. /// @@ -41,18 +46,21 @@ public class UserController : ApiControllerBase /// The user notification service. /// /// The security service. + /// The userPasswordResetRequests service. /// The logger. public UserController( IUserService userService, IUserProfileService userProfileService, IUserNotificationService userNotificationService, ISecurityService securityService, + IUserPasswordResetRequestsService userPasswordResetRequestsService, ILogger logger) : base(userService, logger) { this.userProfileService = userProfileService; this.userNotificationService = userNotificationService; this.securityService = securityService; + this.userPasswordResetRequestsService = userPasswordResetRequestsService; } /// @@ -270,6 +278,29 @@ public async Task ReGenerateEmailChangeValidationToken(string new return this.Ok(result); } + /// + /// Check user can request password reset. + /// + /// emailAddress. + /// The passwordRequestLimitingPeriod. + /// ThepasswordRequestLimit. + /// + /// The . + /// + [HttpGet] + [AllowAnonymous] + [Route("CanRequestPasswordReset/{emailAddress}/{passwordRequestLimitingPeriod}/{passwordRequestLimit}")] + public async Task CanRequestPasswordReset(string emailAddress, int passwordRequestLimitingPeriod, int passwordRequestLimit) + { + var result = await this.userPasswordResetRequestsService.CanRequestPasswordReset(emailAddress, passwordRequestLimitingPeriod, passwordRequestLimit); + if (result) + { + await this.userPasswordResetRequestsService.CreateUserPasswordRequest(emailAddress); + } + + return result; + } + /// /// Regenerate email change token. /// diff --git a/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj b/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj index 9f081a054..bb0c6c6cc 100644 --- a/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj +++ b/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj @@ -29,7 +29,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.API/Startup/ServiceMappings.cs b/WebAPI/LearningHub.Nhs.API/Startup/ServiceMappings.cs index 03bf68127..a9f0988ce 100644 --- a/WebAPI/LearningHub.Nhs.API/Startup/ServiceMappings.cs +++ b/WebAPI/LearningHub.Nhs.API/Startup/ServiceMappings.cs @@ -147,6 +147,7 @@ public static void AddLearningHubMappings(this IServiceCollection services, ICon services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); + services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); @@ -228,6 +229,7 @@ public static void AddLearningHubMappings(this IServiceCollection services, ICon services.AddScoped(); services.AddScoped(); services.AddScoped(); + services.AddScoped(); services.AddTransient(); services.AddTransient(); services.AddTransient(); @@ -284,6 +286,7 @@ public static void AddLearningHubMappings(this IServiceCollection services, ICon services.AddScoped(); services.AddScoped(); services.AddScoped(); + services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddTransient(); diff --git a/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj b/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj index c512629ba..74d2ccc77 100644 --- a/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj +++ b/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj @@ -9,7 +9,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj b/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj index d33315f1b..9663e4ee7 100644 --- a/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj +++ b/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj @@ -11,7 +11,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.Database/LearningHub.Nhs.Database.sqlproj b/WebAPI/LearningHub.Nhs.Database/LearningHub.Nhs.Database.sqlproj index 42a432ae2..06e1a1598 100644 --- a/WebAPI/LearningHub.Nhs.Database/LearningHub.Nhs.Database.sqlproj +++ b/WebAPI/LearningHub.Nhs.Database/LearningHub.Nhs.Database.sqlproj @@ -536,6 +536,7 @@ + diff --git a/WebAPI/LearningHub.Nhs.Database/Tables/Hub/PasswordResetRequests.sql b/WebAPI/LearningHub.Nhs.Database/Tables/Hub/PasswordResetRequests.sql new file mode 100644 index 000000000..8742660b4 --- /dev/null +++ b/WebAPI/LearningHub.Nhs.Database/Tables/Hub/PasswordResetRequests.sql @@ -0,0 +1,17 @@ + +CREATE TABLE [hub].[PasswordResetRequests]( + [Id] [int] IDENTITY(1,1) NOT NULL, + [EmailAddress] [nvarchar](100) NOT NULL, + [RequestTime] [datetimeoffset](7) NOT NULL, + [Deleted] [bit] NOT NULL, + [CreateUserId] [int] NOT NULL, + [CreateDate] [datetimeoffset](7) NOT NULL, + [AmendUserId] [int] NOT NULL, + [AmendDate] [datetimeoffset](7) NOT NULL, + CONSTRAINT [PK_Hub_PasswordResetRequests] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] +) ON [PRIMARY] +GO + diff --git a/WebAPI/LearningHub.Nhs.Repository.Interface/IUserPasswordResetRequestsRepository.cs b/WebAPI/LearningHub.Nhs.Repository.Interface/IUserPasswordResetRequestsRepository.cs new file mode 100644 index 000000000..dbe4610a8 --- /dev/null +++ b/WebAPI/LearningHub.Nhs.Repository.Interface/IUserPasswordResetRequestsRepository.cs @@ -0,0 +1,32 @@ +namespace LearningHub.Nhs.Repository.Interface +{ + using System.Threading.Tasks; + using LearningHub.Nhs.Models.Entities; + using Microsoft.AspNetCore.Mvc; + + /// + /// The UserPasswordResetRequestsRepository interface. + /// + public interface IUserPasswordResetRequestsRepository + { + /// + /// To check user can request a password reset. + /// + /// + /// The lookup. + /// + /// The passwordRequestLimitingPeriod. + /// ThepasswordRequestLimit. + /// + /// The . + /// + Task CanRequestPasswordResetAsync(string emailAddress, int passwordRequestLimitingPeriod, int passwordRequestLimit); + + /// + /// CreatePasswordRequests. + /// + /// The emailAddress. + /// The . + Task CreatePasswordRequests(string emailAddress); + } +} \ No newline at end of file diff --git a/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj b/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj index e6e0db066..d41ba9e68 100644 --- a/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj +++ b/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj @@ -10,7 +10,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj b/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj index 86ba264f1..904bda4c8 100644 --- a/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj +++ b/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj @@ -9,7 +9,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.Repository/LearningHubDbContext.cs b/WebAPI/LearningHub.Nhs.Repository/LearningHubDbContext.cs index 77f14343c..80c45ed58 100644 --- a/WebAPI/LearningHub.Nhs.Repository/LearningHubDbContext.cs +++ b/WebAPI/LearningHub.Nhs.Repository/LearningHubDbContext.cs @@ -115,6 +115,11 @@ public LearningHubDbContextOptions Options /// public virtual DbSet EmailChangeValidationToken { get; set; } + /// + /// Gets or sets the password requests. + /// + public virtual DbSet PasswordResetRequests { get; set; } + /// /// Gets or sets the Notification. /// diff --git a/WebAPI/LearningHub.Nhs.Repository/Map/PasswordResetRequestsMap.cs b/WebAPI/LearningHub.Nhs.Repository/Map/PasswordResetRequestsMap.cs new file mode 100644 index 000000000..f3d60981c --- /dev/null +++ b/WebAPI/LearningHub.Nhs.Repository/Map/PasswordResetRequestsMap.cs @@ -0,0 +1,24 @@ +namespace LearningHub.Nhs.Repository +{ + using LearningHub.Nhs.Models.Entities; + using LearningHub.Nhs.Repository.Map; + using Microsoft.EntityFrameworkCore; + using Microsoft.EntityFrameworkCore.Metadata.Builders; + + /// + /// The password reset requests map. + /// + public class PasswordResetRequestsMap : BaseEntityMap + { + /// + /// The internal map. + /// + /// + /// The model builder. + /// + protected override void InternalMap(EntityTypeBuilder modelBuilder) + { + modelBuilder.ToTable("PasswordResetRequests", "hub"); + } + } +} \ No newline at end of file diff --git a/WebAPI/LearningHub.Nhs.Repository/UserPasswordResetRequestsRepository.cs b/WebAPI/LearningHub.Nhs.Repository/UserPasswordResetRequestsRepository.cs new file mode 100644 index 000000000..5130bf9df --- /dev/null +++ b/WebAPI/LearningHub.Nhs.Repository/UserPasswordResetRequestsRepository.cs @@ -0,0 +1,86 @@ +namespace LearningHub.Nhs.Repository +{ + using System; + using System.Linq; + using System.Threading.Tasks; + using elfhHub.Nhs.Models.Entities; + using LearningHub.Nhs.Models.Entities; + using LearningHub.Nhs.Models.Enums; + using LearningHub.Nhs.Repository.Interface; + using Microsoft.AspNetCore.Mvc; + using Microsoft.EntityFrameworkCore; + + /// + /// The user password reset requests repository. + /// + public class UserPasswordResetRequestsRepository : GenericRepository, IUserPasswordResetRequestsRepository + { + /// + /// Initializes a new instance of the class. + /// + /// + /// The db context. + /// + /// + /// The Timezone offset manager. + /// + public UserPasswordResetRequestsRepository(LearningHubDbContext dbContext, ITimezoneOffsetManager tzOffsetManager) + : base(dbContext, tzOffsetManager) + { + } + + /// + /// To check user can request a password reset. + /// + /// + /// The lookup. + /// + /// The passwordRequestLimitingPeriod. + /// ThepasswordRequestLimit. + /// + /// The . + /// + public async Task CanRequestPasswordResetAsync(string emailAddress, int passwordRequestLimitingPeriod, int passwordRequestLimit) + { + // passwordRequestLimitingPeriod is in minutes. + var oneMinuteAgo = DateTime.UtcNow.AddMinutes(-passwordRequestLimitingPeriod); + + // Get the count of password reset requests for the user in the last 1 minute + var recentRequests = await this.DbContext.PasswordResetRequests + .Where(r => r.EmailAddress == emailAddress && r.RequestTime >= oneMinuteAgo) + .CountAsync(); + + return recentRequests < passwordRequestLimit; + } + + /// + /// CreatePasswordRequests. + /// + /// The emailAddress. + /// The . + public async Task CreatePasswordRequests(string emailAddress) + { + try + { + var passwordResetRequests = new PasswordResetRequests + { + EmailAddress = emailAddress, + RequestTime = DateTime.UtcNow, + Deleted = false, + CreateUserId = 4, + CreateDate = DateTime.UtcNow, + AmendUserId = 4, + AmendDate = DateTime.UtcNow, + }; + + await this.DbContext.PasswordResetRequests.AddAsync(passwordResetRequests); + await this.DbContext.SaveChangesAsync(); + return true; + } + catch (Exception ex) + { + return false; + } + } + } +} \ No newline at end of file diff --git a/WebAPI/LearningHub.Nhs.Services.Interface/IUserPasswordResetRequestsService.cs b/WebAPI/LearningHub.Nhs.Services.Interface/IUserPasswordResetRequestsService.cs new file mode 100644 index 000000000..610561f87 --- /dev/null +++ b/WebAPI/LearningHub.Nhs.Services.Interface/IUserPasswordResetRequestsService.cs @@ -0,0 +1,33 @@ +namespace LearningHub.Nhs.Services.Interface +{ + using System.Collections.Generic; + using System.Threading.Tasks; + using LearningHub.Nhs.Models.Common; + using LearningHub.Nhs.Models.Entities; + using LearningHub.Nhs.Models.Resource; + using LearningHub.Nhs.Models.User; + using LearningHub.Nhs.Models.Validation; + using Microsoft.AspNetCore.Mvc; + + /// + /// Theuser password resets interface. + /// + public interface IUserPasswordResetRequestsService + { + /// + /// The check user can rtequest password reset async. + /// + /// The user name. + /// The passwordRequestLimitingPeriod. + /// ThepasswordRequestLimit. + /// The . + Task CanRequestPasswordReset(string emailAddress, int passwordRequestLimitingPeriod, int passwordRequestLimit); + + /// + /// CreatePasswordRequests. + /// + /// The emailAddress. + /// The . + Task CreateUserPasswordRequest(string emailAddress); + } +} diff --git a/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj b/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj index 5599e343a..b259b3a7e 100644 --- a/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj +++ b/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj @@ -16,7 +16,7 @@ - + all diff --git a/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj b/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj index 97abe26a9..f78df0084 100644 --- a/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj +++ b/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj @@ -13,7 +13,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj b/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj index 090d5cb80..e99e5300a 100644 --- a/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj +++ b/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj @@ -13,7 +13,7 @@ - + diff --git a/WebAPI/LearningHub.Nhs.Services/UserPasswordResetRequestsService.cs b/WebAPI/LearningHub.Nhs.Services/UserPasswordResetRequestsService.cs new file mode 100644 index 000000000..78bee3308 --- /dev/null +++ b/WebAPI/LearningHub.Nhs.Services/UserPasswordResetRequestsService.cs @@ -0,0 +1,96 @@ +namespace LearningHub.Nhs.Services +{ + using System; + using System.Collections.Generic; + using System.IO.Enumeration; + using System.Linq; + using System.Reflection.Metadata.Ecma335; + using System.Threading.Tasks; + using AutoMapper; + using LearningHub.Nhs.Models.Common; + using LearningHub.Nhs.Models.Constants; + using LearningHub.Nhs.Models.Entities; + using LearningHub.Nhs.Models.Enums; + using LearningHub.Nhs.Models.Resource; + using LearningHub.Nhs.Models.User; + using LearningHub.Nhs.Models.Validation; + using LearningHub.Nhs.Repository.Interface; + using LearningHub.Nhs.Services.Extensions; + using LearningHub.Nhs.Services.Interface; + using Microsoft.AspNetCore.Mvc; + using Microsoft.EntityFrameworkCore; + using Microsoft.Extensions.Logging; + using Newtonsoft.Json; + + /// + /// The user service. + /// + public class UserPasswordResetRequestsService : IUserPasswordResetRequestsService + { + /// + /// The user password reset requests repository. + /// + private readonly IUserPasswordResetRequestsRepository userPasswordResetRequestsRepository; + + /// + /// The mapper. + /// + private readonly IMapper mapper; + + /// + /// The cache. + /// + private readonly ICachingService cachingService; + + /// + /// The logger. + /// + private readonly ILogger logger; + + /// + /// Initializes a new instance of the class. + /// + /// The user password reset requests repository. + /// The mapper. + /// The caching service. + /// The logger. + /// The userDetailsRepository. + public UserPasswordResetRequestsService( + IUserPasswordResetRequestsRepository userPasswordResetRequestsRepository, + IMapper mapper, + ICachingService cachingService, + ILogger logger, + IUserProfileRepository userDetailsRepository) + { + this.userPasswordResetRequestsRepository = userPasswordResetRequestsRepository; + this.mapper = mapper; + this.cachingService = cachingService; + this.logger = logger; + } + + /// + /// The get by username async. + /// + /// The user name. + /// The passwordRequestLimitingPeriod. + /// ThepasswordRequestLimit. + /// The . + public async Task CanRequestPasswordReset(string emailAddress, int passwordRequestLimitingPeriod, int passwordRequestLimit) + { + var result = await this.userPasswordResetRequestsRepository.CanRequestPasswordResetAsync(emailAddress, passwordRequestLimitingPeriod, passwordRequestLimit); + + return result; + } + + /// + /// CreateUserPasswordRequest. + /// + /// the emailAddress. + /// The . + public async Task CreateUserPasswordRequest(string emailAddress) + { + var result = await this.userPasswordResetRequestsRepository.CreatePasswordRequests(emailAddress); + return result; + } + } +} diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj index 8b75e5a4b..697d1db2f 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj @@ -25,7 +25,7 @@ - + all diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj index ac957415c..89ca1344e 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj @@ -9,7 +9,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj index 05b6c681a..4ab608bac 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj @@ -10,7 +10,7 @@ - + all diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj index c0c4fbfe5..7dd7febb7 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj @@ -9,7 +9,7 @@ - + diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj index b2ecc0d2c..5b83ec893 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj @@ -10,7 +10,7 @@ - + diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj index 98c4954b5..bf0235325 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj @@ -12,7 +12,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 12ebaaa865859bd712d3224062219f57b24ff906 Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Thu, 27 Mar 2025 11:30:00 +0000 Subject: [PATCH 516/576] added to gitignore --- .gitignore | 1 + ReportAPI/LearningHub.Nhs.ReportApi/web.config | 15 --------------- 2 files changed, 1 insertion(+), 15 deletions(-) delete mode 100644 ReportAPI/LearningHub.Nhs.ReportApi/web.config diff --git a/.gitignore b/.gitignore index 5e8ca2030..fcd06e014 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ obj /OpenAPI/LearningHub.Nhs.OpenApi/web.config /AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj.user /WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj.user +/ReportAPI/LearningHub.Nhs.ReportApi/web.config diff --git a/ReportAPI/LearningHub.Nhs.ReportApi/web.config b/ReportAPI/LearningHub.Nhs.ReportApi/web.config deleted file mode 100644 index 3c48403e6..000000000 --- a/ReportAPI/LearningHub.Nhs.ReportApi/web.config +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file From f1875e16649d1f9f1f398a2b522d0f38c9d6945f Mon Sep 17 00:00:00 2001 From: Swapnamol Abraham Date: Thu, 27 Mar 2025 11:54:20 +0000 Subject: [PATCH 517/576] Modified the script --- .../Tables/Hub/PasswordResetRequests.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WebAPI/LearningHub.Nhs.Database/Tables/Hub/PasswordResetRequests.sql b/WebAPI/LearningHub.Nhs.Database/Tables/Hub/PasswordResetRequests.sql index 8742660b4..e1a2bd06a 100644 --- a/WebAPI/LearningHub.Nhs.Database/Tables/Hub/PasswordResetRequests.sql +++ b/WebAPI/LearningHub.Nhs.Database/Tables/Hub/PasswordResetRequests.sql @@ -11,7 +11,7 @@ CREATE TABLE [hub].[PasswordResetRequests]( CONSTRAINT [PK_Hub_PasswordResetRequests] PRIMARY KEY CLUSTERED ( [Id] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] -) ON [PRIMARY] +) +) GO From df645f9e9fce4b7aec10300df04435fd2e880663 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Mar 2025 08:31:50 +0000 Subject: [PATCH 518/576] Bump @mediakind/mkplayer from 1.20.0 to 1.21.0 in /LearningHub.Nhs.WebUI --- updated-dependencies: - dependency-name: "@mediakind/mkplayer" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- LearningHub.Nhs.WebUI/package-lock.json | 8 ++++---- LearningHub.Nhs.WebUI/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/LearningHub.Nhs.WebUI/package-lock.json b/LearningHub.Nhs.WebUI/package-lock.json index c459b48a4..779d67c61 100644 --- a/LearningHub.Nhs.WebUI/package-lock.json +++ b/LearningHub.Nhs.WebUI/package-lock.json @@ -10,7 +10,7 @@ "dependencies": { "@ckeditor/ckeditor5-build-classic": "16.0.0", "@ckeditor/ckeditor5-vue": "1.0.3", - "@mediakind/mkplayer": "1.20.0", + "@mediakind/mkplayer": "1.21.0", "@types/uuid": "^8.3.4", "axios": "^0.30.0", "babel-polyfill": "^6.26.0", @@ -3818,9 +3818,9 @@ } }, "node_modules/@mediakind/mkplayer": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/@mediakind/mkplayer/-/mkplayer-1.20.0.tgz", - "integrity": "sha512-8msi65ezI/MjTSakrO8w78tfIdqIDXP8MgIFBlM5H26OtLCdu7ywvsyvszud2rmBhz0GZSd0Km+Wr8SXikAZtQ==", + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/@mediakind/mkplayer/-/mkplayer-1.21.0.tgz", + "integrity": "sha512-6sZwxQObISgmD4z0RV6xoi2bJgnOBtDAa2bPg4H/D095MaUInaDkrCimROst/rWfeMFg2m4h9PSmJV88cYbvQw==", "license": "©2025 Copyright Mediakind Ltd. All Rights Reserved. Including All Downloadable Materials.", "dependencies": { "bitmovin-player": "8.193.0", diff --git a/LearningHub.Nhs.WebUI/package.json b/LearningHub.Nhs.WebUI/package.json index f07a417de..4809135de 100644 --- a/LearningHub.Nhs.WebUI/package.json +++ b/LearningHub.Nhs.WebUI/package.json @@ -22,7 +22,7 @@ "dependencies": { "@ckeditor/ckeditor5-build-classic": "16.0.0", "@ckeditor/ckeditor5-vue": "1.0.3", - "@mediakind/mkplayer": "1.20.0", + "@mediakind/mkplayer": "1.21.0", "@types/uuid": "^8.3.4", "axios": "^0.30.0", "babel-polyfill": "^6.26.0", From 1321ad5f6e936f37f9ea0e79d2d352928398fafd Mon Sep 17 00:00:00 2001 From: Anju Jose Date: Fri, 28 Mar 2025 12:02:14 +0000 Subject: [PATCH 519/576] TD-5146-Fix --- .../Views/Resource/Details.cshtml | 1711 +++++++++-------- 1 file changed, 857 insertions(+), 854 deletions(-) diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/Details.cshtml b/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/Details.cshtml index 5c7b99069..53d548c59 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/Details.cshtml +++ b/AdminUI/LearningHub.Nhs.AdminUI/Views/Resource/Details.cshtml @@ -5,919 +5,922 @@ @inject IOptions webSettings @{ - ViewData["Title"] = "Details"; - var activetab = this.ViewBag.ActiveTab; + ViewData["Title"] = "Details"; + var activetab = this.ViewBag.ActiveTab; } -@section Styles{ - +@section Styles { + }
    - -
    -
    -
    - - @if (Model.ResourceVersionId == 0) - { -
    Resource Version not found
    - } - else - { -
    -
    @Model.Title (@Model.VersionStatusDescription)
    -
    - @if (Model.VersionStatusEnum == VersionStatusEnum.Published) - { - - } - @if (Model.VersionStatusEnum == VersionStatusEnum.Publishing || Model.VersionStatusEnum == VersionStatusEnum.FailedToPublish) - { - - } - -
    -
    - -