From 073aee95a327e9fbebdaff2193957ee51ffb2a79 Mon Sep 17 00:00:00 2001 From: Lucas Parzianello Date: Thu, 20 Aug 2026 11:22:47 -0400 Subject: [PATCH 1/3] included uuids to assets --- gateway/package.json | 131 +++++++++--------- .../__tests__/detailsModalConfig.test.js | 11 ++ .../static/js/constants/detailsModalConfig.js | 6 + .../capture_details_modal_body.html | 13 ++ .../dataset_details_modal_body.html | 22 +-- .../templates/users/file_detail.html | 24 +++- 6 files changed, 133 insertions(+), 74 deletions(-) diff --git a/gateway/package.json b/gateway/package.json index fe30d0786..dca08c005 100644 --- a/gateway/package.json +++ b/gateway/package.json @@ -1,66 +1,69 @@ { - "name": "sds_gateway", - "version": "0.0.1", - "devDependencies": { - "@babel/core": "^7.29.7", - "@babel/plugin-transform-runtime": "^7.29.7", - "@babel/preset-env": "^7.29.7", - "@biomejs/biome": "^1.9.4", - "@popperjs/core": "^2.11.8", - "autoprefixer": "^10.5.0", - "babel-jest": "^29.7.0", - "babel-loader": "^9.2.1", - "bootstrap": "^5.3.8", - "css-loader": "^6.11.0", - "fallow": "^2.89.0", - "jest": "^29.7.0", - "jest-environment-jsdom": "^29.7.0", - "mini-css-extract-plugin": "^2.10.2", - "node-sass-tilde-importer": "^1.0.2", - "pixrem": "^5.0.0", - "postcss": "^8.5.15", - "postcss-loader": "^8.2.1", - "postcss-preset-env": "^9.6.0", - "sass": "^1.100.0", - "sass-loader": "^14.2.1", - "webpack": "^5.107.2", - "webpack-bundle-tracker": "^3.2.4", - "webpack-cli": "^5.1.4", - "webpack-dev-server": "^5.2.4", - "webpack-merge": "^5.10.0" - }, - "dependencies": { - "@babel/runtime": "^7.29.7" - }, - "engines": { - "node": "24" - }, - "devEngines": { - "runtime": { - "name": "node", - "version": "^24.0", - "onFail": "download" - } - }, - "browserslist": ["last 2 versions"], - "babel": { - "presets": ["@babel/preset-env"], - "plugins": ["@babel/plugin-transform-runtime"] - }, - "parser": "babel-eslint", - "parserOptions": { - "sourceType": "module", - "allowImportExportEverywhere": true - }, - "scripts": { - "dev": "webpack --config webpack/dev.config.js; webpack serve --config webpack/dev.config.js", - "build": "webpack --config webpack/prod.config.js", - "test": "jest --config sds_gateway/static/js/tests-config/jest.config.js", - "test:watch": "jest --config sds_gateway/static/js/tests-config/jest.config.js --watch", - "test:coverage": "jest --config sds_gateway/static/js/tests-config/jest.config.js --coverage", - "test:ci": "jest --config sds_gateway/static/js/tests-config/jest.config.js --ci --coverage --watchAll=false", - "fallow": "fallow --summary", - "fallow:static-js": "node scripts/fallow-static-js-dead-code.cjs" - }, - "packageManager": "pnpm@11.5.2" + "name": "sds_gateway", + "version": "0.0.1", + "devDependencies": { + "@babel/core": "^7.29.7", + "@babel/plugin-transform-runtime": "^7.29.7", + "@babel/preset-env": "^7.29.7", + "@biomejs/biome": "^1.9.4", + "@popperjs/core": "^2.11.8", + "autoprefixer": "^10.5.0", + "babel-jest": "^29.7.0", + "babel-loader": "^9.2.1", + "bootstrap": "^5.3.8", + "css-loader": "^6.11.0", + "fallow": "^2.89.0", + "jest": "^29.7.0", + "jest-environment-jsdom": "^29.7.0", + "mini-css-extract-plugin": "^2.10.2", + "node-sass-tilde-importer": "^1.0.2", + "pixrem": "^5.0.0", + "postcss": "^8.5.15", + "postcss-loader": "^8.2.1", + "postcss-preset-env": "^9.6.0", + "sass": "^1.100.0", + "sass-loader": "^14.2.1", + "webpack": "^5.107.2", + "webpack-bundle-tracker": "^3.2.4", + "webpack-cli": "^5.1.4", + "webpack-dev-server": "^5.2.4", + "webpack-merge": "^5.10.0" + }, + "dependencies": { + "@babel/runtime": "^7.29.7" + }, + "engines": { + "node": "24" + }, + "devEngines": { + "runtime": { + "name": "node", + "version": "^24.0", + "onFail": "download" + } + }, + "browserslist": ["last 2 versions"], + "babel": { + "presets": ["@babel/preset-env"], + "plugins": ["@babel/plugin-transform-runtime"] + }, + "parser": "babel-eslint", + "parserOptions": { + "sourceType": "module", + "allowImportExportEverywhere": true + }, + "scripts": { + "dev": "webpack --config webpack/dev.config.js; webpack serve --config webpack/dev.config.js", + "build": "webpack --config webpack/prod.config.js", + "test": "jest --config sds_gateway/static/js/tests-config/jest.config.js", + "test:watch": "jest --config sds_gateway/static/js/tests-config/jest.config.js --watch", + "test:coverage": "jest --config sds_gateway/static/js/tests-config/jest.config.js --coverage", + "test:ci": "jest --config sds_gateway/static/js/tests-config/jest.config.js --ci --coverage --watchAll=false", + "fallow": "fallow --summary", + "fallow:static-js": "node scripts/fallow-static-js-dead-code.cjs" + }, + "packageManager": "pnpm@11.5.2", + "workspaces": [ + "." + ] } diff --git a/gateway/sds_gateway/static/js/constants/__tests__/detailsModalConfig.test.js b/gateway/sds_gateway/static/js/constants/__tests__/detailsModalConfig.test.js index 371afd4c4..88f7fbe37 100644 --- a/gateway/sds_gateway/static/js/constants/__tests__/detailsModalConfig.test.js +++ b/gateway/sds_gateway/static/js/constants/__tests__/detailsModalConfig.test.js @@ -67,6 +67,17 @@ describe("detailsModalConfig", () => { ) }) + test("capture afterInject wires attachUuidCopyButton on modal", () => { + const attachUuidCopyButton = jest.fn() + window.DetailsActionManager = { attachUuidCopyButton } + window.CaptureDetailsModalBehavior = { + afterInject: jest.fn(), + } + const modal = document.getElementById("asset-details-modal") + registry().capture.afterInject({ modal, meta: { uuid: "cap-42" } }) + expect(attachUuidCopyButton).toHaveBeenCalledWith(modal, "cap-42") + }) + test("dataset afterInject wires uuid copy on modal", () => { const attachUuidCopyButton = jest.fn() window.DetailsActionManager = { attachUuidCopyButton } diff --git a/gateway/sds_gateway/static/js/constants/detailsModalConfig.js b/gateway/sds_gateway/static/js/constants/detailsModalConfig.js index 88b085a05..bfa0dcef3 100644 --- a/gateway/sds_gateway/static/js/constants/detailsModalConfig.js +++ b/gateway/sds_gateway/static/js/constants/detailsModalConfig.js @@ -43,6 +43,12 @@ if (window.CaptureDetailsModalBehavior?.afterInject) { window.CaptureDetailsModalBehavior.afterInject(ctx) } + if (window.DetailsActionManager?.attachUuidCopyButton) { + window.DetailsActionManager.attachUuidCopyButton( + ctx.modal, + ctx.meta?.uuid, + ) + } }, loadingTitle: "Loading capture details...", } diff --git a/gateway/sds_gateway/templates/users/components/capture_details_modal_body.html b/gateway/sds_gateway/templates/users/components/capture_details_modal_body.html index 5c1536de1..5dcb3f1b7 100644 --- a/gateway/sds_gateway/templates/users/components/capture_details_modal_body.html +++ b/gateway/sds_gateway/templates/users/components/capture_details_modal_body.html @@ -62,6 +62,19 @@
{{ channel_label }}: {{ channel_value }} +
+ UUID: + {{ capture_uuid }} + +
diff --git a/gateway/sds_gateway/templates/users/components/dataset_details_modal_body.html b/gateway/sds_gateway/templates/users/components/dataset_details_modal_body.html index 155da313e..1691ce49c 100644 --- a/gateway/sds_gateway/templates/users/components/dataset_details_modal_body.html +++ b/gateway/sds_gateway/templates/users/components/dataset_details_modal_body.html @@ -16,17 +16,21 @@

