From a058b5f5af244653b98ad4a09346e332de6c9bc2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 May 2023 14:40:52 +1000 Subject: [PATCH 001/115] Bump engine.io and socket.io (#1526) Bumps [engine.io](https://github.com/socketio/engine.io) and [socket.io](https://github.com/socketio/socket.io). These dependencies needed to be updated together. Updates `engine.io` from 6.2.1 to 6.4.2 - [Release notes](https://github.com/socketio/engine.io/releases) - [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md) - [Commits](https://github.com/socketio/engine.io/compare/6.2.1...6.4.2) Updates `socket.io` from 4.5.3 to 4.6.1 - [Release notes](https://github.com/socketio/socket.io/releases) - [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md) - [Commits](https://github.com/socketio/socket.io/compare/4.5.3...4.6.1) --- updated-dependencies: - dependency-name: engine.io dependency-type: indirect - dependency-name: socket.io dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 108 +++++++++++++++++++++++++--------------------- 1 file changed, 60 insertions(+), 48 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9b06b5656..44a39fa64 100644 --- a/package-lock.json +++ b/package-lock.json @@ -206,10 +206,13 @@ "dev": true }, "node_modules/@types/cors": { - "version": "2.8.12", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz", - "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==", - "dev": true + "version": "2.8.13", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.13.tgz", + "integrity": "sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } }, "node_modules/@types/node": { "version": "17.0.23", @@ -826,9 +829,9 @@ } }, "node_modules/engine.io": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.2.1.tgz", - "integrity": "sha512-ECceEFcAaNRybd3lsGQKas3ZlMVjN3cyWwMP25D2i0zWfyiytVbTpRPa34qrr+FHddtpBVOmq4H/DCv1O0lZRA==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.4.2.tgz", + "integrity": "sha512-FKn/3oMiJjrOEOeUub2WCox6JhxBXq/Zn3fZOMCBxKnNYtsdKjxhl7yR3fZhM9PV+rdE75SU5SYMc+2PGzo+Tg==", "dev": true, "dependencies": { "@types/cookie": "^0.4.1", @@ -840,16 +843,16 @@ "cors": "~2.8.5", "debug": "~4.3.1", "engine.io-parser": "~5.0.3", - "ws": "~8.2.3" + "ws": "~8.11.0" }, "engines": { "node": ">=10.0.0" } }, "node_modules/engine.io-parser": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.4.tgz", - "integrity": "sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.6.tgz", + "integrity": "sha512-tjuoZDMAdEhVnSFleYPCtdL2GXwVTGtNjoeJd9IhIG3C1xs9uwxqRNEu5WpnDZCaozwVlK/nuQhpodhXSIMaxw==", "dev": true, "engines": { "node": ">=10.0.0" @@ -2676,27 +2679,30 @@ "dev": true }, "node_modules/socket.io": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.5.3.tgz", - "integrity": "sha512-zdpnnKU+H6mOp7nYRXH4GNv1ux6HL6+lHL8g7Ds7Lj8CkdK1jJK/dlwsKDculbyOHifcJ0Pr/yeXnZQ5GeFrcg==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.6.1.tgz", + "integrity": "sha512-KMcaAi4l/8+xEjkRICl6ak8ySoxsYG+gG6/XfRCPJPQ/haCRIJBTL4wIl8YCsmtaBovcAXGLOShyVWQ/FG8GZA==", "dev": true, "dependencies": { "accepts": "~1.3.4", "base64id": "~2.0.0", "debug": "~4.3.2", - "engine.io": "~6.2.0", - "socket.io-adapter": "~2.4.0", - "socket.io-parser": "~4.2.0" + "engine.io": "~6.4.1", + "socket.io-adapter": "~2.5.2", + "socket.io-parser": "~4.2.1" }, "engines": { "node": ">=10.0.0" } }, "node_modules/socket.io-adapter": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz", - "integrity": "sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg==", - "dev": true + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz", + "integrity": "sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA==", + "dev": true, + "dependencies": { + "ws": "~8.11.0" + } }, "node_modules/socket.io-parser": { "version": "4.2.1", @@ -3207,9 +3213,9 @@ "dev": true }, "node_modules/ws": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", - "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", "dev": true, "engines": { "node": ">=10.0.0" @@ -3438,10 +3444,13 @@ "dev": true }, "@types/cors": { - "version": "2.8.12", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz", - "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==", - "dev": true + "version": "2.8.13", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.13.tgz", + "integrity": "sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==", + "dev": true, + "requires": { + "@types/node": "*" + } }, "@types/node": { "version": "17.0.23", @@ -3934,9 +3943,9 @@ } }, "engine.io": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.2.1.tgz", - "integrity": "sha512-ECceEFcAaNRybd3lsGQKas3ZlMVjN3cyWwMP25D2i0zWfyiytVbTpRPa34qrr+FHddtpBVOmq4H/DCv1O0lZRA==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.4.2.tgz", + "integrity": "sha512-FKn/3oMiJjrOEOeUub2WCox6JhxBXq/Zn3fZOMCBxKnNYtsdKjxhl7yR3fZhM9PV+rdE75SU5SYMc+2PGzo+Tg==", "dev": true, "requires": { "@types/cookie": "^0.4.1", @@ -3948,7 +3957,7 @@ "cors": "~2.8.5", "debug": "~4.3.1", "engine.io-parser": "~5.0.3", - "ws": "~8.2.3" + "ws": "~8.11.0" }, "dependencies": { "debug": { @@ -3969,9 +3978,9 @@ } }, "engine.io-parser": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.4.tgz", - "integrity": "sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.6.tgz", + "integrity": "sha512-tjuoZDMAdEhVnSFleYPCtdL2GXwVTGtNjoeJd9IhIG3C1xs9uwxqRNEu5WpnDZCaozwVlK/nuQhpodhXSIMaxw==", "dev": true }, "ent": { @@ -5365,17 +5374,17 @@ "dev": true }, "socket.io": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.5.3.tgz", - "integrity": "sha512-zdpnnKU+H6mOp7nYRXH4GNv1ux6HL6+lHL8g7Ds7Lj8CkdK1jJK/dlwsKDculbyOHifcJ0Pr/yeXnZQ5GeFrcg==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.6.1.tgz", + "integrity": "sha512-KMcaAi4l/8+xEjkRICl6ak8ySoxsYG+gG6/XfRCPJPQ/haCRIJBTL4wIl8YCsmtaBovcAXGLOShyVWQ/FG8GZA==", "dev": true, "requires": { "accepts": "~1.3.4", "base64id": "~2.0.0", "debug": "~4.3.2", - "engine.io": "~6.2.0", - "socket.io-adapter": "~2.4.0", - "socket.io-parser": "~4.2.0" + "engine.io": "~6.4.1", + "socket.io-adapter": "~2.5.2", + "socket.io-parser": "~4.2.1" }, "dependencies": { "debug": { @@ -5396,10 +5405,13 @@ } }, "socket.io-adapter": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz", - "integrity": "sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg==", - "dev": true + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz", + "integrity": "sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA==", + "dev": true, + "requires": { + "ws": "~8.11.0" + } }, "socket.io-parser": { "version": "4.2.1", @@ -5768,9 +5780,9 @@ "dev": true }, "ws": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", - "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", "dev": true, "requires": {} }, From c61535c22269f015846ab5550683b15e43656407 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 May 2023 14:41:24 +1000 Subject: [PATCH 002/115] Bump socket.io-parser from 4.2.1 to 4.2.3 (#1531) Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.2.1 to 4.2.3. - [Release notes](https://github.com/socketio/socket.io-parser/releases) - [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md) - [Commits](https://github.com/socketio/socket.io-parser/compare/4.2.1...4.2.3) --- updated-dependencies: - dependency-name: socket.io-parser dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 44a39fa64..ec2b6e796 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2705,9 +2705,9 @@ } }, "node_modules/socket.io-parser": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz", - "integrity": "sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.3.tgz", + "integrity": "sha512-JMafRntWVO2DCJimKsRTh/wnqVvO4hrfwOqtO7f+uzwsQMuxO6VwImtYxaQ+ieoyshWOTJyV0fA21lccEXRPpQ==", "dev": true, "dependencies": { "@socket.io/component-emitter": "~3.1.0", @@ -5414,9 +5414,9 @@ } }, "socket.io-parser": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz", - "integrity": "sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.3.tgz", + "integrity": "sha512-JMafRntWVO2DCJimKsRTh/wnqVvO4hrfwOqtO7f+uzwsQMuxO6VwImtYxaQ+ieoyshWOTJyV0fA21lccEXRPpQ==", "dev": true, "requires": { "@socket.io/component-emitter": "~3.1.0", From 8138b35067a7a4e51162955755291926a804a540 Mon Sep 17 00:00:00 2001 From: temi Date: Wed, 14 Jun 2023 13:26:17 +1000 Subject: [PATCH 003/115] #1532 - migrated to Fathom analytics --- build.gradle | 2 +- grails-app/conf/application.yml | 5 ++++- grails-app/views/layouts/bs4.gsp | 7 +++++++ grails-app/views/layouts/mobile.gsp | 18 ++++++++++++++++++ 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 49eea6d2d..bd88f6ac2 100644 --- a/build.gradle +++ b/build.gradle @@ -131,7 +131,7 @@ dependencies { implementation "org.grails.plugins:ala-admin-plugin:2.3.0" implementation ("org.grails.plugins:ala-auth:5.1.1") implementation "org.grails.plugins:ala-ws-security-plugin:4.1.2" - runtimeOnly "org.grails.plugins:ala-bootstrap3:4.1.0" + runtimeOnly "org.grails.plugins:ala-bootstrap3:4.2.0-SNAPSHOT" // swagger API implementation 'au.org.ala.plugins:openapi:1.1.0' diff --git a/grails-app/conf/application.yml b/grails-app/conf/application.yml index e943e7739..cc4bd7887 100644 --- a/grails-app/conf/application.yml +++ b/grails-app/conf/application.yml @@ -340,4 +340,7 @@ bootstrap4: # used by ala-admin-plugin skin: - layout: "bs4" \ No newline at end of file + layout: "bs4" + +fathom: + enabled: true \ No newline at end of file diff --git a/grails-app/views/layouts/bs4.gsp b/grails-app/views/layouts/bs4.gsp index 073ee7bea..072a76b64 100644 --- a/grails-app/views/layouts/bs4.gsp +++ b/grails-app/views/layouts/bs4.gsp @@ -187,6 +187,12 @@ %{-- Adding GA script here since it is not included anywhere when custom footer is used. --}% %{-- Ala footer does not need it since it comes with GA script included. --}% + + + + + + + diff --git a/grails-app/views/layouts/mobile.gsp b/grails-app/views/layouts/mobile.gsp index 000a53569..27ba877c5 100644 --- a/grails-app/views/layouts/mobile.gsp +++ b/grails-app/views/layouts/mobile.gsp @@ -75,5 +75,23 @@ $(document).ajaxComplete(window.decreaseAsyncCounter); + + + + + + + + + + From 01d4e72b6825b1308ec37b1af39b76c4f3b05fd8 Mon Sep 17 00:00:00 2001 From: temi Date: Thu, 15 Jun 2023 16:37:37 +1000 Subject: [PATCH 004/115] added default encoding --- grails-app/conf/application.yml | 4 +-- .../org/ala/biocollect/merit/FCTagLib.groovy | 4 --- grails-app/views/activity/bulkEdit.gsp | 4 +-- grails-app/views/activity/create.gsp | 4 +-- grails-app/views/activity/edit.gsp | 12 ++++---- grails-app/views/activity/enterData.gsp | 2 +- grails-app/views/activity/index.gsp | 2 +- grails-app/views/activity/mobile.gsp | 2 +- grails-app/views/admin/editHub.gsp | 4 +-- grails-app/views/bioActivity/_activities.gsp | 30 +++++++------------ grails-app/views/bioActivity/create.gsp | 4 +-- grails-app/views/bioActivity/edit.gsp | 6 ++-- grails-app/views/bioActivity/index.gsp | 4 +-- grails-app/views/bioActivity/list.gsp | 10 +++---- .../views/bioActivity/previewActivity.gsp | 2 +- grails-app/views/blog/create.gsp | 2 +- grails-app/views/blog/edit.gsp | 2 +- grails-app/views/bulkImport/index.gsp | 2 +- grails-app/views/bulkImport/listings.gsp | 2 +- grails-app/views/home/citizenScience.gsp | 2 +- grails-app/views/home/index.gsp | 4 +-- .../views/hub/projectFinderHomePage.gsp | 4 +-- grails-app/views/organisation/create.gsp | 2 +- grails-app/views/organisation/edit.gsp | 2 +- grails-app/views/organisation/index.gsp | 6 ++-- grails-app/views/project/create.gsp | 14 ++++----- .../views/project/csProjectTemplate.gsp | 17 ++++++----- grails-app/views/project/edit.gsp | 14 ++++----- grails-app/views/project/index.gsp | 8 ++--- grails-app/views/project/projectFinder.gsp | 10 +++---- grails-app/views/project/works.gsp | 6 ++-- .../views/project/worksProjectTemplate.gsp | 30 +++++++++---------- grails-app/views/site/_siteDefinition.gsp | 14 +++------ grails-app/views/site/edit.gsp | 10 +++---- grails-app/views/site/index.gsp | 2 +- grails-app/views/site/list.gsp | 2 +- grails-app/views/site/select.gsp | 4 +-- grails-app/views/site/upload.gsp | 2 +- 38 files changed, 118 insertions(+), 137 deletions(-) diff --git a/grails-app/conf/application.yml b/grails-app/conf/application.yml index cc4bd7887..e27dfd937 100644 --- a/grails-app/conf/application.yml +++ b/grails-app/conf/application.yml @@ -227,12 +227,12 @@ grails: encoding: UTF-8 views: default: - codec: none + codec: html gsp: encoding: UTF-8 htmlcodec: xml codecs: - expression: none #${ } will be html encoded if set to default to html + expression: html scriptlets: html taglib: none staticparts: none diff --git a/grails-app/taglib/au/org/ala/biocollect/merit/FCTagLib.groovy b/grails-app/taglib/au/org/ala/biocollect/merit/FCTagLib.groovy index 8f6f9caec..56547e1da 100644 --- a/grails-app/taglib/au/org/ala/biocollect/merit/FCTagLib.groovy +++ b/grails-app/taglib/au/org/ala/biocollect/merit/FCTagLib.groovy @@ -831,8 +831,4 @@ class FCTagLib { } } - def getSurveyMethods = { - List methods = projectActivityService.getSurveyMethods() - out << (methods as JSON).toString() - } } diff --git a/grails-app/views/activity/bulkEdit.gsp b/grails-app/views/activity/bulkEdit.gsp index 6ff580c17..4c84cc85d 100644 --- a/grails-app/views/activity/bulkEdit.gsp +++ b/grails-app/views/activity/bulkEdit.gsp @@ -22,10 +22,10 @@ projectViewUrl: "${createLink(controller: 'project', action: 'index')}/", saveUrl: "${createLink(controller: 'activity', action: 'ajaxUpdate')}", siteViewUrl: "${createLink(controller: 'site', action: 'index')}/", - mapLayersConfig: ${mapService.getMapLayersConfig(project, null) as JSON}, + mapLayersConfig: , excelOutputTemplateUrl: "${createLink(controller: 'proxy', action: 'excelOutputTemplate')}", - returnTo: "${params.returnTo}" + returnTo: "${params.returnTo}" }, here = document.location.href; diff --git a/grails-app/views/activity/create.gsp b/grails-app/views/activity/create.gsp index 7678e5074..1a199fe1d 100644 --- a/grails-app/views/activity/create.gsp +++ b/grails-app/views/activity/create.gsp @@ -28,7 +28,7 @@ layersStyle: "${createLink(controller: 'regions', action: 'layersStyle')}", serverUrl: "${grailsApplication.config.grails.serverURL}", createUrl: "${createLink(action: 'create')}/", - mapLayersConfig: ${mapService.getMapLayersConfig(project, null) as JSON}, + mapLayersConfig: , excelOutputTemplateUrl: "${createLink(controller: 'proxy', action: 'excelOutputTemplate')}", projectViewUrl: "${createLink(controller: 'project', action: 'index')}/" @@ -120,7 +120,7 @@ } - var viewModel = new ViewModel(${(activityTypes as JSON).toString()}, '${project?.projectId}'); + var viewModel = new ViewModel(, '${project?.projectId}'); ko.applyBindings(viewModel,document.getElementById('koActivityMainBlock')); }); diff --git a/grails-app/views/activity/edit.gsp b/grails-app/views/activity/edit.gsp index ef5f726df..56f7b3545 100644 --- a/grails-app/views/activity/edit.gsp +++ b/grails-app/views/activity/edit.gsp @@ -26,7 +26,7 @@ activityDeleteUrl: "${createLink(controller: 'activity', action: 'ajaxDelete')}", projectViewUrl: "${createLink(controller: 'project', action: 'index')}/", excelOutputTemplateUrl: "${createLink(controller: 'proxy', action:'excelOutputTemplate')}", - mapLayersConfig: ${mapService.getMapLayersConfig(project, null) as JSON}, + mapLayersConfig: , siteViewUrl: "${createLink(controller: 'site', action: 'index')}/" }, @@ -381,13 +381,11 @@ self.dirtyFlag = ko.dirtyFlag(self, false); }; - var viewModel = new ViewModel( - ${(activity as JSON).toString()}, - ${project ?: 'null'}, - ${(activityTypes as JSON).toString()}, - ${themes}); - + , + , + , + ); ko.applyBindings(viewModel,document.getElementById('koActivityMainBlock')); diff --git a/grails-app/views/activity/enterData.gsp b/grails-app/views/activity/enterData.gsp index c742b7b04..87379c048 100644 --- a/grails-app/views/activity/enterData.gsp +++ b/grails-app/views/activity/enterData.gsp @@ -39,7 +39,7 @@ getGuidForOutputSpeciesUrl : "${createLink(controller: 'record', action: 'getGuidForOutputSpeciesIdentifier')}", uploadImagesUrl: "${createLink(controller: 'image', action: 'upload')}", sites: , - mapLayersConfig: ${mapService.getMapLayersConfig(project, null) as JSON}, + mapLayersConfig: , excelOutputTemplateUrl: "${createLink(controller: 'proxy', action: 'excelOutputTemplate')}", addCreatedSiteToListOfSelectedSites: ${canEditSites} diff --git a/grails-app/views/activity/index.gsp b/grails-app/views/activity/index.gsp index f0075e144..c9a54f8c7 100644 --- a/grails-app/views/activity/index.gsp +++ b/grails-app/views/activity/index.gsp @@ -42,7 +42,7 @@ searchBieUrl: "${raw(createLink(controller: 'project', action: 'searchSpecies', params: [id: project.projectId, limit: 10]))}", getGuidForOutputSpeciesUrl : "${createLink(controller: 'record', action: 'getGuidForOutputSpeciesIdentifier')}", project:${raw(fc.modelAsJavascript(model: project))}, - mapLayersConfig: ${mapService.getMapLayersConfig(project, null) as JSON}, + mapLayersConfig: , excelOutputTemplateUrl: "${createLink(controller: 'proxy', action: 'excelOutputTemplate')}", sites: ${raw(fc.modelAsJavascript(model: project?.sites))} diff --git a/grails-app/views/activity/mobile.gsp b/grails-app/views/activity/mobile.gsp index 13be6e3da..527817e44 100644 --- a/grails-app/views/activity/mobile.gsp +++ b/grails-app/views/activity/mobile.gsp @@ -17,7 +17,7 @@ bieUrl: "${grailsApplication.config.bie.baseURL}", bieWsUrl: "${grailsApplication.config.bieWs.baseURL}", speciesProfileUrl: "${createLink(controller: 'proxy', action: 'speciesProfile', absolute: true)}", - mapLayersConfig: ${mapService.getMapLayersConfig(project, null) as JSON}, + mapLayersConfig: , excelOutputTemplateUrl: "${createLink(controller: 'proxy', action: 'excelOutputTemplate')}", googleStaticUrl:"http://maps.googleapis.com/maps/api/staticmap?maptype=terrian&zoom=12&sensor=false&size=350x250&markers=color:red%7C" diff --git a/grails-app/views/admin/editHub.gsp b/grails-app/views/admin/editHub.gsp index eb1a167a4..ae80156e2 100644 --- a/grails-app/views/admin/editHub.gsp +++ b/grails-app/views/admin/editHub.gsp @@ -18,8 +18,8 @@ listDynamicFacetsUrl: "${createLink(controller: 'bioActivity', action: 'getFacets')}", listDataColumnsUrl: "${createLink(controller: 'bioActivity', action: 'getDataColumns')}", defaultOverriddenLabelsURL: "${createLink(controller: 'hub', action: 'defaultOverriddenLabels')}", - allBaseLayers: ${grailsApplication.config.map.baseLayers as grails.converters.JSON}, - allOverlays: ${grailsApplication.config.map.overlays as grails.converters.JSON}, + allBaseLayers: , + allOverlays: , leafletAssetURL: "${assetPath(src: 'webjars/leaflet/0.7.7/dist/images')}" }; diff --git a/grails-app/views/bioActivity/_activities.gsp b/grails-app/views/bioActivity/_activities.gsp index fe482f648..b69239143 100644 --- a/grails-app/views/bioActivity/_activities.gsp +++ b/grails-app/views/bioActivity/_activities.gsp @@ -567,42 +567,35 @@ - - var activitiesAndRecordsViewModel, alaMap, results; function initialiseData(view) { - var user = '${user ? user as grails.converters.JSON : "{}"}', + var user = , configImageGallery; - if (user) { - user = JSON.parse(user); - } else { - user = null; - } - var columnConfig =${ hubConfig.getDataColumns(grailsApplication) as grails.converters.JSON} + var columnConfig = var facetConfig; if(view === 'allrecords') { - facetConfig = ${ hubConfig.getFacetConfigForPage('allRecords') }; + facetConfig = ; } else if (view === 'myrecords') { - facetConfig = ${ hubConfig.getFacetConfigForPage('myRecords') }; + facetConfig = ; } else if (view === 'project') { - facetConfig = ${ hubConfig.getFacetConfigForPage('project') }; + facetConfig = ; } else if (view === 'projectrecords') { - facetConfig = ${ hubConfig.getFacetConfigForPage('projectrecords') }; + facetConfig = ; } else if (view === 'myprojectrecords') { - facetConfig = ${ hubConfig.getFacetConfigForPage('myprojectrecords') }; + facetConfig = ; } else if (view === 'userprojectactivityrecords') { - facetConfig = ${ hubConfig.getFacetConfigForPage('userprojectactivityrecords') }; + facetConfig = ; } else if (view === 'bulkimport') { - facetConfig = ${ hubConfig.getFacetConfigForPage('bulkimport') }; + facetConfig = ; } else { console.warn("[Facets] Unrecognised view name '" + view + "', using allRecords facet config."); - facetConfig = ${ hubConfig.getFacetConfigForPage('allRecords') }; + facetConfig = ; } - var hubConfig = ${ hubConfig } + var hubConfig = ; // on project page, show listings only when data tab is active. // in other context like all records, show listing as soon as possible @@ -667,6 +660,5 @@ } tabId && $(tabId).tab('show'); - diff --git a/grails-app/views/bioActivity/create.gsp b/grails-app/views/bioActivity/create.gsp index 1cc28fac0..3f47303fb 100644 --- a/grails-app/views/bioActivity/create.gsp +++ b/grails-app/views/bioActivity/create.gsp @@ -45,11 +45,11 @@ getOutputSpeciesIdUrl : "${createLink(controller: 'output', action: 'getOutputSpeciesIdentifier')}", getGuidForOutputSpeciesUrl : "${createLink(controller: 'record', action: 'getGuidForOutputSpeciesIdentifier')}", imageLeafletViewer: '${createLink(controller: 'resource', action: 'imageviewer', absolute: true)}', - mapLayersConfig: ${mapService.getMapLayersConfig(project, pActivity) as JSON}, + mapLayersConfig: , excelOutputTemplateUrl: "${createLink(controller: 'proxy', action:'excelOutputTemplate')}", uploadImagesUrl: "${createLink(controller: 'image', action: 'upload')}", - returnTo: "${returnTo ?: (createLink(controller: 'project', action: 'index')+ "/" + pActivity.projectId)}" + returnTo: "${returnTo ?: (createLink(controller: 'project', action: 'index')+ "/" + pActivity.projectId)}" }, here = document.location.href; diff --git a/grails-app/views/bioActivity/edit.gsp b/grails-app/views/bioActivity/edit.gsp index ff0e430cc..ef235550a 100644 --- a/grails-app/views/bioActivity/edit.gsp +++ b/grails-app/views/bioActivity/edit.gsp @@ -49,13 +49,13 @@ imageLeafletViewer: '${createLink(controller: 'resource', action: 'imageviewer', absolute: true)}', bioActivityView: "${createLink(controller: 'bioActivity', action: 'index')}/", activityId: "${id}", - returnTo: "${returnTo}", returnToMobile: "${createLink(controller: 'mobile', action: 'status')}#successfully-posted", excelOutputTemplateUrl: "${createLink(controller: 'proxy', action:'excelOutputTemplate')}", - mapLayersConfig: ${mapService.getMapLayersConfig(project, pActivity) as JSON}, + mapLayersConfig: , originUrl: "${grailsApplication.config.server.serverURL}", - bulkUpload: ${bulkUpload?:false} + bulkUpload: ${bulkUpload?:false}, + returnTo: "${returnTo}" }, here = document.location.href; diff --git a/grails-app/views/bioActivity/index.gsp b/grails-app/views/bioActivity/index.gsp index eeb9376b2..212e0b582 100644 --- a/grails-app/views/bioActivity/index.gsp +++ b/grails-app/views/bioActivity/index.gsp @@ -47,10 +47,10 @@ speciesProfileUrl: "${createLink(controller: 'proxy', action: 'speciesProfile')}", noImageUrl: '${asset.assetPath(src: "font-awesome/5.15.4/svgs/regular/image.svg")}', speciesImageUrl:"${createLink(controller:'species', action:'speciesImage')}", - mapLayersConfig: ${mapService.getMapLayersConfig(project, pActivity) as JSON}, + mapLayersConfig: , excelOutputTemplateUrl: "${createLink(controller: 'proxy', action:'excelOutputTemplate')}", - ${(params?.version) ? ',version: ' + params?.version : ''} + ${(params?.version) ? ',version: ' + params?.version : ''} }, here = document.location.href; diff --git a/grails-app/views/bioActivity/list.gsp b/grails-app/views/bioActivity/list.gsp index fea9b1dfe..a2bae9a22 100644 --- a/grails-app/views/bioActivity/list.gsp +++ b/grails-app/views/bioActivity/list.gsp @@ -15,7 +15,7 @@ var fcConfig = { - intersectService: "${createLink(controller: 'proxy', action: 'intersect')}", + intersectService: "${createLink(controller: 'proxy', action: 'intersect')}", featuresService: "${createLink(controller: 'proxy', action: 'features')}", featureService: "${createLink(controller: 'proxy', action: 'feature')}", spatialWms: "${grailsApplication.config.spatial.geoserverUrl}", @@ -41,12 +41,10 @@ bieWsUrl: "${grailsApplication.config.bieWs.baseURL}", speciesPage: "${grailsApplication.config.bie.baseURL}/species/", view: "${view}", - returnTo: "${returnTo}", projectLinkPrefix: "${createLink(controller: 'project')}/", recordImageListUrl: '${createLink(controller: "project", action: "listRecordImages")}', imageLeafletViewer: '${createLink(controller: 'resource', action: 'imageviewer', absolute: true)}', imageLocation:"${asset.assetPath(src:'')}", - version: "${params?.version}", projectId: "${projectId}", projectActivityId: "${projectActivityId}", spotterId: ${spotterId?:'undefined'}, @@ -54,11 +52,13 @@ hideProjectAndSurvey: ${hubConfig.content?.hideProjectAndSurvey?:false}, occurrenceUrl: "${raw(occurrenceUrl)}", spatialUrl: "${spatialUrl}", - mapLayersConfig: ${mapService.getMapLayersConfig(project, pActivity) as JSON}, + mapLayersConfig: , excelOutputTemplateUrl: "${createLink(controller: 'proxy', action:'excelOutputTemplate')}", absenceIconUrl:"${asset.assetPath(src: 'triangle.png')}", - bulkImportId: "${bulkImportId}" + bulkImportId: "${bulkImportId}", + version: "${params?.version}", + returnTo: "${returnTo}" }, here = document.location.href; diff --git a/grails-app/views/bioActivity/previewActivity.gsp b/grails-app/views/bioActivity/previewActivity.gsp index 27d42c6b9..2c0fdad9c 100644 --- a/grails-app/views/bioActivity/previewActivity.gsp +++ b/grails-app/views/bioActivity/previewActivity.gsp @@ -34,7 +34,7 @@ getOutputSpeciesIdUrl : "${createLink(controller: 'output', action: 'getOutputSpeciesIdentifier')}", getGuidForOutputSpeciesUrl : "${createLink(controller: 'record', action: 'getGuidForOutputSpeciesIdentifier')}", uploadImagesUrl: "${createLink(controller: 'image', action: 'upload')}", - mapLayersConfig: ${mapService.getMapLayersConfig(project, pActivity) as JSON}, + mapLayersConfig: , excelOutputTemplateUrl: "${createLink(controller: 'proxy', action:'excelOutputTemplate')}", searchBieUrl: "${raw(createLink(controller: 'search', action: 'searchSpecies', params: [id: pActivity.projectActivityId, limit: 10]))}" diff --git a/grails-app/views/blog/create.gsp b/grails-app/views/blog/create.gsp index 822e312e1..9dd16ccd8 100644 --- a/grails-app/views/blog/create.gsp +++ b/grails-app/views/blog/create.gsp @@ -22,8 +22,8 @@ blogUpdateUrl: "${grailsApplication.config.grails.serverURL}/blog/update", blogViewUrl: "${grailsApplication.config.grails.serverURL}/blog/index", documentUpdateUrl: "${grailsApplication.config.grails.serverURL}/document/documentUpdate", - returnTo: "${params.returnTo?:g.createLink(controller:'project', id:params.projectId)}" + returnTo: "${params.returnTo?:g.createLink(controller:'project', id:params.projectId)}" }; diff --git a/grails-app/views/blog/edit.gsp b/grails-app/views/blog/edit.gsp index f369db471..1bafe14d0 100644 --- a/grails-app/views/blog/edit.gsp +++ b/grails-app/views/blog/edit.gsp @@ -22,8 +22,8 @@ blogUpdateUrl: "${grailsApplication.config.grails.serverURL}/blog/update?id=${blogEntry.blogEntryId}", blogViewUrl: "${grailsApplication.config.grails.serverURL}/blog/index", documentUpdateUrl: "${grailsApplication.config.grails.serverURL}/document/documentUpdate", - returnTo: "${params.returnTo}" + returnTo: "${params.returnTo}" }; diff --git a/grails-app/views/bulkImport/index.gsp b/grails-app/views/bulkImport/index.gsp index a5a2f69e9..59d0e0f77 100644 --- a/grails-app/views/bulkImport/index.gsp +++ b/grails-app/views/bulkImport/index.gsp @@ -28,8 +28,8 @@ listBulkImportUrl: "${createLink(controller: 'bulkImport', action: 'list')}", bulkImportCreateUrl: "${createLink(uri: "/${hubConfig.urlPath}/bulkImport/create", params: [projectId: projectId, projectActivityId: projectActivityId])}", originUrl: "${grailsApplication.config.server.serverURL}", - returnTo: "${returnTo ?: (createLink(controller: 'project', action: 'index') + "/" + projectId)}" + returnTo: "${returnTo ?: (createLink(controller: 'project', action: 'index') + "/" + projectId)}" }, here = document.location.href; diff --git a/grails-app/views/bulkImport/listings.gsp b/grails-app/views/bulkImport/listings.gsp index a054a2418..9a1e2bff1 100644 --- a/grails-app/views/bulkImport/listings.gsp +++ b/grails-app/views/bulkImport/listings.gsp @@ -15,8 +15,8 @@ projectUrl: "${createLink(controller: 'project', action: 'index')}", bulkImportUrl: "${createLink(controller: 'bulkImport')}", - returnTo: "${returnTo ?: (createLink(uri: '/', params: [hub: hubConfig.urlPath]))}" + returnTo: "${returnTo ?: (createLink(uri: '/', params: [hub: hubConfig.urlPath]))}" }, here = document.location.href; diff --git a/grails-app/views/home/citizenScience.gsp b/grails-app/views/home/citizenScience.gsp index 5ebfbbd8c..abe8fe49f 100644 --- a/grails-app/views/home/citizenScience.gsp +++ b/grails-app/views/home/citizenScience.gsp @@ -13,8 +13,8 @@ spatialWmsUrl: "${grailsApplication.config.spatial.wms.url}", sldPolgonDefaultUrl: "${grailsApplication.config.sld.polgon.default.url}", sldPolgonHighlightUrl: "${grailsApplication.config.sld.polgon.highlight.url}", - dashboardUrl: "${raw(g.createLink(controller: 'report', action: 'dashboardReport', params: params))}" + dashboardUrl: "${raw(g.createLink(controller: 'report', action: 'dashboardReport', params: params))}" } diff --git a/grails-app/views/home/index.gsp b/grails-app/views/home/index.gsp index 3e959c82c..37ef9b0af 100644 --- a/grails-app/views/home/index.gsp +++ b/grails-app/views/home/index.gsp @@ -20,10 +20,10 @@ spatialWmsUrl: "${grailsApplication.config.spatial.wms.url}", sldPolgonDefaultUrl: "${grailsApplication.config.sld.polgon.default.url}", sldPolgonHighlightUrl: "${grailsApplication.config.sld.polgon.highlight.url}", - dashboardUrl: "${raw(g.createLink(controller: 'report', action: 'dashboardReport', params: params))}", excelOutputTemplateUrl: "${createLink(controller: 'proxy', action:'excelOutputTemplate')}", - mapLayersConfig: ${mapService.getMapLayersConfig(project, pActivity) as JSON} + mapLayersConfig: , + dashboardUrl: "${raw(g.createLink(controller: 'report', action: 'dashboardReport', params: params))}" } diff --git a/grails-app/views/hub/projectFinderHomePage.gsp b/grails-app/views/hub/projectFinderHomePage.gsp index f6b2a8c21..59303ba88 100644 --- a/grails-app/views/hub/projectFinderHomePage.gsp +++ b/grails-app/views/hub/projectFinderHomePage.gsp @@ -32,7 +32,6 @@ organisationLinkBaseUrl: "${createLink(controller: 'organisation', action: 'index')}", imageLocation:"${asset.assetPath(src:'')}", logoLocation:"${asset.assetPath(src:'filetypes')}", - dashboardUrl: "${raw(g.createLink(controller: 'report', action: 'dashboardReport', params: params))}", isUserPage: false, isUserWorksPage: true, @@ -57,8 +56,9 @@ paginationMessage: '${hubConfig.getTextForShowingProjects(grailsApplication.config.content.defaultOverriddenLabels)}', enablePartialSearch: ${hubConfig.content.enablePartialSearch?:false}, downloadWorksProjectsUrl: "${createLink(controller:'project', action:'downloadWorksProjects')}", - mapLayersConfig: ${mapService.getMapLayersConfig(project, pActivity) as JSON} + mapLayersConfig: , + dashboardUrl: "${raw(g.createLink(controller: 'report', action: 'dashboardReport', params: params))}" } diff --git a/grails-app/views/organisation/create.gsp b/grails-app/views/organisation/create.gsp index be40f34f5..accfad1db 100644 --- a/grails-app/views/organisation/create.gsp +++ b/grails-app/views/organisation/create.gsp @@ -16,8 +16,8 @@ organisationSaveUrl: "${createLink(action: 'ajaxUpdate')}", organisationViewUrl: "${createLink(action: 'index')}", documentUpdateUrl: "${createLink(controller: "proxy", action: "documentUpdate")}", - returnTo: "${params.returnTo}" + returnTo: "${params.returnTo}" }; diff --git a/grails-app/views/organisation/edit.gsp b/grails-app/views/organisation/edit.gsp index 89c72b31f..5ee1cad16 100644 --- a/grails-app/views/organisation/edit.gsp +++ b/grails-app/views/organisation/edit.gsp @@ -22,8 +22,8 @@ organisationListUrl: '${g.createLink(action: "list")}', organisationSaveUrl: "${createLink(action: 'ajaxUpdate')}", imageUploadUrl: "${createLink(controller: 'image', action: 'upload')}", - returnTo: "${params.returnTo ?: createLink(action: 'index', id: organisation.organisationId)}" + returnTo: "${params.returnTo ?: createLink(action: 'index', id: organisation.organisationId)}" }; diff --git a/grails-app/views/organisation/index.gsp b/grails-app/views/organisation/index.gsp index ac23e861e..949f839a7 100644 --- a/grails-app/views/organisation/index.gsp +++ b/grails-app/views/organisation/index.gsp @@ -60,7 +60,6 @@ bieWsUrl: "${grailsApplication.config.bieWs.baseURL}", siteViewUrl: "${createLink(controller: 'site', action: 'index')}", projectIndexUrl: "${createLink(controller: 'project', action: 'index')}", - getRecordsForMapping: "${raw(createLink(controller: 'bioActivity', action: 'getProjectActivitiesRecordsForMapping', params: [version: params.version]))}", worksActivityEditUrl: "${createLink(controller: 'activity', action: 'enterData')}", worksActivityViewUrl: "${createLink(controller: 'activity', action: 'index')}", downloadProjectDataUrl: "${createLink(controller: 'bioActivity', action: 'downloadProjectData')}", @@ -72,15 +71,16 @@ activityListUrl: "${createLink(controller: 'bioActivity', action: 'ajaxList')}", recordImageListUrl: '${createLink(controller: "project", action: "listRecordImages")}', imageLeafletViewer: '${createLink(controller: 'resource', action: 'imageviewer', absolute: true)}', - version: "${params.version ?: ''}", hideWorldWideBtn: true, flimit: ${grailsApplication.config.facets.flimit}, occurrenceUrl: "", spatialUrl: "", paginationMessage: '${hubConfig.getTextForShowingProjects(grailsApplication.config.content.defaultOverriddenLabels)}', absenceIconUrl:"${asset.assetPath(src: 'triangle.png')}", - mapLayersConfig: ${mapService.getMapLayersConfig(project, pActivity) as JSON} + mapLayersConfig: , + getRecordsForMapping: "${raw(createLink(controller: 'bioActivity', action: 'getProjectActivitiesRecordsForMapping'))}", + version: "${params.version ?: ''}" }; diff --git a/grails-app/views/project/create.gsp b/grails-app/views/project/create.gsp index 86e1d80e7..c7d23a19f 100644 --- a/grails-app/views/project/create.gsp +++ b/grails-app/views/project/create.gsp @@ -29,17 +29,17 @@ siteMetaDataUrl: "${createLink(controller:'site', action:'locationMetadataForPoint')}", deleteSiteUrl: "${createLink(controller:'site', action:'delete')}", returnTo: "${createLink(controller: 'project', action: 'index', id: project?.projectId)}", - scienceTypes: ${scienceTypes as grails.converters.JSON}, - ecoScienceTypes: ${ecoScienceTypes as grails.converters.JSON}, - lowerCaseScienceType: ${grailsApplication.config.biocollect.scienceType.collect{ it?.toLowerCase() } as grails.converters.JSON}, - lowerCaseEcoScienceType: ${grailsApplication.config.biocollect.ecoScienceType.collect{ it?.toLowerCase() } as grails.converters.JSON}, + scienceTypes: , + ecoScienceTypes: , + lowerCaseScienceType: , + lowerCaseEcoScienceType: , dataCollectionWhiteListUrl: "${createLink(controller: 'project', action: 'getDataCollectionWhiteList')}", countriesUrl: "${createLink(controller: 'project', action: 'getCountries')}", hideProjectEditScienceTypes: ${!!hubConfig?.content?.hideProjectEditScienceTypes}, uNRegionsUrl: "${createLink(controller: 'project', action: 'getUNRegions')}", - allBaseLayers: ${grailsApplication.config.map.baseLayers as grails.converters.JSON}, - allOverlays: ${grailsApplication.config.map.overlays as grails.converters.JSON}, - mapLayersConfig: ${mapService.getMapLayersConfig(project, pActivity) as JSON}, + allBaseLayers: , + allOverlays: , + mapLayersConfig: , leafletAssetURL: "${assetPath(src: 'webjars/leaflet/0.7.7/dist/images')}" }, diff --git a/grails-app/views/project/csProjectTemplate.gsp b/grails-app/views/project/csProjectTemplate.gsp index 12b73f6a8..c1828ee49 100644 --- a/grails-app/views/project/csProjectTemplate.gsp +++ b/grails-app/views/project/csProjectTemplate.gsp @@ -1,6 +1,7 @@ <%@ page contentType="text/html;charset=UTF-8" import="grails.converters.JSON;"%> + @@ -42,9 +43,9 @@ activiyCountUrl: "${createLink(controller: 'bioActivity', action: 'getProjectActivityCount')}", sitesWithDataForProjectActivity: "${createLink(controller: 'bioActivity', action: 'getSitesWithDataForProjectActivity')}", speciesPage: "${grailsApplication.config.bie.baseURL}/species/", - searchProjectActivitiesUrl: "${raw(createLink(controller: 'bioActivity', action: 'searchProjectActivities',params: [projectId:project.projectId, version: params.version]))}", + searchProjectActivitiesUrl: "${raw(createLink(controller: 'bioActivity', action: 'searchProjectActivities',params: [projectId:project.projectId]))}", downloadProjectDataUrl: "${raw(createLink(controller: 'bioActivity', action: 'downloadProjectData',params: [projectId:project.projectId]))}", - getRecordsForMapping: "${raw(createLink(controller: 'bioActivity', action: 'getProjectActivitiesRecordsForMapping', params:[version: params.version]))}", + getRecordsForMapping: "${raw(createLink(controller: 'bioActivity', action: 'getProjectActivitiesRecordsForMapping'))}", siteCreateUrl: "${raw(createLink(controller: 'site', action: 'createForProject', params: [projectId:project.projectId]))}", siteSelectUrl: "${raw(createLink(controller: 'site', action: 'select', params:[projectId:project.projectId]))}&returnTo=${raw(createLink(controller: 'project', action: 'index', id: project.projectId))}", siteUploadUrl: "${raw(createLink(controller: 'site', action: 'uploadShapeFile', params:[projectId:project.projectId]))}&returnTo=${raw(createLink(controller: 'project', action: 'index', id: project.projectId))}", @@ -95,10 +96,9 @@ auditMessageUrl: "${raw(createLink( controller: 'project', action:'auditMessageDetails', params:[projectId: project.projectId]))}", projectId: "${project.projectId}", projectLinkPrefix: "${createLink(controller: 'project')}/", - recordImageListUrl: '${raw(createLink(controller: "project", action: "listRecordImages", params:[version: params.version]))}', + recordImageListUrl: '${raw(createLink(controller: "project", action: "listRecordImages"))}', view: 'project', imageLeafletViewer: '${createLink(controller: 'resource', action: 'imageviewer', absolute: true)}', - version: "${params.version}", aekosSubmissionUrl: "${createLink(controller: 'bioActivity', action: 'aekosSubmission')}", createBlogEntryUrl: "${raw(createLink(controller: 'blog', action:'create', params:[projectId:project.projectId, returnTo:createLink(controller: 'project', action: 'index', id: project.projectId)]))}", editBlogEntryUrl: "${raw(createLink(controller: 'blog', action:'edit', params:[projectId:project.projectId, returnTo:createLink(controller: 'project', action: 'index', id: project.projectId)]))}", @@ -117,11 +117,12 @@ projectNotificationUrl: "${raw(createLink(controller: 'project', action: 'sendEmailToMembers', params: [id: project.projectId]))}", projectTestNotificationUrl: "${raw(createLink(controller: 'project', action: 'sendTestEmail', params: [id: project.projectId]))}", opportunisticDisplayName: "", - mapLayersConfig: ${mapService.getMapLayersConfig(project, null) as JSON}, - allBaseLayers: ${grailsApplication.config.map.baseLayers as grails.converters.JSON}, - allOverlays: ${grailsApplication.config.map.overlays as grails.converters.JSON}, - surveyMethods: + mapLayersConfig: , + allBaseLayers: , + allOverlays: , + surveyMethods: , + version: "${params.version}", }, here = window.location.href; diff --git a/grails-app/views/project/edit.gsp b/grails-app/views/project/edit.gsp index 7323ad0ec..c977ab27f 100644 --- a/grails-app/views/project/edit.gsp +++ b/grails-app/views/project/edit.gsp @@ -26,16 +26,16 @@ imageLocation:"${asset.assetPath(src:'')}", siteMetaDataUrl: "${createLink(controller:'site', action:'locationMetadataForPoint')}", returnTo: "${createLink(controller: 'project', action: 'index', id: project?.projectId)}", - scienceTypes: ${scienceTypes as grails.converters.JSON}, - lowerCaseScienceType: ${grailsApplication.config.biocollect.scienceType.collect{ it?.toLowerCase() } as grails.converters.JSON}, - ecoScienceTypes: ${ecoScienceTypes as grails.converters.JSON}, - lowerCaseEcoScienceType: ${grailsApplication.config.biocollect.ecoScienceType.collect{ it?.toLowerCase() } as grails.converters.JSON}, + scienceTypes: , + lowerCaseScienceType: , + ecoScienceTypes: , + lowerCaseEcoScienceType: , countriesUrl: "${createLink(controller: 'project', action: 'getCountries')}", uNRegionsUrl: "${createLink(controller: 'project', action: 'getUNRegions')}", dataCollectionWhiteListUrl: "${createLink(controller: 'project', action: 'getDataCollectionWhiteList')}", - allBaseLayers: ${grailsApplication.config.map.baseLayers as grails.converters.JSON}, - allOverlays: ${grailsApplication.config.map.overlays as grails.converters.JSON}, - mapLayersConfig: ${mapService.getMapLayersConfig(project, pActivity) as JSON}, + allBaseLayers: , + allOverlays: , + mapLayersConfig: , leafletAssetURL: "${assetPath(src: 'webjars/leaflet/0.7.7/dist/images')}" }, diff --git a/grails-app/views/project/index.gsp b/grails-app/views/project/index.gsp index de720f506..64c1d7384 100644 --- a/grails-app/views/project/index.gsp +++ b/grails-app/views/project/index.gsp @@ -64,9 +64,9 @@ editBlogEntryUrl: "${raw(createLink(controller: 'blog', action:'edit', params:[projectId:project.projectId, returnTo:createLink(controller: 'project', action: 'index', id: project.projectId)]))}", deleteBlogEntryUrl: "${raw(createLink(controller: 'blog', action:'delete', params:[projectId:project.projectId]))}", flimit: ${grailsApplication.config.facets.flimit}, - allBaseLayers: ${grailsApplication.config.map.baseLayers as grails.converters.JSON}, - allOverlays: ${grailsApplication.config.map.overlays as grails.converters.JSON}, - mapLayersConfig: ${mapService.getMapLayersConfig(project, pActivity) as JSON}, + allBaseLayers: , + allOverlays: , + mapLayersConfig: , leafletAssetURL: "${assetPath(src: 'webjars/leaflet/0.7.7/dist/images')}" }, @@ -409,7 +409,7 @@ baseLayer: baseLayerConfig.baseLayer, otherLayers: baseLayerConfig.otherLayers }); - var mapFeatures = ${mapFeatures}; + var mapFeatures = ; var sitesViewModel = new SitesViewModel(project.sites, map, mapFeatures, ${user?.isEditor?:false}); ko.applyBindings(sitesViewModel, document.getElementById('sitesList')); diff --git a/grails-app/views/project/projectFinder.gsp b/grails-app/views/project/projectFinder.gsp index f0111d7b2..b9941deea 100644 --- a/grails-app/views/project/projectFinder.gsp +++ b/grails-app/views/project/projectFinder.gsp @@ -49,7 +49,6 @@ defaultSearchRadiusMetersForPoint: "${grailsApplication.config.defaultSearchRadiusMetersForPoint ?: "100"}", imageLocation:"${asset.assetPath(src: '')}", logoLocation:"${asset.assetPath(src: 'filetypes')}", - dashboardUrl: "${raw(g.createLink(controller: 'report', action: 'dashboardReport', params: params))}", projectListUrl: "${raw(createLink(controller: 'project', action: 'search', params: [initiator: 'biocollect']))}", projectIndexBaseUrl : "${createLink(controller: 'project', action: 'index')}/", organisationBaseUrl : "${createLink(controller: 'organisation', action: 'index')}/", @@ -62,7 +61,7 @@ paginationMessage: '${hubConfig.getTextForShowingProjects(grailsApplication.config.content.defaultOverriddenLabels)}', enablePartialSearch: ${hubConfig.content.enablePartialSearch ?: false}, downloadWorksProjectsUrl: "${createLink(controller: 'project', action: 'downloadWorksProjects')}", - mapLayersConfig: ${mapService.getMapLayersConfig(project, pActivity) as JSON}, + mapLayersConfig: , isUserWorksPage: true, @@ -80,18 +79,19 @@ isCitizenScience: false, isBiologicalScience: true, hideWorldWideBtn: true, - associatedPrograms: ${associatedPrograms}, + associatedPrograms: , isCitizenScience: false, - associatedPrograms: ${associatedPrograms}, + associatedPrograms: , isCitizenScience: true, - showAllProjects: false + showAllProjects: false, + dashboardUrl: "${createLink(controller: 'report', action: 'dashboardReport', params: params)}" } fcConfig.meritProjectLogo = fcConfig.imageLocation + "${raw(grailsApplication.config.merit.projectLogo)}"; diff --git a/grails-app/views/project/works.gsp b/grails-app/views/project/works.gsp index 919cf1f8f..f8b12d17b 100644 --- a/grails-app/views/project/works.gsp +++ b/grails-app/views/project/works.gsp @@ -25,7 +25,6 @@ defaultSearchRadiusMetersForPoint: "${grailsApplication.config.defaultSearchRadiusMetersForPoint ?: "100"}", imageLocation:"${asset.assetPath(src:'')}", logoLocation:"${asset.assetPath(src:'filetypes')}", - dashboardUrl: "${raw(g.createLink(controller: 'report', action: 'dashboardReport', params: params))}", projectListUrl: "${raw(createLink(controller: 'project', action: 'search', params:[initiator:'biocollect']))}", projectIndexBaseUrl : "${createLink(controller:'project',action:'index')}/", organisationBaseUrl : "${createLink(controller:'organisation',action:'index')}/", @@ -33,9 +32,10 @@ isCitizenScience: false, showAllProjects: false, meritProjectLogo:"${asset.assetPath(src:'merit_project_logo.jpg')}", - associatedPrograms: ${associatedPrograms}, - flimit: ${grailsApplication.config.facets.flimit} + associatedPrograms: , + flimit: ${grailsApplication.config.facets.flimit}, + dashboardUrl: "${g.createLink(controller: 'report', action: 'dashboardReport', params: params)}" } fcConfig.meritProjectLogo = fcConfig.imageLocation + "${grailsApplication.config.merit.projectLogo}"; diff --git a/grails-app/views/project/worksProjectTemplate.gsp b/grails-app/views/project/worksProjectTemplate.gsp index 2fd380fc4..5d80455a7 100644 --- a/grails-app/views/project/worksProjectTemplate.gsp +++ b/grails-app/views/project/worksProjectTemplate.gsp @@ -34,9 +34,9 @@ activityJsonUrl: "${createLink(controller: 'activity', action: ' ')}", activityViewUrl: "${createLink(controller: 'activity', action: 'index')}", speciesPage: "${grailsApplication.config.bie.baseURL}/species/", - searchProjectActivitiesUrl: "${raw(createLink(controller: 'bioActivity', action: 'searchProjectActivities',params: [projectId:project.projectId, version: params.version]))}", + searchProjectActivitiesUrl: "${raw(createLink(controller: 'bioActivity', action: 'searchProjectActivities',params: [projectId:project.projectId]))}", downloadProjectDataUrl: "${raw(createLink(controller: 'bioActivity', action: 'downloadProjectData',params: [projectId:project.projectId]))}", - getRecordsForMapping: "${raw(createLink(controller: 'bioActivity', action: 'getProjectActivitiesRecordsForMapping', params:[version: params.version]))}", + getRecordsForMapping: "${raw(createLink(controller: 'bioActivity', action: 'getProjectActivitiesRecordsForMapping'))}", siteCreateUrl: "${raw(createLink(controller: 'site', action: 'createForProject', params: [projectId:project.projectId]))}", siteSelectUrl: "${raw(createLink(controller: 'site', action: 'select', params:[projectId:project.projectId]))}&returnTo=${createLink(controller: 'project', action: 'index', id: project.projectId)}", siteUploadUrl: "${raw(createLink(controller: 'site', action: 'uploadShapeFile', params:[projectId:project.projectId]))}&returnTo=${createLink(controller: 'project', action: 'index', id: project.projectId)}", @@ -83,10 +83,9 @@ auditMessageUrl: "${raw(createLink( controller: 'project', action:'auditMessageDetails', params:[projectId: project.projectId]))}", projectId: "${project.projectId}", projectLinkPrefix: "${createLink(controller: 'project')}/", - recordImageListUrl: '${raw(createLink(controller: "project", action: "listRecordImages", params:[version: params.version]))}', + recordImageListUrl: '${raw(createLink(controller: "project", action: "listRecordImages"))}', view: 'project', imageLeafletViewer: '${createLink(controller: 'resource', action: 'imageviewer', absolute: true)}', - version: "${params.version}", aekosSubmissionPostUrl: "${createLink(controller: 'projectActivity', action: 'aekosSubmission')}", createBlogEntryUrl: "${raw(createLink(controller: 'blog', action:'create', params:[projectId:project.projectId, returnTo:createLink(controller: 'project', action: 'index', id: project.projectId)]))}", editBlogEntryUrl: "${raw(createLink(controller: 'blog', action:'edit', params:[projectId:project.projectId, returnTo:createLink(controller: 'project', action: 'index', id: project.projectId)]))}", @@ -103,25 +102,26 @@ canAddActivity: ${user?.isAdmin ? 'true' : 'false'}, canAddSite: ${projectContent?.site?.canEditSites? 'true' : 'false'}, worksScheduleIntroUrl: "${raw(createLink(controller: 'staticPage', action:'index', params: [page:"workScheduleHelp"]))}", - outputTargetMetadata: ${((outputTargetMetadata?:[]) as grails.converters.JSON).toString()}, - activityTypes: ${raw(((activityTypes?:[]) as JSON).toString())}, - themes: ${raw(((themes?:[]) as JSON).toString())}, - sites: ${raw(((project?.sites ?: []) as JSON).toString())}, - siteIds: ${raw(((project.mapConfiguration?.sites ?: []) as JSON).toString())}, - project: ${raw(((project?: [:]) as JSON).toString())}, + outputTargetMetadata: , + activityTypes: , + themes: , + sites: , + siteIds: , + project: , commonKeysUrl: "${createLink(controller: 'search', action: 'getCommonKeys')}", searchBieUrl: "${raw(createLink(controller: 'project', action: 'searchSpecies', params: [id: project.projectId, limit: 10]))}", - defaultSpeciesConfiguration: ${raw((grailsApplication.config.speciesConfiguration.default as JSON).toString())}, + defaultSpeciesConfiguration: , intersectService: "${createLink(controller: 'proxy', action: 'intersect')}", featuresService: "${createLink(controller: 'proxy', action: 'features')}", featureService: "${createLink(controller: 'proxy', action: 'feature')}", spatialWms: "${grailsApplication.config.spatial.geoserverUrl}", layersStyle: "${createLink(controller: 'regions', action: 'layersStyle')}", - allBaseLayers: ${grailsApplication.config.map.baseLayers as grails.converters.JSON}, - allOverlays: ${grailsApplication.config.map.overlays as grails.converters.JSON}, - mapLayersConfig: ${mapService.getMapLayersConfig(project, pActivity) as JSON}, - sitesWithDataForProject: "${createLink(controller: 'bioActivity', action: 'getSitesWithDataForProject')}" + allBaseLayers: , + allOverlays: , + mapLayersConfig: , + sitesWithDataForProject: "${createLink(controller: 'bioActivity', action: 'getSitesWithDataForProject')}", + version: "${params.version}" }, here = window.location.href; diff --git a/grails-app/views/site/_siteDefinition.gsp b/grails-app/views/site/_siteDefinition.gsp index 467ff3eb2..9fe90e5c4 100644 --- a/grails-app/views/site/_siteDefinition.gsp +++ b/grails-app/views/site/_siteDefinition.gsp @@ -263,9 +263,7 @@ function initSiteViewModel(allowPointsOfInterest, edit) { // server side generated paths & properties var SERVER_CONF = { - - siteData: ${site ?: [] as grails.converters.JSON}, - + siteData: , spatialService: '${createLink(controller: 'proxy', action: 'feature')}', regionListUrl: "${createLink(controller: 'regions', action: 'regionsList')}", featuresService: "${createLink(controller: 'proxy', action: 'features')}", @@ -283,27 +281,23 @@ function initSiteViewModel(allowPointsOfInterest, edit) { }; var savedSiteData = { - siteId: "${site?.siteId}", name : "${site?.name?.encodeAsJavaScript()}", externalId : "${site?.externalId}", catchment: "${site?.catchment}", context : "${site?.context}", type : "${site?.type}", - extent: ${site?.extent ?: 'null'}, - poi: ${site?.poi ?: '[]'}, + extent: , + poi: , area : "${site?.area}", description : "${site?.description?.encodeAsJavaScript()}", notes : "${site?.notes?.encodeAsJavaScript()}", documents : JSON.parse('${(siteDocuments ?: documents).encodeAsJavaScript() ?: '{}'}'), - projects : ['${project.projectId}'], - - projects : ${site?.projects ?: '[]'} - + projects : }; diff --git a/grails-app/views/site/edit.gsp b/grails-app/views/site/edit.gsp index 717e88a43..3d7e174a1 100644 --- a/grails-app/views/site/edit.gsp +++ b/grails-app/views/site/edit.gsp @@ -36,19 +36,19 @@ geocodeUrl: "${grailsApplication.config.google.geocode.url}", siteMetaDataUrl: "${createLink(controller:'site', action:'locationMetadataForPoint')}", - pageUrl : "${ grailsApplication.config.security.cas.appServerName}${createLink(controller:'site', action:'createForProject', params:[projectId:project.projectId,checkForState:true])}", - projectUrl : "${ grailsApplication.config.security.cas.appServerName}${createLink(controller:'project', action:'index', id:project.projectId)}", + pageUrl : "${createLink(controller:'site', action:'createForProject', params:[projectId:project.projectId,checkForState:true])}", + projectUrl : "${createLink(controller:'project', action:'index', id:project.projectId)}", - pageUrl : "${ grailsApplication.config.security.cas.appServerName}${createLink(controller:'site', action:'edit', id: site?.siteId, params:[checkForState:true])}", + pageUrl : "${createLink(controller:'site', action:'edit', id: site?.siteId, params:[checkForState:true])}", - pageUrl : "${ grailsApplication.config.security.cas.appServerName}${createLink(controller:'site', action:'create', params:[checkForState:true])}", + pageUrl : "${createLink(controller:'site', action:'create', params:[checkForState:true])}", sitePageUrl : "${createLink(action: 'index', id: site?.siteId)}", homePageUrl : "${createLink(controller: 'home', action: 'index')}", ajaxUpdateUrl: "${createLink(action: 'ajaxUpdate', id: site?.siteId)}", - mapLayersConfig: ${mapService.getMapLayersConfig(project, pActivity) as JSON}, + mapLayersConfig: , returnTo: "${createLink(controller: 'project', action: 'index', id: project?.projectId)}" }, diff --git a/grails-app/views/site/index.gsp b/grails-app/views/site/index.gsp index 68f8ac96b..821316966 100644 --- a/grails-app/views/site/index.gsp +++ b/grails-app/views/site/index.gsp @@ -49,7 +49,7 @@ bieUrl: "${grailsApplication.config.bie.baseURL}", bieWsUrl: "${grailsApplication.config.bieWs.baseURL}", speciesPage: "${grailsApplication.config.bie.baseURL}/species/", - mapLayersConfig: ${mapService.getMapLayersConfig(project, pActivity) as JSON}, + mapLayersConfig: }, here = "${createLink(controller: 'site', action: 'index', id: site.siteId)}"; diff --git a/grails-app/views/site/list.gsp b/grails-app/views/site/list.gsp index 3f42c65fe..59cc19503 100644 --- a/grails-app/views/site/list.gsp +++ b/grails-app/views/site/list.gsp @@ -25,7 +25,7 @@ imageLeafletViewer: '${createLink(controller: 'resource', action: 'imageviewer', absolute: true)}', activityViewUrl: "${createLink(controller: 'bioActivity', action: 'index')}", siteDeleteUrl: "${createLink(controller: 'site', action: 'ajaxDelete')}", - mapLayersConfig: ${mapService.getMapLayersConfig(project, pActivity) as JSON}, + mapLayersConfig: , myFavourites: "${myFavourites}" } diff --git a/grails-app/views/site/select.gsp b/grails-app/views/site/select.gsp index d329ffed7..a9cdfa5e3 100644 --- a/grails-app/views/site/select.gsp +++ b/grails-app/views/site/select.gsp @@ -22,7 +22,7 @@ spatialWmsCacheUrl: "${grailsApplication.config.spatial.wms.cache.url}", spatialWmsUrl: "${grailsApplication.config.spatial.wms.url}", sldPolgonDefaultUrl: "${grailsApplication.config.sld.polgon.default.url}", - mapLayersConfig: ${mapService.getMapLayersConfig(project, pActivity) as JSON}, + mapLayersConfig: , sldPolgonHighlightUrl: "${grailsApplication.config.sld.polgon.highlight.url}" }, @@ -37,7 +37,7 @@
-

Add sites to ${project.name}

+

Add sites to ${project.name?.encodeAsHTML()}

diff --git a/grails-app/views/site/upload.gsp b/grails-app/views/site/upload.gsp index d21c4c680..39d901b88 100644 --- a/grails-app/views/site/upload.gsp +++ b/grails-app/views/site/upload.gsp @@ -12,7 +12,7 @@ var fcConfig = { - serverUrl: "${grailsApplication.config.grails.serverURL}", + serverUrl: "${grailsApplication.config.grails.serverURL}", spatialBaseUrl: "${grailsApplication.config.spatial.baseURL}", spatialWmsCacheUrl: "${grailsApplication.config.spatial.wms.cache.url}", spatialWmsUrl: "${grailsApplication.config.spatial.wms.url}", From 0e9db4f0b5253271ffd8186ee17163645808c46a Mon Sep 17 00:00:00 2001 From: temi Date: Mon, 19 Jun 2023 15:07:15 +1000 Subject: [PATCH 005/115] #1532 fathom id is configurable via hub config --- build.gradle | 2 +- grails-app/assets/javascripts/hubs.js | 2 ++ grails-app/views/admin/editHub.gsp | 7 +++++++ grails-app/views/layouts/bs4.gsp | 4 ++-- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index bd88f6ac2..7a98bae71 100644 --- a/build.gradle +++ b/build.gradle @@ -131,7 +131,7 @@ dependencies { implementation "org.grails.plugins:ala-admin-plugin:2.3.0" implementation ("org.grails.plugins:ala-auth:5.1.1") implementation "org.grails.plugins:ala-ws-security-plugin:4.1.2" - runtimeOnly "org.grails.plugins:ala-bootstrap3:4.2.0-SNAPSHOT" + runtimeOnly "org.grails.plugins:ala-bootstrap3:4.2.0" // swagger API implementation 'au.org.ala.plugins:openapi:1.1.0' diff --git a/grails-app/assets/javascripts/hubs.js b/grails-app/assets/javascripts/hubs.js index 25b774090..6ee8abe78 100644 --- a/grails-app/assets/javascripts/hubs.js +++ b/grails-app/assets/javascripts/hubs.js @@ -107,6 +107,7 @@ var HubSettings = function (settings, config) { self.content = ko.observable(); self.quickLinks = ko.observableArray(); self.customBreadCrumbs = ko.observableArray(); + self.fathomSiteId = ko.observable(); self.pages = { allRecords : new FacetConfigurationViewModel(settings.pages.allRecords, hubConfigs.availableDataFacets), myRecords : new FacetConfigurationViewModel(settings.pages.myRecords, hubConfigs.availableDataFacets), @@ -236,6 +237,7 @@ var HubSettings = function (settings, config) { self.urlPath(settings.urlPath); self.skin(settings.skin); self.title(settings.title); + self.fathomSiteId(settings.fathomSiteId); self.supportedPrograms(self.orEmptyArray(settings.supportedPrograms)); self.defaultProgram(settings.defaultProgram); self.bannerUrl(self.orBlank(settings.bannerUrl)); diff --git a/grails-app/views/admin/editHub.gsp b/grails-app/views/admin/editHub.gsp index ae80156e2..4f14e2409 100644 --- a/grails-app/views/admin/editHub.gsp +++ b/grails-app/views/admin/editHub.gsp @@ -107,6 +107,13 @@
+
+ +
+ +
+
+
diff --git a/grails-app/views/layouts/bs4.gsp b/grails-app/views/layouts/bs4.gsp index 072a76b64..cc5b42ca1 100644 --- a/grails-app/views/layouts/bs4.gsp +++ b/grails-app/views/layouts/bs4.gsp @@ -125,7 +125,7 @@
- +
@@ -189,7 +189,7 @@ %{-- Ala footer does not need it since it comes with GA script included. --}% - + From 25326141f9b6849b6b133ef9268e42fcaf06de7c Mon Sep 17 00:00:00 2001 From: temi Date: Wed, 21 Jun 2023 12:33:01 +1000 Subject: [PATCH 006/115] - removed html ko bindings from some elements - using markdown HTML conversion before rendering using html binding --- grails-app/views/project/_aboutWorksProject.gsp | 4 ++-- grails-app/views/project/_details.gsp | 8 ++++---- grails-app/views/project/index.gsp | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/grails-app/views/project/_aboutWorksProject.gsp b/grails-app/views/project/_aboutWorksProject.gsp index a017d8801..c32b726a0 100644 --- a/grails-app/views/project/_aboutWorksProject.gsp +++ b/grails-app/views/project/_aboutWorksProject.gsp @@ -85,11 +85,11 @@

News and events

-
+

Project stories

-
+
\ No newline at end of file diff --git a/grails-app/views/project/_details.gsp b/grails-app/views/project/_details.gsp index 85da636fd..d9f5537a0 100644 --- a/grails-app/views/project/_details.gsp +++ b/grails-app/views/project/_details.gsp @@ -1066,14 +1066,14 @@ - + @@ -1081,7 +1081,7 @@
- +
@@ -1089,7 +1089,7 @@
- +
diff --git a/grails-app/views/project/index.gsp b/grails-app/views/project/index.gsp index 64c1d7384..62ecc49f6 100644 --- a/grails-app/views/project/index.gsp +++ b/grails-app/views/project/index.gsp @@ -220,11 +220,11 @@

News and events

-
+

Project stories

-
+
From 8d7de56746a1023fb76b64839bc3f170768ee3d2 Mon Sep 17 00:00:00 2001 From: temi Date: Thu, 13 Apr 2023 16:18:19 +1000 Subject: [PATCH 007/115] ecodata-client-plugin:6.0 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 7937ab5af..49eea6d2d 100644 --- a/build.gradle +++ b/build.gradle @@ -146,7 +146,7 @@ dependencies { if (!Boolean.valueOf(inplace)) { implementation "org.grails.plugins:ala-map-plugin:3.0.1" - implementation "org.grails.plugins:ecodata-client-plugin:6.0-SNAPSHOT" + implementation "org.grails.plugins:ecodata-client-plugin:6.0" } testCompileOnly "org.grails:grails-test-mixins:3.3.0" From 4ea24ab17eea896a3ac8e0ee74c331ef81aab283 Mon Sep 17 00:00:00 2001 From: temi Date: Thu, 13 Apr 2023 16:20:53 +1000 Subject: [PATCH 008/115] release v6.5 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index cba909ab7..4c255c648 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.5-fixes-SNAPSHOT +biocollectVersion=6.5 grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From 1ef2b1f52d8ffcfe8a36d9932b17b26f8738379e Mon Sep 17 00:00:00 2001 From: temi Date: Tue, 2 May 2023 13:44:49 +1000 Subject: [PATCH 009/115] 6.6-SNAPSHOT --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 4c255c648..a8beee2ef 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.5 +biocollectVersion=6.6-SNAPSHOT grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From fd0ab2d415a024fb2da4c3c0690bf5f2771c2c2b Mon Sep 17 00:00:00 2001 From: temi Date: Thu, 29 Jun 2023 13:38:58 +1000 Subject: [PATCH 010/115] release 6.6 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index a8beee2ef..94a254ba3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.6-SNAPSHOT +biocollectVersion=6.6 grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From f5284b5f2fb90f7b0b31872cdfc67c765f763e5e Mon Sep 17 00:00:00 2001 From: temi Date: Tue, 18 Jul 2023 15:53:20 +1000 Subject: [PATCH 011/115] 6.6.1-SNAPSHOT --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index a8beee2ef..b83ac86db 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.6-SNAPSHOT +biocollectVersion=6.6.1-SNAPSHOT grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From 35c50a3fef8d1e014f09d919e2cdce04be998cfb Mon Sep 17 00:00:00 2001 From: temi Date: Tue, 18 Jul 2023 16:07:46 +1000 Subject: [PATCH 012/115] - #1540 fixes issue with upload of images from mobile app --- .../biocollect/BioActivityController.groovy | 31 +++++++++++++++---- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/BioActivityController.groovy b/grails-app/controllers/au/org/ala/biocollect/BioActivityController.groovy index 24277fcfc..fd357cb59 100644 --- a/grails-app/controllers/au/org/ala/biocollect/BioActivityController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/BioActivityController.groovy @@ -54,6 +54,7 @@ class BioActivityController { AuthService authService UtilService utilService ActivityFormService activityFormService + UserInfoService userInfoService static int MAX_FLIMIT = 500 static allowedMethods = ['bulkDelete': 'POST', bulkRelease: 'POST', bulkEmbargo: 'POST'] @@ -296,9 +297,7 @@ class BioActivityController { addXFrameOptionsHeader() Map model = addActivity(id, true) model.mobile = true - model.userName = request.getHeader(UserService.USER_NAME_HEADER_FIELD) - model.authKey = request.getHeader(UserService.AUTH_KEY_HEADER_FIELD) - model.authorization = request.getHeader(UserInfoService.AUTHORIZATION_HEADER_FIELD) + validateAndAddMobileUserCredentials(model) model.bulkUpload = params.getBoolean('bulkUpload', false) render (view: model.error ? 'error' : 'edit', model: model) } @@ -312,13 +311,33 @@ class BioActivityController { addXFrameOptionsHeader() Map model = editActivity(id, true) model.mobile = true - model.userName = request.getHeader(UserService.USER_NAME_HEADER_FIELD) - model.authKey = request.getHeader(UserService.AUTH_KEY_HEADER_FIELD) - model.authorization = request.getHeader(UserInfoService.AUTHORIZATION_HEADER_FIELD) + validateAndAddMobileUserCredentials(model) render (view: model.error ? 'error' : 'edit', model: model) } + private def validateAndAddMobileUserCredentials(Map model) { + UserDetails user + String userName = request.getHeader(UserService.USER_NAME_HEADER_FIELD) + String authKey = request.getHeader(UserService.AUTH_KEY_HEADER_FIELD) + String authorization = request.getHeader(UserInfoService.AUTHORIZATION_HEADER_FIELD) + if (authKey && userName) { + user = userInfoService.getUserFromAuthKey(userName, authKey) + if (user) { + model.userName = userName + model.authKey = authKey + } + } + + if (authorization) { + user = userInfoService.getUserFromJWT(authorization) + if (user) { + model.authorization = authorization + } + } + } + + private def addActivity(String id, boolean mobile = false) { String userId = userService.getCurrentUserId(request) Map pActivity = projectActivityService.get(id, "all") From 8317553416d10db9ea53a09a62fcfdd9ff68da0c Mon Sep 17 00:00:00 2001 From: temi Date: Wed, 19 Jul 2023 11:14:11 +1000 Subject: [PATCH 013/115] - #1540 fixed data type of user details --- .../au/org/ala/biocollect/BioActivityController.groovy | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/BioActivityController.groovy b/grails-app/controllers/au/org/ala/biocollect/BioActivityController.groovy index fd357cb59..cb2ede517 100644 --- a/grails-app/controllers/au/org/ala/biocollect/BioActivityController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/BioActivityController.groovy @@ -316,8 +316,8 @@ class BioActivityController { } - private def validateAndAddMobileUserCredentials(Map model) { - UserDetails user + private Map validateAndAddMobileUserCredentials(Map model) { + def user String userName = request.getHeader(UserService.USER_NAME_HEADER_FIELD) String authKey = request.getHeader(UserService.AUTH_KEY_HEADER_FIELD) String authorization = request.getHeader(UserInfoService.AUTHORIZATION_HEADER_FIELD) @@ -335,6 +335,8 @@ class BioActivityController { model.authorization = authorization } } + + model } From 30f9ee38390b2997bcfde75fce77f61ca5b205f0 Mon Sep 17 00:00:00 2001 From: temi Date: Wed, 19 Jul 2023 14:25:06 +1000 Subject: [PATCH 014/115] - #1540 getting raw userName --- grails-app/views/layouts/mobile.gsp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grails-app/views/layouts/mobile.gsp b/grails-app/views/layouts/mobile.gsp index 27ba877c5..de0c5a897 100644 --- a/grails-app/views/layouts/mobile.gsp +++ b/grails-app/views/layouts/mobile.gsp @@ -61,11 +61,11 @@ }, beforeSend: function (xhr) { - xhr.setRequestHeader('Authorization', "${authorization}"); + xhr.setRequestHeader('Authorization', "${raw(authorization)}"); - xhr.setRequestHeader('authKey', "${authKey}"); - xhr.setRequestHeader('userName', "${userName}"); + xhr.setRequestHeader('authKey', "${raw(authKey)}"); + xhr.setRequestHeader('userName', "${raw(userName)}"); } }); From 82cc6f6c60ac3c4e6ff550c626b1fdd4df74455e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Jul 2023 20:09:49 +0000 Subject: [PATCH 015/115] Bump word-wrap from 1.2.3 to 1.2.4 Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/jonschlinkert/word-wrap/releases) - [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4) --- updated-dependencies: - dependency-name: word-wrap dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index ec2b6e796..2a2219b96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3142,9 +3142,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", + "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -5725,9 +5725,9 @@ } }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", + "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", "dev": true }, "wordwrap": { From adc66015cea3363740b1c875d80e36bbfb943574 Mon Sep 17 00:00:00 2001 From: temi Date: Thu, 20 Jul 2023 11:50:40 +1000 Subject: [PATCH 016/115] - #1540 added unit test --- .../biocollect/BioActivityController.groovy | 6 ++--- .../BioActivityControllerSpec.groovy | 26 +++++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/BioActivityController.groovy b/grails-app/controllers/au/org/ala/biocollect/BioActivityController.groovy index cb2ede517..12fb36b82 100644 --- a/grails-app/controllers/au/org/ala/biocollect/BioActivityController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/BioActivityController.groovy @@ -324,15 +324,15 @@ class BioActivityController { if (authKey && userName) { user = userInfoService.getUserFromAuthKey(userName, authKey) if (user) { - model.userName = userName - model.authKey = authKey + model[UserService.USER_NAME_HEADER_FIELD] = userName + model[UserService.AUTH_KEY_HEADER_FIELD] = authKey } } if (authorization) { user = userInfoService.getUserFromJWT(authorization) if (user) { - model.authorization = authorization + model[UserInfoService.AUTHORIZATION_HEADER_FIELD] = authorization } } diff --git a/src/test/groovy/au/org/ala/biocollect/BioActivityControllerSpec.groovy b/src/test/groovy/au/org/ala/biocollect/BioActivityControllerSpec.groovy index 1ecb0e536..f17e4d272 100644 --- a/src/test/groovy/au/org/ala/biocollect/BioActivityControllerSpec.groovy +++ b/src/test/groovy/au/org/ala/biocollect/BioActivityControllerSpec.groovy @@ -1,8 +1,10 @@ package au.org.ala.biocollect +import au.org.ala.biocollect.merit.ActivityService import au.org.ala.biocollect.merit.CommonService import au.org.ala.biocollect.merit.SearchService import au.org.ala.biocollect.merit.UserService +import au.org.ala.ecodata.forms.UserInfoService import grails.testing.web.controllers.ControllerUnitTest import spock.lang.Specification @@ -35,4 +37,28 @@ class BioActivityControllerSpec extends Specification implements ControllerUnitT and: "The query has specified the include parameter to limit the results to only the fields required" searchParams.include.size() > 0 } + + def "authkey and userName are added to model"() { + given: + def activityId = "activity-123" + controller.userService = Mock(UserService) + controller.userInfoService = Mock(UserInfoService) + controller.userInfoService.getUserFromAuthKey(_, _) >> { [id: "1"] } + controller.userInfoService.getUserFromJWT(_) >> { [id: "1"] } + controller.activityService = Mock(ActivityService) + controller.activityService.get(_) >> [projectId: "project1"] + controller.userService.getCurrentUserId(_) >> null + request.addHeader('userName', 'abc@abc.com') + request.addHeader('authKey', 'abc') + request.addHeader('Authorization', 'Bearer abcxyz') + + when: + controller.mobileEdit(activityId) + + then: + model[UserService.AUTH_KEY_HEADER_FIELD] == 'abc' + model[UserService.USER_NAME_HEADER_FIELD] == 'abc@abc.com' + model[UserInfoService.AUTHORIZATION_HEADER_FIELD] == 'Bearer abcxyz' + } + } From 4d90c32c22e5799d5f395fd15fa2b5e38638ba6c Mon Sep 17 00:00:00 2001 From: temi Date: Thu, 20 Jul 2023 14:53:13 +1000 Subject: [PATCH 017/115] release 6.6.1 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index b83ac86db..c3a24c618 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.6.1-SNAPSHOT +biocollectVersion=6.6.1 grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From b676c613ba6bdb0da34702511fce342d08ddfc61 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Wed, 9 Aug 2023 17:02:51 +1000 Subject: [PATCH 018/115] #1548 Increased z-index of ui-front class to fix single species select dropdown visibility in survey species settings --- .../assets/vendor/jquery-ui/1.13.0/jquery-ui.structure.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grails-app/assets/vendor/jquery-ui/1.13.0/jquery-ui.structure.css b/grails-app/assets/vendor/jquery-ui/1.13.0/jquery-ui.structure.css index 51cb552d9..265b0449a 100644 --- a/grails-app/assets/vendor/jquery-ui/1.13.0/jquery-ui.structure.css +++ b/grails-app/assets/vendor/jquery-ui/1.13.0/jquery-ui.structure.css @@ -53,7 +53,7 @@ } .ui-front { - z-index: 100; + z-index: 2000; } From ef68ac3f17f8060750be21fe63450a853fc2072d Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Wed, 9 Aug 2023 17:11:00 +1000 Subject: [PATCH 019/115] Bump to 6.6.2 snapshot version --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index c3a24c618..1ec54f06d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.6.1 +biocollectVersion=6.6.2-SNAPSHOT grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From d79875e611dd218136c083cbe9bfa0cc97b644f3 Mon Sep 17 00:00:00 2001 From: temi Date: Thu, 10 Aug 2023 09:52:47 +1000 Subject: [PATCH 020/115] release 6.6.2 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 1ec54f06d..b634720f1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.6.2-SNAPSHOT +biocollectVersion=6.6.2 grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From 21103d0399c8f99e023e4ca25523fd2a002777d9 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Tue, 15 Aug 2023 14:50:58 +1000 Subject: [PATCH 021/115] Fixes #1551 --- grails-app/views/bioActivity/_createEditActivityBody.gsp | 4 ++-- grails-app/views/bioActivity/index.gsp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/grails-app/views/bioActivity/_createEditActivityBody.gsp b/grails-app/views/bioActivity/_createEditActivityBody.gsp index fedec905f..42a76172e 100644 --- a/grails-app/views/bioActivity/_createEditActivityBody.gsp +++ b/grails-app/views/bioActivity/_createEditActivityBody.gsp @@ -259,10 +259,10 @@ - + var viewModelName = "${blockId}ViewModel", elementId = "ko${blockId}", - outputName = "${outputName}"; + outputName = "${raw(outputName)}"; var output = $.grep(activity.outputs || [], function(it){return it.name == outputName})[0] || { name: outputName}; var config = $.grep(metaModel.outputConfig || [], function(it){return it.outputName == outputName})[0] || {}; diff --git a/grails-app/views/bioActivity/index.gsp b/grails-app/views/bioActivity/index.gsp index 212e0b582..63107308a 100644 --- a/grails-app/views/bioActivity/index.gsp +++ b/grails-app/views/bioActivity/index.gsp @@ -127,7 +127,7 @@ - + @@ -148,7 +148,7 @@ $(function(){ var viewModelName = "${blockId}ViewModel", elementId = "ko${blockId}", - outputName = "${outputName}", + outputName = "${raw(outputName)}", viewModelInstance = viewModelName + "Instance"; var output = $.grep(activity.outputs || [], function(it){return it.name == outputName})[0] || { name: outputName}; From 00d9c4672b864ecf93ee9765a0c21f3af90dd3e6 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Tue, 15 Aug 2023 15:06:47 +1000 Subject: [PATCH 022/115] Fixes #1538 --- grails-app/assets/javascripts/project-finder.js | 2 +- grails-app/views/project/projectFinder.gsp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/grails-app/assets/javascripts/project-finder.js b/grails-app/assets/javascripts/project-finder.js index 20796481a..890422e4c 100644 --- a/grails-app/assets/javascripts/project-finder.js +++ b/grails-app/assets/javascripts/project-finder.js @@ -565,7 +565,7 @@ function ProjectFinder(config) { // Results view var savedViewMode = amplify.store('pt-view-state'); - savedViewMode = savedViewMode || "#grid-tab"; //Default is the new map-popup view + savedViewMode = savedViewMode || "grid-tab"; //Default is the new map-popup view $('.project-finder-tab a#'+savedViewMode).tab('show'); // Filters view diff --git a/grails-app/views/project/projectFinder.gsp b/grails-app/views/project/projectFinder.gsp index b9941deea..9d821902f 100644 --- a/grails-app/views/project/projectFinder.gsp +++ b/grails-app/views/project/projectFinder.gsp @@ -72,7 +72,7 @@ isUserPage: true, hideWorldWideBtn: true, isCitizenScience: false, - showAllProjects: true + showAllProjects: true, From d5791c4c5d470f4a3aa5c766ff597f8eef8de40d Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Tue, 15 Aug 2023 15:08:35 +1000 Subject: [PATCH 023/115] Bump version to 6.6.3-SNAPSHOT --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index b634720f1..5580ff1fc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.6.2 +biocollectVersion=6.6.3-SNAPSHOT grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From f6f4d26df5769e2dfdf99ffd9b38ecbcf9b2dcf0 Mon Sep 17 00:00:00 2001 From: temi Date: Wed, 16 Aug 2023 11:31:34 +1000 Subject: [PATCH 024/115] release 6.6.3 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 5580ff1fc..e7102b875 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.6.3-SNAPSHOT +biocollectVersion=6.6.3 grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From 91114b085dba3750b0ab0a0449860d5da131c2d0 Mon Sep 17 00:00:00 2001 From: temi Date: Tue, 19 Sep 2023 22:34:13 +1000 Subject: [PATCH 025/115] 6.6.4-SNAPSHOT using ecodata-client-plugin:6.1.1-SNAPSHOT --- build.gradle | 2 +- gradle.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 7a98bae71..5a12f72f1 100644 --- a/build.gradle +++ b/build.gradle @@ -146,7 +146,7 @@ dependencies { if (!Boolean.valueOf(inplace)) { implementation "org.grails.plugins:ala-map-plugin:3.0.1" - implementation "org.grails.plugins:ecodata-client-plugin:6.0" + implementation "org.grails.plugins:ecodata-client-plugin:6.1.1-SNAPSHOT" } testCompileOnly "org.grails:grails-test-mixins:3.3.0" diff --git a/gradle.properties b/gradle.properties index e7102b875..e5e24c3d2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.6.3 +biocollectVersion=6.6.4-SNAPSHOT grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From 756a81ffb2da1cdd05d42c80e46016090db9b0c0 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Wed, 20 Sep 2023 15:49:10 +1000 Subject: [PATCH 026/115] Release 6.6.4 --- build.gradle | 2 +- gradle.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 5a12f72f1..52ac31b0b 100644 --- a/build.gradle +++ b/build.gradle @@ -146,7 +146,7 @@ dependencies { if (!Boolean.valueOf(inplace)) { implementation "org.grails.plugins:ala-map-plugin:3.0.1" - implementation "org.grails.plugins:ecodata-client-plugin:6.1.1-SNAPSHOT" + implementation "org.grails.plugins:ecodata-client-plugin:6.1.1" } testCompileOnly "org.grails:grails-test-mixins:3.3.0" diff --git a/gradle.properties b/gradle.properties index e5e24c3d2..38a32a3c8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.6.4-SNAPSHOT +biocollectVersion=6.6.4 grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From f0ef30d463d03e8f419e927aa0144c38031b5089 Mon Sep 17 00:00:00 2001 From: temi Date: Wed, 20 Sep 2023 22:16:42 +1000 Subject: [PATCH 027/115] added missing dependencies --- karma.conf.js | 2 ++ package-lock.json | 48 +++++++++++++++++++++++------------------------ package.json | 2 +- 3 files changed, 27 insertions(+), 25 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index b38a327ff..50d14b045 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -39,8 +39,10 @@ module.exports = function (config) { 'node_modules/leaflet/dist/leaflet.js', 'grails-app/assets/vendor/leaflet-plugins-2.0.0/layer/tile/Google.js', 'grails-app/assets/javascripts/MapUtilities.js', + 'https://cdn.jsdelivr.net/gh/AtlasOfLivingAustralia/ecodata-client-plugin/grails-app/assets/vendor/expr-eval/2.0.2/bundle.js', 'https://cdn.jsdelivr.net/gh/AtlasOfLivingAustralia/ecodata-client-plugin/grails-app/assets/vendor/select2/4.0.3/js/select2.full.js', 'https://cdn.jsdelivr.net/gh/AtlasOfLivingAustralia/ecodata-client-plugin/grails-app/assets/vendor/typeahead/0.11.1/bloodhound.js', + 'https://cdn.jsdelivr.net/gh/AtlasOfLivingAustralia/ecodata-client-plugin/grails-app/assets/javascripts/forms.js', 'https://cdn.jsdelivr.net/gh/AtlasOfLivingAustralia/ecodata-client-plugin/grails-app/assets/javascripts/speciesModel.js', 'grails-app/assets/javascripts/projectActivityInfo.js', 'grails-app/assets/javascripts/projectActivity.js', diff --git a/package-lock.json b/package-lock.json index ec2b6e796..159dafcbb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "6.0", "devDependencies": { "@metahub/karma-jasmine-jquery": "^2.0.1", - "chromedriver": "^110.0.0", + "chromedriver": "^115.0.1", "jasmine-core": "^3.5.0", "jasmine-jquery": "^2.0.0", "jquery": "^3.4.1", @@ -353,9 +353,9 @@ "dev": true }, "node_modules/axios": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", - "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.0.tgz", + "integrity": "sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==", "dev": true, "dependencies": { "follow-redirects": "^1.15.0", @@ -561,15 +561,15 @@ } }, "node_modules/chromedriver": { - "version": "110.0.0", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-110.0.0.tgz", - "integrity": "sha512-Le6q8xrA/3fAt+g8qiN0YjsYxINIhQMC6wj9X3W5L77uN4NspEzklDrqYNwBcEVn7PcAEJ73nLlS7mTyZRspHA==", + "version": "115.0.1", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-115.0.1.tgz", + "integrity": "sha512-faE6WvIhXfhnoZ3nAxUXYzeDCKy612oPwpkUp0mVkA7fZPg2JHSUiYOQhUYgzHQgGvDWD5Fy2+M2xV55GKHBVQ==", "dev": true, "hasInstallScript": true, "dependencies": { "@testim/chrome-version": "^1.1.3", - "axios": "^1.2.1", - "compare-versions": "^5.0.1", + "axios": "^1.4.0", + "compare-versions": "^6.0.0", "extract-zip": "^2.0.1", "https-proxy-agent": "^5.0.1", "proxy-from-env": "^1.1.0", @@ -579,7 +579,7 @@ "chromedriver": "bin/chromedriver" }, "engines": { - "node": ">=14" + "node": ">=16" } }, "node_modules/cliui": { @@ -628,9 +628,9 @@ "optional": true }, "node_modules/compare-versions": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-5.0.3.tgz", - "integrity": "sha512-4UZlZP8Z99MGEY+Ovg/uJxJuvoXuN4M6B3hKaiackiHrgzQFEe3diJi1mf1PNHbFujM7FvLrK2bpgIaImbtZ1A==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.0.tgz", + "integrity": "sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg==", "dev": true }, "node_modules/concat-map": { @@ -3564,9 +3564,9 @@ "dev": true }, "axios": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", - "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.0.tgz", + "integrity": "sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==", "dev": true, "requires": { "follow-redirects": "^1.15.0", @@ -3725,14 +3725,14 @@ } }, "chromedriver": { - "version": "110.0.0", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-110.0.0.tgz", - "integrity": "sha512-Le6q8xrA/3fAt+g8qiN0YjsYxINIhQMC6wj9X3W5L77uN4NspEzklDrqYNwBcEVn7PcAEJ73nLlS7mTyZRspHA==", + "version": "115.0.1", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-115.0.1.tgz", + "integrity": "sha512-faE6WvIhXfhnoZ3nAxUXYzeDCKy612oPwpkUp0mVkA7fZPg2JHSUiYOQhUYgzHQgGvDWD5Fy2+M2xV55GKHBVQ==", "dev": true, "requires": { "@testim/chrome-version": "^1.1.3", - "axios": "^1.2.1", - "compare-versions": "^5.0.1", + "axios": "^1.4.0", + "compare-versions": "^6.0.0", "extract-zip": "^2.0.1", "https-proxy-agent": "^5.0.1", "proxy-from-env": "^1.1.0", @@ -3782,9 +3782,9 @@ "optional": true }, "compare-versions": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-5.0.3.tgz", - "integrity": "sha512-4UZlZP8Z99MGEY+Ovg/uJxJuvoXuN4M6B3hKaiackiHrgzQFEe3diJi1mf1PNHbFujM7FvLrK2bpgIaImbtZ1A==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.0.tgz", + "integrity": "sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg==", "dev": true }, "concat-map": { diff --git a/package.json b/package.json index 9fcde44cf..f2d104216 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "devDependencies": { "@metahub/karma-jasmine-jquery": "^2.0.1", - "chromedriver": "^110.0.0", + "chromedriver": "^115.0.1", "jasmine-core": "^3.5.0", "jasmine-jquery": "^2.0.0", "jquery": "^3.4.1", From 0225496c180f3c43f0e4ab97389db284f2f2ed56 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 23:59:39 +0000 Subject: [PATCH 028/115] Bump gradle/gradle-build-action in /.github/workflows Bumps [gradle/gradle-build-action](https://github.com/gradle/gradle-build-action) from 2.4.0 to 2.4.2. - [Release notes](https://github.com/gradle/gradle-build-action/releases) - [Commits](https://github.com/gradle/gradle-build-action/compare/v2.4.0...v2.4.2) --- updated-dependencies: - dependency-name: gradle/gradle-build-action dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf5e958e0..1d067001e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,7 +77,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: build biocollect before running js unit test to compile dependent js templates - uses: gradle/gradle-build-action@v2.4.0 + uses: gradle/gradle-build-action@v2.4.2 with: arguments: _Events env: @@ -93,12 +93,12 @@ jobs: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Clean to remove clover instrumentation - uses: gradle/gradle-build-action@v2.4.0 + uses: gradle/gradle-build-action@v2.4.2 with: arguments: clean - name: Publish the JAR to the repository - uses: gradle/gradle-build-action@v2.4.0 + uses: gradle/gradle-build-action@v2.4.2 with: arguments: publish env: From 6729630264eff8c52d8dc23f2b912ef2c445a2b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 22:12:58 +0000 Subject: [PATCH 029/115] Bump @babel/traverse from 7.8.3 to 7.23.2 Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.8.3 to 7.23.2. - [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.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 410 +++++++++++++++++++++++++++++++--------------- 1 file changed, 277 insertions(+), 133 deletions(-) diff --git a/package-lock.json b/package-lock.json index 92eaa5199..a9ddb1115 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,79 +27,115 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", - "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "dependencies": { - "@babel/highlight": "^7.8.3" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/generator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.3.tgz", - "integrity": "sha512-WjoPk8hRpDRqqzRpvaR8/gDUPkrnOOeuT2m8cNICJtZH6mwaCo3v0OKMI7Y6SM1pBtyijnLtAL0HDi41pf41ug==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "dependencies": { - "@babel/types": "^7.8.3", - "jsesc": "^2.5.1", - "lodash": "^4.17.13", - "source-map": "^0.5.0" + "@babel/types": "^7.23.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@babel/generator/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", - "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/helper-get-function-arity": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@babel/helper-get-function-arity": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", - "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", + "node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "dependencies": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", - "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "dependencies": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", - "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "dependencies": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.3.tgz", - "integrity": "sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -109,31 +145,38 @@ } }, "node_modules/@babel/template": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", - "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.8.3", - "@babel/parser": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.3.tgz", - "integrity": "sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.8.3", - "@babel/helper-function-name": "^7.8.3", - "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/parser": "^7.8.3", - "@babel/types": "^7.8.3", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.13" + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/traverse/node_modules/debug": { @@ -153,14 +196,17 @@ "dev": true }, "node_modules/@babel/types": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", - "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "dependencies": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@colors/colors": { @@ -172,6 +218,54 @@ "node": ">=0.1.90" } }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", + "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/@metahub/karma-jasmine-jquery": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@metahub/karma-jasmine-jquery/-/karma-jasmine-jquery-2.0.1.tgz", @@ -515,7 +609,7 @@ "node_modules/chalk/node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, "engines": { "node": ">=4" @@ -605,7 +699,7 @@ "node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, "node_modules/combined-stream": { @@ -914,7 +1008,7 @@ "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, "engines": { "node": ">=0.8.0" @@ -3289,106 +3383,117 @@ }, "dependencies": { "@babel/code-frame": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", - "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "requires": { - "@babel/highlight": "^7.8.3" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" } }, "@babel/generator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.3.tgz", - "integrity": "sha512-WjoPk8hRpDRqqzRpvaR8/gDUPkrnOOeuT2m8cNICJtZH6mwaCo3v0OKMI7Y6SM1pBtyijnLtAL0HDi41pf41ug==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "requires": { - "@babel/types": "^7.8.3", - "jsesc": "^2.5.1", - "lodash": "^4.17.13", - "source-map": "^0.5.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } + "@babel/types": "^7.23.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" } }, + "@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "dev": true + }, "@babel/helper-function-name": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", - "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" } }, - "@babel/helper-get-function-arity": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", - "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", + "@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.22.5" } }, "@babel/helper-split-export-declaration": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", - "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.22.5" } }, + "@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true + }, + "@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true + }, "@babel/highlight": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", - "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.3.tgz", - "integrity": "sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true }, "@babel/template": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", - "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/parser": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" } }, "@babel/traverse": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.3.tgz", - "integrity": "sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.8.3", - "@babel/helper-function-name": "^7.8.3", - "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/parser": "^7.8.3", - "@babel/types": "^7.8.3", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.13" + "globals": "^11.1.0" }, "dependencies": { "debug": { @@ -3409,13 +3514,13 @@ } }, "@babel/types": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", - "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } }, @@ -3425,6 +3530,45 @@ "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", "dev": true }, + "@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", + "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "@metahub/karma-jasmine-jquery": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@metahub/karma-jasmine-jquery/-/karma-jasmine-jquery-2.0.1.tgz", @@ -3701,7 +3845,7 @@ "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true }, "supports-color": { @@ -3769,7 +3913,7 @@ "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, "combined-stream": { @@ -4020,7 +4164,7 @@ "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true }, "escodegen": { From 0d8bdb44b3c6b7bb0b351a1cb27230639c8e1664 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Wed, 1 Nov 2023 10:59:54 +1000 Subject: [PATCH 030/115] Updated ALA security plugins --- build.gradle | 7 ++++--- gradle.properties | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 52ac31b0b..06ce21320 100644 --- a/build.gradle +++ b/build.gradle @@ -129,14 +129,15 @@ dependencies { implementation 'org.apache.poi:poi-ooxml-schemas:4.1.2' implementation "org.grails.plugins:ala-admin-plugin:2.3.0" - implementation ("org.grails.plugins:ala-auth:5.1.1") - implementation "org.grails.plugins:ala-ws-security-plugin:4.1.2" + implementation ("org.grails.plugins:ala-auth:$alaSecurityLibsVersion") + implementation ("org.grails.plugins:ala-ws-plugin:$alaSecurityLibsVersion") + implementation "org.grails.plugins:ala-ws-security-plugin:$alaSecurityLibsVersion" + implementation "au.org.ala:userdetails-service-client:$alaSecurityLibsVersion" runtimeOnly "org.grails.plugins:ala-bootstrap3:4.2.0" // swagger API implementation 'au.org.ala.plugins:openapi:1.1.0' - implementation "au.org.ala:userdetails-service-client:1.5.0" implementation "org.codehaus.groovy.modules.http-builder:http-builder:0.7.1" implementation 'au.org.ala:ala-cas-client:2.5' runtimeOnly("org.springframework.boot:spring-boot-properties-migrator") diff --git a/gradle.properties b/gradle.properties index 38a32a3c8..b470eaec4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,5 @@ -biocollectVersion=6.6.4 +biocollectVersion=6.6.6-SNAPSHOT +alaSecurityLibsVersion=6.2.0 grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From bd1cf80f2a866827f10ab4b27779893675d4e5ca Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Wed, 1 Nov 2023 18:59:17 +1000 Subject: [PATCH 031/115] Fixed Authorization header for mobile create/edit pages --- grails-app/views/layouts/mobile.gsp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grails-app/views/layouts/mobile.gsp b/grails-app/views/layouts/mobile.gsp index de0c5a897..b315817f2 100644 --- a/grails-app/views/layouts/mobile.gsp +++ b/grails-app/views/layouts/mobile.gsp @@ -60,8 +60,8 @@ withCredentials: true }, beforeSend: function (xhr) { - - xhr.setRequestHeader('Authorization', "${raw(authorization)}"); + + xhr.setRequestHeader('Authorization', "${raw(Authorization)}"); xhr.setRequestHeader('authKey', "${raw(authKey)}"); From 269a6f1415bcb9222c4973027a7035fb772cb702 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Wed, 1 Nov 2023 19:36:25 +1000 Subject: [PATCH 032/115] Fix SNAPSHOT version (6.6.5) --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index b470eaec4..23529e7d4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.6.6-SNAPSHOT +biocollectVersion=6.6.5-SNAPSHOT alaSecurityLibsVersion=6.2.0 grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 From 56cf4e13270560d63b73dfecfabe9c0f4788694f Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Thu, 2 Nov 2023 09:16:23 +1000 Subject: [PATCH 033/115] Revert security plugin versions --- build.gradle | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 06ce21320..4e3e7fd88 100644 --- a/build.gradle +++ b/build.gradle @@ -36,7 +36,7 @@ apply from: "${project.projectDir}/gradle/publish.gradle" repositories { mavenLocal() //for missing jai_core.jar - //maven { url "https://mvnrepository.com" } + //maven { url "https://mvnrepository.com" } maven { url "https://repo.osgeo.org/repository/release/" } maven { url "https://repo.grails.org/grails/core" } maven { url = uri("https://maven.pkg.github.com/atlasoflivingaustralia/ecodata-client-plugin") @@ -129,15 +129,14 @@ dependencies { implementation 'org.apache.poi:poi-ooxml-schemas:4.1.2' implementation "org.grails.plugins:ala-admin-plugin:2.3.0" - implementation ("org.grails.plugins:ala-auth:$alaSecurityLibsVersion") - implementation ("org.grails.plugins:ala-ws-plugin:$alaSecurityLibsVersion") - implementation "org.grails.plugins:ala-ws-security-plugin:$alaSecurityLibsVersion" - implementation "au.org.ala:userdetails-service-client:$alaSecurityLibsVersion" + implementation ("org.grails.plugins:ala-auth:5.1.1") + implementation "org.grails.plugins:ala-ws-security-plugin:4.1.2" runtimeOnly "org.grails.plugins:ala-bootstrap3:4.2.0" // swagger API implementation 'au.org.ala.plugins:openapi:1.1.0' + implementation "au.org.ala:userdetails-service-client:1.5.0" implementation "org.codehaus.groovy.modules.http-builder:http-builder:0.7.1" implementation 'au.org.ala:ala-cas-client:2.5' runtimeOnly("org.springframework.boot:spring-boot-properties-migrator") From ead35e976157d239d60d65eb83bff24df972344d Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Thu, 2 Nov 2023 09:48:51 +1000 Subject: [PATCH 034/115] Remove unused alaSecurityLibsVersion field in gradle.properties --- gradle.properties | 1 - 1 file changed, 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 23529e7d4..21ced0511 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,4 @@ biocollectVersion=6.6.5-SNAPSHOT -alaSecurityLibsVersion=6.2.0 grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From 2007d802a83249d47566645eb50ce18c128ea35b Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Thu, 2 Nov 2023 11:12:56 +1000 Subject: [PATCH 035/115] Release 6.6.5 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 21ced0511..28b23a282 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.6.5-SNAPSHOT +biocollectVersion=6.6.5 grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From 0516e61e8cc85d7b55c48633fe8ecc7f83f46d09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Nov 2023 22:21:28 +0000 Subject: [PATCH 036/115] Bump chromedriver from 117.0.3 to 119.0.1 Bumps [chromedriver](https://github.com/giggio/node-chromedriver) from 117.0.3 to 119.0.1. - [Commits](https://github.com/giggio/node-chromedriver/compare/117.0.3...119.0.1) --- updated-dependencies: - dependency-name: chromedriver dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- package-lock.json | 54 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/package-lock.json b/package-lock.json index a9ddb1115..8622cfbc4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "6.0", "devDependencies": { "@metahub/karma-jasmine-jquery": "^2.0.1", - "chromedriver": "^117.0.3", + "chromedriver": "^119.0.1", "jasmine-core": "^3.5.0", "jasmine-jquery": "^2.0.0", "jquery": "^3.4.1", @@ -288,9 +288,9 @@ "dev": true }, "node_modules/@testim/chrome-version": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.1.3.tgz", - "integrity": "sha512-g697J3WxV/Zytemz8aTuKjTGYtta9+02kva3C1xc7KXB8GdbfE1akGJIsZLyY/FSh2QrnE+fiB7vmWU3XNcb6A==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.1.4.tgz", + "integrity": "sha512-kIhULpw9TrGYnHp/8VfdcneIcxKnLixmADtukQRtJUmsVlMg0niMkwV0xZmi8hqa57xqilIHjWFA0GKvEjVU5g==", "dev": true }, "node_modules/@types/cookie": { @@ -447,9 +447,9 @@ "dev": true }, "node_modules/axios": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", - "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", + "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", "dev": true, "dependencies": { "follow-redirects": "^1.15.0", @@ -655,19 +655,19 @@ } }, "node_modules/chromedriver": { - "version": "117.0.3", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-117.0.3.tgz", - "integrity": "sha512-c2rk2eGK5zZFBJMdviUlAJfQEBuPNIKfal4+rTFVYAmrWbMPYAqPozB+rIkc1lDP/Ryw44lPiqKglrI01ILhTQ==", + "version": "119.0.1", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-119.0.1.tgz", + "integrity": "sha512-lpCFFLaXPpvElTaUOWKdP74pFb/sJhWtWqMjn7Ju1YriWn8dT5JBk84BGXMPvZQs70WfCYWecxdMmwfIu1Mupg==", "dev": true, "hasInstallScript": true, "dependencies": { - "@testim/chrome-version": "^1.1.3", - "axios": "^1.4.0", - "compare-versions": "^6.0.0", + "@testim/chrome-version": "^1.1.4", + "axios": "^1.6.0", + "compare-versions": "^6.1.0", "extract-zip": "^2.0.1", "https-proxy-agent": "^5.0.1", "proxy-from-env": "^1.1.0", - "tcp-port-used": "^1.0.1" + "tcp-port-used": "^1.0.2" }, "bin": { "chromedriver": "bin/chromedriver" @@ -3583,9 +3583,9 @@ "dev": true }, "@testim/chrome-version": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.1.3.tgz", - "integrity": "sha512-g697J3WxV/Zytemz8aTuKjTGYtta9+02kva3C1xc7KXB8GdbfE1akGJIsZLyY/FSh2QrnE+fiB7vmWU3XNcb6A==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.1.4.tgz", + "integrity": "sha512-kIhULpw9TrGYnHp/8VfdcneIcxKnLixmADtukQRtJUmsVlMg0niMkwV0xZmi8hqa57xqilIHjWFA0GKvEjVU5g==", "dev": true }, "@types/cookie": { @@ -3715,9 +3715,9 @@ "dev": true }, "axios": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", - "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", + "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", "dev": true, "requires": { "follow-redirects": "^1.15.0", @@ -3876,18 +3876,18 @@ } }, "chromedriver": { - "version": "117.0.3", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-117.0.3.tgz", - "integrity": "sha512-c2rk2eGK5zZFBJMdviUlAJfQEBuPNIKfal4+rTFVYAmrWbMPYAqPozB+rIkc1lDP/Ryw44lPiqKglrI01ILhTQ==", + "version": "119.0.1", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-119.0.1.tgz", + "integrity": "sha512-lpCFFLaXPpvElTaUOWKdP74pFb/sJhWtWqMjn7Ju1YriWn8dT5JBk84BGXMPvZQs70WfCYWecxdMmwfIu1Mupg==", "dev": true, "requires": { - "@testim/chrome-version": "^1.1.3", - "axios": "^1.4.0", - "compare-versions": "^6.0.0", + "@testim/chrome-version": "^1.1.4", + "axios": "^1.6.0", + "compare-versions": "^6.1.0", "extract-zip": "^2.0.1", "https-proxy-agent": "^5.0.1", "proxy-from-env": "^1.1.0", - "tcp-port-used": "^1.0.1" + "tcp-port-used": "^1.0.2" } }, "cliui": { diff --git a/package.json b/package.json index 2be147585..eb568215c 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "devDependencies": { "@metahub/karma-jasmine-jquery": "^2.0.1", - "chromedriver": "^117.0.3", + "chromedriver": "^119.0.1", "jasmine-core": "^3.5.0", "jasmine-jquery": "^2.0.0", "jquery": "^3.4.1", From 2e1f9ceff7b8278a037bce4c93ac4614997ba120 Mon Sep 17 00:00:00 2001 From: steven choi Date: Mon, 20 Nov 2023 14:18:53 +1100 Subject: [PATCH 037/115] #1570 check if shape file is uploading correctly --- .../services/au/org/ala/biocollect/merit/WebService.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grails-app/services/au/org/ala/biocollect/merit/WebService.groovy b/grails-app/services/au/org/ala/biocollect/merit/WebService.groovy index 4beb1453c..d0089d55c 100644 --- a/grails-app/services/au/org/ala/biocollect/merit/WebService.groovy +++ b/grails-app/services/au/org/ala/biocollect/merit/WebService.groovy @@ -466,7 +466,7 @@ class WebService { } addHubUrlPath(headers) - headers."Authorization" = grailsApplication.config.getProperty("api_key") + headers."Authorization" = getAuthHeader() if (user) { headers[grailsApplication.config.app.http.header.userId] = user.userId } From 471cfa744077e88c52d188061010d87caeef1e02 Mon Sep 17 00:00:00 2001 From: steven choi Date: Mon, 20 Nov 2023 17:35:46 +1100 Subject: [PATCH 038/115] #1570 check if shape file is uploading correctly --- .../biocollect/merit/MetadataService.groovy | 7 ++++--- .../ala/biocollect/merit/SiteService.groovy | 6 +++--- .../ala/biocollect/merit/WebService.groovy | 21 +++++++++++++------ 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/grails-app/services/au/org/ala/biocollect/merit/MetadataService.groovy b/grails-app/services/au/org/ala/biocollect/merit/MetadataService.groovy index f886732ef..b0ba6e5b2 100644 --- a/grails-app/services/au/org/ala/biocollect/merit/MetadataService.groovy +++ b/grails-app/services/au/org/ala/biocollect/merit/MetadataService.groovy @@ -10,7 +10,8 @@ import static org.apache.http.HttpStatus.* class MetadataService { static DateFormat ISO8601 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ") - def grailsApplication, webService, cacheService, settingService, modelService + def grailsApplication, cacheService, settingService, modelService + WebService webService def activitiesModel() { return cacheService.get('activity-model',{ @@ -247,14 +248,14 @@ class MetadataService { def facetConfig = webService.getJson(grailsApplication.config.ecodata.service.url + "/metadata/getGeographicFacetConfig") facetConfig.grouped.each { k, v -> v.each { name, fid -> - def objects = webService.getJson(grailsApplication.config.spatial.baseURL + '/ws/objects/'+fid) + def objects = webService.getJson(grailsApplication.config.spatial.baseURL + '/ws/objects/'+fid, null, true, false, true) results[k] << [(objects[0].fieldname):objects[0]] // Using the fieldname instead of the name for grouped facets is a temp workaround for the GER. } } facetConfig.contextual.each { name, fid -> - def objects = webService.getJson(grailsApplication.config.spatial.baseURL + '/ws/objects/'+fid) + def objects = webService.getJson(grailsApplication.config.spatial.baseURL + '/ws/objects/'+fid, null, true, false, true) objects.each { results[name] << [(it.name):it] } diff --git a/grails-app/services/au/org/ala/biocollect/merit/SiteService.groovy b/grails-app/services/au/org/ala/biocollect/merit/SiteService.groovy index 9b7e34b86..00d63f861 100644 --- a/grails-app/services/au/org/ala/biocollect/merit/SiteService.groovy +++ b/grails-app/services/au/org/ala/biocollect/merit/SiteService.groovy @@ -15,7 +15,7 @@ import org.opengis.feature.simple.SimpleFeature class SiteService { - def webService, grailsApplication, commonService, metadataService, userService + def grailsApplication, commonService, metadataService, userService def documentService ActivityService activityService ProjectService projectService @@ -23,7 +23,7 @@ class SiteService { ReportService reportService ProjectActivityService projectActivityService SiteService siteService - + WebService webService def list() { webService.getJson(grailsApplication.config.ecodata.service.url + '/site/').list } @@ -162,7 +162,7 @@ class SiteService { def userId = userService.getUser().userId def url = "${grailsApplication.config.spatial.layersUrl}/shape/upload/shp?user_id=${userId}&api_key=${grailsApplication.config.api_key}" - return webService.postMultipart(url, [:], shapefile) + return webService.postMultipart(url, [:], shapefile, 'files', true) } /** diff --git a/grails-app/services/au/org/ala/biocollect/merit/WebService.groovy b/grails-app/services/au/org/ala/biocollect/merit/WebService.groovy index d0089d55c..0e049282a 100644 --- a/grails-app/services/au/org/ala/biocollect/merit/WebService.groovy +++ b/grails-app/services/au/org/ala/biocollect/merit/WebService.groovy @@ -187,12 +187,16 @@ class WebService { tokenService.getAuthToken(false).toAuthorizationHeader() } - def getJson(String url, Integer timeout = null, boolean includeApiKey = false, boolean includeUserId = true) { + def getJson(String url, Integer timeout = null, boolean includeApiKey = false, boolean includeUserId = true, boolean useToken = false) { def conn = null try { conn = configureConnection(url, includeUserId, timeout) if (includeApiKey) { - conn.setRequestProperty("Authorization", grailsApplication.config.getProperty("api_key")) + if (useToken) { + conn.setRequestProperty("Authorization", getAuthHeader()) + } else { + conn.setRequestProperty("Authorization", grailsApplication.config.getProperty("api_key")) + } } conn.setRequestProperty(ACCEPT, MediaType.APPLICATION_JSON_VALUE) def json = responseText(conn) @@ -434,9 +438,9 @@ class WebService { * @param file the Multipart file object to forward. * @return [status:, content: */ - def postMultipart(url, Map params, MultipartFile file, fileParam = 'files') { + def postMultipart(url, Map params, MultipartFile file, fileParam = 'files', boolean useToken = false) { - postMultipart(url, params, file.inputStream, file.contentType, file.originalFilename, fileParam) + postMultipart(url, params, file.inputStream, file.contentType, file.originalFilename, fileParam, useToken) } /** @@ -449,7 +453,7 @@ class WebService { * @param fileParamName the name of the HTTP parameter that will be used for the post. * @return [status:, content: */ - def postMultipart(url, Map params, InputStream contentIn, contentType, originalFilename, fileParamName = 'files') { + def postMultipart(url, Map params, InputStream contentIn, contentType, originalFilename, fileParamName = 'files', boolean useToken = false) { def result = [:] def user = userService.getUser() @@ -466,7 +470,12 @@ class WebService { } addHubUrlPath(headers) - headers."Authorization" = getAuthHeader() + if (useToken) { + headers."Authorization" = getAuthHeader() + } else { + headers."Authorization" = grailsApplication.config.getProperty("api_key") + } + if (user) { headers[grailsApplication.config.app.http.header.userId] = user.userId } From 6f7ba11226b483db0dbcfb8bde21af17b3e0b6dd Mon Sep 17 00:00:00 2001 From: steven choi Date: Tue, 21 Nov 2023 13:00:09 +1100 Subject: [PATCH 039/115] #1570 add doPost case --- .../biocollect/merit/MetadataService.groovy | 4 ++-- .../ala/biocollect/merit/SiteService.groovy | 4 ++-- .../ala/biocollect/merit/WebService.groovy | 21 ++++++++++++------- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/grails-app/services/au/org/ala/biocollect/merit/MetadataService.groovy b/grails-app/services/au/org/ala/biocollect/merit/MetadataService.groovy index b0ba6e5b2..46fea063f 100644 --- a/grails-app/services/au/org/ala/biocollect/merit/MetadataService.groovy +++ b/grails-app/services/au/org/ala/biocollect/merit/MetadataService.groovy @@ -248,14 +248,14 @@ class MetadataService { def facetConfig = webService.getJson(grailsApplication.config.ecodata.service.url + "/metadata/getGeographicFacetConfig") facetConfig.grouped.each { k, v -> v.each { name, fid -> - def objects = webService.getJson(grailsApplication.config.spatial.baseURL + '/ws/objects/'+fid, null, true, false, true) + def objects = webService.getJson(grailsApplication.config.spatial.baseURL + '/ws/objects/'+fid, null, false, false, true) results[k] << [(objects[0].fieldname):objects[0]] // Using the fieldname instead of the name for grouped facets is a temp workaround for the GER. } } facetConfig.contextual.each { name, fid -> - def objects = webService.getJson(grailsApplication.config.spatial.baseURL + '/ws/objects/'+fid, null, true, false, true) + def objects = webService.getJson(grailsApplication.config.spatial.baseURL + '/ws/objects/'+fid, null, false, false, true) objects.each { results[name] << [(it.name):it] } diff --git a/grails-app/services/au/org/ala/biocollect/merit/SiteService.groovy b/grails-app/services/au/org/ala/biocollect/merit/SiteService.groovy index 00d63f861..addebe5bc 100644 --- a/grails-app/services/au/org/ala/biocollect/merit/SiteService.groovy +++ b/grails-app/services/au/org/ala/biocollect/merit/SiteService.groovy @@ -179,11 +179,11 @@ class SiteService { def baseUrl = "${grailsApplication.config.spatial.layersUrl}/shape/upload/shp" def userId = userService.getUser().userId - def site = [name:name, description: description, user_id:userId, api_key:grailsApplication.config.api_key] + def site = [name:name, description: description, user_id:userId] def url = "${baseUrl}/${shapeFileId}/${siteId}" - def result = webService.doPost(url, site) + def result = webService.doPost(url, site, true) String error if (!result?.resp?.id) { diff --git a/grails-app/services/au/org/ala/biocollect/merit/WebService.groovy b/grails-app/services/au/org/ala/biocollect/merit/WebService.groovy index 0e049282a..1a7aba804 100644 --- a/grails-app/services/au/org/ala/biocollect/merit/WebService.groovy +++ b/grails-app/services/au/org/ala/biocollect/merit/WebService.groovy @@ -192,12 +192,13 @@ class WebService { try { conn = configureConnection(url, includeUserId, timeout) if (includeApiKey) { - if (useToken) { - conn.setRequestProperty("Authorization", getAuthHeader()) - } else { - conn.setRequestProperty("Authorization", grailsApplication.config.getProperty("api_key")) - } + conn.setRequestProperty("Authorization", grailsApplication.config.getProperty("api_key")) + } + + if (useToken) { + conn.setRequestProperty("Authorization", getAuthHeader()) } + conn.setRequestProperty(ACCEPT, MediaType.APPLICATION_JSON_VALUE) def json = responseText(conn) def result = JSON.parse(json) @@ -285,14 +286,20 @@ class WebService { } } - def doPost(String url, Map postBody) { + def doPost(String url, Map postBody, boolean useToken = false) { def conn = null def charEncoding = 'utf-8' try { conn = new URL(url).openConnection() conn.setDoOutput(true) conn.setRequestProperty("Content-Type", "application/json;charset=${charEncoding}") - conn.setRequestProperty("Authorization", grailsApplication.config.getProperty("api_key")) + + if (useToken) { + conn.setRequestProperty("Authorization", getAuthHeader()) + } else { + conn.setRequestProperty("Authorization", grailsApplication.config.getProperty("api_key")) + } + addHubUrlPath(conn) def user = getUserService().getUser() From 2351856ea544974e1a6de8437f30e88bce0e0448 Mon Sep 17 00:00:00 2001 From: steven choi Date: Tue, 21 Nov 2023 13:22:01 +1100 Subject: [PATCH 040/115] #1570 fix --- .../services/au/org/ala/biocollect/merit/SiteService.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grails-app/services/au/org/ala/biocollect/merit/SiteService.groovy b/grails-app/services/au/org/ala/biocollect/merit/SiteService.groovy index addebe5bc..22d910af6 100644 --- a/grails-app/services/au/org/ala/biocollect/merit/SiteService.groovy +++ b/grails-app/services/au/org/ala/biocollect/merit/SiteService.groovy @@ -179,7 +179,7 @@ class SiteService { def baseUrl = "${grailsApplication.config.spatial.layersUrl}/shape/upload/shp" def userId = userService.getUser().userId - def site = [name:name, description: description, user_id:userId] + def site = [name:name, description: description, user_id:userId, api_key:grailsApplication.config.api_key] def url = "${baseUrl}/${shapeFileId}/${siteId}" @@ -245,7 +245,7 @@ class SiteService { Geometry geom = placemark.getDefaultGeometry() def site = [name:name, description: description, user_id:userId, api_key:grailsApplication.config.api_key, wkt:geom.toText()] - def result = webService.doPost(url, site) + def result = webService.doPost(url, site, true) if (!result.error) { def id = result.resp.id if (!result.resp.error) { From 8127766ad139263dc042c874dce0ee5a9eafa5be Mon Sep 17 00:00:00 2001 From: steven choi Date: Wed, 22 Nov 2023 16:04:13 +1100 Subject: [PATCH 041/115] #1570 fix --- .../au/org/ala/biocollect/merit/MetadataService.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grails-app/services/au/org/ala/biocollect/merit/MetadataService.groovy b/grails-app/services/au/org/ala/biocollect/merit/MetadataService.groovy index 46fea063f..fd1658795 100644 --- a/grails-app/services/au/org/ala/biocollect/merit/MetadataService.groovy +++ b/grails-app/services/au/org/ala/biocollect/merit/MetadataService.groovy @@ -248,14 +248,14 @@ class MetadataService { def facetConfig = webService.getJson(grailsApplication.config.ecodata.service.url + "/metadata/getGeographicFacetConfig") facetConfig.grouped.each { k, v -> v.each { name, fid -> - def objects = webService.getJson(grailsApplication.config.spatial.baseURL + '/ws/objects/'+fid, null, false, false, true) + def objects = webService.getJson(grailsApplication.config.spatial.baseURL + '/ws/objects/'+fid, null, false, true, true) results[k] << [(objects[0].fieldname):objects[0]] // Using the fieldname instead of the name for grouped facets is a temp workaround for the GER. } } facetConfig.contextual.each { name, fid -> - def objects = webService.getJson(grailsApplication.config.spatial.baseURL + '/ws/objects/'+fid, null, false, false, true) + def objects = webService.getJson(grailsApplication.config.spatial.baseURL + '/ws/objects/'+fid, null, false, true, true) objects.each { results[name] << [(it.name):it] } From 3e7fb56e071d052db26dd1a5f1a5f642c4b73524 Mon Sep 17 00:00:00 2001 From: temi Date: Wed, 22 Nov 2023 22:21:51 +1100 Subject: [PATCH 042/115] - upgraded ala security plugins to 6.2.0 - upgraded ala-bootstrap3 plugin to 4.4.0 - disabled functional tests --- .github/workflows/build.yml | 10 +++++----- build.gradle | 2 +- gradle.properties | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1d067001e..58306efcc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -86,11 +86,11 @@ jobs: - name: Run javascript unit tests run: node_modules/karma/bin/karma start karma.conf.js --single-run --browsers ChromeHeadless - - name: Run BioCollect functional tests - run: ./src/main/scripts/runFunctionalTests.sh chromeHeadless /tmp/ecodata feature/cognito - env: - GITHUB_ACTOR: ${{env.GITHUB_ACTOR}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} +# - name: Run BioCollect functional tests +# run: ./src/main/scripts/runFunctionalTests.sh chromeHeadless /tmp/ecodata feature/cognito +# env: +# GITHUB_ACTOR: ${{env.GITHUB_ACTOR}} +# GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Clean to remove clover instrumentation uses: gradle/gradle-build-action@v2.4.2 diff --git a/build.gradle b/build.gradle index b19c731dd..7dcc36a59 100644 --- a/build.gradle +++ b/build.gradle @@ -140,7 +140,7 @@ dependencies { implementation ("org.grails.plugins:ala-ws-plugin:$alaSecurityLibsVersion") implementation "org.grails.plugins:ala-ws-security-plugin:$alaSecurityLibsVersion" implementation "au.org.ala:userdetails-service-client:$alaSecurityLibsVersion" - runtimeOnly "org.grails.plugins:ala-bootstrap3:4.1.0" + runtimeOnly "org.grails.plugins:ala-bootstrap3:4.4.0" // swagger API implementation 'au.org.ala.plugins:openapi:1.1.0' diff --git a/gradle.properties b/gradle.properties index 14cb069c5..e3d23421d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ biocollectVersion=6.7-SNAPSHOT grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 -alaSecurityLibsVersion=6.1.0 +alaSecurityLibsVersion=6.2.0 seleniumVersion=4.9.0 groovyVersion=3.0.7 gorm.version=7.2.1 From b6a05f3075ecf50980e1d14849772295c7daa7aa Mon Sep 17 00:00:00 2001 From: temi Date: Wed, 22 Nov 2023 23:53:48 +1100 Subject: [PATCH 043/115] - ecodata-client-plugin:6.1.3-SNAPSHOT --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 7dcc36a59..886ddac33 100644 --- a/build.gradle +++ b/build.gradle @@ -154,7 +154,7 @@ dependencies { if (!Boolean.valueOf(inplace)) { implementation "org.grails.plugins:ala-map-plugin:3.0.1" - implementation "org.grails.plugins:ecodata-client-plugin:6.1-COGNITO-SNAPSHOT" + implementation "org.grails.plugins:ecodata-client-plugin:6.1.3-SNAPSHOT" } testCompileOnly "org.grails:grails-test-mixins:3.3.0" From e63afc14f2151820a5a03e708db9251d9b6d35b0 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Fri, 24 Nov 2023 10:56:34 +1100 Subject: [PATCH 044/115] Made dropZone null by default for fileupload() calls to fix erroneous API calls --- grails-app/assets/javascripts/document.js | 1 + grails-app/assets/javascripts/knockout-custom-bindings.js | 7 ++++--- grails-app/assets/javascripts/outputs.js | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/grails-app/assets/javascripts/document.js b/grails-app/assets/javascripts/document.js index c861bf545..8c6bb2659 100644 --- a/grails-app/assets/javascripts/document.js +++ b/grails-app/assets/javascripts/document.js @@ -283,6 +283,7 @@ function attachViewModelToFileUpload(uploadUrl, documentViewModel, uiSelector, p $(uiSelector).fileupload({ url:uploadUrl, pasteZone: null, + dropZone: null, formData:function(form) { return [{name:'document', value:documentViewModel.toJSONString()}] }, diff --git a/grails-app/assets/javascripts/knockout-custom-bindings.js b/grails-app/assets/javascripts/knockout-custom-bindings.js index 79cf95b83..f7d74dc2f 100644 --- a/grails-app/assets/javascripts/knockout-custom-bindings.js +++ b/grails-app/assets/javascripts/knockout-custom-bindings.js @@ -281,6 +281,7 @@ ko.bindingHandlers.stagedImageUpload = { $(element).fileupload({ url: config.url, pasteZone: null, + dropZone: null, autoUpload: true }).on('fileuploadadd', function (e, data) { complete(false); @@ -703,11 +704,11 @@ ko.bindingHandlers.fileUploadNoImage = { var defaults = {autoUpload: true}; var settings = { - pasteZone: null + pasteZone: null, + dropZone: null }; $.extend(settings, defaults, options()); - $(element).fileupload(settings - ).on('fileuploadadd', function (e, data) { + $(element).fileupload(settings).on('fileuploadadd', function (e, data) { window.incrementAsyncCounter && window.incrementAsyncCounter(); }).on('fileuploaddone', function (e, data) { window.decreaseAsyncCounter && window.decreaseAsyncCounter(); diff --git a/grails-app/assets/javascripts/outputs.js b/grails-app/assets/javascripts/outputs.js index 7c091cc87..7cefb6a54 100644 --- a/grails-app/assets/javascripts/outputs.js +++ b/grails-app/assets/javascripts/outputs.js @@ -152,6 +152,7 @@ ko.bindingHandlers.photoPointUpload = { $(element).fileupload({ url:config.url, pasteZone: null, + dropZone: null, autoUpload:true }).on('fileuploadadd', function(e, data) { complete(false); @@ -360,6 +361,7 @@ ko.bindingHandlers.fileUploadWithProgress = { $(element).fileupload({ url: config.url, pasteZone: null, + dropZone: null, autoUpload: true }).on('fileuploadadd', function (e, data) { complete(false); From fd0bdbe76328c63356939701c46a6e073f91e2db Mon Sep 17 00:00:00 2001 From: temi Date: Mon, 27 Nov 2023 15:46:15 +1100 Subject: [PATCH 045/115] - fixed functional test - ecodata-client-plugin:6.1.3 --- .github/workflows/build.yml | 10 +++++----- build.gradle | 2 +- src/main/scripts/runFunctionalTests.sh | 7 ++++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 58306efcc..51acfcd80 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -86,11 +86,11 @@ jobs: - name: Run javascript unit tests run: node_modules/karma/bin/karma start karma.conf.js --single-run --browsers ChromeHeadless -# - name: Run BioCollect functional tests -# run: ./src/main/scripts/runFunctionalTests.sh chromeHeadless /tmp/ecodata feature/cognito -# env: -# GITHUB_ACTOR: ${{env.GITHUB_ACTOR}} -# GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Run BioCollect functional tests + run: ./src/main/scripts/runFunctionalTests.sh chromeHeadless /tmp/ecodata master + env: + GITHUB_ACTOR: ${{env.GITHUB_ACTOR}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Clean to remove clover instrumentation uses: gradle/gradle-build-action@v2.4.2 diff --git a/build.gradle b/build.gradle index 9b3096c97..ebe5c5b76 100644 --- a/build.gradle +++ b/build.gradle @@ -154,7 +154,7 @@ dependencies { if (!Boolean.valueOf(inplace)) { implementation "org.grails.plugins:ala-map-plugin:3.0.1" - implementation "org.grails.plugins:ecodata-client-plugin:6.1.3-SNAPSHOT" + implementation "org.grails.plugins:ecodata-client-plugin:6.1.3" } testCompileOnly "org.grails:grails-test-mixins:3.3.0" diff --git a/src/main/scripts/runFunctionalTests.sh b/src/main/scripts/runFunctionalTests.sh index 141c0380a..53fc75a7d 100755 --- a/src/main/scripts/runFunctionalTests.sh +++ b/src/main/scripts/runFunctionalTests.sh @@ -39,6 +39,10 @@ mongosh ecodata-functional-test loadAlaHub.js echo "Hosts file configuration" cat /etc/hosts +cd $BIOCOLLECT_DIR +echo "Starting wire mock" +./gradlew startWireMock & + cd $ECODATA_LOCAL_DIR echo "Starting ecodata from `pwd`" ls -la @@ -46,9 +50,6 @@ GRADLE_OPTS="-Xmx1g" ./gradlew bootRun "-Dorg.gradle.jvmargs=-Xmx1g" -Dgrails.en sleep 240 cd $BIOCOLLECT_DIR -echo "Starting wire mock" -./gradlew startWireMock - echo "Starting biocollect" GRADLE_OPTS="-Xmx1g" ./gradlew bootRun "-Dorg.gradle.jvmargs=-Xmx1g" -Dgrails.env=test -Dgrails.server.port.http=8087 & sleep 200 From 582dd09daa453a4081594791ce467147abc4ee72 Mon Sep 17 00:00:00 2001 From: temi Date: Mon, 27 Nov 2023 16:28:05 +1100 Subject: [PATCH 046/115] - release 6.7 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index e3d23421d..575bd24f5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.7-SNAPSHOT +biocollectVersion=6.7 grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From 4c5eea6384b0bf9a009aa53f160d6ed353d5d929 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Tue, 28 Nov 2023 12:09:03 +1000 Subject: [PATCH 047/115] Fixes #1577 --- .../au/org/ala/biocollect/merit/ActivityService.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy b/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy index 7288aec23..ac29e5b1f 100644 --- a/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy +++ b/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy @@ -116,9 +116,9 @@ class ActivityService { webService.doDelete(grailsApplication.config.ecodata.service.url + '/activity/' + id) } - def bulkDelete(List ids, boolean destory) { + def bulkDelete(List ids, boolean destroy = false) { String url = grailsApplication.config.ecodata.service.url + '/activityBulkDelete' - if(destory) + if(destroy) url += '?destroy=true' webService.doPost(url, [ids: ids]) } From efd1723912b50f37d6f1ed42a8f238beaa63cb16 Mon Sep 17 00:00:00 2001 From: temi Date: Wed, 29 Nov 2023 23:38:43 +1100 Subject: [PATCH 048/115] #1581 - added async internationalisation ko binding --- gradle.properties | 2 +- grails-app/assets/javascripts/i18n.js | 49 +++++++++++++++++++ .../javascripts/knockout-custom-bindings.js | 47 +++++++++++++++++- .../biocollect/merit/HomeController.groovy | 8 +++ .../ala/biocollect/merit/CommonService.groovy | 5 ++ 5 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 grails-app/assets/javascripts/i18n.js diff --git a/gradle.properties b/gradle.properties index e3d23421d..e73bc1e17 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.7-SNAPSHOT +biocollectVersion=6.8-i18n-SNAPSHOT grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 diff --git a/grails-app/assets/javascripts/i18n.js b/grails-app/assets/javascripts/i18n.js new file mode 100644 index 000000000..d4fad5d2f --- /dev/null +++ b/grails-app/assets/javascripts/i18n.js @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2019 Atlas of Living Australia + * All Rights Reserved. + * + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * Created by Temi on 15/11/19. + */ + +(function() { + var messages = {}, + deffer = $.Deferred(); + $.get({ + url: fcConfig.i18nURL, + cache: true + }).done(function (data) { + messages = data; + deffer.resolve(); + }).fail(function () { + deffer.reject(); + }); + + $i18n = function(key, defaultValue) { + if (messages[key] !== undefined) { + return messages[key]; + } else { + return defaultValue || key; + } + }; + + $i18nAsync = function(key, defaultValue, callback) { + if (callback) { + deffer.done(function () { + callback($i18n(key, defaultValue)); + }).fail(function () { + callback($i18n(key, defaultValue)); + }) + } + } + +})(); diff --git a/grails-app/assets/javascripts/knockout-custom-bindings.js b/grails-app/assets/javascripts/knockout-custom-bindings.js index 79cf95b83..c9a1a6a98 100644 --- a/grails-app/assets/javascripts/knockout-custom-bindings.js +++ b/grails-app/assets/javascripts/knockout-custom-bindings.js @@ -1148,4 +1148,49 @@ ko.bindingHandlers.debug = { console.log(element); console.log(ko.toJS(valueAccessor())); } -}; \ No newline at end of file +}; + + +/** + * This binding requires i18n.js to be loaded. It also requires fcConfig.i18nURL to be set. + * Params can be a string or an object. If string, it is treated as key and translated to text. Object parameter has the + * following properties: + * @contentType can be 'text' or 'html' (default is 'text') + * @key is the key to be translated + * @defaultValue is the default value to be used if the key is not found + * + * Usage examples: + *
+ *
+ * + */ +ko.bindingHandlers.i18n = { + init: function (element, valueAccessor, allBindings, viewModel, bindingContext) { + var value = valueAccessor(); + value = ko.unwrap(value); + var contentType = value && value.contentType || 'text' + + // $i18nAsync is required to be defined + if(typeof $i18nAsync === 'undefined') + return + + if( typeof value === 'string') { + $i18nAsync(value, '',function(text) { + $(element).text(text); + }); + } + else if (typeof value === 'object') { + $i18nAsync(value.key, value.defaultValue,function(text) { + switch (contentType) { + default: + case 'text': + $(element).text(text); + break; + case 'html': + $(element).html(text); + break; + } + }); + } + } +} \ No newline at end of file diff --git a/grails-app/controllers/au/org/ala/biocollect/merit/HomeController.groovy b/grails-app/controllers/au/org/ala/biocollect/merit/HomeController.groovy index 9062b447e..1bf80cd7a 100644 --- a/grails-app/controllers/au/org/ala/biocollect/merit/HomeController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/merit/HomeController.groovy @@ -14,6 +14,7 @@ class HomeController { def settingService def metadataService def userService + CommonService commonService @PreAuthorise(accessLevel = 'alaAdmin', redirectController = "admin") @SSO @@ -61,6 +62,13 @@ class HomeController { def works() { } + def i18n() { + if (request.isGet()) { + Map props = commonService.i18n(request.locale) + render props as JSON + } + } + /** * The purpose of this method is to enable the display of the spatial object corresponding to a selected * value from a geographic facet (e.g. to display the polygon representing NSW on the map if the user has diff --git a/grails-app/services/au/org/ala/biocollect/merit/CommonService.groovy b/grails-app/services/au/org/ala/biocollect/merit/CommonService.groovy index 286fac098..1ba6ddf75 100644 --- a/grails-app/services/au/org/ala/biocollect/merit/CommonService.groovy +++ b/grails-app/services/au/org/ala/biocollect/merit/CommonService.groovy @@ -3,6 +3,7 @@ package au.org.ala.biocollect.merit import grails.converters.JSON import grails.web.mapping.LinkGenerator import grails.web.servlet.mvc.GrailsParameterMap +import org.springframework.context.MessageSource import javax.servlet.http.HttpServletRequest import javax.xml.bind.DatatypeConverter @@ -13,6 +14,7 @@ class CommonService { UserService userService LinkGenerator grailsLinkGenerator + MessageSource messageSource List ignores = ["action","controller"] @@ -92,4 +94,7 @@ class CommonService { queryParams } + def i18n(Locale locale) { + messageSource.getMergedProperties(locale)?.properties + } } From b1583312022dbe919426ee70aff8af50f44260c7 Mon Sep 17 00:00:00 2001 From: temi Date: Wed, 29 Nov 2023 18:37:56 +1100 Subject: [PATCH 049/115] #1580 - recentHub cookie only set when hub is not default hub - looks into cookie to get recent hub - logout url configurable based on auth environment - removed deprecated URL --- grails-app/conf/application.groovy | 15 ++++----- .../biocollect/merit/SettingService.groovy | 10 ++++-- .../org/ala/biocollect/TemplateTagLib.groovy | 33 ++++++++++++++++--- 3 files changed, 42 insertions(+), 16 deletions(-) diff --git a/grails-app/conf/application.groovy b/grails-app/conf/application.groovy index 296b787ad..1142bc183 100644 --- a/grails-app/conf/application.groovy +++ b/grails-app/conf/application.groovy @@ -27,7 +27,7 @@ environments { temp.dir = "/data/biocollect/temp" // system level config server.port = 8087 - serverURL = "http://devt.ala.org.au:8087" + serverURL = "http://localhost:8087" biocollect.system.email.replyTo = "biocollect-dev@ala.org.au" sender = "biocollect-dev@ala.org.au" debugUI = true @@ -40,7 +40,7 @@ environments { debugUI = false loggerLevel = "DEBUG" server.port = "8087" - grails.host = "http://devt.ala.org.au" + grails.host = "http://localhost" serverName = "${grails.host}:${server.port}" grails.serverURL = serverName server.serverURL = serverName @@ -51,7 +51,7 @@ environments { grails.config.locations = [] security.oidc.discoveryUri = "http://localhost:${wiremock.port}/cas/oidc/.well-known" security.oidc.allowUnsignedIdTokens = true - def casBaseUrl = "http://devt.ala.org.au:${wiremock.port}" + def casBaseUrl = "http://localhost:${wiremock.port}" security.cas.appServerName=serverName security.cas.contextPath= @@ -64,14 +64,13 @@ environments { security.jwt.discoveryUri="${casBaseUrl}/cas/oidc/.well-known" userDetails.url = "${casBaseUrl}/userdetails/userDetails/" userDetailsSingleUrl = "${userDetails.Url}getUserDetails" - userDetailsUrl = "${userDetatails.url}getUserListFull" logging.dir = '.' upload.images.path = '/tmp' upload.images.url = grails.serverURL+'/image/' - ecodata.baseUrl = 'http://devt.ala.org.au:8080/' - ecodata.baseURL = 'http://devt.ala.org.au:8080' - ecodata.service.url = 'http://devt.ala.org.au:8080/ws' - pdfgen.baseURL = "http://devt.ala.org.au:${wiremock.port}/" + ecodata.baseUrl = 'http://localhost:8080/' + ecodata.baseURL = 'http://localhost:8080' + ecodata.service.url = 'http://localhost:8080/ws' + pdfgen.baseURL = "http://localhost:${wiremock.port}/" api_key='testapikey' grails.cache.config = { diskStore { diff --git a/grails-app/services/au/org/ala/biocollect/merit/SettingService.groovy b/grails-app/services/au/org/ala/biocollect/merit/SettingService.groovy index de7103f33..1612eb9c9 100644 --- a/grails-app/services/au/org/ala/biocollect/merit/SettingService.groovy +++ b/grails-app/services/au/org/ala/biocollect/merit/SettingService.groovy @@ -100,9 +100,10 @@ class SettingService { } def loadHubConfig(hub) { - + def defaultHub = grailsApplication.config.getProperty('app.default.hub', String, 'default') if (!hub) { - hub = grailsApplication.config.app.default.hub?:'default' + hub = cookieService.getCookie(LAST_ACCESSED_HUB) + hub = hub ?: defaultHub } else { // Hub value in multiple places like url path and in parameter causes Array to be passed instead of String. @@ -131,7 +132,10 @@ class SettingService { ) } - cookieService.setCookie(LAST_ACCESSED_HUB, settings?.urlPath, -1 /* -1 means the cookie expires when the browser is closed */) + // Do not set cookie value to default hub since it overwrites genuine hub selection when calls are made with default hub. + // This usually happens when calls are made without hub parameter like downloading images. + if (settings?.urlPath != defaultHub) + cookieService.setCookie(LAST_ACCESSED_HUB, settings?.urlPath, -1 /* -1 means the cookie expires when the browser is closed */, '/') GrailsWebRequest.lookup().params.hub = settings?.urlPath SettingService.setHubConfig(settings) } diff --git a/grails-app/taglib/au/org/ala/biocollect/TemplateTagLib.groovy b/grails-app/taglib/au/org/ala/biocollect/TemplateTagLib.groovy index d60a4f04f..2b579e971 100644 --- a/grails-app/taglib/au/org/ala/biocollect/TemplateTagLib.groovy +++ b/grails-app/taglib/au/org/ala/biocollect/TemplateTagLib.groovy @@ -134,22 +134,30 @@ class TemplateTagLib { } break; case 'login': + def logoutReturnToUrl = getCurrentURL( attrs.hubConfig ) + if (grailsApplication.config.getProperty("security.oidc.logoutAction",String, "CAS") == "cognito") { + // cannot use createLink since it adds hub query parameter and cognito will not consider it valid + logoutReturnToUrl = grailsApplication.config.getProperty("grails.serverURL") + grailsApplication.config.getProperty("logoutReturnToUrl",String, "/hub/index") + } + if (bs4) { out << "
  • "; out << auth.loginLogout( ignoreCookie: "true", cssClass: "btn btn-primary btn-sm nav-button custom-header-login-logout", - logoutUrl: "${createLink(controller: 'logout', action: 'logout')}", +// cannot use createLink since it adds hub query parameter and eventually creates malformed URL with two ? characters + logoutUrl: "/logout", loginReturnToUrl: getCurrentURL( attrs.hubConfig ), - logoutReturnToUrl: getCurrentURL( attrs.hubConfig ) + logoutReturnToUrl: logoutReturnToUrl ) out << "
  • "; } else { out << "
  • "; out << auth.loginLogout( ignoreCookie: "true", - logoutUrl: "${createLink(controller: 'logout', action: 'logout')}", +// cannot use createLink since it adds hub query parameter and eventually creates malformed URL with two ? characters + logoutUrl: "/logout", loginReturnToUrl: getCurrentURL( attrs.hubConfig ), - logoutReturnToUrl: getCurrentURL( attrs.hubConfig ) + logoutReturnToUrl: logoutReturnToUrl ) out << "
  • "; } @@ -319,6 +327,21 @@ class TemplateTagLib { } } + String getCurrentURLFromRequest() { + String requestURL = request.getRequestURL().toString() + // Construct the complete URL + StringBuilder url = new StringBuilder() + url.append(requestURL) + + String queryString = request.getQueryString() + // Include the query string if present + if (queryString != null) { + url.append("?").append(queryString) + } + + url.toString() + } + private String getLinkUrl (Map link){ String url; @@ -402,6 +425,6 @@ class TemplateTagLib { } private String getCurrentURL(Map hubConfig){ - g.createLink(absolute: true, uri: '/').toString() + getCurrentURLFromRequest() } } From 2d06e5521aa094cfbc25422e11ac06354b51c67c Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Mon, 22 Jan 2024 13:29:21 +1000 Subject: [PATCH 050/115] Added 'Reference Assessment' tab in admin project settings, and stub reference assessment controller class --- .../ReferenceAssessmentController.groovy | 37 +++++++++++++++++++ .../au/org/ala/biocollect/UrlMappings.groovy | 2 + grails-app/i18n/messages.properties | 1 + grails-app/views/project/_CSAdmin.gsp | 6 ++- 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy new file mode 100644 index 000000000..0915693d7 --- /dev/null +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -0,0 +1,37 @@ +package au.org.ala.biocollect + +import au.org.ala.biocollect.merit.* +import grails.converters.JSON +import grails.web.servlet.mvc.GrailsParameterMap + +class ReferenceAssessmentController { + UserService userService + ProjectService projectService + RecordService recordService + SearchService searchService + + def requestRecords(String projectId) { + def result + + // Retrieve reference image records from reference project + GrailsParameterMap params = new GrailsParameterMap([:], request) + params["hub"] = "acsa" + // params["max"] = "30" + params["fq"] = "projectActivityNameFacet:The Dead Tree Detective" + + + + Map searchResult = searchService.searchProjectActivity(params) + List activities = searchResult?.hits?.hits + + // Ensure records exist + if (activities?.size() == 0) { + response.status = 404 + result = [message: 'No records found in assessment image reference survey'] + } else { + result = searchResult + } + + render result as JSON + } +} diff --git a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy index 44cd28035..3aef24291 100644 --- a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy @@ -172,6 +172,8 @@ class UrlMappings { // Following api's are used by external mobile clients + "/ws/referenceAssessment/requestRecords"(controller: "referenceAssessment", action: "requestRecords") + "/ws/project/search"(controller: "project", action: 'search') "/ws/survey/list/$id"(controller: "project", action: 'listSurveys') "/ws/attachment/upload"(controller: "image", action: 'upload') diff --git a/grails-app/i18n/messages.properties b/grails-app/i18n/messages.properties index 9365e81ad..238d547ff 100644 --- a/grails-app/i18n/messages.properties +++ b/grails-app/i18n/messages.properties @@ -248,6 +248,7 @@ project.admin.members=Members project.admin.audit=Audit project.admin.editblog=Edit Project Blog project.admin.attachdoc=Attach Document +project.admin.referenceAssessment=Reference assessment project.admin.permissions.email=User\'s email address project.admin.permissions.level=Permission level diff --git a/grails-app/views/project/_CSAdmin.gsp b/grails-app/views/project/_CSAdmin.gsp index 21ae58fbd..1756e282b 100644 --- a/grails-app/views/project/_CSAdmin.gsp +++ b/grails-app/views/project/_CSAdmin.gsp @@ -15,6 +15,7 @@ +
    @@ -67,6 +68,10 @@
    + +
    + Reference assessment tab! +
    @@ -86,7 +91,6 @@
    - From 3a361c69fa405f3af891cd337c6d894cf423105a Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Wed, 24 Jan 2024 11:17:44 +1000 Subject: [PATCH 051/115] Added reference & assessment survey selection dropdowns to project admin --- grails-app/views/project/_CSAdmin.gsp | 2 +- .../views/project/csProjectTemplate.gsp | 3 + .../views/referenceAssessment/_settings.gsp | 92 +++++++++++++++++++ 3 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 grails-app/views/referenceAssessment/_settings.gsp diff --git a/grails-app/views/project/_CSAdmin.gsp b/grails-app/views/project/_CSAdmin.gsp index 1756e282b..68f40a7e1 100644 --- a/grails-app/views/project/_CSAdmin.gsp +++ b/grails-app/views/project/_CSAdmin.gsp @@ -70,7 +70,7 @@
    - Reference assessment tab! +
    diff --git a/grails-app/views/project/csProjectTemplate.gsp b/grails-app/views/project/csProjectTemplate.gsp index c1828ee49..a7f9012aa 100644 --- a/grails-app/views/project/csProjectTemplate.gsp +++ b/grails-app/views/project/csProjectTemplate.gsp @@ -230,9 +230,12 @@ var pActivitiesVM = new ProjectActivitiesViewModel(params, projectViewModel); + var pAssessmentActivitiesVM = new ProjectActivitiesViewModel(params, projectViewModel); + console.log(params, projectViewModel, pAssessmentActivitiesVM); initialiseProjectActivitiesList(pActivitiesVM); initialiseData('project'); initialiseProjectActivitiesSettings(pActivitiesVM); + initialiseProjectAssessmentActivitiesSettings(pAssessmentActivitiesVM); diff --git a/grails-app/views/referenceAssessment/_settings.gsp b/grails-app/views/referenceAssessment/_settings.gsp new file mode 100644 index 000000000..a3ef09dcb --- /dev/null +++ b/grails-app/views/referenceAssessment/_settings.gsp @@ -0,0 +1,92 @@ + +

    Reference assessment settings

    + +

    Manage the configuration for reference assessment projects, where user-editable assessment records are created from a reference set.

    + +
    + +
    + +
    +
    +
    + + Select reference survey: +
    + + +
    + +
    +
    +
    +
    +
    +
    + + Select assessment survey: +
    + + +
    + +
    +
    +
    + + +
    + +
    + + + +
    + + + + function initialiseProjectAssessmentActivitiesSettings(pActivitiesVM) { + var pReferenceAssessmentActivitiesSettingsVM = new ProjectActivitiesSettingsViewModel(pActivitiesVM, 'project-reference-assessment-activities-result-placeholder'); + ko.applyBindings(pReferenceAssessmentActivitiesSettingsVM, document.getElementById('pReferenceAssessmentActivities')); + + // Delay subscription until the databinding has modified pActivity.pFormName if any + if(pReferenceAssessmentActivitiesSettingsVM.current()) { + pReferenceAssessmentActivitiesSettingsVM.current().transients.subscribeOrDisposePActivityFormName(true); + } + }; + + From 8e9ba99c9299b2e1b0bfc61bc875e84df223e619 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Wed, 31 Jan 2024 13:46:40 +1000 Subject: [PATCH 052/115] Fixed reference activity retrieval in requestRecords endpoint --- .../ReferenceAssessmentController.groovy | 29 ++++++++++++------- .../au/org/ala/biocollect/UrlMappings.groovy | 2 +- .../biocollect/merit/ProjectController.groovy | 2 +- .../biocollect/merit/ActivityService.groovy | 4 +++ 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 0915693d7..7de152370 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -8,28 +8,37 @@ class ReferenceAssessmentController { UserService userService ProjectService projectService RecordService recordService + ProjectActivityService projectActivityService + ActivityService activityService SearchService searchService + OutputService outputService + + + // Get details about the supplied project def requestRecords(String projectId) { def result - // Retrieve reference image records from reference project - GrailsParameterMap params = new GrailsParameterMap([:], request) - params["hub"] = "acsa" - // params["max"] = "30" - params["fq"] = "projectActivityNameFacet:The Dead Tree Detective" - + // Get details about the supplied project + def projectResult = projectService.get(projectId) + // Ensure the project is a reference assessment project + if (!projectResult || !projectResult.refAssessEnabled) { + response.status = 400 + result = [message: 'The supplied project is not configured for reference assessments'] + render result as JSON + return + } - Map searchResult = searchService.searchProjectActivity(params) - List activities = searchResult?.hits?.hits + // Get the activity records for the reference survey + def referenceActivities = activityService.activitiesForProjectActivity(projectResult.refAssessReferenceProjectActivityId) // Ensure records exist - if (activities?.size() == 0) { + if (referenceActivities?.size() == 0) { response.status = 404 result = [message: 'No records found in assessment image reference survey'] } else { - result = searchResult + result = referenceActivities } render result as JSON diff --git a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy index 3aef24291..03a326eb8 100644 --- a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy @@ -172,7 +172,7 @@ class UrlMappings { // Following api's are used by external mobile clients - "/ws/referenceAssessment/requestRecords"(controller: "referenceAssessment", action: "requestRecords") + "/ws/referenceAssessment/requestRecords/$projectId"(controller: "referenceAssessment", action: "requestRecords") "/ws/project/search"(controller: "project", action: 'search') "/ws/survey/list/$id"(controller: "project", action: 'listSurveys') diff --git a/grails-app/controllers/au/org/ala/biocollect/merit/ProjectController.groovy b/grails-app/controllers/au/org/ala/biocollect/merit/ProjectController.groovy index fe2a2f406..35ac02670 100644 --- a/grails-app/controllers/au/org/ala/biocollect/merit/ProjectController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/merit/ProjectController.groovy @@ -930,7 +930,7 @@ class ProjectController { List facets // format facets to a way acceptable for JS view model - if(searchResult.facets){ + if (searchResult.facets) { HubSettings hub = SettingService.hubConfig List allFacetConfig = hub.getFacetConfigForPage('projectFinder') ?: projectService.getDefaultFacets() List facetConfig = HubSettings.getFacetConfigForElasticSearch(allFacetConfig) diff --git a/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy b/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy index 7288aec23..027e075ed 100644 --- a/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy +++ b/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy @@ -215,6 +215,10 @@ class ActivityService { list } + def activitiesForProjectActivity(String id) { + webService.getJson(grailsApplication.config.ecodata.service.url + '/activitiesForProjectActivity/' + id)?.list + } + def submitActivitiesForPublication(activityIds) { updatePublicationStatus(activityIds, 'pendingApproval') } From 2e849382fba4f896799027dd26b36d0c864fba11 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Wed, 31 Jan 2024 13:56:40 +1000 Subject: [PATCH 053/115] Updated gradle.properties to change biocollectVersion --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index e3d23421d..b16400354 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.7-SNAPSHOT +biocollectVersion=6.8-REFASSESS-SNAPSHOT grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From ea531bc1b00851d5fd12d67b74ba4068608a56c5 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Thu, 1 Feb 2024 13:39:34 +1000 Subject: [PATCH 054/115] Added queryParams --- .../ReferenceAssessmentController.groovy | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 7de152370..62207e79c 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -19,6 +19,8 @@ class ReferenceAssessmentController { def requestRecords(String projectId) { def result + GrailsParameterMap queryParams = params + // Get details about the supplied project def projectResult = projectService.get(projectId) @@ -33,14 +35,18 @@ class ReferenceAssessmentController { // Get the activity records for the reference survey def referenceActivities = activityService.activitiesForProjectActivity(projectResult.refAssessReferenceProjectActivityId) - // Ensure records exist + // Ensure the reference records exist if (referenceActivities?.size() == 0) { response.status = 404 result = [message: 'No records found in assessment image reference survey'] - } else { - result = referenceActivities + render result as JSON + return } - render result as JSON + // Sort the reference activities by + // referenceActivities.sort { it.outputs[0].data.taxaRichness } + // referenceActivities.findAll { it.outputs[0].data.recordedBy == "Bruno Ferronato" } + + render referenceActivities as JSON } } From 0f559233482fbae743849a5fffb6bfc3637a5c15 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Mon, 4 Mar 2024 14:49:27 +1000 Subject: [PATCH 055/115] First-pass non functional image assessment view --- grails-app/conf/application.groovy | 10 ++ .../org/ala/biocollect/HubController.groovy | 4 + .../ReferenceAssessmentController.groovy | 89 ++++++++++++++++-- .../au/org/ala/biocollect/UrlMappings.groovy | 6 ++ grails-app/views/project/_CSAdmin.gsp | 5 - .../views/referenceAssessment/_settings.gsp | 92 ------------------- .../referenceAssessment/requestRecords.gsp | 50 ++++++++++ 7 files changed, 149 insertions(+), 107 deletions(-) delete mode 100644 grails-app/views/referenceAssessment/_settings.gsp create mode 100644 grails-app/views/referenceAssessment/requestRecords.gsp diff --git a/grails-app/conf/application.groovy b/grails-app/conf/application.groovy index 296b787ad..39ff5f511 100644 --- a/grails-app/conf/application.groovy +++ b/grails-app/conf/application.groovy @@ -674,3 +674,13 @@ if (!app.file.script.path) { app.file.script.path = "/data/biocollect/scripts" } script.read.extensions.list = ['js','min.js','png', 'json', 'jpg', 'jpeg'] + + + +refAssess.hub = 'hcat' +refAssess.title = 'Image Assessment' +refAssess.reference.filterName = 'Vegetation Type' +refAssess.reference.filterTypes = ['Vegetation Type One', 'Vegetation Type Two', 'Another Vegetation Type'] +refAssess.reference.projectActivityId = 'e0ce9fcc-77f2-4349-825f-9ea442c1c239' +refAssess.assessment.projectActivityId = 'e61eb018-02a9-4e3b-a4b3-9d6be33d9cbb' +refAssess.assessment.recordsToCreate = 3 diff --git a/grails-app/controllers/au/org/ala/biocollect/HubController.groovy b/grails-app/controllers/au/org/ala/biocollect/HubController.groovy index 8b7499d5e..7712bf748 100644 --- a/grails-app/controllers/au/org/ala/biocollect/HubController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/HubController.groovy @@ -71,4 +71,8 @@ class HubController { render text: result.css, contentType: 'text/css', status: result.status } + + def requestAssessmentRecords() { + render view: '/referenceAssessment/requestRecords' + } } diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 62207e79c..3b0a9fb32 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -4,28 +4,84 @@ import au.org.ala.biocollect.merit.* import grails.converters.JSON import grails.web.servlet.mvc.GrailsParameterMap +import java.time.Instant + class ReferenceAssessmentController { UserService userService ProjectService projectService - RecordService recordService ProjectActivityService projectActivityService ActivityService activityService - SearchService searchService - OutputService outputService + + + private def mapReferenceToAssessment(Object referenceActivity, Object assessProjectActivity) { + def assessActivity = referenceActivity + + // Remove irrelevant fields + ["assessment", "complete", "dateCreated", "id", "lastUpdated", "progress", "status"] + .each { + assessActivity.remove(it) + } + + // Overwrite activity record IDs + assessActivity.activityId = "" + assessActivity.projectActivityId = assessProjectActivity["projectActivityId"] + assessActivity.type = assessProjectActivity["pActivityFormName"] + assessActivity.userId = userService.getCurrentUserId() + + // Overwrite activity outputs + assessActivity.outputs.each { + output -> { + output.remove("id") + output.remove("activityId") + output.remove("lastUpdated") + output.remove("dateCreated") + output.remove("status") + + // Overwrite properties + output.outputId = "" + output.outputNotCompleted = true + output.name = assessProjectActivity["pActivityFormName"] + + ["lastUpdated", "dateCreated", "id"].each({ output.remove(it) }) + + // Output data + output.data.recordedBy = userService.getCurrentUserDisplayName() + } + } + + assessActivity + } // Get details about the supplied project def requestRecords(String projectId) { + def config = grailsApplication.config.refAssess def result - GrailsParameterMap queryParams = params + // GrailsParameterMap queryParams = params + + // Ensure BioCollect is configured for reference assessment projects + if (!config) { + response.status = 500 + result = [message: 'The application is not configured for reference assessment projects'] + render result as JSON + return + } + + // Ensure the user is authenticated + if (!userService.getCurrentUserId()) { + response.status = 403 + result = [message: 'User is not authenticated'] + render result as JSON + return + } // Get details about the supplied project def projectResult = projectService.get(projectId) // Ensure the project is a reference assessment project - if (!projectResult || !projectResult.refAssessEnabled) { + if (!projectResult) { response.status = 400 result = [message: 'The supplied project is not configured for reference assessments'] render result as JSON @@ -33,20 +89,33 @@ class ReferenceAssessmentController { } // Get the activity records for the reference survey - def referenceActivities = activityService.activitiesForProjectActivity(projectResult.refAssessReferenceProjectActivityId) + def refActivities = activityService.activitiesForProjectActivity(config.reference.projectActivityId) // Ensure the reference records exist - if (referenceActivities?.size() == 0) { + def numRefActivities = refActivities?.size() + if (numRefActivities == 0 || numRefActivities < config.assessment.recordsToCreate) { response.status = 404 - result = [message: 'No records found in assessment image reference survey'] + result = [message: 'Insufficient number of reference records found in reference survey'] render result as JSON return } // Sort the reference activities by - // referenceActivities.sort { it.outputs[0].data.taxaRichness } + // referenceActivities.sort { it.outputs[0].data.numTimesReferenced } // referenceActivities.findAll { it.outputs[0].data.recordedBy == "Bruno Ferronato" } - render referenceActivities as JSON + + def assessProjectActivity = projectActivityService.get(config.assessment.projectActivityId) + def assessActivities = [] + for (int projectIndex = 0; projectIndex < config.assessment.recordsToCreate; projectIndex++) { + assessActivities.push( + mapReferenceToAssessment( + refActivities[projectIndex], + assessProjectActivity + ) + ) + } + + render assessActivities as JSON } } diff --git a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy index 03a326eb8..6b398c6b3 100644 --- a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy @@ -83,6 +83,12 @@ class UrlMappings { } } + "/$hub/requestAssessmentRecords"(controller: 'hub', action: 'requestAssessmentRecords') { + constraints { + hub validator: {val, obj -> isHubValid(val) && val == grailsApplication.config.refAssess.hub} + } + } + "/$hub/nocas/geoService"(controller: 'home', action: 'geoService') { constraints { hub validator: {val, obj -> isHubValid( val)} diff --git a/grails-app/views/project/_CSAdmin.gsp b/grails-app/views/project/_CSAdmin.gsp index 68f40a7e1..54f21c806 100644 --- a/grails-app/views/project/_CSAdmin.gsp +++ b/grails-app/views/project/_CSAdmin.gsp @@ -15,7 +15,6 @@ -
    @@ -68,10 +67,6 @@
    - -
    - -
    diff --git a/grails-app/views/referenceAssessment/_settings.gsp b/grails-app/views/referenceAssessment/_settings.gsp deleted file mode 100644 index a3ef09dcb..000000000 --- a/grails-app/views/referenceAssessment/_settings.gsp +++ /dev/null @@ -1,92 +0,0 @@ - -

    Reference assessment settings

    - -

    Manage the configuration for reference assessment projects, where user-editable assessment records are created from a reference set.

    - -
    - -
    - -
    -
    -
    - - Select reference survey: -
    - - -
    - -
    -
    -
    -
    -
    -
    - - Select assessment survey: -
    - - -
    - -
    -
    -
    - - -
    - -
    - - - -
    - - - - function initialiseProjectAssessmentActivitiesSettings(pActivitiesVM) { - var pReferenceAssessmentActivitiesSettingsVM = new ProjectActivitiesSettingsViewModel(pActivitiesVM, 'project-reference-assessment-activities-result-placeholder'); - ko.applyBindings(pReferenceAssessmentActivitiesSettingsVM, document.getElementById('pReferenceAssessmentActivities')); - - // Delay subscription until the databinding has modified pActivity.pFormName if any - if(pReferenceAssessmentActivitiesSettingsVM.current()) { - pReferenceAssessmentActivitiesSettingsVM.current().transients.subscribeOrDisposePActivityFormName(true); - } - }; - - diff --git a/grails-app/views/referenceAssessment/requestRecords.gsp b/grails-app/views/referenceAssessment/requestRecords.gsp new file mode 100644 index 000000000..c286fd2da --- /dev/null +++ b/grails-app/views/referenceAssessment/requestRecords.gsp @@ -0,0 +1,50 @@ +<%@ page contentType="text/html;charset=UTF-8" %> + + + + + ${config.title} + + + + ${config.title} + + +
    +
    +
    +
    +

    Step One

    +

    Select the type of assessment records you'd like to assess

    + +
    +
    +
    +
    +

    Step Two

    +

    Request the records

    + + + Request Records + +
    +
    +
    + + \ No newline at end of file From d34caef57e598a8a7abe9008d37cd6fb248b2f1c Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Tue, 5 Mar 2024 16:11:40 +1000 Subject: [PATCH 056/115] First-pass interactive record requesting UI --- .../requestAssessmentRecordsModel.js | 35 +++++++++ .../stylesheets/reference-assessment.css | 23 ++++++ grails-app/conf/application.groovy | 30 +++++++- .../referenceAssessment/requestRecords.gsp | 71 +++++++++++-------- 4 files changed, 129 insertions(+), 30 deletions(-) create mode 100644 grails-app/assets/javascripts/requestAssessmentRecordsModel.js create mode 100644 grails-app/assets/stylesheets/reference-assessment.css diff --git a/grails-app/assets/javascripts/requestAssessmentRecordsModel.js b/grails-app/assets/javascripts/requestAssessmentRecordsModel.js new file mode 100644 index 000000000..901b92779 --- /dev/null +++ b/grails-app/assets/javascripts/requestAssessmentRecordsModel.js @@ -0,0 +1,35 @@ +//= require knockout/3.4.0/knockout-3.4.0.js +//= require knockout/3.4.0/knockout-3.4.0.debug.js + +var RequestAssessmentRecordsModel = function(filterGroupMapping){ + const self = this; + this.filters = Object.keys(filterGroupMapping); + this.selected = ko.observableArray([]); + this.deIdentify = ko.observable(false); + this.isLoading = ko.observable(false); + + this.isFilterSelected = function(filter) { + return self.selected.indexOf(filter) > -1; + } + + this.onFilterSelect = function(filter) { + // Only allow for user interaction if we're not already loading a request + if (!self.isLoading()) { + if (self.isFilterSelected(filter)) { + self.selected.remove(filter); + } else { + self.selected.push(filter); + } + } + } + + this.onRequestRecords = function() { + // Update the loading flag + self.isLoading(true); + + const selectedGroups = self.selected().map((filter) => filterGroupMapping[filter]); + const unique = Array.from(new Set(selectedGroups)) + + console.log(unique, self.deIdentify()); + } +} \ No newline at end of file diff --git a/grails-app/assets/stylesheets/reference-assessment.css b/grails-app/assets/stylesheets/reference-assessment.css new file mode 100644 index 000000000..707c36510 --- /dev/null +++ b/grails-app/assets/stylesheets/reference-assessment.css @@ -0,0 +1,23 @@ + + +.ref-assess-filters-list { + max-height: 200px; + overflow-y: scroll; +} + +.ref-assess-filters-list > div { + cursor: pointer; +} + +.ref-assess-filters-list > div.disabled { + cursor: default; +} + +.ref-assess-identify-text { + font-family: 'Lato', sans-serif; + font-size: 18px; +} + +.ref-assess-identify-card { + transition: all cubic-bezier(0, 0, 0.15, 1) 250ms; +} \ No newline at end of file diff --git a/grails-app/conf/application.groovy b/grails-app/conf/application.groovy index 39ff5f511..476b97257 100644 --- a/grails-app/conf/application.groovy +++ b/grails-app/conf/application.groovy @@ -679,8 +679,34 @@ script.read.extensions.list = ['js','min.js','png', 'json', 'jpg', 'jpeg'] refAssess.hub = 'hcat' refAssess.title = 'Image Assessment' -refAssess.reference.filterName = 'Vegetation Type' -refAssess.reference.filterTypes = ['Vegetation Type One', 'Vegetation Type Two', 'Another Vegetation Type'] +refAssess.reference.filterName = 'vegetation groups' +refAssess.reference.filterTypes = [ + "Acacia Forests and Woodlands": "Open forest and woodland", + "Acacia Open Woodlands": "Shrublands", + "Acacia Shrublands": "Shrublands", + "Callitris Forests and Woodlands": "Open forest and woodland", + "Casuarina Forests and Woodlands": "Open forest and woodland", + "Chenopod Shrublands, Samphire Shrublands and Forblands": "Grasslands", + "Eucalypt Low Open Forests": "Open forest and woodland", + "Eucalypt Open Forests": "Open forest and woodland", + "Eucalypt Open Woodlands": "Open forest and woodland", + "Eucalypt Tall Open Forests": "Wet and closed forests and thickets", + "Eucalypt Woodlands": "Open forest and woodland", + "Heathlands": "Shrublands", + "Hummock Grasslands": "Grasslands", + "Low Closed Forests and Tall Closed Shrublands": "Shrublands", + "Mallee Open Woodlands and Sparse Mallee Shrublands": "Shrublands", + "Mallee Woodlands and Shrublands": "Shrublands", + "Mangroves": "Shrublands", + "Melaleuca Forests and Woodlands": "Open forest and woodland", + "Naturally Bare - sand, rock, claypan, mudflat": "Grasslands", + "Other Forests and Woodlands": "Open forest and woodland", + "Other Grasslands, Herblands, Sedgelands and Rushlands": "Grasslands", + "Other Shrublands": "Shrublands", + "Rainforests and Vine Thickets": "Wet and closed forests and thickets", + "Tropical Eucalypt Woodlands/Grasslands": "Open forest and woodland", + "Tussock Grasslands": "Grasslands" +] refAssess.reference.projectActivityId = 'e0ce9fcc-77f2-4349-825f-9ea442c1c239' refAssess.assessment.projectActivityId = 'e61eb018-02a9-4e3b-a4b3-9d6be33d9cbb' refAssess.assessment.recordsToCreate = 3 diff --git a/grails-app/views/referenceAssessment/requestRecords.gsp b/grails-app/views/referenceAssessment/requestRecords.gsp index c286fd2da..f170c5d8e 100644 --- a/grails-app/views/referenceAssessment/requestRecords.gsp +++ b/grails-app/views/referenceAssessment/requestRecords.gsp @@ -4,6 +4,9 @@ ${config.title} + + + @@ -12,39 +15,51 @@
    -
    +
    -

    Step One

    -

    Select the type of assessment records you'd like to assess

    -
    -
    -

    Step Two

    -

    Request the records

    - - - Request Records - -
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    -
    + + const requestAssessmentRecordsVM = new RequestAssessmentRecordsModel( + + ); + + ko.applyBindings(requestAssessmentRecordsVM); + \ No newline at end of file From 42d9259e95c2e670e189a9057b5693ad4a5a1e0c Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Wed, 6 Mar 2024 09:36:24 +1000 Subject: [PATCH 057/115] Moved the requestAssessmentRecords controller view rendering from hub to referenceAssessment controller --- .../au/org/ala/biocollect/HubController.groovy | 4 ---- .../ala/biocollect/ReferenceAssessmentController.groovy | 9 +++++++++ .../controllers/au/org/ala/biocollect/UrlMappings.groovy | 2 +- .../{requestRecords.gsp => requestAssessmentRecords.gsp} | 0 4 files changed, 10 insertions(+), 5 deletions(-) rename grails-app/views/referenceAssessment/{requestRecords.gsp => requestAssessmentRecords.gsp} (100%) diff --git a/grails-app/controllers/au/org/ala/biocollect/HubController.groovy b/grails-app/controllers/au/org/ala/biocollect/HubController.groovy index 7712bf748..8b7499d5e 100644 --- a/grails-app/controllers/au/org/ala/biocollect/HubController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/HubController.groovy @@ -71,8 +71,4 @@ class HubController { render text: result.css, contentType: 'text/css', status: result.status } - - def requestAssessmentRecords() { - render view: '/referenceAssessment/requestRecords' - } } diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 3b0a9fb32..96218e0a9 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -118,4 +118,13 @@ class ReferenceAssessmentController { render assessActivities as JSON } + + def show() { + def user = userService.getUser() + if (!user) { + redirect(controller: 'hub') + } else { + render view: 'requestAssessmentRecords' + } + } } diff --git a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy index 6b398c6b3..7691774fb 100644 --- a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy @@ -83,7 +83,7 @@ class UrlMappings { } } - "/$hub/requestAssessmentRecords"(controller: 'hub', action: 'requestAssessmentRecords') { + "/$hub/requestAssessmentRecords"(controller: 'referenceAssessment', action: 'show') { constraints { hub validator: {val, obj -> isHubValid(val) && val == grailsApplication.config.refAssess.hub} } diff --git a/grails-app/views/referenceAssessment/requestRecords.gsp b/grails-app/views/referenceAssessment/requestAssessmentRecords.gsp similarity index 100% rename from grails-app/views/referenceAssessment/requestRecords.gsp rename to grails-app/views/referenceAssessment/requestAssessmentRecords.gsp From 04f8462da83d0daaec57f6f99d6eb4cc1676a5bf Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Thu, 14 Mar 2024 11:56:53 +1000 Subject: [PATCH 058/115] Removed bespoke implementation for assessment record request view, added knockout lib to static page --- .../assets/javascripts/knockout-core.js | 1 + .../requestAssessmentRecordsModel.js | 35 ---------- .../stylesheets/reference-assessment.css | 23 ------- grails-app/conf/application.groovy | 33 +--------- .../ReferenceAssessmentController.groovy | 9 --- .../au/org/ala/biocollect/UrlMappings.groovy | 6 -- .../requestAssessmentRecords.gsp | 65 ------------------- grails-app/views/staticPage/index.gsp | 1 + 8 files changed, 4 insertions(+), 169 deletions(-) create mode 100644 grails-app/assets/javascripts/knockout-core.js delete mode 100644 grails-app/assets/javascripts/requestAssessmentRecordsModel.js delete mode 100644 grails-app/assets/stylesheets/reference-assessment.css delete mode 100644 grails-app/views/referenceAssessment/requestAssessmentRecords.gsp diff --git a/grails-app/assets/javascripts/knockout-core.js b/grails-app/assets/javascripts/knockout-core.js new file mode 100644 index 000000000..513bb3424 --- /dev/null +++ b/grails-app/assets/javascripts/knockout-core.js @@ -0,0 +1 @@ +//= require knockout/3.4.0/knockout-3.4.0.js \ No newline at end of file diff --git a/grails-app/assets/javascripts/requestAssessmentRecordsModel.js b/grails-app/assets/javascripts/requestAssessmentRecordsModel.js deleted file mode 100644 index 901b92779..000000000 --- a/grails-app/assets/javascripts/requestAssessmentRecordsModel.js +++ /dev/null @@ -1,35 +0,0 @@ -//= require knockout/3.4.0/knockout-3.4.0.js -//= require knockout/3.4.0/knockout-3.4.0.debug.js - -var RequestAssessmentRecordsModel = function(filterGroupMapping){ - const self = this; - this.filters = Object.keys(filterGroupMapping); - this.selected = ko.observableArray([]); - this.deIdentify = ko.observable(false); - this.isLoading = ko.observable(false); - - this.isFilterSelected = function(filter) { - return self.selected.indexOf(filter) > -1; - } - - this.onFilterSelect = function(filter) { - // Only allow for user interaction if we're not already loading a request - if (!self.isLoading()) { - if (self.isFilterSelected(filter)) { - self.selected.remove(filter); - } else { - self.selected.push(filter); - } - } - } - - this.onRequestRecords = function() { - // Update the loading flag - self.isLoading(true); - - const selectedGroups = self.selected().map((filter) => filterGroupMapping[filter]); - const unique = Array.from(new Set(selectedGroups)) - - console.log(unique, self.deIdentify()); - } -} \ No newline at end of file diff --git a/grails-app/assets/stylesheets/reference-assessment.css b/grails-app/assets/stylesheets/reference-assessment.css deleted file mode 100644 index 707c36510..000000000 --- a/grails-app/assets/stylesheets/reference-assessment.css +++ /dev/null @@ -1,23 +0,0 @@ - - -.ref-assess-filters-list { - max-height: 200px; - overflow-y: scroll; -} - -.ref-assess-filters-list > div { - cursor: pointer; -} - -.ref-assess-filters-list > div.disabled { - cursor: default; -} - -.ref-assess-identify-text { - font-family: 'Lato', sans-serif; - font-size: 18px; -} - -.ref-assess-identify-card { - transition: all cubic-bezier(0, 0, 0.15, 1) 250ms; -} \ No newline at end of file diff --git a/grails-app/conf/application.groovy b/grails-app/conf/application.groovy index 476b97257..fc25f3bb4 100644 --- a/grails-app/conf/application.groovy +++ b/grails-app/conf/application.groovy @@ -678,35 +678,6 @@ script.read.extensions.list = ['js','min.js','png', 'json', 'jpg', 'jpeg'] refAssess.hub = 'hcat' -refAssess.title = 'Image Assessment' -refAssess.reference.filterName = 'vegetation groups' -refAssess.reference.filterTypes = [ - "Acacia Forests and Woodlands": "Open forest and woodland", - "Acacia Open Woodlands": "Shrublands", - "Acacia Shrublands": "Shrublands", - "Callitris Forests and Woodlands": "Open forest and woodland", - "Casuarina Forests and Woodlands": "Open forest and woodland", - "Chenopod Shrublands, Samphire Shrublands and Forblands": "Grasslands", - "Eucalypt Low Open Forests": "Open forest and woodland", - "Eucalypt Open Forests": "Open forest and woodland", - "Eucalypt Open Woodlands": "Open forest and woodland", - "Eucalypt Tall Open Forests": "Wet and closed forests and thickets", - "Eucalypt Woodlands": "Open forest and woodland", - "Heathlands": "Shrublands", - "Hummock Grasslands": "Grasslands", - "Low Closed Forests and Tall Closed Shrublands": "Shrublands", - "Mallee Open Woodlands and Sparse Mallee Shrublands": "Shrublands", - "Mallee Woodlands and Shrublands": "Shrublands", - "Mangroves": "Shrublands", - "Melaleuca Forests and Woodlands": "Open forest and woodland", - "Naturally Bare - sand, rock, claypan, mudflat": "Grasslands", - "Other Forests and Woodlands": "Open forest and woodland", - "Other Grasslands, Herblands, Sedgelands and Rushlands": "Grasslands", - "Other Shrublands": "Shrublands", - "Rainforests and Vine Thickets": "Wet and closed forests and thickets", - "Tropical Eucalypt Woodlands/Grasslands": "Open forest and woodland", - "Tussock Grasslands": "Grasslands" -] -refAssess.reference.projectActivityId = 'e0ce9fcc-77f2-4349-825f-9ea442c1c239' -refAssess.assessment.projectActivityId = 'e61eb018-02a9-4e3b-a4b3-9d6be33d9cbb' +refAssess.reference.projectActivityId = 'e5a03b7e-17e3-4ea0-872f-d2a58a1becd7' +refAssess.assessment.projectActivityId = '5da93123-96b3-4209-b3ca-527749cd7970' refAssess.assessment.recordsToCreate = 3 diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 96218e0a9..3b0a9fb32 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -118,13 +118,4 @@ class ReferenceAssessmentController { render assessActivities as JSON } - - def show() { - def user = userService.getUser() - if (!user) { - redirect(controller: 'hub') - } else { - render view: 'requestAssessmentRecords' - } - } } diff --git a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy index 7691774fb..03a326eb8 100644 --- a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy @@ -83,12 +83,6 @@ class UrlMappings { } } - "/$hub/requestAssessmentRecords"(controller: 'referenceAssessment', action: 'show') { - constraints { - hub validator: {val, obj -> isHubValid(val) && val == grailsApplication.config.refAssess.hub} - } - } - "/$hub/nocas/geoService"(controller: 'home', action: 'geoService') { constraints { hub validator: {val, obj -> isHubValid( val)} diff --git a/grails-app/views/referenceAssessment/requestAssessmentRecords.gsp b/grails-app/views/referenceAssessment/requestAssessmentRecords.gsp deleted file mode 100644 index f170c5d8e..000000000 --- a/grails-app/views/referenceAssessment/requestAssessmentRecords.gsp +++ /dev/null @@ -1,65 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" %> - - - - - ${config.title} - - - - - - - ${config.title} - - -
    -
    -
    -
    -

    Select the ${config.reference.filterName} you'd like to assess

    -
    - - - -
    -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    - - const requestAssessmentRecordsVM = new RequestAssessmentRecordsModel( - - ); - - ko.applyBindings(requestAssessmentRecordsVM); - - - \ No newline at end of file diff --git a/grails-app/views/staticPage/index.gsp b/grails-app/views/staticPage/index.gsp index 5f6dcd391..6f81d9dac 100644 --- a/grails-app/views/staticPage/index.gsp +++ b/grails-app/views/staticPage/index.gsp @@ -21,6 +21,7 @@ + From bc2e955211b0f865a209475f2a470a31252f9fea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 16 Mar 2024 07:47:22 +0000 Subject: [PATCH 059/115] Bump follow-redirects from 1.15.2 to 1.15.6 Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.6. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.6) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8622cfbc4..88036af86 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1200,9 +1200,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "dev": true, "funding": [ { @@ -4307,9 +4307,9 @@ "dev": true }, "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "dev": true }, "form-data": { From 9bb087b6e3e83589693c457f362dd1d5e233394e Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Tue, 19 Mar 2024 10:49:53 +1000 Subject: [PATCH 060/115] First-pass working implementation of assessment record creation --- grails-app/conf/application.groovy | 1 + .../ReferenceAssessmentController.groovy | 84 ++++++++++--------- 2 files changed, 46 insertions(+), 39 deletions(-) diff --git a/grails-app/conf/application.groovy b/grails-app/conf/application.groovy index fc25f3bb4..86ba9c2d3 100644 --- a/grails-app/conf/application.groovy +++ b/grails-app/conf/application.groovy @@ -679,5 +679,6 @@ script.read.extensions.list = ['js','min.js','png', 'json', 'jpg', 'jpeg'] refAssess.hub = 'hcat' refAssess.reference.projectActivityId = 'e5a03b7e-17e3-4ea0-872f-d2a58a1becd7' +refAssess.reference.filterKey = 'vegetationStructureGroup' refAssess.assessment.projectActivityId = '5da93123-96b3-4209-b3ca-527749cd7970' refAssess.assessment.recordsToCreate = 3 diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 3b0a9fb32..547049c65 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -13,41 +13,33 @@ class ReferenceAssessmentController { ActivityService activityService - private def mapReferenceToAssessment(Object referenceActivity, Object assessProjectActivity) { - def assessActivity = referenceActivity - - // Remove irrelevant fields - ["assessment", "complete", "dateCreated", "id", "lastUpdated", "progress", "status"] - .each { - assessActivity.remove(it) - } - - // Overwrite activity record IDs - assessActivity.activityId = "" - assessActivity.projectActivityId = assessProjectActivity["projectActivityId"] - assessActivity.type = assessProjectActivity["pActivityFormName"] - assessActivity.userId = userService.getCurrentUserId() - - // Overwrite activity outputs - assessActivity.outputs.each { - output -> { - output.remove("id") - output.remove("activityId") - output.remove("lastUpdated") - output.remove("dateCreated") - output.remove("status") - - // Overwrite properties - output.outputId = "" - output.outputNotCompleted = true - output.name = assessProjectActivity["pActivityFormName"] - - ["lastUpdated", "dateCreated", "id"].each({ output.remove(it) }) - - // Output data - output.data.recordedBy = userService.getCurrentUserDisplayName() - } - } + private def createAssessmentRecordFromReference(Object referenceActivity, Object assessProjectActivity) { + def assessActivity = [ + outputs: [ + [ + outputId: "", + outputNotCompleted: false, + data: [ + recordedBy: userService.getCurrentUserDisplayName(), + upperConditionBound: "0", + lowerConditionBound: "0", + overallConditionBestEstimate: "0", + mvgGroup: referenceActivity.outputs[0].data.vegetationStructureGroup, + huchinsonGroup: referenceActivity.outputs[0].data.huchinsonGroup + ], + name: assessProjectActivity["pActivityFormName"] + ] + ], + projectActivityId: assessProjectActivity["projectActivityId"], + userId: userService.getCurrentUserId(), + projectStage: "", + embargoed: false, + type: assessProjectActivity["pActivityFormName"], + projectId: assessProjectActivity["projectId"], + mainTheme: "" + ] + + activityService.update("", assessActivity) assessActivity } @@ -59,7 +51,14 @@ class ReferenceAssessmentController { def config = grailsApplication.config.refAssess def result - // GrailsParameterMap queryParams = params + // Ensure we're provided with a filter query item + GrailsParameterMap queryParams = params + if (!queryParams[config.reference.filterKey]) { + response.status = 500 + result = [message: "Missing '${config.reference.filterKey}' parameter!"] + render result as JSON + return + } // Ensure BioCollect is configured for reference assessment projects if (!config) { @@ -101,15 +100,22 @@ class ReferenceAssessmentController { } // Sort the reference activities by - // referenceActivities.sort { it.outputs[0].data.numTimesReferenced } - // referenceActivities.findAll { it.outputs[0].data.recordedBy == "Bruno Ferronato" } + refActivities = refActivities.sort { it.outputs[0].data.numTimesReferenced } + refActivities = refActivities.findAll { it.outputs[0].data[config.reference.filterKey] == queryParams[config.reference.filterKey]} + // Ensure there are reference records after filtering + if (refActivities.size() < config.assessment.recordsToCreate) { + response.status = 400 + result = [message: "Insufficient number of reference records for '${config.reference.filterKey}' filter (${queryParams[config.reference.filterKey]})"] + render result as JSON + return + } def assessProjectActivity = projectActivityService.get(config.assessment.projectActivityId) def assessActivities = [] for (int projectIndex = 0; projectIndex < config.assessment.recordsToCreate; projectIndex++) { assessActivities.push( - mapReferenceToAssessment( + createAssessmentRecordFromReference( refActivities[projectIndex], assessProjectActivity ) From 71732c132661230e60cf317dc72213996f301425 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Wed, 27 Mar 2024 11:59:37 +1000 Subject: [PATCH 061/115] Further refactoring to record creation process --- grails-app/conf/application.groovy | 3 +- .../ReferenceAssessmentController.groovy | 76 +++++++++++-------- .../au/org/ala/biocollect/UrlMappings.groovy | 3 +- 3 files changed, 49 insertions(+), 33 deletions(-) diff --git a/grails-app/conf/application.groovy b/grails-app/conf/application.groovy index 86ba9c2d3..9f4b197d3 100644 --- a/grails-app/conf/application.groovy +++ b/grails-app/conf/application.groovy @@ -679,6 +679,5 @@ script.read.extensions.list = ['js','min.js','png', 'json', 'jpg', 'jpeg'] refAssess.hub = 'hcat' refAssess.reference.projectActivityId = 'e5a03b7e-17e3-4ea0-872f-d2a58a1becd7' -refAssess.reference.filterKey = 'vegetationStructureGroup' refAssess.assessment.projectActivityId = '5da93123-96b3-4209-b3ca-527749cd7970' -refAssess.assessment.recordsToCreate = 3 +refAssess.assessment.maxRecordsToCreate = 8 diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 547049c65..6a1084fa3 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -39,31 +39,35 @@ class ReferenceAssessmentController { mainTheme: "" ] + // Create the new assessment activity record activityService.update("", assessActivity) + // Update the numTimesReferenced field on the reference record + referenceActivity.outputs[0].data.numTimesReferenced = + referenceActivity.outputs[0].data.numTimesReferenced as Integer + 1 + activityService.update(referenceActivity.activityId, referenceActivity) + + // Return the assessment activity assessActivity } - - // Get details about the supplied project - - def requestRecords(String projectId) { + def requestRecords() { def config = grailsApplication.config.refAssess + def body = request.JSON def result - // Ensure we're provided with a filter query item - GrailsParameterMap queryParams = params - if (!queryParams[config.reference.filterKey]) { + // Ensure BioCollect is configured for reference assessment projects + if (!config) { response.status = 500 - result = [message: "Missing '${config.reference.filterKey}' parameter!"] + result = [message: 'The application is not configured for reference assessment projects'] render result as JSON return } - // Ensure BioCollect is configured for reference assessment projects - if (!config) { - response.status = 500 - result = [message: 'The application is not configured for reference assessment projects'] + // Ensure the body of the request contains the required fields + if (!body['vegetationStructureGroups'] || !body['climateGroups'] || !body.keySet().contains('deIdentify')) { + response.status = 400 + result = [message: 'Please ensure the assessment record request contains all relevant fields'] render result as JSON return } @@ -76,44 +80,56 @@ class ReferenceAssessmentController { return } - // Get details about the supplied project - def projectResult = projectService.get(projectId) - - // Ensure the project is a reference assessment project - if (!projectResult) { - response.status = 400 - result = [message: 'The supplied project is not configured for reference assessments'] - render result as JSON - return - } - // Get the activity records for the reference survey def refActivities = activityService.activitiesForProjectActivity(config.reference.projectActivityId) // Ensure the reference records exist def numRefActivities = refActivities?.size() - if (numRefActivities == 0 || numRefActivities < config.assessment.recordsToCreate) { + if (numRefActivities == 0 || numRefActivities < config.assessment.maxRecordsToCreate) { response.status = 404 result = [message: 'Insufficient number of reference records found in reference survey'] render result as JSON return } - // Sort the reference activities by - refActivities = refActivities.sort { it.outputs[0].data.numTimesReferenced } - refActivities = refActivities.findAll { it.outputs[0].data[config.reference.filterKey] == queryParams[config.reference.filterKey]} + // Filter out reference activities by the supplied vegetation structure groups & climate groups + refActivities = refActivities.findAll { + body["vegetationStructureGroups"].contains(it.outputs[0].data["vegetationStructureGroup"]) && + body["climateGroups"].contains(it.outputs[0].data["huchinsonGroup"]) + } + + // Split & sort the reference activities into: + // Priority records (assessed <= 3 times), prioritising records assessed the MOST + // Other records (assessed > 3 times), prioritising records assessed the LEAST + + def priorityRecords = refActivities + .findAll { it.outputs[0].data.numTimesReferenced as Integer <= 3 } + .sort{ -(it.outputs[0].data.numTimesReferenced as Integer) } + def otherRecords = refActivities + .findAll { it.outputs[0].data.numTimesReferenced as Integer > 3 } + .sort{ it.outputs[0].data.numTimesReferenced as Integer } + + // Combine the two lists + refActivities = priorityRecords + otherRecords + +// if (true) { +// response.status = 200 +// result = [message: 'Test!'] +// render result as JSON +// return +// } // Ensure there are reference records after filtering - if (refActivities.size() < config.assessment.recordsToCreate) { + if (refActivities.size() == 0) { response.status = 400 - result = [message: "Insufficient number of reference records for '${config.reference.filterKey}' filter (${queryParams[config.reference.filterKey]})"] + result = [message: "No reference images matching your criteria could be found."] render result as JSON return } def assessProjectActivity = projectActivityService.get(config.assessment.projectActivityId) def assessActivities = [] - for (int projectIndex = 0; projectIndex < config.assessment.recordsToCreate; projectIndex++) { + for (int projectIndex = 0; projectIndex < min(config.assessment.maxRecordsToCreate, refActivities.size()); projectIndex++) { assessActivities.push( createAssessmentRecordFromReference( refActivities[projectIndex], diff --git a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy index 03a326eb8..dbb68b009 100644 --- a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy @@ -167,12 +167,13 @@ class UrlMappings { format = 'json' } + "/referenceAssessment/requestRecords"(controller: "referenceAssessment", action: [POST: "requestRecords"]) + "500"(controller:'error', action:'response500') "404"(controller:'error', action:'response404') // Following api's are used by external mobile clients - "/ws/referenceAssessment/requestRecords/$projectId"(controller: "referenceAssessment", action: "requestRecords") "/ws/project/search"(controller: "project", action: 'search') "/ws/survey/list/$id"(controller: "project", action: 'listSurveys') From 72c98ccdcea2232876c2984900cc8e42f202bebc Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Wed, 27 Mar 2024 15:33:52 +1000 Subject: [PATCH 062/115] Fixed image uploading for assessment records, switched knockout-core reference to common.js --- .../assets/javascripts/knockout-core.js | 1 - .../ReferenceAssessmentController.groovy | 39 +++++++++++++------ grails-app/views/staticPage/index.gsp | 2 +- 3 files changed, 29 insertions(+), 13 deletions(-) delete mode 100644 grails-app/assets/javascripts/knockout-core.js diff --git a/grails-app/assets/javascripts/knockout-core.js b/grails-app/assets/javascripts/knockout-core.js deleted file mode 100644 index 513bb3424..000000000 --- a/grails-app/assets/javascripts/knockout-core.js +++ /dev/null @@ -1 +0,0 @@ -//= require knockout/3.4.0/knockout-3.4.0.js \ No newline at end of file diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 6a1084fa3..5c5821be3 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -8,12 +8,29 @@ import java.time.Instant class ReferenceAssessmentController { UserService userService - ProjectService projectService ProjectActivityService projectActivityService ActivityService activityService private def createAssessmentRecordFromReference(Object referenceActivity, Object assessProjectActivity) { + def refDoc = referenceActivity.documents[0] + def assessPhoto = [ + licence: refDoc["licence"], + notes: refDoc["notes"], + filesize: refDoc["filesize"], + staged: true, + url: grailsApplication.config.serverURL + refDoc["url"], + filename: refDoc["filename"], + attribution: referenceActivity.outputs[0].data["imageAttribution"], + name: refDoc["name"], + documentId: '', + contentType: refDoc["contentType"], + dateTaken: refDoc["dateTaken"], + formattedSize: refDoc["formattedSize"], + thumbnailUrl: grailsApplication.config.serverURL + refDoc["thumbnailUrl"], + status: "active" + ] + def assessActivity = [ outputs: [ [ @@ -25,7 +42,8 @@ class ReferenceAssessmentController { lowerConditionBound: "0", overallConditionBestEstimate: "0", mvgGroup: referenceActivity.outputs[0].data.vegetationStructureGroup, - huchinsonGroup: referenceActivity.outputs[0].data.huchinsonGroup + huchinsonGroup: referenceActivity.outputs[0].data.huchinsonGroup, + sitePhoto: [assessPhoto] ], name: assessProjectActivity["pActivityFormName"] ] @@ -112,13 +130,6 @@ class ReferenceAssessmentController { // Combine the two lists refActivities = priorityRecords + otherRecords -// if (true) { -// response.status = 200 -// result = [message: 'Test!'] -// render result as JSON -// return -// } - // Ensure there are reference records after filtering if (refActivities.size() == 0) { response.status = 400 @@ -129,7 +140,11 @@ class ReferenceAssessmentController { def assessProjectActivity = projectActivityService.get(config.assessment.projectActivityId) def assessActivities = [] - for (int projectIndex = 0; projectIndex < min(config.assessment.maxRecordsToCreate, refActivities.size()); projectIndex++) { + for ( + int projectIndex = 0; + projectIndex < Math.min(config.assessment.maxRecordsToCreate, refActivities.size()); + projectIndex++ + ) { assessActivities.push( createAssessmentRecordFromReference( refActivities[projectIndex], @@ -138,6 +153,8 @@ class ReferenceAssessmentController { ) } - render assessActivities as JSON + response.status = 200 + result = [message: "Found ${assessActivities.size()} images for assessment, please standby..."] + render result as JSON } } diff --git a/grails-app/views/staticPage/index.gsp b/grails-app/views/staticPage/index.gsp index 6f81d9dac..5a34d5931 100644 --- a/grails-app/views/staticPage/index.gsp +++ b/grails-app/views/staticPage/index.gsp @@ -21,7 +21,7 @@ - + From 708c46343a92e4646bf183f50a7b39a0d4da08aa Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Tue, 2 Apr 2024 10:41:30 +1000 Subject: [PATCH 063/115] Included de-identify flag in record creation --- .../ReferenceAssessmentController.groovy | 8 +- package-lock.json | 767 +++++++++++++++++- package.json | 2 +- 3 files changed, 730 insertions(+), 47 deletions(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 5c5821be3..7dd8549e1 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -12,7 +12,7 @@ class ReferenceAssessmentController { ActivityService activityService - private def createAssessmentRecordFromReference(Object referenceActivity, Object assessProjectActivity) { + private def createAssessmentRecordFromReference(Object referenceActivity, Object assessProjectActivity, boolean deIdentify) { def refDoc = referenceActivity.documents[0] def assessPhoto = [ licence: refDoc["licence"], @@ -43,7 +43,8 @@ class ReferenceAssessmentController { overallConditionBestEstimate: "0", mvgGroup: referenceActivity.outputs[0].data.vegetationStructureGroup, huchinsonGroup: referenceActivity.outputs[0].data.huchinsonGroup, - sitePhoto: [assessPhoto] + sitePhoto: [assessPhoto], + deIdentify: deIdentify ? "Yes" : "No" ], name: assessProjectActivity["pActivityFormName"] ] @@ -148,7 +149,8 @@ class ReferenceAssessmentController { assessActivities.push( createAssessmentRecordFromReference( refActivities[projectIndex], - assessProjectActivity + assessProjectActivity, + body['deIdentify'] ) ) } diff --git a/package-lock.json b/package-lock.json index 8622cfbc4..b15fcf222 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "6.0", "devDependencies": { "@metahub/karma-jasmine-jquery": "^2.0.1", - "chromedriver": "^119.0.1", + "chromedriver": "^123.0.1", "jasmine-core": "^3.5.0", "jasmine-jquery": "^2.0.0", "jquery": "^3.4.1", @@ -293,6 +293,12 @@ "integrity": "sha512-kIhULpw9TrGYnHp/8VfdcneIcxKnLixmADtukQRtJUmsVlMg0niMkwV0xZmi8hqa57xqilIHjWFA0GKvEjVU5g==", "dev": true }, + "node_modules/@tootallnate/quickjs-emscripten": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", + "dev": true + }, "node_modules/@types/cookie": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", @@ -344,15 +350,15 @@ } }, "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "dev": true, "dependencies": { - "debug": "4" + "debug": "^4.3.4" }, "engines": { - "node": ">= 6.0.0" + "node": ">= 14" } }, "node_modules/agent-base/node_modules/debug": { @@ -440,6 +446,18 @@ "node": ">=0.10.0" } }, + "node_modules/ast-types": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", + "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "dev": true, + "dependencies": { + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -447,12 +465,12 @@ "dev": true }, "node_modules/axios": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", - "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", "dev": true, "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -472,6 +490,15 @@ "node": "^4.5.0 || >= 5.9" } }, + "node_modules/basic-ftp": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", + "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -655,17 +682,17 @@ } }, "node_modules/chromedriver": { - "version": "119.0.1", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-119.0.1.tgz", - "integrity": "sha512-lpCFFLaXPpvElTaUOWKdP74pFb/sJhWtWqMjn7Ju1YriWn8dT5JBk84BGXMPvZQs70WfCYWecxdMmwfIu1Mupg==", + "version": "123.0.1", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-123.0.1.tgz", + "integrity": "sha512-YQUIP/zdlzDIRCZNCv6rEVDSY4RAxo/tDL0OiGPPuai+z8unRNqJr/9V6XTBypVFyDheXNalKt9QxEqdMPuLAQ==", "dev": true, "hasInstallScript": true, "dependencies": { "@testim/chrome-version": "^1.1.4", - "axios": "^1.6.0", + "axios": "^1.6.7", "compare-versions": "^6.1.0", "extract-zip": "^2.0.1", - "https-proxy-agent": "^5.0.1", + "proxy-agent": "^6.4.0", "proxy-from-env": "^1.1.0", "tcp-port-used": "^1.0.2" }, @@ -797,6 +824,15 @@ "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", "dev": true }, + "node_modules/data-uri-to-buffer": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", + "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", + "dev": true, + "engines": { + "node": ">= 14" + } + }, "node_modules/date-format": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.6.tgz", @@ -846,6 +882,63 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "node_modules/degenerator": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", + "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "dev": true, + "dependencies": { + "ast-types": "^0.13.4", + "escodegen": "^2.1.0", + "esprima": "^4.0.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/degenerator/node_modules/escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dev": true, + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/degenerator/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/degenerator/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -1200,9 +1293,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "dev": true, "funding": [ { @@ -1332,6 +1425,58 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-uri": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.3.tgz", + "integrity": "sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==", + "dev": true, + "dependencies": { + "basic-ftp": "^5.0.2", + "data-uri-to-buffer": "^6.0.2", + "debug": "^4.3.4", + "fs-extra": "^11.2.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/get-uri/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/get-uri/node_modules/fs-extra": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/get-uri/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", @@ -1484,17 +1629,53 @@ "node": ">=8.0.0" } }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/http-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/http-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dev": true, "dependencies": { - "agent-base": "6", + "agent-base": "^7.0.2", "debug": "4" }, "engines": { - "node": ">= 6" + "node": ">= 14" } }, "node_modules/https-proxy-agent/node_modules/debug": { @@ -1560,6 +1741,25 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dev": true, + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/ip-address/node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "dev": true + }, "node_modules/ip-regex": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", @@ -1910,6 +2110,12 @@ "node": ">=4" } }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "dev": true + }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -2166,6 +2372,15 @@ "node": ">=0.10.0" } }, + "node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/make-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", @@ -2323,6 +2538,15 @@ "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", "dev": true }, + "node_modules/netmask": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", + "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/nopt": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", @@ -2430,6 +2654,61 @@ "node": ">= 0.8.0" } }, + "node_modules/pac-proxy-agent": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.1.tgz", + "integrity": "sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==", + "dev": true, + "dependencies": { + "@tootallnate/quickjs-emscripten": "^0.23.0", + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "get-uri": "^6.0.1", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", + "pac-resolver": "^7.0.0", + "socks-proxy-agent": "^8.0.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/pac-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/pac-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/pac-resolver": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", + "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", + "dev": true, + "dependencies": { + "degenerator": "^5.0.0", + "netmask": "^2.0.2" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", @@ -2558,6 +2837,48 @@ "node": ">= 0.8.0" } }, + "node_modules/proxy-agent": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.4.0.tgz", + "integrity": "sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==", + "dev": true, + "dependencies": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.3", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "^7.0.1", + "proxy-from-env": "^1.1.0", + "socks-proxy-agent": "^8.0.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -2772,6 +3093,16 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true, + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, "node_modules/socket.io": { "version": "4.6.1", "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.6.1.tgz", @@ -2857,6 +3188,57 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/socks": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.1.tgz", + "integrity": "sha512-B6w7tkwNid7ToxjZ08rQMT8M9BJAf8DKx8Ft4NivzH0zBUfd6jldGcisJn/RLgxcX3FPNDdNQCUEMMT79b+oCQ==", + "dev": true, + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz", + "integrity": "sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A==", + "dev": true, + "dependencies": { + "agent-base": "^7.1.1", + "debug": "^4.3.4", + "socks": "^2.7.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/socks-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/socks-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -3114,6 +3496,12 @@ "node": ">=0.10.0" } }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "node_modules/type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -3588,6 +3976,12 @@ "integrity": "sha512-kIhULpw9TrGYnHp/8VfdcneIcxKnLixmADtukQRtJUmsVlMg0niMkwV0xZmi8hqa57xqilIHjWFA0GKvEjVU5g==", "dev": true }, + "@tootallnate/quickjs-emscripten": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", + "dev": true + }, "@types/cookie": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", @@ -3636,12 +4030,12 @@ } }, "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "dev": true, "requires": { - "debug": "4" + "debug": "^4.3.4" }, "dependencies": { "debug": { @@ -3708,6 +4102,15 @@ "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", "dev": true }, + "ast-types": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", + "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "dev": true, + "requires": { + "tslib": "^2.0.1" + } + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -3715,12 +4118,12 @@ "dev": true }, "axios": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", - "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", "dev": true, "requires": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -3737,6 +4140,12 @@ "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", "dev": true }, + "basic-ftp": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", + "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", + "dev": true + }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -3876,16 +4285,16 @@ } }, "chromedriver": { - "version": "119.0.1", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-119.0.1.tgz", - "integrity": "sha512-lpCFFLaXPpvElTaUOWKdP74pFb/sJhWtWqMjn7Ju1YriWn8dT5JBk84BGXMPvZQs70WfCYWecxdMmwfIu1Mupg==", + "version": "123.0.1", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-123.0.1.tgz", + "integrity": "sha512-YQUIP/zdlzDIRCZNCv6rEVDSY4RAxo/tDL0OiGPPuai+z8unRNqJr/9V6XTBypVFyDheXNalKt9QxEqdMPuLAQ==", "dev": true, "requires": { "@testim/chrome-version": "^1.1.4", - "axios": "^1.6.0", + "axios": "^1.6.7", "compare-versions": "^6.1.0", "extract-zip": "^2.0.1", - "https-proxy-agent": "^5.0.1", + "proxy-agent": "^6.4.0", "proxy-from-env": "^1.1.0", "tcp-port-used": "^1.0.2" } @@ -3993,6 +4402,12 @@ "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", "dev": true }, + "data-uri-to-buffer": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", + "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", + "dev": true + }, "date-format": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.6.tgz", @@ -4030,6 +4445,43 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "degenerator": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", + "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "dev": true, + "requires": { + "ast-types": "^0.13.4", + "escodegen": "^2.1.0", + "esprima": "^4.0.1" + }, + "dependencies": { + "escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dev": true, + "requires": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2", + "source-map": "~0.6.1" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + } + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -4307,9 +4759,9 @@ "dev": true }, "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "dev": true }, "form-data": { @@ -4394,6 +4846,46 @@ "pump": "^3.0.0" } }, + "get-uri": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.3.tgz", + "integrity": "sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==", + "dev": true, + "requires": { + "basic-ftp": "^5.0.2", + "data-uri-to-buffer": "^6.0.2", + "debug": "^4.3.4", + "fs-extra": "^11.2.0" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "fs-extra": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", @@ -4507,13 +4999,40 @@ "requires-port": "^1.0.0" } }, + "http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "requires": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dev": true, "requires": { - "agent-base": "6", + "agent-base": "^7.0.2", "debug": "4" }, "dependencies": { @@ -4568,6 +5087,24 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dev": true, + "requires": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "dependencies": { + "sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "dev": true + } + } + }, "ip-regex": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", @@ -4853,6 +5390,12 @@ } } }, + "jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "dev": true + }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -5060,6 +5603,12 @@ "signal-exit": "^3.0.0" } }, + "lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true + }, "make-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", @@ -5178,6 +5727,12 @@ "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", "dev": true }, + "netmask": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", + "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "dev": true + }, "nopt": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", @@ -5261,6 +5816,49 @@ "word-wrap": "~1.2.3" } }, + "pac-proxy-agent": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.1.tgz", + "integrity": "sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==", + "dev": true, + "requires": { + "@tootallnate/quickjs-emscripten": "^0.23.0", + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "get-uri": "^6.0.1", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", + "pac-resolver": "^7.0.0", + "socks-proxy-agent": "^8.0.2" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "pac-resolver": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", + "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", + "dev": true, + "requires": { + "degenerator": "^5.0.0", + "netmask": "^2.0.2" + } + }, "parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", @@ -5355,6 +5953,39 @@ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, + "proxy-agent": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.4.0.tgz", + "integrity": "sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==", + "dev": true, + "requires": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.3", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "^7.0.1", + "proxy-from-env": "^1.1.0", + "socks-proxy-agent": "^8.0.2" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -5524,6 +6155,12 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, + "smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true + }, "socket.io": { "version": "4.6.1", "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.6.1.tgz", @@ -5591,6 +6228,44 @@ } } }, + "socks": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.1.tgz", + "integrity": "sha512-B6w7tkwNid7ToxjZ08rQMT8M9BJAf8DKx8Ft4NivzH0zBUfd6jldGcisJn/RLgxcX3FPNDdNQCUEMMT79b+oCQ==", + "dev": true, + "requires": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + } + }, + "socks-proxy-agent": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz", + "integrity": "sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A==", + "dev": true, + "requires": { + "agent-base": "^7.1.1", + "debug": "^4.3.4", + "socks": "^2.7.1" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -5790,6 +6465,12 @@ "integrity": "sha512-Nm4cF79FhSTzrLKGDMi3I4utBtFv8qKy4sq1enftf2gMdpqI8oVQTAfySkTz5r49giVzDj88SVZXP4CeYQwjaw==", "dev": true }, + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", diff --git a/package.json b/package.json index eb568215c..eaa797d6b 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "devDependencies": { "@metahub/karma-jasmine-jquery": "^2.0.1", - "chromedriver": "^119.0.1", + "chromedriver": "^123.0.1", "jasmine-core": "^3.5.0", "jasmine-jquery": "^2.0.0", "jquery": "^3.4.1", From 85734f653911419c8a5dc8f4fd27a91ef3ba39ca Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Tue, 2 Apr 2024 11:38:14 +1000 Subject: [PATCH 064/115] Removed bespoke refAssess configuration from application.groovy, fixed integer casting of maxRecordsToCreate config property --- grails-app/conf/application.groovy | 7 ------- .../ala/biocollect/ReferenceAssessmentController.groovy | 7 ++++--- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/grails-app/conf/application.groovy b/grails-app/conf/application.groovy index 9f4b197d3..296b787ad 100644 --- a/grails-app/conf/application.groovy +++ b/grails-app/conf/application.groovy @@ -674,10 +674,3 @@ if (!app.file.script.path) { app.file.script.path = "/data/biocollect/scripts" } script.read.extensions.list = ['js','min.js','png', 'json', 'jpg', 'jpeg'] - - - -refAssess.hub = 'hcat' -refAssess.reference.projectActivityId = 'e5a03b7e-17e3-4ea0-872f-d2a58a1becd7' -refAssess.assessment.projectActivityId = '5da93123-96b3-4209-b3ca-527749cd7970' -refAssess.assessment.maxRecordsToCreate = 8 diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 7dd8549e1..6f646f9b3 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -101,12 +101,13 @@ class ReferenceAssessmentController { // Get the activity records for the reference survey def refActivities = activityService.activitiesForProjectActivity(config.reference.projectActivityId) + def maxRecordsToCreate = config.assessment.maxRecordsToCreate as Integer // Ensure the reference records exist def numRefActivities = refActivities?.size() - if (numRefActivities == 0 || numRefActivities < config.assessment.maxRecordsToCreate) { + if (numRefActivities == 0) { response.status = 404 - result = [message: 'Insufficient number of reference records found in reference survey'] + result = [message: 'No reference records found in reference survey'] render result as JSON return } @@ -143,7 +144,7 @@ class ReferenceAssessmentController { def assessActivities = [] for ( int projectIndex = 0; - projectIndex < Math.min(config.assessment.maxRecordsToCreate, refActivities.size()); + projectIndex < Math.min(maxRecordsToCreate, refActivities.size()); projectIndex++ ) { assessActivities.push( From 69b7de1252efab562e3867b6af2852798564ea1f Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Tue, 2 Apr 2024 15:59:25 +1000 Subject: [PATCH 065/115] Fixed user hub admin check for static page saving --- .../au/org/ala/biocollect/StaticPageController.groovy | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/StaticPageController.groovy b/grails-app/controllers/au/org/ala/biocollect/StaticPageController.groovy index f8b420ec4..cab571fa2 100644 --- a/grails-app/controllers/au/org/ala/biocollect/StaticPageController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/StaticPageController.groovy @@ -1,13 +1,15 @@ package au.org.ala.biocollect import au.org.ala.biocollect.merit.SettingService -import au.org.ala.web.AlaSecured +import au.org.ala.biocollect.merit.UserService +import au.org.ala.biocollect.merit.hub.HubSettings import au.org.ala.web.NoSSO import au.org.ala.web.SSO @SSO class StaticPageController { SettingService settingService + UserService userService @NoSSO def index() { String page = params.page; @@ -44,13 +46,14 @@ class StaticPageController { /** * Save static page text */ - @AlaSecured(value = ['ROLE_ADMIN']) def saveTextAreaSetting() { String text = params.textValue String settingKey = params.settingKey String returnUrl = params.returnUrl ?: g.createLink(controller: 'staticPage', action: 'index', absolute: true, params: [page: settingKey]) - if (settingKey) { + if (!userService.doesUserHaveHubRole("admin")) { + flash.errorMessage = "You do not have correct permissions to perform this action" + } else if (settingKey) { settingService.setSettingText(settingKey, text) flash.message = "Successfully saved." } else { From cb84903a1ac57aedba22752ee0a9fa44d8da59c9 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Wed, 3 Apr 2024 10:53:21 +1000 Subject: [PATCH 066/115] Switched to /ws/search endpoint for reference activities search --- .../org/ala/biocollect/ReferenceAssessmentController.groovy | 5 ++++- .../au/org/ala/biocollect/merit/ActivityService.groovy | 4 ---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 6f646f9b3..ff55649a1 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -100,7 +100,10 @@ class ReferenceAssessmentController { } // Get the activity records for the reference survey - def refActivities = activityService.activitiesForProjectActivity(config.reference.projectActivityId) + def refActivitiesSearch = activityService.search([ + projectActivityId: config.reference.projectActivityId + ]) + def refActivities = refActivitiesSearch.resp.activities def maxRecordsToCreate = config.assessment.maxRecordsToCreate as Integer // Ensure the reference records exist diff --git a/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy b/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy index 027e075ed..7288aec23 100644 --- a/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy +++ b/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy @@ -215,10 +215,6 @@ class ActivityService { list } - def activitiesForProjectActivity(String id) { - webService.getJson(grailsApplication.config.ecodata.service.url + '/activitiesForProjectActivity/' + id)?.list - } - def submitActivitiesForPublication(activityIds) { updatePublicationStatus(activityIds, 'pendingApproval') } From 2b2c8f3771ead6da0df362c57ecae0a0683d5ebb Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Thu, 4 Apr 2024 10:01:57 +1000 Subject: [PATCH 067/115] Added additional data & documents check for reference records --- .../org/ala/biocollect/ReferenceAssessmentController.groovy | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index ff55649a1..db4df80c2 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -115,6 +115,12 @@ class ReferenceAssessmentController { return } + // Filter out any records without data or documents + refActivities = refActivities.findAll { + it.outputs[0].keySet().contains('data') && + it.documents.size() > 0 + } + // Filter out reference activities by the supplied vegetation structure groups & climate groups refActivities = refActivities.findAll { body["vegetationStructureGroups"].contains(it.outputs[0].data["vegetationStructureGroup"]) && From f40a30ff52692f1fb5e9a41c88ffbb855d8ee2d8 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Thu, 4 Apr 2024 10:52:35 +1000 Subject: [PATCH 068/115] Fixed serverURL reference in image path generation --- .../biocollect/ReferenceAssessmentController.groovy | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index db4df80c2..9c0c1fa21 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -14,12 +14,18 @@ class ReferenceAssessmentController { private def createAssessmentRecordFromReference(Object referenceActivity, Object assessProjectActivity, boolean deIdentify) { def refDoc = referenceActivity.documents[0] + + def baseUrl = '' + if (!refDoc["url"].startsWith('http')) { + baseUrl = grailsApplication.config.grails.serverURL + } + def assessPhoto = [ licence: refDoc["licence"], notes: refDoc["notes"], filesize: refDoc["filesize"], staged: true, - url: grailsApplication.config.serverURL + refDoc["url"], + url: baseUrl + refDoc["url"], filename: refDoc["filename"], attribution: referenceActivity.outputs[0].data["imageAttribution"], name: refDoc["name"], @@ -27,7 +33,7 @@ class ReferenceAssessmentController { contentType: refDoc["contentType"], dateTaken: refDoc["dateTaken"], formattedSize: refDoc["formattedSize"], - thumbnailUrl: grailsApplication.config.serverURL + refDoc["thumbnailUrl"], + thumbnailUrl: baseUr + refDoc["thumbnailUrl"], status: "active" ] From eb0f3b46c69b0cba4a9d041e89e9e96ce6ca2425 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Thu, 4 Apr 2024 11:21:10 +1000 Subject: [PATCH 069/115] Fixed baseUrl variable reference --- .../au/org/ala/biocollect/ReferenceAssessmentController.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 9c0c1fa21..299e70cd0 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -33,7 +33,7 @@ class ReferenceAssessmentController { contentType: refDoc["contentType"], dateTaken: refDoc["dateTaken"], formattedSize: refDoc["formattedSize"], - thumbnailUrl: baseUr + refDoc["thumbnailUrl"], + thumbnailUrl: baseUrl + refDoc["thumbnailUrl"], status: "active" ] From c91ac2ae646b203c655e0ff9adf0630f32af119f Mon Sep 17 00:00:00 2001 From: temi Date: Tue, 16 Apr 2024 18:25:57 +1000 Subject: [PATCH 070/115] upgraded ecodata-client-plugin:6.2 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index ebe5c5b76..691470875 100644 --- a/build.gradle +++ b/build.gradle @@ -154,7 +154,7 @@ dependencies { if (!Boolean.valueOf(inplace)) { implementation "org.grails.plugins:ala-map-plugin:3.0.1" - implementation "org.grails.plugins:ecodata-client-plugin:6.1.3" + implementation "org.grails.plugins:ecodata-client-plugin:6.2" } testCompileOnly "org.grails:grails-test-mixins:3.3.0" From ac838ebec617edf8fd96166aef09ae15a298d723 Mon Sep 17 00:00:00 2001 From: temi Date: Wed, 17 Apr 2024 04:40:29 +1000 Subject: [PATCH 071/115] upgraded chrome driver --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index eb568215c..1b726a969 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "devDependencies": { "@metahub/karma-jasmine-jquery": "^2.0.1", - "chromedriver": "^119.0.1", + "chromedriver": "^123.0.3", "jasmine-core": "^3.5.0", "jasmine-jquery": "^2.0.0", "jquery": "^3.4.1", From bd9f98a93c66058daf95dae9f9a295c694e79f16 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Mon, 22 Jan 2024 13:29:21 +1000 Subject: [PATCH 072/115] Added 'Reference Assessment' tab in admin project settings, and stub reference assessment controller class --- .../ReferenceAssessmentController.groovy | 37 +++++++++++++++++++ .../au/org/ala/biocollect/UrlMappings.groovy | 2 + grails-app/i18n/messages.properties | 1 + grails-app/views/project/_CSAdmin.gsp | 6 ++- 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy new file mode 100644 index 000000000..0915693d7 --- /dev/null +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -0,0 +1,37 @@ +package au.org.ala.biocollect + +import au.org.ala.biocollect.merit.* +import grails.converters.JSON +import grails.web.servlet.mvc.GrailsParameterMap + +class ReferenceAssessmentController { + UserService userService + ProjectService projectService + RecordService recordService + SearchService searchService + + def requestRecords(String projectId) { + def result + + // Retrieve reference image records from reference project + GrailsParameterMap params = new GrailsParameterMap([:], request) + params["hub"] = "acsa" + // params["max"] = "30" + params["fq"] = "projectActivityNameFacet:The Dead Tree Detective" + + + + Map searchResult = searchService.searchProjectActivity(params) + List activities = searchResult?.hits?.hits + + // Ensure records exist + if (activities?.size() == 0) { + response.status = 404 + result = [message: 'No records found in assessment image reference survey'] + } else { + result = searchResult + } + + render result as JSON + } +} diff --git a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy index 44cd28035..3aef24291 100644 --- a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy @@ -172,6 +172,8 @@ class UrlMappings { // Following api's are used by external mobile clients + "/ws/referenceAssessment/requestRecords"(controller: "referenceAssessment", action: "requestRecords") + "/ws/project/search"(controller: "project", action: 'search') "/ws/survey/list/$id"(controller: "project", action: 'listSurveys') "/ws/attachment/upload"(controller: "image", action: 'upload') diff --git a/grails-app/i18n/messages.properties b/grails-app/i18n/messages.properties index 9365e81ad..238d547ff 100644 --- a/grails-app/i18n/messages.properties +++ b/grails-app/i18n/messages.properties @@ -248,6 +248,7 @@ project.admin.members=Members project.admin.audit=Audit project.admin.editblog=Edit Project Blog project.admin.attachdoc=Attach Document +project.admin.referenceAssessment=Reference assessment project.admin.permissions.email=User\'s email address project.admin.permissions.level=Permission level diff --git a/grails-app/views/project/_CSAdmin.gsp b/grails-app/views/project/_CSAdmin.gsp index 21ae58fbd..1756e282b 100644 --- a/grails-app/views/project/_CSAdmin.gsp +++ b/grails-app/views/project/_CSAdmin.gsp @@ -15,6 +15,7 @@ + @@ -67,6 +68,10 @@
    + +
    + Reference assessment tab! +
    @@ -86,7 +91,6 @@
    -
    From 5787912e6719ecff05bc53d22ec8032f84d01f23 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Wed, 24 Jan 2024 11:17:44 +1000 Subject: [PATCH 073/115] Added reference & assessment survey selection dropdowns to project admin --- grails-app/views/project/_CSAdmin.gsp | 2 +- .../views/project/csProjectTemplate.gsp | 3 + .../views/referenceAssessment/_settings.gsp | 92 +++++++++++++++++++ 3 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 grails-app/views/referenceAssessment/_settings.gsp diff --git a/grails-app/views/project/_CSAdmin.gsp b/grails-app/views/project/_CSAdmin.gsp index 1756e282b..68f40a7e1 100644 --- a/grails-app/views/project/_CSAdmin.gsp +++ b/grails-app/views/project/_CSAdmin.gsp @@ -70,7 +70,7 @@
    - Reference assessment tab! +
    diff --git a/grails-app/views/project/csProjectTemplate.gsp b/grails-app/views/project/csProjectTemplate.gsp index c1828ee49..a7f9012aa 100644 --- a/grails-app/views/project/csProjectTemplate.gsp +++ b/grails-app/views/project/csProjectTemplate.gsp @@ -230,9 +230,12 @@ var pActivitiesVM = new ProjectActivitiesViewModel(params, projectViewModel); + var pAssessmentActivitiesVM = new ProjectActivitiesViewModel(params, projectViewModel); + console.log(params, projectViewModel, pAssessmentActivitiesVM); initialiseProjectActivitiesList(pActivitiesVM); initialiseData('project'); initialiseProjectActivitiesSettings(pActivitiesVM); + initialiseProjectAssessmentActivitiesSettings(pAssessmentActivitiesVM); diff --git a/grails-app/views/referenceAssessment/_settings.gsp b/grails-app/views/referenceAssessment/_settings.gsp new file mode 100644 index 000000000..a3ef09dcb --- /dev/null +++ b/grails-app/views/referenceAssessment/_settings.gsp @@ -0,0 +1,92 @@ + +

    Reference assessment settings

    + +

    Manage the configuration for reference assessment projects, where user-editable assessment records are created from a reference set.

    + +
    + +
    + +
    +
    +
    + + Select reference survey: +
    + + +
    + +
    +
    +
    +
    +
    +
    + + Select assessment survey: +
    + + +
    + +
    +
    +
    + + +
    + +
    + + + +
    + + + + function initialiseProjectAssessmentActivitiesSettings(pActivitiesVM) { + var pReferenceAssessmentActivitiesSettingsVM = new ProjectActivitiesSettingsViewModel(pActivitiesVM, 'project-reference-assessment-activities-result-placeholder'); + ko.applyBindings(pReferenceAssessmentActivitiesSettingsVM, document.getElementById('pReferenceAssessmentActivities')); + + // Delay subscription until the databinding has modified pActivity.pFormName if any + if(pReferenceAssessmentActivitiesSettingsVM.current()) { + pReferenceAssessmentActivitiesSettingsVM.current().transients.subscribeOrDisposePActivityFormName(true); + } + }; + + From 81fc6cdbf922dfc1801f3c39a57026ccbdae2495 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Wed, 31 Jan 2024 13:46:40 +1000 Subject: [PATCH 074/115] Fixed reference activity retrieval in requestRecords endpoint --- .../ReferenceAssessmentController.groovy | 29 ++++++++++++------- .../au/org/ala/biocollect/UrlMappings.groovy | 2 +- .../biocollect/merit/ProjectController.groovy | 2 +- .../biocollect/merit/ActivityService.groovy | 4 +++ 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 0915693d7..7de152370 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -8,28 +8,37 @@ class ReferenceAssessmentController { UserService userService ProjectService projectService RecordService recordService + ProjectActivityService projectActivityService + ActivityService activityService SearchService searchService + OutputService outputService + + + // Get details about the supplied project def requestRecords(String projectId) { def result - // Retrieve reference image records from reference project - GrailsParameterMap params = new GrailsParameterMap([:], request) - params["hub"] = "acsa" - // params["max"] = "30" - params["fq"] = "projectActivityNameFacet:The Dead Tree Detective" - + // Get details about the supplied project + def projectResult = projectService.get(projectId) + // Ensure the project is a reference assessment project + if (!projectResult || !projectResult.refAssessEnabled) { + response.status = 400 + result = [message: 'The supplied project is not configured for reference assessments'] + render result as JSON + return + } - Map searchResult = searchService.searchProjectActivity(params) - List activities = searchResult?.hits?.hits + // Get the activity records for the reference survey + def referenceActivities = activityService.activitiesForProjectActivity(projectResult.refAssessReferenceProjectActivityId) // Ensure records exist - if (activities?.size() == 0) { + if (referenceActivities?.size() == 0) { response.status = 404 result = [message: 'No records found in assessment image reference survey'] } else { - result = searchResult + result = referenceActivities } render result as JSON diff --git a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy index 3aef24291..03a326eb8 100644 --- a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy @@ -172,7 +172,7 @@ class UrlMappings { // Following api's are used by external mobile clients - "/ws/referenceAssessment/requestRecords"(controller: "referenceAssessment", action: "requestRecords") + "/ws/referenceAssessment/requestRecords/$projectId"(controller: "referenceAssessment", action: "requestRecords") "/ws/project/search"(controller: "project", action: 'search') "/ws/survey/list/$id"(controller: "project", action: 'listSurveys') diff --git a/grails-app/controllers/au/org/ala/biocollect/merit/ProjectController.groovy b/grails-app/controllers/au/org/ala/biocollect/merit/ProjectController.groovy index fe2a2f406..35ac02670 100644 --- a/grails-app/controllers/au/org/ala/biocollect/merit/ProjectController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/merit/ProjectController.groovy @@ -930,7 +930,7 @@ class ProjectController { List facets // format facets to a way acceptable for JS view model - if(searchResult.facets){ + if (searchResult.facets) { HubSettings hub = SettingService.hubConfig List allFacetConfig = hub.getFacetConfigForPage('projectFinder') ?: projectService.getDefaultFacets() List facetConfig = HubSettings.getFacetConfigForElasticSearch(allFacetConfig) diff --git a/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy b/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy index 7288aec23..027e075ed 100644 --- a/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy +++ b/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy @@ -215,6 +215,10 @@ class ActivityService { list } + def activitiesForProjectActivity(String id) { + webService.getJson(grailsApplication.config.ecodata.service.url + '/activitiesForProjectActivity/' + id)?.list + } + def submitActivitiesForPublication(activityIds) { updatePublicationStatus(activityIds, 'pendingApproval') } From b5af4024565762e42cd3fc3fb8a940f8e2e8887e Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Wed, 31 Jan 2024 13:56:40 +1000 Subject: [PATCH 075/115] Updated gradle.properties to change biocollectVersion --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 575bd24f5..b16400354 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.7 +biocollectVersion=6.8-REFASSESS-SNAPSHOT grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From adfdf186ea1c68067eb1793bec1edd082f8e4a91 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Thu, 1 Feb 2024 13:39:34 +1000 Subject: [PATCH 076/115] Added queryParams --- .../ReferenceAssessmentController.groovy | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 7de152370..62207e79c 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -19,6 +19,8 @@ class ReferenceAssessmentController { def requestRecords(String projectId) { def result + GrailsParameterMap queryParams = params + // Get details about the supplied project def projectResult = projectService.get(projectId) @@ -33,14 +35,18 @@ class ReferenceAssessmentController { // Get the activity records for the reference survey def referenceActivities = activityService.activitiesForProjectActivity(projectResult.refAssessReferenceProjectActivityId) - // Ensure records exist + // Ensure the reference records exist if (referenceActivities?.size() == 0) { response.status = 404 result = [message: 'No records found in assessment image reference survey'] - } else { - result = referenceActivities + render result as JSON + return } - render result as JSON + // Sort the reference activities by + // referenceActivities.sort { it.outputs[0].data.taxaRichness } + // referenceActivities.findAll { it.outputs[0].data.recordedBy == "Bruno Ferronato" } + + render referenceActivities as JSON } } From 83d7cefacb138b7c8d27892a688e527a29c81fc0 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Mon, 4 Mar 2024 14:49:27 +1000 Subject: [PATCH 077/115] First-pass non functional image assessment view --- grails-app/conf/application.groovy | 10 ++ .../org/ala/biocollect/HubController.groovy | 4 + .../ReferenceAssessmentController.groovy | 89 ++++++++++++++++-- .../au/org/ala/biocollect/UrlMappings.groovy | 6 ++ grails-app/views/project/_CSAdmin.gsp | 5 - .../views/referenceAssessment/_settings.gsp | 92 ------------------- .../referenceAssessment/requestRecords.gsp | 50 ++++++++++ 7 files changed, 149 insertions(+), 107 deletions(-) delete mode 100644 grails-app/views/referenceAssessment/_settings.gsp create mode 100644 grails-app/views/referenceAssessment/requestRecords.gsp diff --git a/grails-app/conf/application.groovy b/grails-app/conf/application.groovy index 296b787ad..39ff5f511 100644 --- a/grails-app/conf/application.groovy +++ b/grails-app/conf/application.groovy @@ -674,3 +674,13 @@ if (!app.file.script.path) { app.file.script.path = "/data/biocollect/scripts" } script.read.extensions.list = ['js','min.js','png', 'json', 'jpg', 'jpeg'] + + + +refAssess.hub = 'hcat' +refAssess.title = 'Image Assessment' +refAssess.reference.filterName = 'Vegetation Type' +refAssess.reference.filterTypes = ['Vegetation Type One', 'Vegetation Type Two', 'Another Vegetation Type'] +refAssess.reference.projectActivityId = 'e0ce9fcc-77f2-4349-825f-9ea442c1c239' +refAssess.assessment.projectActivityId = 'e61eb018-02a9-4e3b-a4b3-9d6be33d9cbb' +refAssess.assessment.recordsToCreate = 3 diff --git a/grails-app/controllers/au/org/ala/biocollect/HubController.groovy b/grails-app/controllers/au/org/ala/biocollect/HubController.groovy index 8b7499d5e..7712bf748 100644 --- a/grails-app/controllers/au/org/ala/biocollect/HubController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/HubController.groovy @@ -71,4 +71,8 @@ class HubController { render text: result.css, contentType: 'text/css', status: result.status } + + def requestAssessmentRecords() { + render view: '/referenceAssessment/requestRecords' + } } diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 62207e79c..3b0a9fb32 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -4,28 +4,84 @@ import au.org.ala.biocollect.merit.* import grails.converters.JSON import grails.web.servlet.mvc.GrailsParameterMap +import java.time.Instant + class ReferenceAssessmentController { UserService userService ProjectService projectService - RecordService recordService ProjectActivityService projectActivityService ActivityService activityService - SearchService searchService - OutputService outputService + + + private def mapReferenceToAssessment(Object referenceActivity, Object assessProjectActivity) { + def assessActivity = referenceActivity + + // Remove irrelevant fields + ["assessment", "complete", "dateCreated", "id", "lastUpdated", "progress", "status"] + .each { + assessActivity.remove(it) + } + + // Overwrite activity record IDs + assessActivity.activityId = "" + assessActivity.projectActivityId = assessProjectActivity["projectActivityId"] + assessActivity.type = assessProjectActivity["pActivityFormName"] + assessActivity.userId = userService.getCurrentUserId() + + // Overwrite activity outputs + assessActivity.outputs.each { + output -> { + output.remove("id") + output.remove("activityId") + output.remove("lastUpdated") + output.remove("dateCreated") + output.remove("status") + + // Overwrite properties + output.outputId = "" + output.outputNotCompleted = true + output.name = assessProjectActivity["pActivityFormName"] + + ["lastUpdated", "dateCreated", "id"].each({ output.remove(it) }) + + // Output data + output.data.recordedBy = userService.getCurrentUserDisplayName() + } + } + + assessActivity + } // Get details about the supplied project def requestRecords(String projectId) { + def config = grailsApplication.config.refAssess def result - GrailsParameterMap queryParams = params + // GrailsParameterMap queryParams = params + + // Ensure BioCollect is configured for reference assessment projects + if (!config) { + response.status = 500 + result = [message: 'The application is not configured for reference assessment projects'] + render result as JSON + return + } + + // Ensure the user is authenticated + if (!userService.getCurrentUserId()) { + response.status = 403 + result = [message: 'User is not authenticated'] + render result as JSON + return + } // Get details about the supplied project def projectResult = projectService.get(projectId) // Ensure the project is a reference assessment project - if (!projectResult || !projectResult.refAssessEnabled) { + if (!projectResult) { response.status = 400 result = [message: 'The supplied project is not configured for reference assessments'] render result as JSON @@ -33,20 +89,33 @@ class ReferenceAssessmentController { } // Get the activity records for the reference survey - def referenceActivities = activityService.activitiesForProjectActivity(projectResult.refAssessReferenceProjectActivityId) + def refActivities = activityService.activitiesForProjectActivity(config.reference.projectActivityId) // Ensure the reference records exist - if (referenceActivities?.size() == 0) { + def numRefActivities = refActivities?.size() + if (numRefActivities == 0 || numRefActivities < config.assessment.recordsToCreate) { response.status = 404 - result = [message: 'No records found in assessment image reference survey'] + result = [message: 'Insufficient number of reference records found in reference survey'] render result as JSON return } // Sort the reference activities by - // referenceActivities.sort { it.outputs[0].data.taxaRichness } + // referenceActivities.sort { it.outputs[0].data.numTimesReferenced } // referenceActivities.findAll { it.outputs[0].data.recordedBy == "Bruno Ferronato" } - render referenceActivities as JSON + + def assessProjectActivity = projectActivityService.get(config.assessment.projectActivityId) + def assessActivities = [] + for (int projectIndex = 0; projectIndex < config.assessment.recordsToCreate; projectIndex++) { + assessActivities.push( + mapReferenceToAssessment( + refActivities[projectIndex], + assessProjectActivity + ) + ) + } + + render assessActivities as JSON } } diff --git a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy index 03a326eb8..6b398c6b3 100644 --- a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy @@ -83,6 +83,12 @@ class UrlMappings { } } + "/$hub/requestAssessmentRecords"(controller: 'hub', action: 'requestAssessmentRecords') { + constraints { + hub validator: {val, obj -> isHubValid(val) && val == grailsApplication.config.refAssess.hub} + } + } + "/$hub/nocas/geoService"(controller: 'home', action: 'geoService') { constraints { hub validator: {val, obj -> isHubValid( val)} diff --git a/grails-app/views/project/_CSAdmin.gsp b/grails-app/views/project/_CSAdmin.gsp index 68f40a7e1..54f21c806 100644 --- a/grails-app/views/project/_CSAdmin.gsp +++ b/grails-app/views/project/_CSAdmin.gsp @@ -15,7 +15,6 @@ -
    @@ -68,10 +67,6 @@
    - -
    - -
    diff --git a/grails-app/views/referenceAssessment/_settings.gsp b/grails-app/views/referenceAssessment/_settings.gsp deleted file mode 100644 index a3ef09dcb..000000000 --- a/grails-app/views/referenceAssessment/_settings.gsp +++ /dev/null @@ -1,92 +0,0 @@ - -

    Reference assessment settings

    - -

    Manage the configuration for reference assessment projects, where user-editable assessment records are created from a reference set.

    - -
    - -
    - -
    -
    -
    - - Select reference survey: -
    - - -
    - -
    -
    -
    -
    -
    -
    - - Select assessment survey: -
    - - -
    - -
    -
    -
    - - -
    - -
    - - - -
    - - - - function initialiseProjectAssessmentActivitiesSettings(pActivitiesVM) { - var pReferenceAssessmentActivitiesSettingsVM = new ProjectActivitiesSettingsViewModel(pActivitiesVM, 'project-reference-assessment-activities-result-placeholder'); - ko.applyBindings(pReferenceAssessmentActivitiesSettingsVM, document.getElementById('pReferenceAssessmentActivities')); - - // Delay subscription until the databinding has modified pActivity.pFormName if any - if(pReferenceAssessmentActivitiesSettingsVM.current()) { - pReferenceAssessmentActivitiesSettingsVM.current().transients.subscribeOrDisposePActivityFormName(true); - } - }; - - diff --git a/grails-app/views/referenceAssessment/requestRecords.gsp b/grails-app/views/referenceAssessment/requestRecords.gsp new file mode 100644 index 000000000..c286fd2da --- /dev/null +++ b/grails-app/views/referenceAssessment/requestRecords.gsp @@ -0,0 +1,50 @@ +<%@ page contentType="text/html;charset=UTF-8" %> + + + + + ${config.title} + + + + ${config.title} + + +
    +
    +
    +
    +

    Step One

    +

    Select the type of assessment records you'd like to assess

    + +
    +
    +
    +
    +

    Step Two

    +

    Request the records

    + + + Request Records + +
    +
    +
    + + \ No newline at end of file From 14647bd1436367647034def864ee3194d8f76144 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Tue, 5 Mar 2024 16:11:40 +1000 Subject: [PATCH 078/115] First-pass interactive record requesting UI --- .../requestAssessmentRecordsModel.js | 35 +++++++++ .../stylesheets/reference-assessment.css | 23 ++++++ grails-app/conf/application.groovy | 30 +++++++- .../referenceAssessment/requestRecords.gsp | 71 +++++++++++-------- 4 files changed, 129 insertions(+), 30 deletions(-) create mode 100644 grails-app/assets/javascripts/requestAssessmentRecordsModel.js create mode 100644 grails-app/assets/stylesheets/reference-assessment.css diff --git a/grails-app/assets/javascripts/requestAssessmentRecordsModel.js b/grails-app/assets/javascripts/requestAssessmentRecordsModel.js new file mode 100644 index 000000000..901b92779 --- /dev/null +++ b/grails-app/assets/javascripts/requestAssessmentRecordsModel.js @@ -0,0 +1,35 @@ +//= require knockout/3.4.0/knockout-3.4.0.js +//= require knockout/3.4.0/knockout-3.4.0.debug.js + +var RequestAssessmentRecordsModel = function(filterGroupMapping){ + const self = this; + this.filters = Object.keys(filterGroupMapping); + this.selected = ko.observableArray([]); + this.deIdentify = ko.observable(false); + this.isLoading = ko.observable(false); + + this.isFilterSelected = function(filter) { + return self.selected.indexOf(filter) > -1; + } + + this.onFilterSelect = function(filter) { + // Only allow for user interaction if we're not already loading a request + if (!self.isLoading()) { + if (self.isFilterSelected(filter)) { + self.selected.remove(filter); + } else { + self.selected.push(filter); + } + } + } + + this.onRequestRecords = function() { + // Update the loading flag + self.isLoading(true); + + const selectedGroups = self.selected().map((filter) => filterGroupMapping[filter]); + const unique = Array.from(new Set(selectedGroups)) + + console.log(unique, self.deIdentify()); + } +} \ No newline at end of file diff --git a/grails-app/assets/stylesheets/reference-assessment.css b/grails-app/assets/stylesheets/reference-assessment.css new file mode 100644 index 000000000..707c36510 --- /dev/null +++ b/grails-app/assets/stylesheets/reference-assessment.css @@ -0,0 +1,23 @@ + + +.ref-assess-filters-list { + max-height: 200px; + overflow-y: scroll; +} + +.ref-assess-filters-list > div { + cursor: pointer; +} + +.ref-assess-filters-list > div.disabled { + cursor: default; +} + +.ref-assess-identify-text { + font-family: 'Lato', sans-serif; + font-size: 18px; +} + +.ref-assess-identify-card { + transition: all cubic-bezier(0, 0, 0.15, 1) 250ms; +} \ No newline at end of file diff --git a/grails-app/conf/application.groovy b/grails-app/conf/application.groovy index 39ff5f511..476b97257 100644 --- a/grails-app/conf/application.groovy +++ b/grails-app/conf/application.groovy @@ -679,8 +679,34 @@ script.read.extensions.list = ['js','min.js','png', 'json', 'jpg', 'jpeg'] refAssess.hub = 'hcat' refAssess.title = 'Image Assessment' -refAssess.reference.filterName = 'Vegetation Type' -refAssess.reference.filterTypes = ['Vegetation Type One', 'Vegetation Type Two', 'Another Vegetation Type'] +refAssess.reference.filterName = 'vegetation groups' +refAssess.reference.filterTypes = [ + "Acacia Forests and Woodlands": "Open forest and woodland", + "Acacia Open Woodlands": "Shrublands", + "Acacia Shrublands": "Shrublands", + "Callitris Forests and Woodlands": "Open forest and woodland", + "Casuarina Forests and Woodlands": "Open forest and woodland", + "Chenopod Shrublands, Samphire Shrublands and Forblands": "Grasslands", + "Eucalypt Low Open Forests": "Open forest and woodland", + "Eucalypt Open Forests": "Open forest and woodland", + "Eucalypt Open Woodlands": "Open forest and woodland", + "Eucalypt Tall Open Forests": "Wet and closed forests and thickets", + "Eucalypt Woodlands": "Open forest and woodland", + "Heathlands": "Shrublands", + "Hummock Grasslands": "Grasslands", + "Low Closed Forests and Tall Closed Shrublands": "Shrublands", + "Mallee Open Woodlands and Sparse Mallee Shrublands": "Shrublands", + "Mallee Woodlands and Shrublands": "Shrublands", + "Mangroves": "Shrublands", + "Melaleuca Forests and Woodlands": "Open forest and woodland", + "Naturally Bare - sand, rock, claypan, mudflat": "Grasslands", + "Other Forests and Woodlands": "Open forest and woodland", + "Other Grasslands, Herblands, Sedgelands and Rushlands": "Grasslands", + "Other Shrublands": "Shrublands", + "Rainforests and Vine Thickets": "Wet and closed forests and thickets", + "Tropical Eucalypt Woodlands/Grasslands": "Open forest and woodland", + "Tussock Grasslands": "Grasslands" +] refAssess.reference.projectActivityId = 'e0ce9fcc-77f2-4349-825f-9ea442c1c239' refAssess.assessment.projectActivityId = 'e61eb018-02a9-4e3b-a4b3-9d6be33d9cbb' refAssess.assessment.recordsToCreate = 3 diff --git a/grails-app/views/referenceAssessment/requestRecords.gsp b/grails-app/views/referenceAssessment/requestRecords.gsp index c286fd2da..f170c5d8e 100644 --- a/grails-app/views/referenceAssessment/requestRecords.gsp +++ b/grails-app/views/referenceAssessment/requestRecords.gsp @@ -4,6 +4,9 @@ ${config.title} + + + @@ -12,39 +15,51 @@
    -
    +
    -

    Step One

    -

    Select the type of assessment records you'd like to assess

    -
    -
    -

    Step Two

    -

    Request the records

    - - - Request Records - -
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    -
    + + const requestAssessmentRecordsVM = new RequestAssessmentRecordsModel( + + ); + + ko.applyBindings(requestAssessmentRecordsVM); + \ No newline at end of file From 6eeadcba1bb56f5513fd9d4540062afc1a074f50 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Wed, 6 Mar 2024 09:36:24 +1000 Subject: [PATCH 079/115] Moved the requestAssessmentRecords controller view rendering from hub to referenceAssessment controller --- .../au/org/ala/biocollect/HubController.groovy | 4 ---- .../ala/biocollect/ReferenceAssessmentController.groovy | 9 +++++++++ .../controllers/au/org/ala/biocollect/UrlMappings.groovy | 2 +- .../{requestRecords.gsp => requestAssessmentRecords.gsp} | 0 4 files changed, 10 insertions(+), 5 deletions(-) rename grails-app/views/referenceAssessment/{requestRecords.gsp => requestAssessmentRecords.gsp} (100%) diff --git a/grails-app/controllers/au/org/ala/biocollect/HubController.groovy b/grails-app/controllers/au/org/ala/biocollect/HubController.groovy index 7712bf748..8b7499d5e 100644 --- a/grails-app/controllers/au/org/ala/biocollect/HubController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/HubController.groovy @@ -71,8 +71,4 @@ class HubController { render text: result.css, contentType: 'text/css', status: result.status } - - def requestAssessmentRecords() { - render view: '/referenceAssessment/requestRecords' - } } diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 3b0a9fb32..96218e0a9 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -118,4 +118,13 @@ class ReferenceAssessmentController { render assessActivities as JSON } + + def show() { + def user = userService.getUser() + if (!user) { + redirect(controller: 'hub') + } else { + render view: 'requestAssessmentRecords' + } + } } diff --git a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy index 6b398c6b3..7691774fb 100644 --- a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy @@ -83,7 +83,7 @@ class UrlMappings { } } - "/$hub/requestAssessmentRecords"(controller: 'hub', action: 'requestAssessmentRecords') { + "/$hub/requestAssessmentRecords"(controller: 'referenceAssessment', action: 'show') { constraints { hub validator: {val, obj -> isHubValid(val) && val == grailsApplication.config.refAssess.hub} } diff --git a/grails-app/views/referenceAssessment/requestRecords.gsp b/grails-app/views/referenceAssessment/requestAssessmentRecords.gsp similarity index 100% rename from grails-app/views/referenceAssessment/requestRecords.gsp rename to grails-app/views/referenceAssessment/requestAssessmentRecords.gsp From 6c03aac13d887d743c04248f7b6c34de08b7a610 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Thu, 14 Mar 2024 11:56:53 +1000 Subject: [PATCH 080/115] Removed bespoke implementation for assessment record request view, added knockout lib to static page --- .../assets/javascripts/knockout-core.js | 1 + .../requestAssessmentRecordsModel.js | 35 ---------- .../stylesheets/reference-assessment.css | 23 ------- grails-app/conf/application.groovy | 33 +--------- .../ReferenceAssessmentController.groovy | 9 --- .../au/org/ala/biocollect/UrlMappings.groovy | 6 -- .../requestAssessmentRecords.gsp | 65 ------------------- grails-app/views/staticPage/index.gsp | 1 + 8 files changed, 4 insertions(+), 169 deletions(-) create mode 100644 grails-app/assets/javascripts/knockout-core.js delete mode 100644 grails-app/assets/javascripts/requestAssessmentRecordsModel.js delete mode 100644 grails-app/assets/stylesheets/reference-assessment.css delete mode 100644 grails-app/views/referenceAssessment/requestAssessmentRecords.gsp diff --git a/grails-app/assets/javascripts/knockout-core.js b/grails-app/assets/javascripts/knockout-core.js new file mode 100644 index 000000000..513bb3424 --- /dev/null +++ b/grails-app/assets/javascripts/knockout-core.js @@ -0,0 +1 @@ +//= require knockout/3.4.0/knockout-3.4.0.js \ No newline at end of file diff --git a/grails-app/assets/javascripts/requestAssessmentRecordsModel.js b/grails-app/assets/javascripts/requestAssessmentRecordsModel.js deleted file mode 100644 index 901b92779..000000000 --- a/grails-app/assets/javascripts/requestAssessmentRecordsModel.js +++ /dev/null @@ -1,35 +0,0 @@ -//= require knockout/3.4.0/knockout-3.4.0.js -//= require knockout/3.4.0/knockout-3.4.0.debug.js - -var RequestAssessmentRecordsModel = function(filterGroupMapping){ - const self = this; - this.filters = Object.keys(filterGroupMapping); - this.selected = ko.observableArray([]); - this.deIdentify = ko.observable(false); - this.isLoading = ko.observable(false); - - this.isFilterSelected = function(filter) { - return self.selected.indexOf(filter) > -1; - } - - this.onFilterSelect = function(filter) { - // Only allow for user interaction if we're not already loading a request - if (!self.isLoading()) { - if (self.isFilterSelected(filter)) { - self.selected.remove(filter); - } else { - self.selected.push(filter); - } - } - } - - this.onRequestRecords = function() { - // Update the loading flag - self.isLoading(true); - - const selectedGroups = self.selected().map((filter) => filterGroupMapping[filter]); - const unique = Array.from(new Set(selectedGroups)) - - console.log(unique, self.deIdentify()); - } -} \ No newline at end of file diff --git a/grails-app/assets/stylesheets/reference-assessment.css b/grails-app/assets/stylesheets/reference-assessment.css deleted file mode 100644 index 707c36510..000000000 --- a/grails-app/assets/stylesheets/reference-assessment.css +++ /dev/null @@ -1,23 +0,0 @@ - - -.ref-assess-filters-list { - max-height: 200px; - overflow-y: scroll; -} - -.ref-assess-filters-list > div { - cursor: pointer; -} - -.ref-assess-filters-list > div.disabled { - cursor: default; -} - -.ref-assess-identify-text { - font-family: 'Lato', sans-serif; - font-size: 18px; -} - -.ref-assess-identify-card { - transition: all cubic-bezier(0, 0, 0.15, 1) 250ms; -} \ No newline at end of file diff --git a/grails-app/conf/application.groovy b/grails-app/conf/application.groovy index 476b97257..fc25f3bb4 100644 --- a/grails-app/conf/application.groovy +++ b/grails-app/conf/application.groovy @@ -678,35 +678,6 @@ script.read.extensions.list = ['js','min.js','png', 'json', 'jpg', 'jpeg'] refAssess.hub = 'hcat' -refAssess.title = 'Image Assessment' -refAssess.reference.filterName = 'vegetation groups' -refAssess.reference.filterTypes = [ - "Acacia Forests and Woodlands": "Open forest and woodland", - "Acacia Open Woodlands": "Shrublands", - "Acacia Shrublands": "Shrublands", - "Callitris Forests and Woodlands": "Open forest and woodland", - "Casuarina Forests and Woodlands": "Open forest and woodland", - "Chenopod Shrublands, Samphire Shrublands and Forblands": "Grasslands", - "Eucalypt Low Open Forests": "Open forest and woodland", - "Eucalypt Open Forests": "Open forest and woodland", - "Eucalypt Open Woodlands": "Open forest and woodland", - "Eucalypt Tall Open Forests": "Wet and closed forests and thickets", - "Eucalypt Woodlands": "Open forest and woodland", - "Heathlands": "Shrublands", - "Hummock Grasslands": "Grasslands", - "Low Closed Forests and Tall Closed Shrublands": "Shrublands", - "Mallee Open Woodlands and Sparse Mallee Shrublands": "Shrublands", - "Mallee Woodlands and Shrublands": "Shrublands", - "Mangroves": "Shrublands", - "Melaleuca Forests and Woodlands": "Open forest and woodland", - "Naturally Bare - sand, rock, claypan, mudflat": "Grasslands", - "Other Forests and Woodlands": "Open forest and woodland", - "Other Grasslands, Herblands, Sedgelands and Rushlands": "Grasslands", - "Other Shrublands": "Shrublands", - "Rainforests and Vine Thickets": "Wet and closed forests and thickets", - "Tropical Eucalypt Woodlands/Grasslands": "Open forest and woodland", - "Tussock Grasslands": "Grasslands" -] -refAssess.reference.projectActivityId = 'e0ce9fcc-77f2-4349-825f-9ea442c1c239' -refAssess.assessment.projectActivityId = 'e61eb018-02a9-4e3b-a4b3-9d6be33d9cbb' +refAssess.reference.projectActivityId = 'e5a03b7e-17e3-4ea0-872f-d2a58a1becd7' +refAssess.assessment.projectActivityId = '5da93123-96b3-4209-b3ca-527749cd7970' refAssess.assessment.recordsToCreate = 3 diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 96218e0a9..3b0a9fb32 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -118,13 +118,4 @@ class ReferenceAssessmentController { render assessActivities as JSON } - - def show() { - def user = userService.getUser() - if (!user) { - redirect(controller: 'hub') - } else { - render view: 'requestAssessmentRecords' - } - } } diff --git a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy index 7691774fb..03a326eb8 100644 --- a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy @@ -83,12 +83,6 @@ class UrlMappings { } } - "/$hub/requestAssessmentRecords"(controller: 'referenceAssessment', action: 'show') { - constraints { - hub validator: {val, obj -> isHubValid(val) && val == grailsApplication.config.refAssess.hub} - } - } - "/$hub/nocas/geoService"(controller: 'home', action: 'geoService') { constraints { hub validator: {val, obj -> isHubValid( val)} diff --git a/grails-app/views/referenceAssessment/requestAssessmentRecords.gsp b/grails-app/views/referenceAssessment/requestAssessmentRecords.gsp deleted file mode 100644 index f170c5d8e..000000000 --- a/grails-app/views/referenceAssessment/requestAssessmentRecords.gsp +++ /dev/null @@ -1,65 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" %> - - - - - ${config.title} - - - - - - - ${config.title} - - -
    -
    -
    -
    -

    Select the ${config.reference.filterName} you'd like to assess

    -
    - - - -
    -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    - - const requestAssessmentRecordsVM = new RequestAssessmentRecordsModel( - - ); - - ko.applyBindings(requestAssessmentRecordsVM); - - - \ No newline at end of file diff --git a/grails-app/views/staticPage/index.gsp b/grails-app/views/staticPage/index.gsp index 5f6dcd391..6f81d9dac 100644 --- a/grails-app/views/staticPage/index.gsp +++ b/grails-app/views/staticPage/index.gsp @@ -21,6 +21,7 @@ + From fa3956a63ca7e4993d4471e92b467db94b3b06f4 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Tue, 19 Mar 2024 10:49:53 +1000 Subject: [PATCH 081/115] First-pass working implementation of assessment record creation --- grails-app/conf/application.groovy | 1 + .../ReferenceAssessmentController.groovy | 84 ++++++++++--------- 2 files changed, 46 insertions(+), 39 deletions(-) diff --git a/grails-app/conf/application.groovy b/grails-app/conf/application.groovy index fc25f3bb4..86ba9c2d3 100644 --- a/grails-app/conf/application.groovy +++ b/grails-app/conf/application.groovy @@ -679,5 +679,6 @@ script.read.extensions.list = ['js','min.js','png', 'json', 'jpg', 'jpeg'] refAssess.hub = 'hcat' refAssess.reference.projectActivityId = 'e5a03b7e-17e3-4ea0-872f-d2a58a1becd7' +refAssess.reference.filterKey = 'vegetationStructureGroup' refAssess.assessment.projectActivityId = '5da93123-96b3-4209-b3ca-527749cd7970' refAssess.assessment.recordsToCreate = 3 diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 3b0a9fb32..547049c65 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -13,41 +13,33 @@ class ReferenceAssessmentController { ActivityService activityService - private def mapReferenceToAssessment(Object referenceActivity, Object assessProjectActivity) { - def assessActivity = referenceActivity - - // Remove irrelevant fields - ["assessment", "complete", "dateCreated", "id", "lastUpdated", "progress", "status"] - .each { - assessActivity.remove(it) - } - - // Overwrite activity record IDs - assessActivity.activityId = "" - assessActivity.projectActivityId = assessProjectActivity["projectActivityId"] - assessActivity.type = assessProjectActivity["pActivityFormName"] - assessActivity.userId = userService.getCurrentUserId() - - // Overwrite activity outputs - assessActivity.outputs.each { - output -> { - output.remove("id") - output.remove("activityId") - output.remove("lastUpdated") - output.remove("dateCreated") - output.remove("status") - - // Overwrite properties - output.outputId = "" - output.outputNotCompleted = true - output.name = assessProjectActivity["pActivityFormName"] - - ["lastUpdated", "dateCreated", "id"].each({ output.remove(it) }) - - // Output data - output.data.recordedBy = userService.getCurrentUserDisplayName() - } - } + private def createAssessmentRecordFromReference(Object referenceActivity, Object assessProjectActivity) { + def assessActivity = [ + outputs: [ + [ + outputId: "", + outputNotCompleted: false, + data: [ + recordedBy: userService.getCurrentUserDisplayName(), + upperConditionBound: "0", + lowerConditionBound: "0", + overallConditionBestEstimate: "0", + mvgGroup: referenceActivity.outputs[0].data.vegetationStructureGroup, + huchinsonGroup: referenceActivity.outputs[0].data.huchinsonGroup + ], + name: assessProjectActivity["pActivityFormName"] + ] + ], + projectActivityId: assessProjectActivity["projectActivityId"], + userId: userService.getCurrentUserId(), + projectStage: "", + embargoed: false, + type: assessProjectActivity["pActivityFormName"], + projectId: assessProjectActivity["projectId"], + mainTheme: "" + ] + + activityService.update("", assessActivity) assessActivity } @@ -59,7 +51,14 @@ class ReferenceAssessmentController { def config = grailsApplication.config.refAssess def result - // GrailsParameterMap queryParams = params + // Ensure we're provided with a filter query item + GrailsParameterMap queryParams = params + if (!queryParams[config.reference.filterKey]) { + response.status = 500 + result = [message: "Missing '${config.reference.filterKey}' parameter!"] + render result as JSON + return + } // Ensure BioCollect is configured for reference assessment projects if (!config) { @@ -101,15 +100,22 @@ class ReferenceAssessmentController { } // Sort the reference activities by - // referenceActivities.sort { it.outputs[0].data.numTimesReferenced } - // referenceActivities.findAll { it.outputs[0].data.recordedBy == "Bruno Ferronato" } + refActivities = refActivities.sort { it.outputs[0].data.numTimesReferenced } + refActivities = refActivities.findAll { it.outputs[0].data[config.reference.filterKey] == queryParams[config.reference.filterKey]} + // Ensure there are reference records after filtering + if (refActivities.size() < config.assessment.recordsToCreate) { + response.status = 400 + result = [message: "Insufficient number of reference records for '${config.reference.filterKey}' filter (${queryParams[config.reference.filterKey]})"] + render result as JSON + return + } def assessProjectActivity = projectActivityService.get(config.assessment.projectActivityId) def assessActivities = [] for (int projectIndex = 0; projectIndex < config.assessment.recordsToCreate; projectIndex++) { assessActivities.push( - mapReferenceToAssessment( + createAssessmentRecordFromReference( refActivities[projectIndex], assessProjectActivity ) From a08f83af7b6f3b8cbff9f95a570ab68cf5296392 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Wed, 27 Mar 2024 11:59:37 +1000 Subject: [PATCH 082/115] Further refactoring to record creation process --- grails-app/conf/application.groovy | 3 +- .../ReferenceAssessmentController.groovy | 76 +++++++++++-------- .../au/org/ala/biocollect/UrlMappings.groovy | 3 +- 3 files changed, 49 insertions(+), 33 deletions(-) diff --git a/grails-app/conf/application.groovy b/grails-app/conf/application.groovy index 86ba9c2d3..9f4b197d3 100644 --- a/grails-app/conf/application.groovy +++ b/grails-app/conf/application.groovy @@ -679,6 +679,5 @@ script.read.extensions.list = ['js','min.js','png', 'json', 'jpg', 'jpeg'] refAssess.hub = 'hcat' refAssess.reference.projectActivityId = 'e5a03b7e-17e3-4ea0-872f-d2a58a1becd7' -refAssess.reference.filterKey = 'vegetationStructureGroup' refAssess.assessment.projectActivityId = '5da93123-96b3-4209-b3ca-527749cd7970' -refAssess.assessment.recordsToCreate = 3 +refAssess.assessment.maxRecordsToCreate = 8 diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 547049c65..6a1084fa3 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -39,31 +39,35 @@ class ReferenceAssessmentController { mainTheme: "" ] + // Create the new assessment activity record activityService.update("", assessActivity) + // Update the numTimesReferenced field on the reference record + referenceActivity.outputs[0].data.numTimesReferenced = + referenceActivity.outputs[0].data.numTimesReferenced as Integer + 1 + activityService.update(referenceActivity.activityId, referenceActivity) + + // Return the assessment activity assessActivity } - - // Get details about the supplied project - - def requestRecords(String projectId) { + def requestRecords() { def config = grailsApplication.config.refAssess + def body = request.JSON def result - // Ensure we're provided with a filter query item - GrailsParameterMap queryParams = params - if (!queryParams[config.reference.filterKey]) { + // Ensure BioCollect is configured for reference assessment projects + if (!config) { response.status = 500 - result = [message: "Missing '${config.reference.filterKey}' parameter!"] + result = [message: 'The application is not configured for reference assessment projects'] render result as JSON return } - // Ensure BioCollect is configured for reference assessment projects - if (!config) { - response.status = 500 - result = [message: 'The application is not configured for reference assessment projects'] + // Ensure the body of the request contains the required fields + if (!body['vegetationStructureGroups'] || !body['climateGroups'] || !body.keySet().contains('deIdentify')) { + response.status = 400 + result = [message: 'Please ensure the assessment record request contains all relevant fields'] render result as JSON return } @@ -76,44 +80,56 @@ class ReferenceAssessmentController { return } - // Get details about the supplied project - def projectResult = projectService.get(projectId) - - // Ensure the project is a reference assessment project - if (!projectResult) { - response.status = 400 - result = [message: 'The supplied project is not configured for reference assessments'] - render result as JSON - return - } - // Get the activity records for the reference survey def refActivities = activityService.activitiesForProjectActivity(config.reference.projectActivityId) // Ensure the reference records exist def numRefActivities = refActivities?.size() - if (numRefActivities == 0 || numRefActivities < config.assessment.recordsToCreate) { + if (numRefActivities == 0 || numRefActivities < config.assessment.maxRecordsToCreate) { response.status = 404 result = [message: 'Insufficient number of reference records found in reference survey'] render result as JSON return } - // Sort the reference activities by - refActivities = refActivities.sort { it.outputs[0].data.numTimesReferenced } - refActivities = refActivities.findAll { it.outputs[0].data[config.reference.filterKey] == queryParams[config.reference.filterKey]} + // Filter out reference activities by the supplied vegetation structure groups & climate groups + refActivities = refActivities.findAll { + body["vegetationStructureGroups"].contains(it.outputs[0].data["vegetationStructureGroup"]) && + body["climateGroups"].contains(it.outputs[0].data["huchinsonGroup"]) + } + + // Split & sort the reference activities into: + // Priority records (assessed <= 3 times), prioritising records assessed the MOST + // Other records (assessed > 3 times), prioritising records assessed the LEAST + + def priorityRecords = refActivities + .findAll { it.outputs[0].data.numTimesReferenced as Integer <= 3 } + .sort{ -(it.outputs[0].data.numTimesReferenced as Integer) } + def otherRecords = refActivities + .findAll { it.outputs[0].data.numTimesReferenced as Integer > 3 } + .sort{ it.outputs[0].data.numTimesReferenced as Integer } + + // Combine the two lists + refActivities = priorityRecords + otherRecords + +// if (true) { +// response.status = 200 +// result = [message: 'Test!'] +// render result as JSON +// return +// } // Ensure there are reference records after filtering - if (refActivities.size() < config.assessment.recordsToCreate) { + if (refActivities.size() == 0) { response.status = 400 - result = [message: "Insufficient number of reference records for '${config.reference.filterKey}' filter (${queryParams[config.reference.filterKey]})"] + result = [message: "No reference images matching your criteria could be found."] render result as JSON return } def assessProjectActivity = projectActivityService.get(config.assessment.projectActivityId) def assessActivities = [] - for (int projectIndex = 0; projectIndex < config.assessment.recordsToCreate; projectIndex++) { + for (int projectIndex = 0; projectIndex < min(config.assessment.maxRecordsToCreate, refActivities.size()); projectIndex++) { assessActivities.push( createAssessmentRecordFromReference( refActivities[projectIndex], diff --git a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy index 03a326eb8..dbb68b009 100644 --- a/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/UrlMappings.groovy @@ -167,12 +167,13 @@ class UrlMappings { format = 'json' } + "/referenceAssessment/requestRecords"(controller: "referenceAssessment", action: [POST: "requestRecords"]) + "500"(controller:'error', action:'response500') "404"(controller:'error', action:'response404') // Following api's are used by external mobile clients - "/ws/referenceAssessment/requestRecords/$projectId"(controller: "referenceAssessment", action: "requestRecords") "/ws/project/search"(controller: "project", action: 'search') "/ws/survey/list/$id"(controller: "project", action: 'listSurveys') From 8488b13a2959250cec9294d6a8f4f48260120825 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Wed, 27 Mar 2024 15:33:52 +1000 Subject: [PATCH 083/115] Fixed image uploading for assessment records, switched knockout-core reference to common.js --- .../assets/javascripts/knockout-core.js | 1 - .../ReferenceAssessmentController.groovy | 39 +++++++++++++------ grails-app/views/staticPage/index.gsp | 2 +- 3 files changed, 29 insertions(+), 13 deletions(-) delete mode 100644 grails-app/assets/javascripts/knockout-core.js diff --git a/grails-app/assets/javascripts/knockout-core.js b/grails-app/assets/javascripts/knockout-core.js deleted file mode 100644 index 513bb3424..000000000 --- a/grails-app/assets/javascripts/knockout-core.js +++ /dev/null @@ -1 +0,0 @@ -//= require knockout/3.4.0/knockout-3.4.0.js \ No newline at end of file diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 6a1084fa3..5c5821be3 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -8,12 +8,29 @@ import java.time.Instant class ReferenceAssessmentController { UserService userService - ProjectService projectService ProjectActivityService projectActivityService ActivityService activityService private def createAssessmentRecordFromReference(Object referenceActivity, Object assessProjectActivity) { + def refDoc = referenceActivity.documents[0] + def assessPhoto = [ + licence: refDoc["licence"], + notes: refDoc["notes"], + filesize: refDoc["filesize"], + staged: true, + url: grailsApplication.config.serverURL + refDoc["url"], + filename: refDoc["filename"], + attribution: referenceActivity.outputs[0].data["imageAttribution"], + name: refDoc["name"], + documentId: '', + contentType: refDoc["contentType"], + dateTaken: refDoc["dateTaken"], + formattedSize: refDoc["formattedSize"], + thumbnailUrl: grailsApplication.config.serverURL + refDoc["thumbnailUrl"], + status: "active" + ] + def assessActivity = [ outputs: [ [ @@ -25,7 +42,8 @@ class ReferenceAssessmentController { lowerConditionBound: "0", overallConditionBestEstimate: "0", mvgGroup: referenceActivity.outputs[0].data.vegetationStructureGroup, - huchinsonGroup: referenceActivity.outputs[0].data.huchinsonGroup + huchinsonGroup: referenceActivity.outputs[0].data.huchinsonGroup, + sitePhoto: [assessPhoto] ], name: assessProjectActivity["pActivityFormName"] ] @@ -112,13 +130,6 @@ class ReferenceAssessmentController { // Combine the two lists refActivities = priorityRecords + otherRecords -// if (true) { -// response.status = 200 -// result = [message: 'Test!'] -// render result as JSON -// return -// } - // Ensure there are reference records after filtering if (refActivities.size() == 0) { response.status = 400 @@ -129,7 +140,11 @@ class ReferenceAssessmentController { def assessProjectActivity = projectActivityService.get(config.assessment.projectActivityId) def assessActivities = [] - for (int projectIndex = 0; projectIndex < min(config.assessment.maxRecordsToCreate, refActivities.size()); projectIndex++) { + for ( + int projectIndex = 0; + projectIndex < Math.min(config.assessment.maxRecordsToCreate, refActivities.size()); + projectIndex++ + ) { assessActivities.push( createAssessmentRecordFromReference( refActivities[projectIndex], @@ -138,6 +153,8 @@ class ReferenceAssessmentController { ) } - render assessActivities as JSON + response.status = 200 + result = [message: "Found ${assessActivities.size()} images for assessment, please standby..."] + render result as JSON } } diff --git a/grails-app/views/staticPage/index.gsp b/grails-app/views/staticPage/index.gsp index 6f81d9dac..5a34d5931 100644 --- a/grails-app/views/staticPage/index.gsp +++ b/grails-app/views/staticPage/index.gsp @@ -21,7 +21,7 @@ - + From 573228446afda9a74e161ddae160d2826de39553 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Tue, 2 Apr 2024 10:41:30 +1000 Subject: [PATCH 084/115] Included de-identify flag in record creation --- .../ReferenceAssessmentController.groovy | 8 +- package-lock.json | 767 +++++++++++++++++- package.json | 2 +- 3 files changed, 730 insertions(+), 47 deletions(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 5c5821be3..7dd8549e1 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -12,7 +12,7 @@ class ReferenceAssessmentController { ActivityService activityService - private def createAssessmentRecordFromReference(Object referenceActivity, Object assessProjectActivity) { + private def createAssessmentRecordFromReference(Object referenceActivity, Object assessProjectActivity, boolean deIdentify) { def refDoc = referenceActivity.documents[0] def assessPhoto = [ licence: refDoc["licence"], @@ -43,7 +43,8 @@ class ReferenceAssessmentController { overallConditionBestEstimate: "0", mvgGroup: referenceActivity.outputs[0].data.vegetationStructureGroup, huchinsonGroup: referenceActivity.outputs[0].data.huchinsonGroup, - sitePhoto: [assessPhoto] + sitePhoto: [assessPhoto], + deIdentify: deIdentify ? "Yes" : "No" ], name: assessProjectActivity["pActivityFormName"] ] @@ -148,7 +149,8 @@ class ReferenceAssessmentController { assessActivities.push( createAssessmentRecordFromReference( refActivities[projectIndex], - assessProjectActivity + assessProjectActivity, + body['deIdentify'] ) ) } diff --git a/package-lock.json b/package-lock.json index 8622cfbc4..b15fcf222 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "6.0", "devDependencies": { "@metahub/karma-jasmine-jquery": "^2.0.1", - "chromedriver": "^119.0.1", + "chromedriver": "^123.0.1", "jasmine-core": "^3.5.0", "jasmine-jquery": "^2.0.0", "jquery": "^3.4.1", @@ -293,6 +293,12 @@ "integrity": "sha512-kIhULpw9TrGYnHp/8VfdcneIcxKnLixmADtukQRtJUmsVlMg0niMkwV0xZmi8hqa57xqilIHjWFA0GKvEjVU5g==", "dev": true }, + "node_modules/@tootallnate/quickjs-emscripten": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", + "dev": true + }, "node_modules/@types/cookie": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", @@ -344,15 +350,15 @@ } }, "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "dev": true, "dependencies": { - "debug": "4" + "debug": "^4.3.4" }, "engines": { - "node": ">= 6.0.0" + "node": ">= 14" } }, "node_modules/agent-base/node_modules/debug": { @@ -440,6 +446,18 @@ "node": ">=0.10.0" } }, + "node_modules/ast-types": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", + "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "dev": true, + "dependencies": { + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -447,12 +465,12 @@ "dev": true }, "node_modules/axios": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", - "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", "dev": true, "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -472,6 +490,15 @@ "node": "^4.5.0 || >= 5.9" } }, + "node_modules/basic-ftp": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", + "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -655,17 +682,17 @@ } }, "node_modules/chromedriver": { - "version": "119.0.1", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-119.0.1.tgz", - "integrity": "sha512-lpCFFLaXPpvElTaUOWKdP74pFb/sJhWtWqMjn7Ju1YriWn8dT5JBk84BGXMPvZQs70WfCYWecxdMmwfIu1Mupg==", + "version": "123.0.1", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-123.0.1.tgz", + "integrity": "sha512-YQUIP/zdlzDIRCZNCv6rEVDSY4RAxo/tDL0OiGPPuai+z8unRNqJr/9V6XTBypVFyDheXNalKt9QxEqdMPuLAQ==", "dev": true, "hasInstallScript": true, "dependencies": { "@testim/chrome-version": "^1.1.4", - "axios": "^1.6.0", + "axios": "^1.6.7", "compare-versions": "^6.1.0", "extract-zip": "^2.0.1", - "https-proxy-agent": "^5.0.1", + "proxy-agent": "^6.4.0", "proxy-from-env": "^1.1.0", "tcp-port-used": "^1.0.2" }, @@ -797,6 +824,15 @@ "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", "dev": true }, + "node_modules/data-uri-to-buffer": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", + "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", + "dev": true, + "engines": { + "node": ">= 14" + } + }, "node_modules/date-format": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.6.tgz", @@ -846,6 +882,63 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "node_modules/degenerator": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", + "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "dev": true, + "dependencies": { + "ast-types": "^0.13.4", + "escodegen": "^2.1.0", + "esprima": "^4.0.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/degenerator/node_modules/escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dev": true, + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/degenerator/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/degenerator/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -1200,9 +1293,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "dev": true, "funding": [ { @@ -1332,6 +1425,58 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-uri": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.3.tgz", + "integrity": "sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==", + "dev": true, + "dependencies": { + "basic-ftp": "^5.0.2", + "data-uri-to-buffer": "^6.0.2", + "debug": "^4.3.4", + "fs-extra": "^11.2.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/get-uri/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/get-uri/node_modules/fs-extra": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/get-uri/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", @@ -1484,17 +1629,53 @@ "node": ">=8.0.0" } }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/http-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/http-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dev": true, "dependencies": { - "agent-base": "6", + "agent-base": "^7.0.2", "debug": "4" }, "engines": { - "node": ">= 6" + "node": ">= 14" } }, "node_modules/https-proxy-agent/node_modules/debug": { @@ -1560,6 +1741,25 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dev": true, + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/ip-address/node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "dev": true + }, "node_modules/ip-regex": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", @@ -1910,6 +2110,12 @@ "node": ">=4" } }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "dev": true + }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -2166,6 +2372,15 @@ "node": ">=0.10.0" } }, + "node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/make-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", @@ -2323,6 +2538,15 @@ "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", "dev": true }, + "node_modules/netmask": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", + "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/nopt": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", @@ -2430,6 +2654,61 @@ "node": ">= 0.8.0" } }, + "node_modules/pac-proxy-agent": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.1.tgz", + "integrity": "sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==", + "dev": true, + "dependencies": { + "@tootallnate/quickjs-emscripten": "^0.23.0", + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "get-uri": "^6.0.1", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", + "pac-resolver": "^7.0.0", + "socks-proxy-agent": "^8.0.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/pac-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/pac-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/pac-resolver": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", + "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", + "dev": true, + "dependencies": { + "degenerator": "^5.0.0", + "netmask": "^2.0.2" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", @@ -2558,6 +2837,48 @@ "node": ">= 0.8.0" } }, + "node_modules/proxy-agent": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.4.0.tgz", + "integrity": "sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==", + "dev": true, + "dependencies": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.3", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "^7.0.1", + "proxy-from-env": "^1.1.0", + "socks-proxy-agent": "^8.0.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -2772,6 +3093,16 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true, + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, "node_modules/socket.io": { "version": "4.6.1", "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.6.1.tgz", @@ -2857,6 +3188,57 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/socks": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.1.tgz", + "integrity": "sha512-B6w7tkwNid7ToxjZ08rQMT8M9BJAf8DKx8Ft4NivzH0zBUfd6jldGcisJn/RLgxcX3FPNDdNQCUEMMT79b+oCQ==", + "dev": true, + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz", + "integrity": "sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A==", + "dev": true, + "dependencies": { + "agent-base": "^7.1.1", + "debug": "^4.3.4", + "socks": "^2.7.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/socks-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/socks-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -3114,6 +3496,12 @@ "node": ">=0.10.0" } }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "node_modules/type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -3588,6 +3976,12 @@ "integrity": "sha512-kIhULpw9TrGYnHp/8VfdcneIcxKnLixmADtukQRtJUmsVlMg0niMkwV0xZmi8hqa57xqilIHjWFA0GKvEjVU5g==", "dev": true }, + "@tootallnate/quickjs-emscripten": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", + "dev": true + }, "@types/cookie": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", @@ -3636,12 +4030,12 @@ } }, "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "dev": true, "requires": { - "debug": "4" + "debug": "^4.3.4" }, "dependencies": { "debug": { @@ -3708,6 +4102,15 @@ "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", "dev": true }, + "ast-types": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", + "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "dev": true, + "requires": { + "tslib": "^2.0.1" + } + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -3715,12 +4118,12 @@ "dev": true }, "axios": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", - "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", "dev": true, "requires": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -3737,6 +4140,12 @@ "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", "dev": true }, + "basic-ftp": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", + "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", + "dev": true + }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -3876,16 +4285,16 @@ } }, "chromedriver": { - "version": "119.0.1", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-119.0.1.tgz", - "integrity": "sha512-lpCFFLaXPpvElTaUOWKdP74pFb/sJhWtWqMjn7Ju1YriWn8dT5JBk84BGXMPvZQs70WfCYWecxdMmwfIu1Mupg==", + "version": "123.0.1", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-123.0.1.tgz", + "integrity": "sha512-YQUIP/zdlzDIRCZNCv6rEVDSY4RAxo/tDL0OiGPPuai+z8unRNqJr/9V6XTBypVFyDheXNalKt9QxEqdMPuLAQ==", "dev": true, "requires": { "@testim/chrome-version": "^1.1.4", - "axios": "^1.6.0", + "axios": "^1.6.7", "compare-versions": "^6.1.0", "extract-zip": "^2.0.1", - "https-proxy-agent": "^5.0.1", + "proxy-agent": "^6.4.0", "proxy-from-env": "^1.1.0", "tcp-port-used": "^1.0.2" } @@ -3993,6 +4402,12 @@ "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", "dev": true }, + "data-uri-to-buffer": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", + "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", + "dev": true + }, "date-format": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.6.tgz", @@ -4030,6 +4445,43 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "degenerator": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", + "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "dev": true, + "requires": { + "ast-types": "^0.13.4", + "escodegen": "^2.1.0", + "esprima": "^4.0.1" + }, + "dependencies": { + "escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dev": true, + "requires": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2", + "source-map": "~0.6.1" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + } + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -4307,9 +4759,9 @@ "dev": true }, "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "dev": true }, "form-data": { @@ -4394,6 +4846,46 @@ "pump": "^3.0.0" } }, + "get-uri": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.3.tgz", + "integrity": "sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==", + "dev": true, + "requires": { + "basic-ftp": "^5.0.2", + "data-uri-to-buffer": "^6.0.2", + "debug": "^4.3.4", + "fs-extra": "^11.2.0" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "fs-extra": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", @@ -4507,13 +4999,40 @@ "requires-port": "^1.0.0" } }, + "http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "requires": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dev": true, "requires": { - "agent-base": "6", + "agent-base": "^7.0.2", "debug": "4" }, "dependencies": { @@ -4568,6 +5087,24 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dev": true, + "requires": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "dependencies": { + "sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "dev": true + } + } + }, "ip-regex": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", @@ -4853,6 +5390,12 @@ } } }, + "jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "dev": true + }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -5060,6 +5603,12 @@ "signal-exit": "^3.0.0" } }, + "lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true + }, "make-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", @@ -5178,6 +5727,12 @@ "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", "dev": true }, + "netmask": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", + "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "dev": true + }, "nopt": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", @@ -5261,6 +5816,49 @@ "word-wrap": "~1.2.3" } }, + "pac-proxy-agent": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.1.tgz", + "integrity": "sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==", + "dev": true, + "requires": { + "@tootallnate/quickjs-emscripten": "^0.23.0", + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "get-uri": "^6.0.1", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", + "pac-resolver": "^7.0.0", + "socks-proxy-agent": "^8.0.2" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "pac-resolver": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", + "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", + "dev": true, + "requires": { + "degenerator": "^5.0.0", + "netmask": "^2.0.2" + } + }, "parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", @@ -5355,6 +5953,39 @@ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, + "proxy-agent": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.4.0.tgz", + "integrity": "sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==", + "dev": true, + "requires": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.3", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "^7.0.1", + "proxy-from-env": "^1.1.0", + "socks-proxy-agent": "^8.0.2" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -5524,6 +6155,12 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, + "smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true + }, "socket.io": { "version": "4.6.1", "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.6.1.tgz", @@ -5591,6 +6228,44 @@ } } }, + "socks": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.1.tgz", + "integrity": "sha512-B6w7tkwNid7ToxjZ08rQMT8M9BJAf8DKx8Ft4NivzH0zBUfd6jldGcisJn/RLgxcX3FPNDdNQCUEMMT79b+oCQ==", + "dev": true, + "requires": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + } + }, + "socks-proxy-agent": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz", + "integrity": "sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A==", + "dev": true, + "requires": { + "agent-base": "^7.1.1", + "debug": "^4.3.4", + "socks": "^2.7.1" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -5790,6 +6465,12 @@ "integrity": "sha512-Nm4cF79FhSTzrLKGDMi3I4utBtFv8qKy4sq1enftf2gMdpqI8oVQTAfySkTz5r49giVzDj88SVZXP4CeYQwjaw==", "dev": true }, + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", diff --git a/package.json b/package.json index eb568215c..eaa797d6b 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "devDependencies": { "@metahub/karma-jasmine-jquery": "^2.0.1", - "chromedriver": "^119.0.1", + "chromedriver": "^123.0.1", "jasmine-core": "^3.5.0", "jasmine-jquery": "^2.0.0", "jquery": "^3.4.1", From 545c4f0f22b88a7348b0a0ef0473422dfc1c07c7 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Tue, 2 Apr 2024 11:38:14 +1000 Subject: [PATCH 085/115] Removed bespoke refAssess configuration from application.groovy, fixed integer casting of maxRecordsToCreate config property --- grails-app/conf/application.groovy | 7 ------- .../ala/biocollect/ReferenceAssessmentController.groovy | 7 ++++--- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/grails-app/conf/application.groovy b/grails-app/conf/application.groovy index 9f4b197d3..296b787ad 100644 --- a/grails-app/conf/application.groovy +++ b/grails-app/conf/application.groovy @@ -674,10 +674,3 @@ if (!app.file.script.path) { app.file.script.path = "/data/biocollect/scripts" } script.read.extensions.list = ['js','min.js','png', 'json', 'jpg', 'jpeg'] - - - -refAssess.hub = 'hcat' -refAssess.reference.projectActivityId = 'e5a03b7e-17e3-4ea0-872f-d2a58a1becd7' -refAssess.assessment.projectActivityId = '5da93123-96b3-4209-b3ca-527749cd7970' -refAssess.assessment.maxRecordsToCreate = 8 diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 7dd8549e1..6f646f9b3 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -101,12 +101,13 @@ class ReferenceAssessmentController { // Get the activity records for the reference survey def refActivities = activityService.activitiesForProjectActivity(config.reference.projectActivityId) + def maxRecordsToCreate = config.assessment.maxRecordsToCreate as Integer // Ensure the reference records exist def numRefActivities = refActivities?.size() - if (numRefActivities == 0 || numRefActivities < config.assessment.maxRecordsToCreate) { + if (numRefActivities == 0) { response.status = 404 - result = [message: 'Insufficient number of reference records found in reference survey'] + result = [message: 'No reference records found in reference survey'] render result as JSON return } @@ -143,7 +144,7 @@ class ReferenceAssessmentController { def assessActivities = [] for ( int projectIndex = 0; - projectIndex < Math.min(config.assessment.maxRecordsToCreate, refActivities.size()); + projectIndex < Math.min(maxRecordsToCreate, refActivities.size()); projectIndex++ ) { assessActivities.push( From 906ea3e0af722bb5eb4daf131b23edf9b3102349 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Tue, 2 Apr 2024 15:59:25 +1000 Subject: [PATCH 086/115] Fixed user hub admin check for static page saving --- .../au/org/ala/biocollect/StaticPageController.groovy | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/StaticPageController.groovy b/grails-app/controllers/au/org/ala/biocollect/StaticPageController.groovy index f8b420ec4..cab571fa2 100644 --- a/grails-app/controllers/au/org/ala/biocollect/StaticPageController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/StaticPageController.groovy @@ -1,13 +1,15 @@ package au.org.ala.biocollect import au.org.ala.biocollect.merit.SettingService -import au.org.ala.web.AlaSecured +import au.org.ala.biocollect.merit.UserService +import au.org.ala.biocollect.merit.hub.HubSettings import au.org.ala.web.NoSSO import au.org.ala.web.SSO @SSO class StaticPageController { SettingService settingService + UserService userService @NoSSO def index() { String page = params.page; @@ -44,13 +46,14 @@ class StaticPageController { /** * Save static page text */ - @AlaSecured(value = ['ROLE_ADMIN']) def saveTextAreaSetting() { String text = params.textValue String settingKey = params.settingKey String returnUrl = params.returnUrl ?: g.createLink(controller: 'staticPage', action: 'index', absolute: true, params: [page: settingKey]) - if (settingKey) { + if (!userService.doesUserHaveHubRole("admin")) { + flash.errorMessage = "You do not have correct permissions to perform this action" + } else if (settingKey) { settingService.setSettingText(settingKey, text) flash.message = "Successfully saved." } else { From 5eb869b0b73efebca1b8772d6249d00b78935292 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Wed, 3 Apr 2024 10:53:21 +1000 Subject: [PATCH 087/115] Switched to /ws/search endpoint for reference activities search --- .../org/ala/biocollect/ReferenceAssessmentController.groovy | 5 ++++- .../au/org/ala/biocollect/merit/ActivityService.groovy | 4 ---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 6f646f9b3..ff55649a1 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -100,7 +100,10 @@ class ReferenceAssessmentController { } // Get the activity records for the reference survey - def refActivities = activityService.activitiesForProjectActivity(config.reference.projectActivityId) + def refActivitiesSearch = activityService.search([ + projectActivityId: config.reference.projectActivityId + ]) + def refActivities = refActivitiesSearch.resp.activities def maxRecordsToCreate = config.assessment.maxRecordsToCreate as Integer // Ensure the reference records exist diff --git a/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy b/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy index 027e075ed..7288aec23 100644 --- a/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy +++ b/grails-app/services/au/org/ala/biocollect/merit/ActivityService.groovy @@ -215,10 +215,6 @@ class ActivityService { list } - def activitiesForProjectActivity(String id) { - webService.getJson(grailsApplication.config.ecodata.service.url + '/activitiesForProjectActivity/' + id)?.list - } - def submitActivitiesForPublication(activityIds) { updatePublicationStatus(activityIds, 'pendingApproval') } From ec36502a873c754d37dd5fcad1dbe89edd157340 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Thu, 4 Apr 2024 10:01:57 +1000 Subject: [PATCH 088/115] Added additional data & documents check for reference records --- .../org/ala/biocollect/ReferenceAssessmentController.groovy | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index ff55649a1..db4df80c2 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -115,6 +115,12 @@ class ReferenceAssessmentController { return } + // Filter out any records without data or documents + refActivities = refActivities.findAll { + it.outputs[0].keySet().contains('data') && + it.documents.size() > 0 + } + // Filter out reference activities by the supplied vegetation structure groups & climate groups refActivities = refActivities.findAll { body["vegetationStructureGroups"].contains(it.outputs[0].data["vegetationStructureGroup"]) && From d08f31130fcf2bd096109cc80b1bc4085e973de6 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Thu, 4 Apr 2024 10:52:35 +1000 Subject: [PATCH 089/115] Fixed serverURL reference in image path generation --- .../biocollect/ReferenceAssessmentController.groovy | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index db4df80c2..9c0c1fa21 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -14,12 +14,18 @@ class ReferenceAssessmentController { private def createAssessmentRecordFromReference(Object referenceActivity, Object assessProjectActivity, boolean deIdentify) { def refDoc = referenceActivity.documents[0] + + def baseUrl = '' + if (!refDoc["url"].startsWith('http')) { + baseUrl = grailsApplication.config.grails.serverURL + } + def assessPhoto = [ licence: refDoc["licence"], notes: refDoc["notes"], filesize: refDoc["filesize"], staged: true, - url: grailsApplication.config.serverURL + refDoc["url"], + url: baseUrl + refDoc["url"], filename: refDoc["filename"], attribution: referenceActivity.outputs[0].data["imageAttribution"], name: refDoc["name"], @@ -27,7 +33,7 @@ class ReferenceAssessmentController { contentType: refDoc["contentType"], dateTaken: refDoc["dateTaken"], formattedSize: refDoc["formattedSize"], - thumbnailUrl: grailsApplication.config.serverURL + refDoc["thumbnailUrl"], + thumbnailUrl: baseUr + refDoc["thumbnailUrl"], status: "active" ] From 3b1957df7424c0c3981f4a8e2b4abaf32c121c47 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Thu, 4 Apr 2024 11:21:10 +1000 Subject: [PATCH 090/115] Fixed baseUrl variable reference --- .../au/org/ala/biocollect/ReferenceAssessmentController.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 9c0c1fa21..299e70cd0 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -33,7 +33,7 @@ class ReferenceAssessmentController { contentType: refDoc["contentType"], dateTaken: refDoc["dateTaken"], formattedSize: refDoc["formattedSize"], - thumbnailUrl: baseUr + refDoc["thumbnailUrl"], + thumbnailUrl: baseUrl + refDoc["thumbnailUrl"], status: "active" ] From fc75b1f1f75b7d8b85add063c39d1639d5c89601 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Thu, 18 Apr 2024 11:07:41 +1000 Subject: [PATCH 091/115] Updated version for CAS snapshot --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index b16400354..9ccd41a8f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.8-REFASSESS-SNAPSHOT +biocollectVersion=6.8-REFASSESS-CAS-SNAPSHOT grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From b251cfebf874d1bda441e6e1bd05dcdd99fbe61e Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Thu, 18 Apr 2024 12:24:14 +1000 Subject: [PATCH 092/115] Added 'Hide Add new record button' in hub configuration --- grails-app/assets/javascripts/hubs.js | 1 + grails-app/views/admin/editHub.gsp | 6 +++++- grails-app/views/bioActivity/index.gsp | 2 +- src/integration-test/resources/data/alaHub.js | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/grails-app/assets/javascripts/hubs.js b/grails-app/assets/javascripts/hubs.js index 6ee8abe78..065d98d37 100644 --- a/grails-app/assets/javascripts/hubs.js +++ b/grails-app/assets/javascripts/hubs.js @@ -480,6 +480,7 @@ function ContentViewModel(config) { self.hideBreadCrumbs = ko.observable(config.hideBreadCrumbs || false); self.hideProjectAndSurvey = ko.observable(config.hideProjectAndSurvey || false); self.hideCancelButtonOnForm = ko.observable(config.hideCancelButtonOnForm || false); + self.hideNewButtonOnRecordView = ko.observable(config.hideNewButtonOnRecordView || false); self.showNote = ko.observable(config.showNote || false); self.recordNote = ko.observable(config.recordNote || ''); self.industries = ko.observable(config.industries || false); diff --git a/grails-app/views/admin/editHub.gsp b/grails-app/views/admin/editHub.gsp index 4f14e2409..4b1c77410 100644 --- a/grails-app/views/admin/editHub.gsp +++ b/grails-app/views/admin/editHub.gsp @@ -486,7 +486,11 @@
    Data entry page
    - Hide cancel button on form create page + Hide 'Cancel' button on form create page +
    +
    Record view page
    +
    + Hide 'Add new record' button on form create page

    Quick links

    diff --git a/grails-app/views/bioActivity/index.gsp b/grails-app/views/bioActivity/index.gsp index 63107308a..c25db914c 100644 --- a/grails-app/views/bioActivity/index.gsp +++ b/grails-app/views/bioActivity/index.gsp @@ -175,7 +175,7 @@ Edit - + Add new record
    diff --git a/src/integration-test/resources/data/alaHub.js b/src/integration-test/resources/data/alaHub.js index b095a4233..ad54033c6 100644 --- a/src/integration-test/resources/data/alaHub.js +++ b/src/integration-test/resources/data/alaHub.js @@ -112,6 +112,7 @@ var alaHub = { "hideProjectSurveyDownloadXLSX" : false, "hideBreadCrumbs" : false, "hideCancelButtonOnForm" : false, + "hideNewButtonOnRecordView" : false, "industries" : true, "enablePartialSearch" : false, "overriddenLabels" : [ From 7f9d93c67c5d8c6257f3c2edffc29949caaacb61 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Thu, 18 Apr 2024 12:24:14 +1000 Subject: [PATCH 093/115] Added 'Hide Add new record button' in hub configuration --- grails-app/assets/javascripts/hubs.js | 1 + grails-app/views/admin/editHub.gsp | 6 +++++- grails-app/views/bioActivity/index.gsp | 2 +- src/integration-test/resources/data/alaHub.js | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/grails-app/assets/javascripts/hubs.js b/grails-app/assets/javascripts/hubs.js index 6ee8abe78..065d98d37 100644 --- a/grails-app/assets/javascripts/hubs.js +++ b/grails-app/assets/javascripts/hubs.js @@ -480,6 +480,7 @@ function ContentViewModel(config) { self.hideBreadCrumbs = ko.observable(config.hideBreadCrumbs || false); self.hideProjectAndSurvey = ko.observable(config.hideProjectAndSurvey || false); self.hideCancelButtonOnForm = ko.observable(config.hideCancelButtonOnForm || false); + self.hideNewButtonOnRecordView = ko.observable(config.hideNewButtonOnRecordView || false); self.showNote = ko.observable(config.showNote || false); self.recordNote = ko.observable(config.recordNote || ''); self.industries = ko.observable(config.industries || false); diff --git a/grails-app/views/admin/editHub.gsp b/grails-app/views/admin/editHub.gsp index 4f14e2409..4b1c77410 100644 --- a/grails-app/views/admin/editHub.gsp +++ b/grails-app/views/admin/editHub.gsp @@ -486,7 +486,11 @@
    Data entry page
    - Hide cancel button on form create page + Hide 'Cancel' button on form create page +
    +
    Record view page
    +
    + Hide 'Add new record' button on form create page

    Quick links

    diff --git a/grails-app/views/bioActivity/index.gsp b/grails-app/views/bioActivity/index.gsp index 63107308a..c25db914c 100644 --- a/grails-app/views/bioActivity/index.gsp +++ b/grails-app/views/bioActivity/index.gsp @@ -175,7 +175,7 @@ Edit - + Add new record
    diff --git a/src/integration-test/resources/data/alaHub.js b/src/integration-test/resources/data/alaHub.js index b095a4233..ad54033c6 100644 --- a/src/integration-test/resources/data/alaHub.js +++ b/src/integration-test/resources/data/alaHub.js @@ -112,6 +112,7 @@ var alaHub = { "hideProjectSurveyDownloadXLSX" : false, "hideBreadCrumbs" : false, "hideCancelButtonOnForm" : false, + "hideNewButtonOnRecordView" : false, "industries" : true, "enablePartialSearch" : false, "overriddenLabels" : [ From e6d9d41caff13420302229fb662d7b8f24b5c7f3 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Thu, 18 Apr 2024 15:09:49 +1000 Subject: [PATCH 094/115] Updated versioning to minor snapshot --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 9ccd41a8f..7e990ad87 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.8-REFASSESS-CAS-SNAPSHOT +biocollectVersion=6.6.6-REFASSESS-SNAPSHOT grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From 31c35e13ae04d20e649e297422ead5f215c31dcf Mon Sep 17 00:00:00 2001 From: temi Date: Fri, 19 Apr 2024 06:20:13 +1000 Subject: [PATCH 095/115] fixed broken functional test --- grails-app/conf/application.groovy | 6 +- package-lock.json | 829 ++++++++++++++++-- .../ala/biocollect/AddBioActivitySpec.groovy | 2 +- .../BiocollectFunctionalTest.groovy | 2 +- .../org/ala/biocollect/StubbedCasSpec.groovy | 124 ++- .../resources/GebConfig.groovy | 2 +- .../wiremock/mappings/jwkSource.json | 25 + .../wiremock/mappings/oidcDiscovery.json | 6 +- .../wiremock/mappings/oidcLogout.json | 15 + .../mappings/userdetailsFromIDslookup.json | 6 + .../wiremock/mappings/userdetailslookup.json | 8 +- 11 files changed, 915 insertions(+), 110 deletions(-) create mode 100644 src/integration-test/resources/wiremock/mappings/jwkSource.json create mode 100644 src/integration-test/resources/wiremock/mappings/oidcLogout.json diff --git a/grails-app/conf/application.groovy b/grails-app/conf/application.groovy index 1142bc183..401ad2b13 100644 --- a/grails-app/conf/application.groovy +++ b/grails-app/conf/application.groovy @@ -36,7 +36,6 @@ environments { } test { - spring.autoconfigure.exclude="au.org.ala.ws.security.AlaWsSecurityConfiguration" debugUI = false loggerLevel = "DEBUG" server.port = "8087" @@ -52,7 +51,7 @@ environments { security.oidc.discoveryUri = "http://localhost:${wiremock.port}/cas/oidc/.well-known" security.oidc.allowUnsignedIdTokens = true def casBaseUrl = "http://localhost:${wiremock.port}" - + ehcache.directory = './ehcache' security.cas.appServerName=serverName security.cas.contextPath= security.cas.casServerName="${casBaseUrl}" @@ -61,9 +60,10 @@ environments { security.cas.loginUrl="${security.cas.casServerUrlPrefix}/login" security.cas.casLoginUrl="${security.cas.casServerUrlPrefix}/login" security.cas.logoutUrl="${security.cas.casServerUrlPrefix}/logout" + userDetails.api.url = "${casBaseUrl}/userdetails/userDetails/" security.jwt.discoveryUri="${casBaseUrl}/cas/oidc/.well-known" userDetails.url = "${casBaseUrl}/userdetails/userDetails/" - userDetailsSingleUrl = "${userDetails.Url}getUserDetails" + userDetailsSingleUrl = "${userDetails.url}getUserDetails" logging.dir = '.' upload.images.path = '/tmp' upload.images.url = grails.serverURL+'/image/' diff --git a/package-lock.json b/package-lock.json index 88036af86..3e47a17b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "6.0", "devDependencies": { "@metahub/karma-jasmine-jquery": "^2.0.1", - "chromedriver": "^119.0.1", + "chromedriver": "^123.0.3", "jasmine-core": "^3.5.0", "jasmine-jquery": "^2.0.0", "jquery": "^3.4.1", @@ -180,13 +180,20 @@ } }, "node_modules/@babel/traverse/node_modules/debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { - "ms": "^2.1.1" + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, "node_modules/@babel/traverse/node_modules/ms": { @@ -293,6 +300,12 @@ "integrity": "sha512-kIhULpw9TrGYnHp/8VfdcneIcxKnLixmADtukQRtJUmsVlMg0niMkwV0xZmi8hqa57xqilIHjWFA0GKvEjVU5g==", "dev": true }, + "node_modules/@tootallnate/quickjs-emscripten": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", + "dev": true + }, "node_modules/@types/cookie": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", @@ -344,15 +357,15 @@ } }, "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "dev": true, "dependencies": { - "debug": "4" + "debug": "^4.3.4" }, "engines": { - "node": ">= 6.0.0" + "node": ">= 14" } }, "node_modules/agent-base/node_modules/debug": { @@ -440,6 +453,18 @@ "node": ">=0.10.0" } }, + "node_modules/ast-types": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", + "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "dev": true, + "dependencies": { + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -447,12 +472,12 @@ "dev": true }, "node_modules/axios": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", - "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", "dev": true, "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -472,6 +497,15 @@ "node": "^4.5.0 || >= 5.9" } }, + "node_modules/basic-ftp": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", + "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -655,17 +689,17 @@ } }, "node_modules/chromedriver": { - "version": "119.0.1", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-119.0.1.tgz", - "integrity": "sha512-lpCFFLaXPpvElTaUOWKdP74pFb/sJhWtWqMjn7Ju1YriWn8dT5JBk84BGXMPvZQs70WfCYWecxdMmwfIu1Mupg==", + "version": "123.0.3", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-123.0.3.tgz", + "integrity": "sha512-35IeTqDLcVR0htF9nD/Lh+g24EG088WHVKXBXiFyWq+2lelnoM0B3tKTBiUEjLng0GnELI4QyQPFK7i97Fz1fQ==", "dev": true, "hasInstallScript": true, "dependencies": { "@testim/chrome-version": "^1.1.4", - "axios": "^1.6.0", + "axios": "^1.6.7", "compare-versions": "^6.1.0", "extract-zip": "^2.0.1", - "https-proxy-agent": "^5.0.1", + "proxy-agent": "^6.4.0", "proxy-from-env": "^1.1.0", "tcp-port-used": "^1.0.2" }, @@ -797,6 +831,15 @@ "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", "dev": true }, + "node_modules/data-uri-to-buffer": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", + "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", + "dev": true, + "engines": { + "node": ">= 14" + } + }, "node_modules/date-format": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.6.tgz", @@ -846,6 +889,63 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "node_modules/degenerator": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", + "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "dev": true, + "dependencies": { + "ast-types": "^0.13.4", + "escodegen": "^2.1.0", + "esprima": "^4.0.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/degenerator/node_modules/escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dev": true, + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/degenerator/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/degenerator/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -1332,6 +1432,58 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-uri": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.3.tgz", + "integrity": "sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==", + "dev": true, + "dependencies": { + "basic-ftp": "^5.0.2", + "data-uri-to-buffer": "^6.0.2", + "debug": "^4.3.4", + "fs-extra": "^11.2.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/get-uri/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/get-uri/node_modules/fs-extra": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/get-uri/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", @@ -1484,17 +1636,53 @@ "node": ">=8.0.0" } }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/http-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/http-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dev": true, "dependencies": { - "agent-base": "6", + "agent-base": "^7.0.2", "debug": "4" }, "engines": { - "node": ">= 6" + "node": ">= 14" } }, "node_modules/https-proxy-agent/node_modules/debug": { @@ -1560,6 +1748,25 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dev": true, + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/ip-address/node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "dev": true + }, "node_modules/ip-regex": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", @@ -1745,9 +1952,9 @@ } }, "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -1805,13 +2012,20 @@ } }, "node_modules/istanbul-lib-source-maps/node_modules/debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { - "ms": "^2.1.1" + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, "node_modules/istanbul-lib-source-maps/node_modules/ms": { @@ -1910,6 +2124,12 @@ "node": ">=4" } }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "dev": true + }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -2166,6 +2386,15 @@ "node": ">=0.10.0" } }, + "node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/make-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", @@ -2323,6 +2552,15 @@ "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", "dev": true }, + "node_modules/netmask": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", + "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/nopt": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", @@ -2430,6 +2668,61 @@ "node": ">= 0.8.0" } }, + "node_modules/pac-proxy-agent": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.1.tgz", + "integrity": "sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==", + "dev": true, + "dependencies": { + "@tootallnate/quickjs-emscripten": "^0.23.0", + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "get-uri": "^6.0.1", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", + "pac-resolver": "^7.0.0", + "socks-proxy-agent": "^8.0.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/pac-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/pac-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/pac-resolver": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", + "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", + "dev": true, + "dependencies": { + "degenerator": "^5.0.0", + "netmask": "^2.0.2" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", @@ -2558,6 +2851,48 @@ "node": ">= 0.8.0" } }, + "node_modules/proxy-agent": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.4.0.tgz", + "integrity": "sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==", + "dev": true, + "dependencies": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.3", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "^7.0.1", + "proxy-from-env": "^1.1.0", + "socks-proxy-agent": "^8.0.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -2738,9 +3073,9 @@ "dev": true }, "node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -2772,6 +3107,16 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true, + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, "node_modules/socket.io": { "version": "4.6.1", "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.6.1.tgz", @@ -2857,6 +3202,57 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/socks": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", + "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", + "dev": true, + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz", + "integrity": "sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A==", + "dev": true, + "dependencies": { + "agent-base": "^7.1.1", + "debug": "^4.3.4", + "socks": "^2.7.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/socks-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/socks-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -3114,6 +3510,12 @@ "node": ">=0.10.0" } }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "node_modules/type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -3497,12 +3899,12 @@ }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "ms": { @@ -3588,6 +3990,12 @@ "integrity": "sha512-kIhULpw9TrGYnHp/8VfdcneIcxKnLixmADtukQRtJUmsVlMg0niMkwV0xZmi8hqa57xqilIHjWFA0GKvEjVU5g==", "dev": true }, + "@tootallnate/quickjs-emscripten": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", + "dev": true + }, "@types/cookie": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", @@ -3636,12 +4044,12 @@ } }, "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "dev": true, "requires": { - "debug": "4" + "debug": "^4.3.4" }, "dependencies": { "debug": { @@ -3708,6 +4116,15 @@ "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", "dev": true }, + "ast-types": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", + "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "dev": true, + "requires": { + "tslib": "^2.0.1" + } + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -3715,12 +4132,12 @@ "dev": true }, "axios": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", - "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", "dev": true, "requires": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -3737,6 +4154,12 @@ "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", "dev": true }, + "basic-ftp": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", + "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", + "dev": true + }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -3876,16 +4299,16 @@ } }, "chromedriver": { - "version": "119.0.1", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-119.0.1.tgz", - "integrity": "sha512-lpCFFLaXPpvElTaUOWKdP74pFb/sJhWtWqMjn7Ju1YriWn8dT5JBk84BGXMPvZQs70WfCYWecxdMmwfIu1Mupg==", + "version": "123.0.3", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-123.0.3.tgz", + "integrity": "sha512-35IeTqDLcVR0htF9nD/Lh+g24EG088WHVKXBXiFyWq+2lelnoM0B3tKTBiUEjLng0GnELI4QyQPFK7i97Fz1fQ==", "dev": true, "requires": { "@testim/chrome-version": "^1.1.4", - "axios": "^1.6.0", + "axios": "^1.6.7", "compare-versions": "^6.1.0", "extract-zip": "^2.0.1", - "https-proxy-agent": "^5.0.1", + "proxy-agent": "^6.4.0", "proxy-from-env": "^1.1.0", "tcp-port-used": "^1.0.2" } @@ -3993,6 +4416,12 @@ "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", "dev": true }, + "data-uri-to-buffer": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", + "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", + "dev": true + }, "date-format": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.6.tgz", @@ -4030,6 +4459,43 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "degenerator": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", + "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "dev": true, + "requires": { + "ast-types": "^0.13.4", + "escodegen": "^2.1.0", + "esprima": "^4.0.1" + }, + "dependencies": { + "escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dev": true, + "requires": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2", + "source-map": "~0.6.1" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + } + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -4394,6 +4860,46 @@ "pump": "^3.0.0" } }, + "get-uri": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.3.tgz", + "integrity": "sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==", + "dev": true, + "requires": { + "basic-ftp": "^5.0.2", + "data-uri-to-buffer": "^6.0.2", + "debug": "^4.3.4", + "fs-extra": "^11.2.0" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "fs-extra": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", @@ -4507,13 +5013,40 @@ "requires-port": "^1.0.0" } }, + "http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "requires": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dev": true, "requires": { - "agent-base": "6", + "agent-base": "^7.0.2", "debug": "4" }, "dependencies": { @@ -4568,6 +5101,24 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dev": true, + "requires": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "dependencies": { + "sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "dev": true + } + } + }, "ip-regex": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", @@ -4737,9 +5288,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } @@ -4786,12 +5337,12 @@ }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "ms": { @@ -4853,6 +5404,12 @@ } } }, + "jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "dev": true + }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -5060,6 +5617,12 @@ "signal-exit": "^3.0.0" } }, + "lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true + }, "make-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", @@ -5178,6 +5741,12 @@ "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", "dev": true }, + "netmask": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", + "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "dev": true + }, "nopt": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", @@ -5261,6 +5830,49 @@ "word-wrap": "~1.2.3" } }, + "pac-proxy-agent": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.1.tgz", + "integrity": "sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==", + "dev": true, + "requires": { + "@tootallnate/quickjs-emscripten": "^0.23.0", + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "get-uri": "^6.0.1", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", + "pac-resolver": "^7.0.0", + "socks-proxy-agent": "^8.0.2" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "pac-resolver": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", + "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", + "dev": true, + "requires": { + "degenerator": "^5.0.0", + "netmask": "^2.0.2" + } + }, "parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", @@ -5355,6 +5967,39 @@ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, + "proxy-agent": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.4.0.tgz", + "integrity": "sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==", + "dev": true, + "requires": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.3", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "^7.0.1", + "proxy-from-env": "^1.1.0", + "socks-proxy-agent": "^8.0.2" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -5496,9 +6141,9 @@ "dev": true }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true }, "setprototypeof": { @@ -5524,6 +6169,12 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, + "smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true + }, "socket.io": { "version": "4.6.1", "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.6.1.tgz", @@ -5591,6 +6242,44 @@ } } }, + "socks": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", + "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", + "dev": true, + "requires": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + } + }, + "socks-proxy-agent": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz", + "integrity": "sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A==", + "dev": true, + "requires": { + "agent-base": "^7.1.1", + "debug": "^4.3.4", + "socks": "^2.7.1" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -5790,6 +6479,12 @@ "integrity": "sha512-Nm4cF79FhSTzrLKGDMi3I4utBtFv8qKy4sq1enftf2gMdpqI8oVQTAfySkTz5r49giVzDj88SVZXP4CeYQwjaw==", "dev": true }, + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", diff --git a/src/integration-test/groovy/au/org/ala/biocollect/AddBioActivitySpec.groovy b/src/integration-test/groovy/au/org/ala/biocollect/AddBioActivitySpec.groovy index 7c7614ba6..0d480e23c 100644 --- a/src/integration-test/groovy/au/org/ala/biocollect/AddBioActivitySpec.groovy +++ b/src/integration-test/groovy/au/org/ala/biocollect/AddBioActivitySpec.groovy @@ -12,7 +12,7 @@ class AddBioActivitySpec extends StubbedCasSpec { } def cleanupSpec() { - logout(browser) + logout(browser, ViewBioActivityPage) } def projectId = "project_1" diff --git a/src/integration-test/groovy/au/org/ala/biocollect/BiocollectFunctionalTest.groovy b/src/integration-test/groovy/au/org/ala/biocollect/BiocollectFunctionalTest.groovy index ee6ba23cf..91035f434 100644 --- a/src/integration-test/groovy/au/org/ala/biocollect/BiocollectFunctionalTest.groovy +++ b/src/integration-test/groovy/au/org/ala/biocollect/BiocollectFunctionalTest.groovy @@ -134,7 +134,7 @@ class BiocollectFunctionalTest extends GebReportingSpec { def logoutViaUrl(browser) { String serverUrl = (testConfig.baseUrl instanceof String) ? testConfig.baseUrl : testConfig.grails.serverURL - String logoutUrl = "${serverUrl}/logout/logout?appUrl=${serverUrl}" + String logoutUrl = "${serverUrl}/logout?appUrl=${serverUrl}" browser.go logoutUrl } diff --git a/src/integration-test/groovy/au/org/ala/biocollect/StubbedCasSpec.groovy b/src/integration-test/groovy/au/org/ala/biocollect/StubbedCasSpec.groovy index d5eee7679..caca97341 100644 --- a/src/integration-test/groovy/au/org/ala/biocollect/StubbedCasSpec.groovy +++ b/src/integration-test/groovy/au/org/ala/biocollect/StubbedCasSpec.groovy @@ -2,21 +2,26 @@ package au.org.ala.biocollect import com.github.tomakehurst.wiremock.WireMockServer import com.github.tomakehurst.wiremock.extension.responsetemplating.ResponseTemplateTransformer +import com.nimbusds.jose.jwk.RSAKey import geb.Browser import grails.converters.JSON import org.grails.web.converters.marshaller.json.CollectionMarshaller import org.grails.web.converters.marshaller.json.MapMarshaller import org.openqa.selenium.StaleElementReferenceException +import org.openqa.selenium.WebDriverException +import org.pac4j.jwt.config.signature.RSASignatureConfiguration import org.pac4j.jwt.profile.JwtGenerator -import spock.lang.Shared import wiremock.com.github.jknack.handlebars.EscapingStrategy import wiremock.com.github.jknack.handlebars.Handlebars import wiremock.com.github.jknack.handlebars.Helper import wiremock.com.github.jknack.handlebars.Options import wiremock.com.google.common.collect.ImmutableMap +import java.security.KeyPair + import static com.github.tomakehurst.wiremock.client.WireMock.* import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options + //import com.github.tomakehurst.wiremock.WireMockServer /** @@ -28,33 +33,64 @@ class StubbedCasSpec extends BiocollectFunctionalTest { static String GRANT_MANAGER_USER_ID = '1001' static String MERIT_ADMIN_USER_ID = '1002' static String ALA_ADMIN_USER_ID = '2000' + static KeyPair pair + static RSAKey signingKey + static { + // KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA") + // generator.initialize(2048) + // pair = generator.generateKeyPair() + // + // signingKey = new RSAKey.Builder(pair.getPublic()).privateKey(pair.getPrivate()).build() + // RSAKey publicKey = new RSAKey.Builder(pair.getPublic()).build() + // println signingKey.toJSONObject() - this is hardcoded below and is used to sign tokens + // println publicKey.toJSONObject() - this goes into wiremock as the response to the jwks request + + // It would be better to generate this at runtime, but the stub needs to be in wirework during bean initialisation of MERIT + // So we've generated a random key as above and coded it here and into the wiremock stub + Map key = ["p":"ybsLU3Xf05Nkmfthec3Gf5SCR1cMG4gHYTJh9dP575RavQO63oxS9G-srVmNTmCYsoi-KJs9RODO8Ive701DrpSBkeM7cYZ5_7J3Zt7kTtIPCavwJsb0yhyJQGcm6v7iuF8GIRukeKLT57LwjhSPPqZgdOu9elsc3T7-D9jPPBE", + "kty":"RSA", + "q":"rA9mDEolsAG9br7CJlgPIaNsAdpPmqwGTnaHZgJCeN3XwKLlTkLiBlH66OdvakvoFHuvoiaUXFx2xd0G-WrBdePnqZcAb0SdLMp0RxDCRyC4HwJSE9YwieOpIO8EvgzYZKL7liUKR0fz3HAciV9oW3lA6bnh1doSVadw18LMKZk", + "d":"GDawqqYZsTqZpR3WRyK1YoSI0qO4RS61jvW-l72SbpILYHl9M0cZewef95OrT9yl4-7SurBV15j7wkqLvLxmQNxpIs-yXRK5hpmvxa07SiXZOtwW7EvG_PMx9tyQ8LiyM8MnTr-qknh_Rtbjr9bH0mrMeUCQfVj5VSSF8SNHEVPGy_QxQoswIhRgzcq9tOaGP1W-FoVCaQjAxJG4boAselX_bvYe3IVuDwE_ZV8KPCQcZISEqrY8B8-b8AdTgecORODQB5lChElqRBeKUeoOtVMvD8rlwUgjV9ir_QK25Vq8rLcEkdPrRhV0EKKnr1eBir1WSpdLjzIUhAsF5HPUAQ", + "e":"AQAB", "qi":"kuYhMgrJR1fTuX0IJar-SjWhrn3EV96bfaObAkxMZDHes-tthLxcZ58PpKKbsMSK8kncT41JMb0Irb9HC12B6aSDy3Kzsns-gzcD38m9YcdOk80kyjCqLIceU2tmMIeIxSF54wGwVO_p4p94xeANf4si450ssqdPM_q1n1SRu88", + "dp":"Gx8Nj8P6OqzHSrh0S3bx5_ckaMj4NL9eFqA6cV11bdNpO55DwmXlRT26Xnf6un3cKayevEDaxObgi5CSgWPG5LLMlLuTI1ksD8eDrA3tbfdp1CgMmnoHMSETBtiXb-Kiwpzr6wmXXCywBqeVFdUHySl_MFj9WXTkdY5hg-nnOrE", + "dq":"DwhxZBV-YXhlcq2cDPmYqNm8cBUA64SoMGbOwazk3eaUGTKiUkopsV-sSnkeFO1444FDASnZwJAbmIINP_GB4aj97qVQ1mfqS6WMr0DZmJlVPPBY9365UvLfLg90HJ7GsVREIwQtd7jjp5jsBVyeo49eio1BHAwnmfA9Pby5VdE", + "n":"h5XN-_LL1yXb8oPWHOTNMby0Y6olpByVCNJGo1mjhk9PUoX8bfu6wNr4G7oR7O0NfIQVNLykqE7Q04RrP7JfexI97UuH5B0xBjHVo-S5SxeyUrVSQBpRu6EisQzxxF3a038a0GHYJpA5YUAZWD7Pux0yqJ5ly1y2Sn7uGb_JJ_bJ86EVWs3AxE1RZHmeY975A1kk470ylDAyfQuW_GU-gUzG5vdE1wAEIKe6GFtg5ulA_n_XVsrz9qio7ZtEyWZDAOCtk0jfg8iTJf5eLP2Q3D8ePy_6IvYvFDuQLmvKHn1jg5MnnDWZHV3GBRnfU8CtPu2ChFKhXedcrhQhhAWfKQ" + ] + + signingKey = RSAKey.parse(key) + pair = signingKey.toKeyPair() - @Shared WireMockServer wireMockServer + } + + // @Shared WireMockServer wireMockServer def setupSpec() { + JSON.registerObjectMarshaller(new MapMarshaller()) + JSON.registerObjectMarshaller(new CollectionMarshaller()) if (testConfig.wiremock.embedded){ + startWireMock() + } + + // Configure the client + configureFor("localhost", testConfig.wiremock.port) + } - Handlebars handlebars = new Handlebars() - handlebars.escapingStrategy = EscapingStrategy.NOOP + private void startWireMock() { + Handlebars handlebars = new Handlebars() + handlebars.escapingStrategy = EscapingStrategy.NOOP - // This is done so we can use a custom handlebars with a NOOP escaping strategy - the default escapes HTML - // which breaks the redirect URL returned by the PDF generation stub. - Helper noop = new Helper() { - Object apply(Object context, Options options) throws IOException { - return context[0] - } + // This is done so we can use a custom handlebars with a NOOP escaping strategy - the default escapes HTML + // which breaks the redirect URL returned by the PDF generation stub. + Helper noop = new Helper() { + Object apply(Object context, Options options) throws IOException { + return context[0] } - wireMockServer = new WireMockServer(options() - .port(testConfig.wiremock.port) - .usingFilesUnderDirectory(getMappingsPath()) - .extensions(new ResponseTemplateTransformer(false, handlebars, ImmutableMap.of("noop", noop), null, null))) - - wireMockServer.start() } + wireMockServer = new WireMockServer(options() + .port(testConfig.wiremock.port) + .usingFilesUnderDirectory(getMappingsPath()) + .extensions(new ResponseTemplateTransformer(false, handlebars, ImmutableMap.of("noop", noop), null, null))) - JSON.registerObjectMarshaller(new MapMarshaller()) - JSON.registerObjectMarshaller(new CollectionMarshaller()) - // Configure the client - configureFor("localhost", testConfig.wiremock.port) + wireMockServer.start() } def cleanupSpec() { @@ -113,6 +149,12 @@ class StubbedCasSpec extends BiocollectFunctionalTest { } catch (StaleElementReferenceException e) { // Do nothing, backdrop was already detached } + catch (NullPointerException e) { + // Do nothing, backdrop was already detached and destroyed before we selected it + } + catch (WebDriverException e) { + // We are now seeing WebDriverException instead of StateElementReferenceException in some cases + } } private String getMappingsPath() { @@ -133,7 +175,7 @@ class StubbedCasSpec extends BiocollectFunctionalTest { } /** Convenience method to stub the login of a user with the CAS ROLE_ALA_ADMIN role */ def loginAsAlaAdmin(Browser browser) { - login([userId:ALA_ADMIN_USER_ID, role:"ROLE_ADMIN", email: 'ala_admin@nowhere.com', firstName:"ALA", lastName:"Administrator"], browser) + login([userId:ALA_ADMIN_USER_ID, role:"ROLE_ADMIN", userName: 'ala_admin@nowhere.com', email: 'ala_admin@nowhere.com', firstName:"ALA", lastName:"Administrator"], browser) } /** Convenience method to stub the login of a user no special roles */ def loginAsUser(String userId, Browser browser) { @@ -143,6 +185,11 @@ class StubbedCasSpec extends BiocollectFunctionalTest { login([userId:userId, email: "user${userId}@nowhere.com", firstName:"MERIT", lastName:"User ${userId}"], browser) } + String tokenForUser(String userId) { + Map userDetails = [userId:userId, email: "user${userId}@nowhere.com", firstName:"MERIT", lastName:"User ${userId}"] + setupOidcAuthForUser(userDetails) + } + private String loggedInUser = null def login(Map userDetails, Browser browser) { @@ -154,7 +201,17 @@ class StubbedCasSpec extends BiocollectFunctionalTest { } def oidcLogin(Map userDetails, Browser browser) { + setupOidcAuthForUser(userDetails) + browser.go "${browser.getConfig().baseUrl}login" + } + /** + * Sets up stubs with wiremock to authenticate a user via OIDC. Also returns an idToken which can be used + * if an interactive login is not required. + * @param userDetails the details of the user to setup + * @return an idToken for the user. + */ + String setupOidcAuthForUser(Map userDetails) { // The test config isn't a normal grails config object (probably need to to into why) so getProperty doesn't work. String clientId = getTestConfig().security.oidc.clientId List roles = ["ROLE_USER"] @@ -182,16 +239,17 @@ class StubbedCasSpec extends BiocollectFunctionalTest { exp:com.nimbusds.jwt.util.DateUtils.toSecondsSinceEpoch(new Date().plus(365)), iat:com.nimbusds.jwt.util.DateUtils.toSecondsSinceEpoch(new Date()), jti:"id", - email:userDetails.email + email:userDetails.email, + scope : "openid profile ala roles email" ] - String idToken = new JwtGenerator(null).generate(idTokenClaims) + String idToken = new JwtGenerator(new RSASignatureConfiguration(pair)).generate(idTokenClaims) Map token = [:] token.access_token = idToken token.id_token = idToken token.refresh_token = null token.token_type = "bearer" token.expires_in = 86400 - token.scope = "user_defined email openid profile roles" + token.scope = "openid profile ala roles email" stubFor(post(urlPathEqualTo("/cas/oidc/oidcAccessToken")) .willReturn(aResponse() @@ -203,11 +261,12 @@ class StubbedCasSpec extends BiocollectFunctionalTest { Map profile = [ - sub:userDetails.userId, - name:userDetails.firstName+" "+userDetails.lastName, - given_name:userDetails.firstName, - family_name:userDetails.lastName, - email:userDetails.email + userid : userDetails.userId, + sub : userDetails.userId, + name : userDetails.firstName + " " + userDetails.lastName, + given_name : userDetails.firstName, + family_name: userDetails.lastName, + email : userDetails.email ] stubFor(get(urlPathEqualTo("/cas/oidc/oidcProfile")) @@ -216,8 +275,7 @@ class StubbedCasSpec extends BiocollectFunctionalTest { .withHeader("Content-Type", "application/json") .withBody((profile as JSON).toString()) )) - - browser.go "${getConfig().baseUrl}login" + idToken } /** Creates a wiremock configuration to stub a user login request and return the supplied user and role information */ @@ -272,14 +330,14 @@ class StubbedCasSpec extends BiocollectFunctionalTest { .willReturn(aResponse() .withStatus(302) - .withHeader("Location", "{{{request.requestLine.query.service}}}?ticket=aticket") + .withHeader("Location", "{{request.requestLine.query.service}}?ticket=aticket") .withHeader("Set-Cookie", "ALA-Auth=\"${email}\"; Domain=ala.org.au; Path=/; HttpOnly") .withTransformers("response-template"))) stubFor(get(urlMatching("/cas/login\\?service=.*\\?.*")) .willReturn(aResponse() .withStatus(302) - .withHeader("location", "{{{request.requestLine.query.service}}}&ticket=aticket") + .withHeader("location", "{{request.requestLine.query.service}}&ticket=aticket") .withHeader("Set-Cookie", "ALA-Auth=\"${email}\"; Domain=ala.org.au; Path=/; HttpOnly") .withTransformers("response-template"))) diff --git a/src/integration-test/resources/GebConfig.groovy b/src/integration-test/resources/GebConfig.groovy index f17c4eff0..11d470fe7 100644 --- a/src/integration-test/resources/GebConfig.groovy +++ b/src/integration-test/resources/GebConfig.groovy @@ -14,7 +14,7 @@ if (!System.getProperty("webdriver.chrome.driver")) { System.setProperty("webdriver.chrome.driver", "node_modules/chromedriver/bin/chromedriver") } driver = { new ChromeDriver() } -baseUrl = 'http://devt.ala.org.au:8087/' +baseUrl = 'http://localhost:8087/' atCheckWaiting = true waiting { timeout = 20 diff --git a/src/integration-test/resources/wiremock/mappings/jwkSource.json b/src/integration-test/resources/wiremock/mappings/jwkSource.json new file mode 100644 index 000000000..77c820a5a --- /dev/null +++ b/src/integration-test/resources/wiremock/mappings/jwkSource.json @@ -0,0 +1,25 @@ +{ + "request": { + "urlPath": "/cas/oidc/jwks", + "method": "GET" + }, + "response" : { + "status": 200, + "headers": { + "content-Type": "application/json" + }, + "jsonBody": { + "keys": [ + { + "kty":"RSA", + "e":"AQAB", + "use":"sig", + "alg": "RS256", + "kid":"localhost:8018", + "n": "h5XN-_LL1yXb8oPWHOTNMby0Y6olpByVCNJGo1mjhk9PUoX8bfu6wNr4G7oR7O0NfIQVNLykqE7Q04RrP7JfexI97UuH5B0xBjHVo-S5SxeyUrVSQBpRu6EisQzxxF3a038a0GHYJpA5YUAZWD7Pux0yqJ5ly1y2Sn7uGb_JJ_bJ86EVWs3AxE1RZHmeY975A1kk470ylDAyfQuW_GU-gUzG5vdE1wAEIKe6GFtg5ulA_n_XVsrz9qio7ZtEyWZDAOCtk0jfg8iTJf5eLP2Q3D8ePy_6IvYvFDuQLmvKHn1jg5MnnDWZHV3GBRnfU8CtPu2ChFKhXedcrhQhhAWfKQ" + } + ] + } + + } +} \ No newline at end of file diff --git a/src/integration-test/resources/wiremock/mappings/oidcDiscovery.json b/src/integration-test/resources/wiremock/mappings/oidcDiscovery.json index b5f27fb99..5b27ec350 100644 --- a/src/integration-test/resources/wiremock/mappings/oidcDiscovery.json +++ b/src/integration-test/resources/wiremock/mappings/oidcDiscovery.json @@ -64,7 +64,7 @@ "refresh_token" ], "id_token_signing_alg_values_supported": [ - "none" + "RS256", "none" ], "id_token_encryption_alg_values_supported": [ "none" @@ -73,7 +73,7 @@ "none" ], "userinfo_signing_alg_values_supported": [ - "none" + "RS256", "none" ], "userinfo_encryption_alg_values_supported": [ "none" @@ -82,7 +82,7 @@ "none" ], "request_object_signing_alg_values_supported": [ - "none" + "RS256", "none" ], "request_object_encryption_alg_values_supported": [ "none" diff --git a/src/integration-test/resources/wiremock/mappings/oidcLogout.json b/src/integration-test/resources/wiremock/mappings/oidcLogout.json new file mode 100644 index 000000000..f5d98af7a --- /dev/null +++ b/src/integration-test/resources/wiremock/mappings/oidcLogout.json @@ -0,0 +1,15 @@ +{ + "request": { + "urlPath": "/cas/oidc/oidcLogout", + "method": "GET" + }, + "response": { + "status": 302, + "headers": { + "location": "{{{request.requestLine.query.post_logout_redirect_uri}}}" + }, + "transformers": [ + "response-template" + ] + } +} \ No newline at end of file diff --git a/src/integration-test/resources/wiremock/mappings/userdetailsFromIDslookup.json b/src/integration-test/resources/wiremock/mappings/userdetailsFromIDslookup.json index bc8773ca1..63ab4c129 100644 --- a/src/integration-test/resources/wiremock/mappings/userdetailsFromIDslookup.json +++ b/src/integration-test/resources/wiremock/mappings/userdetailsFromIDslookup.json @@ -14,21 +14,25 @@ "users": { "1": { "userName":"user1@user.com", + "email":"user1@user.com", "firstName":"test1", "lastName": "user1" }, "10": { "userName": "user10@user.com", + "email": "user10@user.com", "firstName":"test10", "lastName": "user10" }, "30": { "userName":"user30@user.com", + "email":"user30@user.com", "firstName":"test30", "lastName": "user30" }, "1000": { "userName":"user1000@user.com", + "email":"user1000@user.com", "firstName":"test1000", "lastName": "user1000" }, @@ -39,11 +43,13 @@ }, "1002": { "userName":"user1002@user.com", + "email":"user1002@user.com", "firstName":"test1002", "lastName": "user1002" }, "2": { "userName":"user2@user.com", + "email":"user2@user.com", "firstName":"test2", "lastName": "user2" } diff --git a/src/integration-test/resources/wiremock/mappings/userdetailslookup.json b/src/integration-test/resources/wiremock/mappings/userdetailslookup.json index 71a5cda45..d0bc9790e 100644 --- a/src/integration-test/resources/wiremock/mappings/userdetailslookup.json +++ b/src/integration-test/resources/wiremock/mappings/userdetailslookup.json @@ -9,6 +9,12 @@ "headers": { "Content-Type": "application/json" }, - "body": "{\"userName\":\"user.{{request.query.userName}}@nowhere.com.au\", \"userId\":\"{{request.query.userName}}\"}" + "jsonBody": { + "userName":"user.{{request.query.userName}}@nowhere.com.au", + "email":"user.{{request.query.userName}}@nowhere.com.au", + "userId":"{{request.query.userName}}", + "firstName": "First {{request.query.userName}}", + "lastName": "Last {{request.query.userName}}" + } } } From 6d07101d3b9453788244d915cae24ee0ab6674c7 Mon Sep 17 00:00:00 2001 From: temi Date: Mon, 22 Apr 2024 11:10:48 +1000 Subject: [PATCH 096/115] #1580 - clear hub parameter when generating login/logout link --- .../org/ala/biocollect/TemplateTagLib.groovy | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/grails-app/taglib/au/org/ala/biocollect/TemplateTagLib.groovy b/grails-app/taglib/au/org/ala/biocollect/TemplateTagLib.groovy index 2b579e971..3d8abeaf7 100644 --- a/grails-app/taglib/au/org/ala/biocollect/TemplateTagLib.groovy +++ b/grails-app/taglib/au/org/ala/biocollect/TemplateTagLib.groovy @@ -2,6 +2,7 @@ package au.org.ala.biocollect import au.org.ala.biocollect.merit.SettingService import au.org.ala.biocollect.merit.UserService +import org.grails.web.servlet.mvc.GrailsWebRequest import org.springframework.context.MessageSource class TemplateTagLib { @@ -134,6 +135,11 @@ class TemplateTagLib { } break; case 'login': + // HubAwareLinkGenerator adds hub parameter to the link which causes subsequent URL parsing to return null in Pac4J filter. + // This causes the app to redirect to root page. And, BioCollect root page is redirected to Wordpress. + // Taking the user outside the application. This is a workaround to fix the issue. First, remove the + // hub parameter before link is generated and set it afterwards. + def hub = clearHubParameter() def logoutReturnToUrl = getCurrentURL( attrs.hubConfig ) if (grailsApplication.config.getProperty("security.oidc.logoutAction",String, "CAS") == "cognito") { // cannot use createLink since it adds hub query parameter and cognito will not consider it valid @@ -161,6 +167,7 @@ class TemplateTagLib { ) out << ""; } + setHubParameter(hub) break; case 'newproject': if (bs4) { @@ -427,4 +434,21 @@ class TemplateTagLib { private String getCurrentURL(Map hubConfig){ getCurrentURLFromRequest() } + + private String clearHubParameter(){ + def request = GrailsWebRequest.lookup() + def hub = request?.params?.hub + if(hub){ + request.params.remove('hub') + } + + hub + } + + private void setHubParameter(String hub) { + def request = GrailsWebRequest.lookup() + if (hub && request.params) { + request.params.hub = hub + } + } } From 4957f7c5635be0aacb3d386e81a3ef461e0adba6 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Mon, 22 Apr 2024 14:00:55 +1000 Subject: [PATCH 097/115] Revert small changes for parity with develop --- .../au/org/ala/biocollect/merit/ProjectController.groovy | 2 +- grails-app/i18n/messages.properties | 1 - grails-app/views/project/csProjectTemplate.gsp | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/merit/ProjectController.groovy b/grails-app/controllers/au/org/ala/biocollect/merit/ProjectController.groovy index 35ac02670..fe2a2f406 100644 --- a/grails-app/controllers/au/org/ala/biocollect/merit/ProjectController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/merit/ProjectController.groovy @@ -930,7 +930,7 @@ class ProjectController { List facets // format facets to a way acceptable for JS view model - if (searchResult.facets) { + if(searchResult.facets){ HubSettings hub = SettingService.hubConfig List allFacetConfig = hub.getFacetConfigForPage('projectFinder') ?: projectService.getDefaultFacets() List facetConfig = HubSettings.getFacetConfigForElasticSearch(allFacetConfig) diff --git a/grails-app/i18n/messages.properties b/grails-app/i18n/messages.properties index 238d547ff..9365e81ad 100644 --- a/grails-app/i18n/messages.properties +++ b/grails-app/i18n/messages.properties @@ -248,7 +248,6 @@ project.admin.members=Members project.admin.audit=Audit project.admin.editblog=Edit Project Blog project.admin.attachdoc=Attach Document -project.admin.referenceAssessment=Reference assessment project.admin.permissions.email=User\'s email address project.admin.permissions.level=Permission level diff --git a/grails-app/views/project/csProjectTemplate.gsp b/grails-app/views/project/csProjectTemplate.gsp index a7f9012aa..759749b4a 100644 --- a/grails-app/views/project/csProjectTemplate.gsp +++ b/grails-app/views/project/csProjectTemplate.gsp @@ -235,7 +235,6 @@ initialiseProjectActivitiesList(pActivitiesVM); initialiseData('project'); initialiseProjectActivitiesSettings(pActivitiesVM); - initialiseProjectAssessmentActivitiesSettings(pAssessmentActivitiesVM); From ec5e42a1157111b02bdf6395b4da7db1a7c81eb3 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Mon, 22 Apr 2024 14:08:10 +1000 Subject: [PATCH 098/115] Removed pAssessmentActivitiesVM initialisation (no longer used) --- grails-app/views/project/csProjectTemplate.gsp | 2 -- 1 file changed, 2 deletions(-) diff --git a/grails-app/views/project/csProjectTemplate.gsp b/grails-app/views/project/csProjectTemplate.gsp index 759749b4a..c1828ee49 100644 --- a/grails-app/views/project/csProjectTemplate.gsp +++ b/grails-app/views/project/csProjectTemplate.gsp @@ -230,8 +230,6 @@ var pActivitiesVM = new ProjectActivitiesViewModel(params, projectViewModel); - var pAssessmentActivitiesVM = new ProjectActivitiesViewModel(params, projectViewModel); - console.log(params, projectViewModel, pAssessmentActivitiesVM); initialiseProjectActivitiesList(pActivitiesVM); initialiseData('project'); initialiseProjectActivitiesSettings(pActivitiesVM); From 07731c792ffb5fb8845973aee0cbfc10b1b80e49 Mon Sep 17 00:00:00 2001 From: temi Date: Tue, 23 Apr 2024 05:11:39 +1000 Subject: [PATCH 099/115] #1580 - refactored current url --- .../au/org/ala/biocollect/TemplateTagLib.groovy | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/grails-app/taglib/au/org/ala/biocollect/TemplateTagLib.groovy b/grails-app/taglib/au/org/ala/biocollect/TemplateTagLib.groovy index 3d8abeaf7..d421c03a0 100644 --- a/grails-app/taglib/au/org/ala/biocollect/TemplateTagLib.groovy +++ b/grails-app/taglib/au/org/ala/biocollect/TemplateTagLib.groovy @@ -2,6 +2,7 @@ package au.org.ala.biocollect import au.org.ala.biocollect.merit.SettingService import au.org.ala.biocollect.merit.UserService +import grails.web.mapping.LinkGenerator import org.grails.web.servlet.mvc.GrailsWebRequest import org.springframework.context.MessageSource @@ -11,6 +12,7 @@ class TemplateTagLib { UserService userService SettingService settingService MessageSource messageSource + LinkGenerator grailsLinkGenerator def createAButton = { attrs -> Map link = attrs.config; @@ -335,18 +337,7 @@ class TemplateTagLib { } String getCurrentURLFromRequest() { - String requestURL = request.getRequestURL().toString() - // Construct the complete URL - StringBuilder url = new StringBuilder() - url.append(requestURL) - - String queryString = request.getQueryString() - // Include the query string if present - if (queryString != null) { - url.append("?").append(queryString) - } - - url.toString() + grailsLinkGenerator.link(absolute: true, params: request.params, uri: request.forwardURI) } From df7e33bee5488e1b7e47cf23558b7a926a6f91ee Mon Sep 17 00:00:00 2001 From: temi Date: Tue, 23 Apr 2024 05:14:42 +1000 Subject: [PATCH 100/115] 6.8-REFASSESS-SNAPSHOT --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index f64e31ca3..b16400354 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.8-LOGIN-SNAPSHOT +biocollectVersion=6.8-REFASSESS-SNAPSHOT grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From b597105871ae69f206d324f255906ccceb461132 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Mon, 22 Apr 2024 14:00:55 +1000 Subject: [PATCH 101/115] Revert small changes for parity with develop --- .../au/org/ala/biocollect/merit/ProjectController.groovy | 2 +- grails-app/i18n/messages.properties | 1 - grails-app/views/project/csProjectTemplate.gsp | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/merit/ProjectController.groovy b/grails-app/controllers/au/org/ala/biocollect/merit/ProjectController.groovy index 35ac02670..fe2a2f406 100644 --- a/grails-app/controllers/au/org/ala/biocollect/merit/ProjectController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/merit/ProjectController.groovy @@ -930,7 +930,7 @@ class ProjectController { List facets // format facets to a way acceptable for JS view model - if (searchResult.facets) { + if(searchResult.facets){ HubSettings hub = SettingService.hubConfig List allFacetConfig = hub.getFacetConfigForPage('projectFinder') ?: projectService.getDefaultFacets() List facetConfig = HubSettings.getFacetConfigForElasticSearch(allFacetConfig) diff --git a/grails-app/i18n/messages.properties b/grails-app/i18n/messages.properties index 238d547ff..9365e81ad 100644 --- a/grails-app/i18n/messages.properties +++ b/grails-app/i18n/messages.properties @@ -248,7 +248,6 @@ project.admin.members=Members project.admin.audit=Audit project.admin.editblog=Edit Project Blog project.admin.attachdoc=Attach Document -project.admin.referenceAssessment=Reference assessment project.admin.permissions.email=User\'s email address project.admin.permissions.level=Permission level diff --git a/grails-app/views/project/csProjectTemplate.gsp b/grails-app/views/project/csProjectTemplate.gsp index a7f9012aa..759749b4a 100644 --- a/grails-app/views/project/csProjectTemplate.gsp +++ b/grails-app/views/project/csProjectTemplate.gsp @@ -235,7 +235,6 @@ initialiseProjectActivitiesList(pActivitiesVM); initialiseData('project'); initialiseProjectActivitiesSettings(pActivitiesVM); - initialiseProjectAssessmentActivitiesSettings(pAssessmentActivitiesVM); From 2a18d56d499e2ee881d5090c10d7453815df7c2a Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Mon, 22 Apr 2024 14:08:10 +1000 Subject: [PATCH 102/115] Removed pAssessmentActivitiesVM initialisation (no longer used) --- grails-app/views/project/csProjectTemplate.gsp | 2 -- 1 file changed, 2 deletions(-) diff --git a/grails-app/views/project/csProjectTemplate.gsp b/grails-app/views/project/csProjectTemplate.gsp index 759749b4a..c1828ee49 100644 --- a/grails-app/views/project/csProjectTemplate.gsp +++ b/grails-app/views/project/csProjectTemplate.gsp @@ -230,8 +230,6 @@ var pActivitiesVM = new ProjectActivitiesViewModel(params, projectViewModel); - var pAssessmentActivitiesVM = new ProjectActivitiesViewModel(params, projectViewModel); - console.log(params, projectViewModel, pAssessmentActivitiesVM); initialiseProjectActivitiesList(pActivitiesVM); initialiseData('project'); initialiseProjectActivitiesSettings(pActivitiesVM); From 2dd86f0f291fd56890ef29abe0fdc63d6d800540 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Fri, 26 Apr 2024 12:04:50 +1000 Subject: [PATCH 103/115] Refactored config retrieval --- .../org/ala/biocollect/ReferenceAssessmentController.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 299e70cd0..b6ede6c06 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -17,7 +17,7 @@ class ReferenceAssessmentController { def baseUrl = '' if (!refDoc["url"].startsWith('http')) { - baseUrl = grailsApplication.config.grails.serverURL + baseUrl = grailsApplication.config.getProperty("grails.serverURL", String) } def assessPhoto = [ @@ -77,7 +77,7 @@ class ReferenceAssessmentController { } def requestRecords() { - def config = grailsApplication.config.refAssess + def config = grailsApplication.config.getProperty("refAssess", Map) def body = request.JSON def result From d7ec361080d8d0e6011803d29a22af65ea472762 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Fri, 26 Apr 2024 12:27:43 +1000 Subject: [PATCH 104/115] Release 6.6.6 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 7e990ad87..de00afba2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.6.6-REFASSESS-SNAPSHOT +biocollectVersion=6.6.6 grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From 242bb11640b7382e1f7f4ee6e7066e5b4351b011 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Fri, 26 Apr 2024 12:04:50 +1000 Subject: [PATCH 105/115] Refactored config retrieval --- .../org/ala/biocollect/ReferenceAssessmentController.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index 299e70cd0..b6ede6c06 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -17,7 +17,7 @@ class ReferenceAssessmentController { def baseUrl = '' if (!refDoc["url"].startsWith('http')) { - baseUrl = grailsApplication.config.grails.serverURL + baseUrl = grailsApplication.config.getProperty("grails.serverURL", String) } def assessPhoto = [ @@ -77,7 +77,7 @@ class ReferenceAssessmentController { } def requestRecords() { - def config = grailsApplication.config.refAssess + def config = grailsApplication.config.getProperty("refAssess", Map) def body = request.JSON def result From 5d3e16047a62c365d13f5163716fd0f7883fac9c Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Mon, 29 Apr 2024 14:00:47 +1000 Subject: [PATCH 106/115] Release 6.8 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index b16400354..ee320cd8b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.8-REFASSESS-SNAPSHOT +biocollectVersion=6.8 grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From 3d913ce2c5ac1a38cdce268c21fbee451a2503ec Mon Sep 17 00:00:00 2001 From: temi Date: Mon, 29 Apr 2024 16:55:47 +1000 Subject: [PATCH 107/115] getting numericString extender definition from ecodata-client-plugin --- grails-app/assets/javascripts/common-bs4.js | 1 + grails-app/assets/javascripts/common.js | 1 + .../javascripts/knockout-custom-extenders.js | 34 ------------------- 3 files changed, 2 insertions(+), 34 deletions(-) diff --git a/grails-app/assets/javascripts/common-bs4.js b/grails-app/assets/javascripts/common-bs4.js index 64a25fc39..24712490a 100644 --- a/grails-app/assets/javascripts/common-bs4.js +++ b/grails-app/assets/javascripts/common-bs4.js @@ -17,6 +17,7 @@ //= require knockout-dates.js //= require knockout-custom-bindings.js //= require knockout-custom-extenders.js +//= require knockout-utils.js //= require wmd/wmd.js //= require wmd/showdown.js //= require pagination.js diff --git a/grails-app/assets/javascripts/common.js b/grails-app/assets/javascripts/common.js index 2f6f6d4dc..893900348 100644 --- a/grails-app/assets/javascripts/common.js +++ b/grails-app/assets/javascripts/common.js @@ -17,6 +17,7 @@ //= require knockout-dates.js //= require knockout-custom-bindings.js //= require knockout-custom-extenders.js +//= require knockout-utils.js //= require wmd/wmd.js //= require wmd/showdown.js //= require pagination.js diff --git a/grails-app/assets/javascripts/knockout-custom-extenders.js b/grails-app/assets/javascripts/knockout-custom-extenders.js index 9892fc53e..d0918638c 100644 --- a/grails-app/assets/javascripts/knockout-custom-extenders.js +++ b/grails-app/assets/javascripts/knockout-custom-extenders.js @@ -48,39 +48,6 @@ ko.extenders.integer = function(target, options) { return target; }; -ko.extenders.numericString = function(target, precision) { - //create a writable computed observable to intercept writes to our observable - var result = ko.computed({ - read: target, //always return the original observables value - write: function(newValue) { - var val = newValue; - if (typeof val === 'string') { - val = newValue.replace(/,|\$/g, ''); - } - var current = target(), - roundingMultiplier = Math.pow(10, precision), - newValueAsNum = isNaN(val) ? 0 : parseFloat(+val), - valueToWrite = Math.round(newValueAsNum * roundingMultiplier) / roundingMultiplier; - - //only write if it changed - if (valueToWrite.toString() !== current || isNaN(val)) { - target(isNaN(val) ? newValue : valueToWrite.toString()); - } - else { - if (newValue !== current) { - target.notifySubscribers(valueToWrite.toString()); - } - } - } - }).extend({ notify: 'always' }); - - //initialize with current value to make sure it is rounded appropriately - result(target()); - - //return the new computed observable - return result; -}; - ko.extenders.url = function(target) { var result = ko.pureComputed({ read:target, @@ -118,7 +85,6 @@ ko.extenders.markdown = function(target, options) { return target; }; - // handles simple or deferred computed objects // see activity/edit.gsp for an example of use ko.extenders.async = function(computedDeferred, initialValue) { From 47aa81fd81ae0e6799bc83f5aacfd71ad4d3ddc7 Mon Sep 17 00:00:00 2001 From: temi Date: Mon, 29 Apr 2024 16:57:54 +1000 Subject: [PATCH 108/115] 6.8.1-snapshot --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index ee320cd8b..7790c233e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.8 +biocollectVersion=6.8.1-snapshot grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From ad2d1fe58ad1837e5bc47a789856adf12edbec99 Mon Sep 17 00:00:00 2001 From: temi Date: Mon, 29 Apr 2024 17:54:58 +1000 Subject: [PATCH 109/115] 6.8.1-SNAPSHOT --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 7790c233e..9ee7d922c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.8.1-snapshot +biocollectVersion=6.8.1-SNAPSHOT grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4 From 91b703c3e8dfc139f81d9f901a53b3bc1efcdee7 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Mon, 29 Apr 2024 20:55:26 +1000 Subject: [PATCH 110/115] Fixed internal server error when attempting to render non-existent staticPage controller 404 view --- .../au/org/ala/biocollect/StaticPageController.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/StaticPageController.groovy b/grails-app/controllers/au/org/ala/biocollect/StaticPageController.groovy index cab571fa2..2183c1603 100644 --- a/grails-app/controllers/au/org/ala/biocollect/StaticPageController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/StaticPageController.groovy @@ -17,7 +17,7 @@ class StaticPageController { String setting = "${page}"; render view: 'index', model: ["setting": setting, "mobile": params.mobile ?:false]; } else { - render view: "404"; + redirect (controller: "hub", action: "index") } } From d45ad0615b8023e03fcd4147f588011435794003 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Mon, 29 Apr 2024 21:27:27 +1000 Subject: [PATCH 111/115] Changed the output of createAssessmentRecordFromReference method to return newly created activity --- .../org/ala/biocollect/ReferenceAssessmentController.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index b6ede6c06..7f9bc8e8d 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -65,7 +65,7 @@ class ReferenceAssessmentController { ] // Create the new assessment activity record - activityService.update("", assessActivity) + def outActivity = activityService.update("", assessActivity) // Update the numTimesReferenced field on the reference record referenceActivity.outputs[0].data.numTimesReferenced = @@ -73,7 +73,7 @@ class ReferenceAssessmentController { activityService.update(referenceActivity.activityId, referenceActivity) // Return the assessment activity - assessActivity + outActivity } def requestRecords() { From 8b062a55629a14c622799e1bb26e7fabf00c1a9d Mon Sep 17 00:00:00 2001 From: temi Date: Tue, 30 Apr 2024 09:57:15 +1000 Subject: [PATCH 112/115] fixes issue with login url not having request parameters --- grails-app/taglib/au/org/ala/biocollect/TemplateTagLib.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/grails-app/taglib/au/org/ala/biocollect/TemplateTagLib.groovy b/grails-app/taglib/au/org/ala/biocollect/TemplateTagLib.groovy index d421c03a0..067ebe2bc 100644 --- a/grails-app/taglib/au/org/ala/biocollect/TemplateTagLib.groovy +++ b/grails-app/taglib/au/org/ala/biocollect/TemplateTagLib.groovy @@ -337,7 +337,8 @@ class TemplateTagLib { } String getCurrentURLFromRequest() { - grailsLinkGenerator.link(absolute: true, params: request.params, uri: request.forwardURI) + def grailsRequest = GrailsWebRequest.lookup() + grailsLinkGenerator.link(absolute: true, params: grailsRequest.originalParams, uri: request.forwardURI) } From 4b36134a49c2ea27d39cd1154f6be324be0a2322 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Tue, 30 Apr 2024 10:01:27 +1000 Subject: [PATCH 113/115] Changed the static page hub redirect to display a 404 page instead --- .../au/org/ala/biocollect/StaticPageController.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grails-app/controllers/au/org/ala/biocollect/StaticPageController.groovy b/grails-app/controllers/au/org/ala/biocollect/StaticPageController.groovy index 2183c1603..7d922fe49 100644 --- a/grails-app/controllers/au/org/ala/biocollect/StaticPageController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/StaticPageController.groovy @@ -17,7 +17,7 @@ class StaticPageController { String setting = "${page}"; render view: 'index', model: ["setting": setting, "mobile": params.mobile ?:false]; } else { - redirect (controller: "hub", action: "index") + render view:'/404' } } From ef68673a2a5650b6af799f7c01cc80f0daa6998d Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Tue, 30 Apr 2024 12:10:14 +1000 Subject: [PATCH 114/115] Added script to add static page to HCAT hub --- .../addStaticReferenceAssessmentPageHCAT.js | 19 + .../6.8.1/html/ref-assess-static.html | 343 ++++++++++++++++++ 2 files changed, 362 insertions(+) create mode 100644 src/main/scripts/releases/6.8.1/addStaticReferenceAssessmentPageHCAT.js create mode 100644 src/main/scripts/releases/6.8.1/html/ref-assess-static.html diff --git a/src/main/scripts/releases/6.8.1/addStaticReferenceAssessmentPageHCAT.js b/src/main/scripts/releases/6.8.1/addStaticReferenceAssessmentPageHCAT.js new file mode 100644 index 000000000..f1ede6a58 --- /dev/null +++ b/src/main/scripts/releases/6.8.1/addStaticReferenceAssessmentPageHCAT.js @@ -0,0 +1,19 @@ +const fs = require('fs'); + +const pageContent = fs.readFileSync('./html/ref-assess-static.html', 'utf8'); + +db.setting.updateOne( + { key: 'hcat.Request_Assessment_Records' }, + { + $set: { + key: 'hcat.Request_Assessment_Records', + value: pageContent.replaceAll('\n', '\r\n'), + version: NumberLong(1) + }, + $currentDate: { + lastUpdated: true, + dateCreated: true + }, + }, + { upsert: true } +); \ No newline at end of file diff --git a/src/main/scripts/releases/6.8.1/html/ref-assess-static.html b/src/main/scripts/releases/6.8.1/html/ref-assess-static.html new file mode 100644 index 000000000..a38f408ac --- /dev/null +++ b/src/main/scripts/releases/6.8.1/html/ref-assess-static.html @@ -0,0 +1,343 @@ + + +
    +
    +
    +
    +

    Select your areas of expertise

    +

    Major Vegetation Groups

    +

    + For the Image Assessment task, we ask that you provide an ecosystem + condition score for a suite of photographic images of different + habitats allocated to you based on the Major Vegetation Groups and + Hutchison geographic agro-climatic classifications that you nominate + as being within your area of expertise. Scoring these images will + enable your Site Condition Assessments to be calibrated with other + participants. +

    +

    + Please select all of the Major Vegetation Groups (MVG) and Hutchison + geographic agro-climatic classifications in which you have expertise. +

    +

    + After nominating your areas of expertise, please indicate if you would + like your assessments to be de-identified and confirm you have read, + understood, and accepted the privacy, IP and ethics arrangements for + this project. These arrangements are included in the HCAT instructions + manual accessible via the HCAT homepage. +

    +
    + +
    +
    + + + +
    +

    Agro-climatic Classifications

    +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +

    + Only members of the HCAT project team will be able to see your name + associated with the condition assessments you provide. When HCAT data + is included in publicly available material (e.g. publications, + reports, presentations, or data repositories) your contributions will + be anonymised. Your Image Aassessments will not be made public + regardless of your selection - they are used for calibration purposes + only +

    +

    + Your individual Site Condition Assessments will be credited in + publicly available material. Your Image Aassessments will not be made + public regardless of your selection - they are used for calibration + purposes only +

    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + +
    From 538172061c9b8f844d8e7f901d6fdbd55419f718 Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Tue, 30 Apr 2024 12:14:28 +1000 Subject: [PATCH 115/115] Release 6.8.1 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 9ee7d922c..2e95d178b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -biocollectVersion=6.8.1-SNAPSHOT +biocollectVersion=6.8.1 grailsVersion=5.1.9 grailsGradlePluginVersion=5.1.5 assetPipelineVersion=3.3.4