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/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/components/capture_details_modal_body.html b/gateway/sds_gateway/templates/users/components/capture_details_modal_body.html index 5c1536de1..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 @@ -62,6 +62,19 @@

{{ channel_label }}: {{ channel_value }} +
+ UUID: + {{ capture_uuid }} + +
@@ -160,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 155da313e..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 @@ -16,17 +16,21 @@

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

-
+
+ + {{ dataset_uuid }} + +

@@ -143,4 +147,18 @@

Total Size
+
+
+ + + SDK Datasets API + · Download via SDK + +
diff --git a/gateway/sds_gateway/templates/users/file_detail.html b/gateway/sds_gateway/templates/users/file_detail.html index 15d931e22..cf5de8383 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 }}

@@ -35,7 +44,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 +82,15 @@

{% endfor %} {% 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 f1a907330..ec915c2be 100644 --- a/gateway/sds_gateway/templates/users/files.html +++ b/gateway/sds_gateway/templates/users/files.html @@ -39,7 +39,7 @@
-

Files

+

Files

description Other Files +
  • + +
  • +
  • + + SDK Setup Guide + Python + +
  • @@ -303,6 +315,7 @@
    {% endblock content %} {% block javascript %} {{ block.super }} + 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.

    +

    + +