{{ dataset.name }} (v{{ dataset.version }})

-
+
+ + {{ dataset_uuid }} + +

diff --git a/gateway/sds_gateway/templates/users/file_detail.html b/gateway/sds_gateway/templates/users/file_detail.html index 15d931e22..2a628456a 100644 --- a/gateway/sds_gateway/templates/users/file_detail.html +++ b/gateway/sds_gateway/templates/users/file_detail.html @@ -35,7 +35,18 @@

- {% if key == "directory" or key == "sum_blake3" or key == "uuid" %} + {% if key == "uuid" %} + {{ value }} + + {% elif key == "directory" or key == "sum_blake3" %} {{ value }} {% elif key == "owner" %} {{ request.user.name }} @@ -62,3 +73,14 @@

{% endfor %} {% endblock content %} +{% block javascript %} + + +{% endblock javascript %} From aa2f3353b6d6364ddcfecdf1ae30d997e660049c Mon Sep 17 00:00:00 2001 From: Lucas Parzianello Date: Thu, 20 Aug 2026 11:52:44 -0400 Subject: [PATCH 2/3] added links to relevant SDK docs in multiple pages --- .../components/capture_details_modal_body.html | 14 ++++++++++++++ .../components/dataset_details_modal_body.html | 14 ++++++++++++++ .../sds_gateway/templates/users/file_detail.html | 9 +++++++++ gateway/sds_gateway/templates/users/files.html | 14 +++++++++++++- .../templates/users/generate_api_key_form.html | 14 ++++++++++++++ .../sds_gateway/templates/users/new_api_key.html | 9 +++++++++ .../users/partials/upload_capture_modal.html | 10 ++++++++++ .../templates/users/published_datasets_list.html | 10 ++++++++++ .../sds_gateway/templates/users/user_api_key.html | 10 ++++++++++ 9 files changed, 103 insertions(+), 1 deletion(-) diff --git a/gateway/sds_gateway/templates/users/components/capture_details_modal_body.html b/gateway/sds_gateway/templates/users/components/capture_details_modal_body.html index 5dcb3f1b7..02fe3035c 100644 --- a/gateway/sds_gateway/templates/users/components/capture_details_modal_body.html +++ b/gateway/sds_gateway/templates/users/components/capture_details_modal_body.html @@ -173,3 +173,17 @@

