From 00123343bb9df9345a7ae01e29cf9497bd0978ec Mon Sep 17 00:00:00 2001 From: Simon Krol Date: Fri, 20 Sep 2024 15:26:32 -0400 Subject: [PATCH] Update to v1.5.10 open-source release (#227) --- .viperlightignore | 1 - CHANGELOG.md | 34 +- NOTICE | 2 +- SECURITY.md | 11 + source/web/package-lock.json | 400 ++++---------- source/web/package.json | 12 +- source/web/public/runtimeConfig.json | 2 +- source/web/src/App.vue | 33 +- source/web/src/components/download.vue | 255 +++++---- source/web/src/components/filesystems.vue | 209 +++++--- source/web/src/components/makedir.vue | 143 ++--- source/web/src/components/navbar.vue | 40 +- source/web/src/components/upload.vue | 358 +++++++------ source/web/src/main.js | 14 +- source/web/src/routes/Admin.vue | 30 +- source/web/src/routes/Configure.vue | 327 +++++++----- source/web/src/routes/Details.vue | 69 ++- source/web/src/routes/Filesystem.vue | 616 ++++++++++++++-------- source/web/src/routes/Home.vue | 46 +- source/web/src/routes/Login.vue | 38 +- 20 files changed, 1386 insertions(+), 1254 deletions(-) create mode 100644 SECURITY.md diff --git a/.viperlightignore b/.viperlightignore index ef2470f..98b896e 100644 --- a/.viperlightignore +++ b/.viperlightignore @@ -19,7 +19,6 @@ Config @aws-amplify/api=4.0.64 @aws-amplify/core=4.7.15 aws-amplify=4.3.46 -bootstrap=4.6.2 vue-router=3.6.5 eslint=7.32.0 eslint-plugin-vue=7.20.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 529094f..7562488 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,18 +4,28 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.5.10] - 2024-09-20 +### Security: +- Bump webpack to `5.94.0` to resolve [CVE-2024-43788](https://github.com/advisories/GHSA-4vvj-4cpr-p986) +- Bump serve-static to `1.16.2` to resolve CVE with send [ CVE-2024-43799](https://github.com/advisories/GHSA-m6fv-jmcg-4jfg) +- Bump path-to-regexp to `0.1.10` to resolve [CVE-2024-45296](https://github.com/advisories/GHSA-9wv6-86v2-598j) +- Bump micromatch to `4.0.8` to resolve [CVE-2024-4067](https://github.com/advisories/GHSA-952p-6rrq-rcjv) +- Remove usage of `bootstrap-vue` (EOL) and migrate `bootstrap v4` (EOL) to `bootstrap v5` to resolve [CVE-2024-6531](https://nvd.nist.gov/vuln/detail/CVE-2024-6531) +- Adds Security.md file to provide guidance around reporting security vulnerabilities. + + ## [1.5.9] - 2024-08-02 ### Security: -- Bump `fast-xml-parser` to `4.4.1` to resolve [CVE-2024-41818] -- Update to Vue 3 compat build and replace `vue-template-compiler` with `@vue/compiler-sfc` to resolve [CVE-2024-6783] +- Bump `fast-xml-parser` to `4.4.1` to resolve [CVE-2024-41818](https://nvd.nist.gov/vuln/detail/CVE-2024-41818) +- Update to Vue 3 compat build and replace `vue-template-compiler` with `@vue/compiler-sfc` to resolve [CVE-2024-6783](https://nvd.nist.gov/vuln/detail/CVE-2024-6783) ### Removed - Unused `vue-stepper-component` and `vue2-dropzone` dependencies ## [1.5.8] - 2024-06-23 ### Security: -- Bump `braces` to `3.0.3` to resolve [CVE-2024-4068] -- Bump `ws` to resolve [CVE-2024-37890] +- Bump `braces` to `3.0.3` to resolve [CVE-2024-4068](https://nvd.nist.gov/vuln/detail/CVE-2024-4068) +- Bump `ws` to resolve [CVE-2024-37890](https://nvd.nist.gov/vuln/detail/CVE-2024-37890) ## [1.5.7] - 2024-05-30 ### Fixed: @@ -27,19 +37,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [1.5.6] - 2024-04-09 ### Fixed: - Updated axios sub-dependency to use v0.28.0 to resolve security vulnerabilities: - - [CVE-2023-45857] - - [CVE-2024-28849] - - [CVE-2023-26159] + - [CVE-2023-45857](https://nvd.nist.gov/vuln/detail/CVE-2023-45857) + - [CVE-2024-28849](https://nvd.nist.gov/vuln/detail/CVE-2024-28849) + - [CVE-2023-26159](https://nvd.nist.gov/vuln/detail/CVE-2023-26159) - Re-generated package-lock to resolve security vulnerabilities: - - [CVE-2024-29180] - - [CVE-2023-42282] - - [CVE-2024-29041] + - [CVE-2024-29180](https://nvd.nist.gov/vuln/detail/CVE-2024-29180) + - [CVE-2023-42282](https://nvd.nist.gov/vuln/detail/CVE-2023-42282) + - [CVE-2024-29041](https://nvd.nist.gov/vuln/detail/CVE-2024-29041) ## [1.5.5] - 2023-10-20 ### Fixed: -- Updated crypto.js dependency to fix security vulnerabilities [CVE-2023-46233] -- Updated react-dev-tools dependency to fix security vulnerabilities [CVE-2023-5654] +- Updated crypto.js dependency to fix security vulnerabilities [CVE-2023-46233](https://nvd.nist.gov/vuln/detail/CVE-2023-46233) +- Updated react-dev-tools dependency to fix security vulnerabilities [CVE-2023-5654](https://nvd.nist.gov/vuln/detail/CVE-2023-5654) - Update urllib3 dependency to v1.26.18 ## [1.5.4] - 2023-10-20 diff --git a/NOTICE b/NOTICE index e46f703..a5eb056 100644 --- a/NOTICE +++ b/NOTICE @@ -58,7 +58,7 @@ aws-amplify under the Apache License Version 2.0 aws-amplify-vue under the Apache License Version 2.0 aws-sdk under the Apache License Version 2.0 bootstrap under the MIT License (MIT) -bootstrap-vue under the MIT License (MIT) +bootstrap-icons under the MIT License (MIT) core-js under the MIT License (MIT) awscli under the Apache License Version 2.0 colorama under the BSD-3-Clause License diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..c8b2762 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,11 @@ +# Reporting Security Issues + +We take all security reports seriously. +When we receive such reports, +we will investigate and subsequently address +any potential vulnerabilities as quickly as possible. +If you discover a potential security issue in this project, +please notify AWS/Amazon Security via our +[vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) +or directly via email to [AWS Security](mailto:aws-security@amazon.com). +Please do *not* create a public GitHub issue in this project. \ No newline at end of file diff --git a/source/web/package-lock.json b/source/web/package-lock.json index 655c714..fa7cfcd 100644 --- a/source/web/package-lock.json +++ b/source/web/package-lock.json @@ -15,12 +15,12 @@ "aws-amplify": "^4.3.43", "aws-amplify-vue": "2.1.5", "aws-sdk": "^2.1354.0", - "bootstrap": "^4.5.0", - "bootstrap-vue": "^2.23.0", + "bootstrap": "^5.3.3", + "bootstrap-icons": "^1.11.3", "core-js": "^3.6.5", "vue": "^3.4.34", "vue-router": "^3.4.3", - "webpack": "^5.75.0" + "webpack": "^5.94.0" }, "devDependencies": { "@vue/cli-plugin-babel": "^5.0.8", @@ -9105,94 +9105,6 @@ "node": ">= 8" } }, - "node_modules/@nuxt/opencollective": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@nuxt/opencollective/-/opencollective-0.3.3.tgz", - "integrity": "sha512-6IKCd+gP0HliixqZT/p8nW3tucD6Sv/u/eR2A9X4rxT/6hXlMzA4GZQzq4d2qnBAwSwGpmKyzkyTjNjrhaA25A==", - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "consola": "^2.15.0", - "node-fetch": "^2.6.7" - }, - "bin": { - "opencollective": "bin/opencollective.js" - }, - "engines": { - "node": ">=8.0.0", - "npm": ">=5.0.0" - } - }, - "node_modules/@nuxt/opencollective/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@nuxt/opencollective/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@nuxt/opencollective/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@nuxt/opencollective/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" - }, - "node_modules/@nuxt/opencollective/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@nuxt/opencollective/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@polka/url": { "version": "1.0.0-next.25", "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz", @@ -9200,6 +9112,17 @@ "dev": true, "license": "MIT" }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "license": "MIT", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, "node_modules/@react-native-community/cli": { "version": "13.6.9", "resolved": "https://registry.npmjs.org/@react-native-community/cli/-/cli-13.6.9.tgz", @@ -11383,22 +11306,13 @@ "version": "8.56.11", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.11.tgz", "integrity": "sha512-sVBpJMf7UPo/wGecYOpk2aQya2VUGeHhe38WG7/mN5FufNSubf5VT9Uh9Uyp8/eLJpu1/tuhJ/qTo4mhSB4V4Q==", + "dev": true, "license": "MIT", "dependencies": { "@types/estree": "*", "@types/json-schema": "*" } }, - "node_modules/@types/eslint-scope": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", - "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", - "license": "MIT", - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", @@ -13665,11 +13579,10 @@ "license": "MIT" }, "node_modules/body-parser": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", - "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", "dev": true, - "license": "MIT", "dependencies": { "bytes": "3.1.2", "content-type": "~1.0.5", @@ -13679,7 +13592,7 @@ "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.11.0", + "qs": "6.13.0", "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" @@ -13694,7 +13607,6 @@ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -13704,7 +13616,6 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, - "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -13713,15 +13624,13 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/body-parser/node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dev": true, - "license": "MIT", "dependencies": { "ee-first": "1.1.1" }, @@ -13729,22 +13638,6 @@ "node": ">= 0.8" } }, - "node_modules/body-parser/node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/bonjour-service": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.2.1.tgz", @@ -13764,9 +13657,9 @@ "license": "ISC" }, "node_modules/bootstrap": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.2.tgz", - "integrity": "sha512-51Bbp/Uxr9aTuy6ca/8FbFloBUJZLHwnhTcnjIeRn2suQWsWzcuJhGjKDB5eppVte/8oCdOL3VuwxvZDUggwGQ==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.3.tgz", + "integrity": "sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==", "funding": [ { "type": "github", @@ -13779,58 +13672,24 @@ ], "license": "MIT", "peerDependencies": { - "jquery": "1.9.1 - 3", - "popper.js": "^1.16.1" - } - }, - "node_modules/bootstrap-vue": { - "version": "2.23.1", - "resolved": "https://registry.npmjs.org/bootstrap-vue/-/bootstrap-vue-2.23.1.tgz", - "integrity": "sha512-SEWkG4LzmMuWjQdSYmAQk1G/oOKm37dtNfjB5kxq0YafnL2W6qUAmeDTcIZVbPiQd2OQlIkWOMPBRGySk/zGsg==", - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "@nuxt/opencollective": "^0.3.2", - "bootstrap": "^4.6.1", - "popper.js": "^1.16.1", - "portal-vue": "^2.1.7", - "vue-functional-data-merge": "^3.1.0" - } - }, - "node_modules/bootstrap-vue/node_modules/@vue/compiler-sfc": { - "version": "2.7.16", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.16.tgz", - "integrity": "sha512-KWhJ9k5nXuNtygPU7+t1rX6baZeqOYLEforUPjgNDBnLicfHCoi48H87Q8XyLZOrNNsmhuwKqtpDQWjEFe6Ekg==", - "peer": true, - "dependencies": { - "@babel/parser": "^7.23.5", - "postcss": "^8.4.14", - "source-map": "^0.6.1" - }, - "optionalDependencies": { - "prettier": "^1.18.2 || ^2.0.0" - } - }, - "node_modules/bootstrap-vue/node_modules/portal-vue": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/portal-vue/-/portal-vue-2.1.7.tgz", - "integrity": "sha512-+yCno2oB3xA7irTt0EU5Ezw22L2J51uKAacE/6hMPMoO/mx3h4rXFkkBkT4GFsMDv/vEe8TNKC3ujJJ0PTwb6g==", - "license": "MIT", - "peerDependencies": { - "vue": "^2.5.18" + "@popperjs/core": "^2.11.8" } }, - "node_modules/bootstrap-vue/node_modules/vue": { - "version": "2.7.16", - "resolved": "https://registry.npmjs.org/vue/-/vue-2.7.16.tgz", - "integrity": "sha512-4gCtFXaAA3zYZdTp5s4Hl2sozuySsgz4jy1EnpBHNfpMa9dK1ZCG7viqBPCwXtmgc8nHqUsAu3G4gtmXkkY3Sw==", - "deprecated": "Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details.", - "license": "MIT", - "peer": true, - "dependencies": { - "@vue/compiler-sfc": "2.7.16", - "csstype": "^3.1.0" - } + "node_modules/bootstrap-icons": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/bootstrap-icons/-/bootstrap-icons-1.11.3.tgz", + "integrity": "sha512-+3lpHrCw/it2/7lBL15VR0HEumaBss0+f/Lb6ZvHISn1mlK83jjFpooTLsMWbIjJMDjDjOExMsTxnXSIT4k4ww==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/twbs" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/bootstrap" + } + ], + "license": "MIT" }, "node_modules/bowser": { "version": "2.11.0", @@ -14548,12 +14407,6 @@ "license": "MIT", "peer": true }, - "node_modules/consola": { - "version": "2.15.3", - "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", - "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==", - "license": "MIT" - }, "node_modules/consolidate": { "version": "0.15.1", "resolved": "https://registry.npmjs.org/consolidate/-/consolidate-0.15.1.tgz", @@ -14607,7 +14460,6 @@ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -16477,38 +16329,37 @@ } }, "node_modules/express": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", - "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz", + "integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==", "dev": true, - "license": "MIT", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.2", + "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.2.0", + "finalhandler": "1.3.1", "fresh": "0.5.2", "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", + "merge-descriptors": "1.0.3", "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", + "path-to-regexp": "0.1.10", "proxy-addr": "~2.0.7", - "qs": "6.11.0", + "qs": "6.13.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", + "send": "0.19.0", + "serve-static": "1.16.2", "setprototypeof": "1.2.0", "statuses": "2.0.1", "type-is": "~1.6.18", @@ -16534,20 +16385,27 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, - "license": "MIT", "dependencies": { "ms": "2.0.0" } }, + "node_modules/express/node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/express/node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", "dev": true, - "license": "MIT", "dependencies": { "debug": "2.6.9", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "on-finished": "2.4.1", "parseurl": "~1.3.3", @@ -16562,15 +16420,13 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/express/node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dev": true, - "license": "MIT", "dependencies": { "ee-first": "1.1.1" }, @@ -16578,22 +16434,6 @@ "node": ">= 0.8" } }, - "node_modules/express/node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/express/node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -16620,7 +16460,6 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -17734,7 +17573,6 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, - "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -18843,13 +18681,6 @@ "@sideway/pinpoint": "^2.0.0" } }, - "node_modules/jquery": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", - "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==", - "license": "MIT", - "peer": true - }, "node_modules/js-cookie": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.1.tgz", @@ -19769,7 +19600,6 @@ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -19795,11 +19625,13 @@ "peer": true }, "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", "dev": true, - "license": "MIT" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/merge-source-map": { "version": "1.1.0", @@ -20485,10 +20317,9 @@ } }, "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", - "license": "MIT", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -21459,11 +21290,10 @@ "license": "MIT" }, "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", - "dev": true, - "license": "MIT" + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", + "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", + "dev": true }, "node_modules/path-type": { "version": "4.0.0", @@ -21526,17 +21356,6 @@ "node": ">=8" } }, - "node_modules/popper.js": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", - "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", - "deprecated": "You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1", - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/popperjs" - } - }, "node_modules/portfinder": { "version": "1.0.32", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.32.tgz", @@ -22425,10 +22244,9 @@ } }, "node_modules/qs": { - "version": "6.12.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.3.tgz", - "integrity": "sha512-AWJm14H1vVaO/iNZ4/hO+HyaTehuy9nRqVdkTqlJt0HWvBiBIEXFmb4C0DGeYo3Xes9rrEW+TxHsaigCbN5ICQ==", - "license": "BSD-3-Clause", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "dependencies": { "side-channel": "^1.0.6" }, @@ -22510,7 +22328,6 @@ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dev": true, - "license": "MIT", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -22526,7 +22343,6 @@ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -23258,8 +23074,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/sax": { "version": "1.2.1", @@ -23326,10 +23141,9 @@ } }, "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "license": "MIT", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -23353,7 +23167,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -23361,14 +23174,12 @@ "node_modules/send/node_modules/debug/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/send/node_modules/mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "license": "MIT", "bin": { "mime": "cli.js" }, @@ -23379,14 +23190,12 @@ "node_modules/send/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/send/node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "license": "MIT", "dependencies": { "ee-first": "1.1.1" }, @@ -23398,7 +23207,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -23499,20 +23307,27 @@ "license": "ISC" }, "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "license": "MIT", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", "dependencies": { - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.18.0" + "send": "0.19.0" }, "engines": { "node": ">= 0.8.0" } }, + "node_modules/serve-static/node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -24615,7 +24430,6 @@ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", "dev": true, - "license": "MIT", "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -25041,12 +24855,6 @@ "node": ">=6.0.0" } }, - "node_modules/vue-functional-data-merge": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/vue-functional-data-merge/-/vue-functional-data-merge-3.1.0.tgz", - "integrity": "sha512-leT4kdJVQyeZNY1kmnS1xiUlQ9z1B/kdBFCILIjYYQDqZgLqCLa0UhjSSeRX6c3mUe6U5qYeM8LrEqkHJ1B4LA==", - "license": "MIT" - }, "node_modules/vue-hot-reload-api": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz", @@ -25239,12 +25047,10 @@ "license": "BSD-2-Clause" }, "node_modules/webpack": { - "version": "5.93.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.93.0.tgz", - "integrity": "sha512-Y0m5oEY1LRuwly578VqluorkXbvXKh7U3rLoQCEO04M97ScRr44afGVkI0FQFsXzysk5OgFAxjZAb9rsGQVihA==", - "license": "MIT", + "version": "5.94.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz", + "integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==", "dependencies": { - "@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.5", "@webassemblyjs/ast": "^1.12.1", "@webassemblyjs/wasm-edit": "^1.12.1", @@ -25253,7 +25059,7 @@ "acorn-import-attributes": "^1.9.5", "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.17.0", + "enhanced-resolve": "^5.17.1", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", diff --git a/source/web/package.json b/source/web/package.json index 2fda19d..184b363 100644 --- a/source/web/package.json +++ b/source/web/package.json @@ -12,25 +12,25 @@ "dependencies": { "@aws-amplify/api": "^4.0.63", "@aws-amplify/core": "^4.7.15", + "@vue/compat": "^3.4.34", "aws-amplify": "^4.3.43", "aws-amplify-vue": "2.1.5", "aws-sdk": "^2.1354.0", - "bootstrap": "^4.5.0", - "bootstrap-vue": "^2.23.0", + "bootstrap": "^5.3.3", + "bootstrap-icons": "^1.11.3", "core-js": "^3.6.5", "vue": "^3.4.34", - "@vue/compat": "^3.4.34", "vue-router": "^3.4.3", - "webpack": "^5.75.0" + "webpack": "^5.94.0" }, "devDependencies": { "@vue/cli-plugin-babel": "^5.0.8", "@vue/cli-plugin-eslint": "^5.0.8", "@vue/cli-service": "^5.0.8", + "@vue/compiler-sfc": "^3.4.34", "babel-eslint": "^10.1.0", "eslint": "^7.32.0", "eslint-plugin-vue": "^7.20.0", - "@vue/compiler-sfc": "^3.4.34", "webpack-subresource-integrity": "^1.3.4" }, "eslintConfig": { @@ -61,5 +61,5 @@ "fast-xml-parser": "4.4.1", "postcss": "8.4.31", "axios": "0.28.0" - } + } } diff --git a/source/web/public/runtimeConfig.json b/source/web/public/runtimeConfig.json index 0f56f5f..ac4fdc4 100644 --- a/source/web/public/runtimeConfig.json +++ b/source/web/public/runtimeConfig.json @@ -4,4 +4,4 @@ "userPoolId": "", "userPoolIdClientId": "", "identityPoolId": "" -} +} \ No newline at end of file diff --git a/source/web/src/App.vue b/source/web/src/App.vue index 1e3c585..f45b9da 100644 --- a/source/web/src/App.vue +++ b/source/web/src/App.vue @@ -1,29 +1,22 @@ - - - diff --git a/source/web/src/components/download.vue b/source/web/src/components/download.vue index 664a7b3..aec92a1 100644 --- a/source/web/src/components/download.vue +++ b/source/web/src/components/download.vue @@ -1,148 +1,169 @@ + let offset = chunk.dzchunkbyteoffset; + let chunkIndex = chunk.dzchunkindex; + + let chunkData = chunk.chunk_data; + let chunkblob = await (await fetch(this.href + chunkData)).blob(); + + this.totalChunks = chunk.dztotalchunkcount; + this.chunkBlobs[chunkIndex] = chunkblob; + + this.dzchunkindex = chunkIndex; + this.dzchunkbyteoffset = offset; + + this.downloadFile(filename); + } else { + let requestParams = { + queryStringParameters: { + path: this.path, + filename: filename, + dzchunkindex: this.dzchunkindex, + dzchunkbyteoffset: this.dzchunkbyteoffset, + }, + }; + + let chunk = await this.downloadChunk(requestParams); + + let offset = chunk.dzchunkbyteoffset; + let chunkIndex = chunk.dzchunkindex; + console.log(chunkIndex); + let totalChunks = chunk.dztotalchunkcount; + + if (chunkIndex == totalChunks) { + this.downloadDone = true; + let finalBlob = new Blob(this.chunkBlobs); + let link = document.createElement("a"); + + link.href = window.URL.createObjectURL(finalBlob); + link.download = filename; + + link.click(); + + let formattedResponse = { + type: "success", + message: "Download completed successfully!", + }; + this.$emit("downloadCompleted", formattedResponse); + this.resetModal(); + } else { + let chunkData = chunk.chunk_data; + + this.dzchunkindex = chunkIndex; + this.dzchunkbyteoffset = offset; + + let chunkblob = await (await fetch(this.href + chunkData)).blob(); + + this.chunkBlobs[chunkIndex] = chunkblob; + + this.downloadFile(filename); + } + } + }, + }, +}; + diff --git a/source/web/src/components/filesystems.vue b/source/web/src/components/filesystems.vue index 3cc3d8f..e522889 100644 --- a/source/web/src/components/filesystems.vue +++ b/source/web/src/components/filesystems.vue @@ -1,105 +1,152 @@ - - \ No newline at end of file + diff --git a/source/web/src/components/makedir.vue b/source/web/src/components/makedir.vue index 3117624..81988fb 100644 --- a/source/web/src/components/makedir.vue +++ b/source/web/src/components/makedir.vue @@ -1,92 +1,93 @@ - - - + diff --git a/source/web/src/components/navbar.vue b/source/web/src/components/navbar.vue index 04a435c..271d59e 100644 --- a/source/web/src/components/navbar.vue +++ b/source/web/src/components/navbar.vue @@ -1,52 +1,50 @@ - \ No newline at end of file + diff --git a/source/web/src/components/upload.vue b/source/web/src/components/upload.vue index 846ea1d..2973ff8 100644 --- a/source/web/src/components/upload.vue +++ b/source/web/src/components/upload.vue @@ -1,53 +1,64 @@ - \ No newline at end of file + diff --git a/source/web/src/main.js b/source/web/src/main.js index bc5bb41..8c5afba 100644 --- a/source/web/src/main.js +++ b/source/web/src/main.js @@ -1,12 +1,13 @@ import Vue from 'vue' +import { createApp } from 'vue' import App from './App.vue' -import {BootstrapVue, BootstrapVueIcons} from 'bootstrap-vue' import Amplify, * as AmplifyModules from 'aws-amplify' import { AmplifyPlugin } from 'aws-amplify-vue' +import 'bootstrap/dist/js/bootstrap.bundle.min.js'; +import 'bootstrap-icons/font/bootstrap-icons.css'; import 'bootstrap/dist/css/bootstrap.css' -import 'bootstrap-vue/dist/bootstrap-vue.css' import router from './router.js' @@ -48,12 +49,7 @@ getRuntimeConfig().then(function(json) { }); Vue.use(AmplifyPlugin, AmplifyModules) - - Vue.use(BootstrapVue) - Vue.use(BootstrapVueIcons) - new Vue({ - router, - render: h => h(App), - }).$mount('#app') + const app = createApp({router, ...App}) + app.mount('#app'); }); diff --git a/source/web/src/routes/Admin.vue b/source/web/src/routes/Admin.vue index 46217f6..42b9271 100644 --- a/source/web/src/routes/Admin.vue +++ b/source/web/src/routes/Admin.vue @@ -1,29 +1,19 @@ - - - + diff --git a/source/web/src/routes/Configure.vue b/source/web/src/routes/Configure.vue index 61d8f94..a130649 100644 --- a/source/web/src/routes/Configure.vue +++ b/source/web/src/routes/Configure.vue @@ -1,161 +1,214 @@ + mountTargetNetinfo["uid"] = this.uid; + mountTargetNetinfo["gid"] = this.gid; + mountTargetNetinfo["path"] = this.path; + this.createManagerLambda(mountTargetNetinfo); + } else { + alert("Form Validation Error. Check the form input and try again."); + } + }, + formatNetinfo(netinfo) { + let subnets = []; + let securityGroups = []; + + for (var i = 0, n = netinfo.length; i < n; ++i) { + let mountTarget = Object.keys(netinfo[i])[0]; + let subnet = netinfo[i][mountTarget]["subnet_id"]; + let securityGroup = netinfo[i][mountTarget]["security_groups"]; + + subnets.push(subnet); + securityGroups.push.apply(securityGroups, securityGroup); + } + let uniqSecurityGroups = [...new Set(securityGroups)]; - - + let tmpNetinfo = { + subnetIds: subnets, + securityGroups: uniqSecurityGroups, + }; + + return tmpNetinfo; + }, + async getFilesystemNetinfo() { + try { + let response = await API.get( + "fileManagerApi", + "/api/filesystems/" + this.$route.params.id + "/netinfo" + ); + let formattedNetinfo = this.formatNetinfo(response); + this.mountTargetNetinfo = formattedNetinfo; + } catch (error) { + alert("Unable to retrieve filesystem netinfo, check api logs"); + } + }, + async createManagerLambda(netinfo) { + const params = { + body: { + subnetIds: netinfo.subnetIds, + securityGroups: netinfo.securityGroups, + uid: netinfo.uid, + gid: netinfo.gid, + path: netinfo.path, + }, + headers: { "Content-Type": "application/json" }, + }; + try { + this.processing = true; + await API.post( + "fileManagerApi", + "/api/filesystems/" + this.$route.params.id + "/lambda", + params + ); + this.processing = false; + this.$router.push({ name: "home" }); + } catch (error) { + alert("Unable to create filesystem lambda, check api logs"); + this.processing = false; + } + }, + }, +}; + + + + diff --git a/source/web/src/routes/Details.vue b/source/web/src/routes/Details.vue index 18cce74..577a115 100644 --- a/source/web/src/routes/Details.vue +++ b/source/web/src/routes/Details.vue @@ -1,51 +1,50 @@ - - - + diff --git a/source/web/src/routes/Filesystem.vue b/source/web/src/routes/Filesystem.vue index 9d42e6e..3860bc1 100644 --- a/source/web/src/routes/Filesystem.vue +++ b/source/web/src/routes/Filesystem.vue @@ -1,261 +1,435 @@ - - diff --git a/source/web/src/routes/Home.vue b/source/web/src/routes/Home.vue index 8b1ad48..a4d7d67 100644 --- a/source/web/src/routes/Home.vue +++ b/source/web/src/routes/Home.vue @@ -1,40 +1,32 @@ - - - + diff --git a/source/web/src/routes/Login.vue b/source/web/src/routes/Login.vue index 8a30b19..754e03b 100644 --- a/source/web/src/routes/Login.vue +++ b/source/web/src/routes/Login.vue @@ -1,17 +1,18 @@ - \ No newline at end of file +