{% endif %}
{% include "users/components/capture_files_summary_fragment.html" %}
+
+ diff --git a/gateway/sds_gateway/templates/users/components/dataset_details_modal_body.html b/gateway/sds_gateway/templates/users/components/dataset_details_modal_body.html index 1691ce49c..5eb9a9835 100644 --- a/gateway/sds_gateway/templates/users/components/dataset_details_modal_body.html +++ b/gateway/sds_gateway/templates/users/components/dataset_details_modal_body.html @@ -147,4 +147,18 @@
Total Size
+
+ diff --git a/gateway/sds_gateway/templates/users/file_detail.html b/gateway/sds_gateway/templates/users/file_detail.html index 2a628456a..422447a17 100644 --- a/gateway/sds_gateway/templates/users/file_detail.html +++ b/gateway/sds_gateway/templates/users/file_detail.html @@ -10,6 +10,15 @@
Back to File List +

File {{ file.name }}

diff --git a/gateway/sds_gateway/templates/users/files.html b/gateway/sds_gateway/templates/users/files.html index f1a907330..61c7c0982 100644 --- a/gateway/sds_gateway/templates/users/files.html +++ b/gateway/sds_gateway/templates/users/files.html @@ -38,8 +38,8 @@
+

Files

-

Files

description Other Files +
  • + +
  • +
  • + + SDK Setup Guide + Python + +
  • diff --git a/gateway/sds_gateway/templates/users/generate_api_key_form.html b/gateway/sds_gateway/templates/users/generate_api_key_form.html index 323436c75..1ba11bf51 100644 --- a/gateway/sds_gateway/templates/users/generate_api_key_form.html +++ b/gateway/sds_gateway/templates/users/generate_api_key_form.html @@ -17,6 +17,20 @@

    Generate an API Key

    View API Keys + +
    diff --git a/gateway/sds_gateway/templates/users/new_api_key.html b/gateway/sds_gateway/templates/users/new_api_key.html index 0a097ceab..66bcd9cff 100644 --- a/gateway/sds_gateway/templates/users/new_api_key.html +++ b/gateway/sds_gateway/templates/users/new_api_key.html @@ -21,6 +21,15 @@

    Your New API Key

    {{ api_key }}

    Keep this key safe and secure. You will not be able to view it again.

    +

    + +
    From 0fee041dbbae5a2e1da9a9849be6ad7e456b819a Mon Sep 17 00:00:00 2001 From: Lucas Parzianello Date: Thu, 20 Aug 2026 12:16:36 -0400 Subject: [PATCH 3/3] gwy: reviewed uuid copy actions --- gateway/sds_gateway/templates/users/capture_list.html | 1 + gateway/sds_gateway/templates/users/file_detail.html | 5 +++-- gateway/sds_gateway/templates/users/files.html | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gateway/sds_gateway/templates/users/capture_list.html b/gateway/sds_gateway/templates/users/capture_list.html index f6b59c243..a94ca4096 100644 --- a/gateway/sds_gateway/templates/users/capture_list.html +++ b/gateway/sds_gateway/templates/users/capture_list.html @@ -276,6 +276,7 @@

    + diff --git a/gateway/sds_gateway/templates/users/file_detail.html b/gateway/sds_gateway/templates/users/file_detail.html index 422447a17..cf5de8383 100644 --- a/gateway/sds_gateway/templates/users/file_detail.html +++ b/gateway/sds_gateway/templates/users/file_detail.html @@ -83,13 +83,14 @@

    {% endblock content %} {% block javascript %} + {{ block.super }} {% endblock javascript %} diff --git a/gateway/sds_gateway/templates/users/files.html b/gateway/sds_gateway/templates/users/files.html index 61c7c0982..ec915c2be 100644 --- a/gateway/sds_gateway/templates/users/files.html +++ b/gateway/sds_gateway/templates/users/files.html @@ -38,8 +38,8 @@
    -

    Files

    +

    Files

    {% endblock content %} {% block javascript %} {{ block.super }} +