diff --git a/CHANGELOG.md b/CHANGELOG.md index dcfe1b1d4..6dbb7cfa7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,23 @@ The changelog 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). +## [released] +## [v2.1.1] - 05-02-2024 + +## Added +- Added missing german translations to the transmission pass +- Added missing german translations to the policy selection feature +- Integrated dependabot to automate the dependencies updates + +## Updated +- Updated axios library from `v1.6.0` to `v1.6.7` to fix vulnerability +- Updated the license headers in all the files to the latest "license and copyright header" of 2024 + +## Issues Fixed +- Fixed tabs bugs related to translations +- Fixed translations of battery pass and digital product pass +- Fixed missing additional data visualization +- Fixed missing total sources visualization ## [released] ## [v2.1.0] - 02-02-2024 @@ -43,8 +60,7 @@ The changelog format is based on [Keep a Changelog](https://keepachangelog.com/e - Added fixes in backend and frontend integration - Added pydoc comments to the getPassport.py - Added access-token parameter to authorize the APIs without providing username/password and company - - + ## Updated - Updated versions from container base images - Adjusted the non root user ids in Dockerfiles and dpp helm chart configurations @@ -57,7 +73,6 @@ The changelog format is based on [Keep a Changelog](https://keepachangelog.com/e - Updated license header - Updated user manual readme by adding the policy selection screenshots - ## Issues Fixed - Fixed issue related to `sleepy` EDCs, allowing the backend to re-request the contract negotiation when the EDC does not respond. diff --git a/DEPENDENCIES_FRONTEND b/DEPENDENCIES_FRONTEND index 8c0e320b0..b387385bf 100644 --- a/DEPENDENCIES_FRONTEND +++ b/DEPENDENCIES_FRONTEND @@ -11,7 +11,7 @@ npm/npmjs/-/anymatch/3.1.3, ISC, approved, #5050 npm/npmjs/-/argparse/1.0.10, MIT, approved, #2174 npm/npmjs/-/astral-regex/2.0.0, MIT, approved, clearlydefined npm/npmjs/-/asynckit/0.4.0, MIT, approved, clearlydefined -npm/npmjs/-/axios/1.6.3, MIT, approved, #11338 +npm/npmjs/-/axios/1.6.7, MIT, approved, #11338 npm/npmjs/-/balanced-match/1.0.2, MIT, approved, clearlydefined npm/npmjs/-/base64-js/1.5.1, MIT, approved, clearlydefined npm/npmjs/-/binary-extensions/2.2.0, MIT, approved, clearlydefined diff --git a/README.md b/README.md index 8551c07de..4d75f45e3 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,9 @@ In particular, the appliction is used to access the battery passport data provid ### Software Version #### Helm Chart Version -
2.1.0
+
2.1.1
#### Application Version -
v2.1.0
+
v2.1.1
@@ -83,7 +83,7 @@ To get started you can have a look into our documentation: ## Installation -For installing the Digital Product Pass application please consult our [Intallation Guide](./INSTALL.md). +For installing the Digital Product Pass Application please consult our [Intallation Guide](./INSTALL.md). ## License diff --git a/charts/digital-product-pass/Chart.yaml b/charts/digital-product-pass/Chart.yaml index 0f19c0713..c8e065605 100644 --- a/charts/digital-product-pass/Chart.yaml +++ b/charts/digital-product-pass/Chart.yaml @@ -41,10 +41,10 @@ type: application # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 2.1.0 +version: 2.1.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "2.1.0" +appVersion: "2.1.1" diff --git a/charts/digital-product-pass/README.md b/charts/digital-product-pass/README.md index c6ad71e3e..866faed9b 100644 --- a/charts/digital-product-pass/README.md +++ b/charts/digital-product-pass/README.md @@ -23,7 +23,7 @@ # digital-product-pass -![Version: 2.1.0](https://img.shields.io/badge/Version-2.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.1.0](https://img.shields.io/badge/AppVersion-2.1.0-informational?style=flat-square) +![Version: 2.1.1](https://img.shields.io/badge/Version-2.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.1.1](https://img.shields.io/badge/AppVersion-2.1.1-informational?style=flat-square) A Helm chart for Tractus-X Digital Product Pass Kubernetes diff --git a/charts/digital-product-pass/values-dev.yaml b/charts/digital-product-pass/values-dev.yaml index 67597765c..3b538823f 100644 --- a/charts/digital-product-pass/values-dev.yaml +++ b/charts/digital-product-pass/values-dev.yaml @@ -105,5 +105,4 @@ oauth: enabled: true bpn: *bpn roleCheck: - enabled: false - + enabled: false \ No newline at end of file diff --git a/charts/digital-product-pass/values.yaml b/charts/digital-product-pass/values.yaml index f4514c5a1..7c832675a 100644 --- a/charts/digital-product-pass/values.yaml +++ b/charts/digital-product-pass/values.yaml @@ -95,7 +95,8 @@ backend: catalog: "/catalog/request" negotiation: "/contractnegotiations" transfer: "/transferprocesses" - delay: 100 # -- Negotiation status Delay in milliseconds in between async requests [<= 500] + # -- Negotiation status Delay in milliseconds in between async requests [<= 500] + delay: 100 # -- backend hostname (without protocol prefix [DEFAULT HTTPS] for security ) hostname: *hostname @@ -181,7 +182,7 @@ frontend: ingress: enabled: false hosts: [] - + # -- The [pod security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) defines privilege and access control settings for a Pod within the deployment podSecurityContext: seccompProfile: diff --git a/deployment/local/storage/pv-data.yaml b/deployment/local/storage/pv-data.yaml index 22cf66db5..2e64354ba 100644 --- a/deployment/local/storage/pv-data.yaml +++ b/deployment/local/storage/pv-data.yaml @@ -20,6 +20,7 @@ # # SPDX-License-Identifier: Apache-2.0 ################################################################################# + apiVersion: v1 kind: PersistentVolume metadata: @@ -33,6 +34,6 @@ spec: storageClassName: standard claimRef: name: pvc-data - namespace: default + namespace: {{ .Values.namespace }} hostPath: - path: "/mnt" + path: "/mnt" \ No newline at end of file diff --git a/deployment/local/storage/pvc-data.yaml b/deployment/local/storage/pvc-data.yaml index dbcc22388..f9936817d 100644 --- a/deployment/local/storage/pvc-data.yaml +++ b/deployment/local/storage/pvc-data.yaml @@ -27,7 +27,7 @@ metadata: name: pvc-data labels: {{- include "chart.labels" . | nindent 4 }} - namespace: default + namespace: {{ .Values.namespace }} spec: storageClassName: standard accessModes: diff --git a/docs/RELEASE_USER.md b/docs/RELEASE_USER.md index 96b8731a2..7a2f2f890 100644 --- a/docs/RELEASE_USER.md +++ b/docs/RELEASE_USER.md @@ -24,6 +24,23 @@ # Release Notes Digital Product Pass Application User friendly relase notes without especific technical details. +**February 05 2024 (Version 2.1.1)** +*05.02.2024* + +### Added +#### Added missing german translations for transmission passport +The missing translations related with the view to show the transmission passport was added in order to have both english and german languages on the application. + +#### Integrated dependabot in repository +Integrated dependabot to automate the dependencies updates and comply to the tractus-x release guidelines. + +### Updated +#### Updated License and copyright header +The License and copyright header was changed and the latest version was updated to every files needed in the application folder to the year 2024. + +#### Fixed security vulnerabilies related to axios +Updated the axios library to the latest version `v1.6.7` in order to solve the library vulnerability. + **February 02 2024 (Version 2.1.0)** *02.02.2024* diff --git a/dpp-backend/charts/digital-product-pass-backend/Chart.yaml b/dpp-backend/charts/digital-product-pass-backend/Chart.yaml index ac17849a1..188a8200e 100644 --- a/dpp-backend/charts/digital-product-pass-backend/Chart.yaml +++ b/dpp-backend/charts/digital-product-pass-backend/Chart.yaml @@ -41,10 +41,10 @@ type: application # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 2.1.0 +version: 2.1.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "2.1.0" +appVersion: "2.1.1" diff --git a/dpp-backend/charts/digital-product-pass-backend/README.md b/dpp-backend/charts/digital-product-pass-backend/README.md index 78c5aec61..69d6ab27c 100644 --- a/dpp-backend/charts/digital-product-pass-backend/README.md +++ b/dpp-backend/charts/digital-product-pass-backend/README.md @@ -23,7 +23,7 @@ # digital-product-pass-backend -![Version: 2.1.0](https://img.shields.io/badge/Version-2.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.1.0](https://img.shields.io/badge/AppVersion-2.1.0-informational?style=flat-square) +![Version: 2.1.1](https://img.shields.io/badge/Version-2.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.1.1](https://img.shields.io/badge/AppVersion-2.1.1-informational?style=flat-square) A Helm chart for Tractus-X Digital Product Pass Backend Kubernetes diff --git a/dpp-backend/digitalproductpass/README.md b/dpp-backend/digitalproductpass/README.md index 3146a813f..dfbd1c014 100644 --- a/dpp-backend/digitalproductpass/README.md +++ b/dpp-backend/digitalproductpass/README.md @@ -24,7 +24,7 @@

  Digital Product Pass Backend

-

Version: v2.0.1

+

Version: v2.1.1


diff --git a/dpp-backend/digitalproductpass/pom.xml b/dpp-backend/digitalproductpass/pom.xml index 966e7d002..94a4f1499 100644 --- a/dpp-backend/digitalproductpass/pom.xml +++ b/dpp-backend/digitalproductpass/pom.xml @@ -34,7 +34,7 @@ org.eclipse.tractusx digitalproductpass - 2.1.0 + 2.1.1 jar Catena-X Digital Product Passport Backend Digital Product Passport Consumer Backend Reference Implementation System for Product Passport Consumer Frontend Application diff --git a/package-lock.json b/package-lock.json index 7dfba514d..5ec5f951e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "digital-product-pass-frontend", - "version": "2.1.0", + "version": "2.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "digital-product-pass-frontend", - "version": "2.1.0", + "version": "2.1.1", "dependencies": { "@mdi/font": "5.9.55", "@popperjs/core": "^2.11.2", "@vitejs/plugin-vue": "^4.0.0", - "axios": ">=1.6.0", + "axios": ">=1.6.7", "clipboard": "^2.0.11", "core-js": "^3.8.3", "crypto-js": "^4.2.0", @@ -1027,11 +1027,11 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.3.tgz", - "integrity": "sha512-fWyNdeawGam70jXSVlKl+SUNVcL6j6W79CuSIPfi6HnDUmSCH6gyUys/HrqHeA/wU0Az41rRgean494d0Jb+ww==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.4", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -4087,11 +4087,11 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "axios": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.3.tgz", - "integrity": "sha512-fWyNdeawGam70jXSVlKl+SUNVcL6j6W79CuSIPfi6HnDUmSCH6gyUys/HrqHeA/wU0Az41rRgean494d0Jb+ww==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "requires": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.4", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } diff --git a/package.json b/package.json index ee1af517d..4bdd474ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "digital-product-pass-frontend", - "version": "2.1.0", + "version": "2.1.1", "private": true, "scripts": { "serve": "vite --host localhost", @@ -15,7 +15,7 @@ "@mdi/font": "5.9.55", "@popperjs/core": "^2.11.2", "@vitejs/plugin-vue": "^4.0.0", - "axios": ">=1.6.0", + "axios": ">=1.6.7", "clipboard": "^2.0.11", "core-js": "^3.8.3", "crypto-js": "^4.2.0", diff --git a/src/components/general/TabsComponent.vue b/src/components/general/TabsComponent.vue index 5380c1336..d3bb31610 100644 --- a/src/components/general/TabsComponent.vue +++ b/src/components/general/TabsComponent.vue @@ -30,7 +30,14 @@ :value="section.component" > - {{ $t(`passportView.dppComponentsNames.${section.label}`) }} + {{ + section.label.includes("passportView") + ? $t(`${section.label}`) + : semanticId === + "urn:bamm:io.catenax.transmission.transmission_pass:1.0.0#TransmissionPass" + ? $t(`passportView.tppComponentsNames.${section.label}`) + : $t(`passportView.dppComponentsNames.${section.label}`) + }} @@ -108,6 +115,7 @@ export default { props: { componentsNames: { type: Object, default: Object }, componentsData: { type: Object, default: Object }, + semanticId: { type: String, default: "" }, }, }; - + \ No newline at end of file diff --git a/src/components/passport/AttributeField.vue b/src/components/passport/AttributeField.vue index 64f068370..6381a1a5f 100644 --- a/src/components/passport/AttributeField.vue +++ b/src/components/passport/AttributeField.vue @@ -58,7 +58,7 @@ diff --git a/src/components/passport/GeneralCards.vue b/src/components/passport/GeneralCards.vue index aeac4b62b..fb4dc9e71 100644 --- a/src/components/passport/GeneralCards.vue +++ b/src/components/passport/GeneralCards.vue @@ -145,7 +145,9 @@ export default { this.$props.data.aspect.sustainability["PEF"].carbon ? this.$props.data.aspect.sustainability["PEF"].carbon[0].value : "-", - valueUnits: "t CO2 Total", + valueUnits: (this.$props.data.aspect.sustainability["PEF"].carbon[0].unit !== "" + ? this.$props.data.aspect.sustainability["PEF"].carbon[0].unit + : "t CO₂") + " Total", secondValue: this.$props.data.aspect.commercial ? this.$props.data.aspect.commercial.warranty : "-", diff --git a/src/components/passport/TransmissionCards.vue b/src/components/passport/TransmissionCards.vue index 6c47c75f2..18030af37 100644 --- a/src/components/passport/TransmissionCards.vue +++ b/src/components/passport/TransmissionCards.vue @@ -32,7 +32,7 @@ style="padding: 6px !important" >
- {{ card.title }} + {{ $t(card.title) }}
- {{ card.label }} + {{ $t(card.label) }}
{{ card.value ? card.value : "-" }} {{ card.valueUnits }} @@ -52,7 +52,7 @@
- {{ card.secondLabel }} + {{ $t(card.secondLabel) }}
{{ card.secondValue ? card.secondValue : "-" }} @@ -64,10 +64,10 @@ @@ -95,9 +95,9 @@ export default { return { cards: [ { - title: "GENERAL", - label: "Product description", - secondLabel: "Product type", + title: "generalCards.titleGeneral", + label: "generalCards.productName", + secondLabel: "generalCards.productType", icon: "mdi-pound", value: this.$props.data.aspect.generalInformation ? this.$props.data.aspect.generalInformation.productDescription @@ -107,9 +107,9 @@ export default { : "-", }, { - title: "MANUFACTURING", - label: "Manufacturer Id", - secondLabel: "Matrix code", + title: "generalCards.titleManufacturing", + label: "generalCards.manufacturerId", + secondLabel: "generalCards.dateOfManufacturing", icon: "mdi-chart-timeline-variant-shimmer", value: this.$props.data.aspect.identification ? this.$props.data.aspect.identification.manufacturerId @@ -123,9 +123,9 @@ export default { }, }, { - title: "SPECIFIC PARAMETERS", - label: "Drive type", - secondLabel: "Oil type", + title: "transmissionCards.parameters", + label: "transmissionCards.driveType", + secondLabel: "transmissionCards.oilType", icon: "mdi-aspect", value: this.$props.data.aspect.productSpecificParameters.driveType, secondValue: @@ -136,9 +136,9 @@ export default { }, }, { - title: "SUSTAINABILITY", - label: "Total CO2 footprint", - secondLabel: "Warranty period", + title: "generalCards.titleSustainability", + label: "generalCards.totalCo2Footprint", + secondLabel: "generalCards.warrantyPeriod", icon: "mdi-leaf", value: this.$props.data.aspect.sustainability && @@ -154,12 +154,12 @@ export default { ? "months" : "", description: { - title: "Sustainability", - value: "Description of the Sustainability", + title: "generalCards.descriptionSustainabilityTitle", + value: "generalCards.descriptionSustainabilityValue", }, }, ], }; }, }; - + \ No newline at end of file diff --git a/src/components/passport/sections/GeneralInformation.vue b/src/components/passport/sections/GeneralInformation.vue index 717bf2a8f..7fb72677f 100644 --- a/src/components/passport/sections/GeneralInformation.vue +++ b/src/components/passport/sections/GeneralInformation.vue @@ -32,7 +32,7 @@ @@ -43,7 +43,7 @@ @@ -77,14 +77,14 @@ diff --git a/src/components/passport/sections/Instructions.vue b/src/components/passport/sections/Instructions.vue index 55020a5c6..c7abef139 100644 --- a/src/components/passport/sections/Instructions.vue +++ b/src/components/passport/sections/Instructions.vue @@ -26,29 +26,29 @@ -
Packaging instructions
+
{{ $t('sections.instructions.packagingInstructions') }}
-
Transportation instructions
+
{{ $t('sections.instructions.transportationInstructions') }}
-
Dismantling procedure
+
{{ $t('sections.instructions.dismantlingProcedure') }}
-
Safety measures
+
{{ $t('sections.instructions.safetyMeasures') }}
-
Vehicle dismantling procedure
+
{{ $t('sections.instructions.vehicleDismantlingProcedure') }}
diff --git a/src/components/passport/sections/ProductSpecificParameters.vue b/src/components/passport/sections/ProductSpecificParameters.vue index 376bae3c4..3296c88ea 100644 --- a/src/components/passport/sections/ProductSpecificParameters.vue +++ b/src/components/passport/sections/ProductSpecificParameters.vue @@ -34,7 +34,7 @@ >
@@ -42,72 +42,72 @@ -
Standard gear ratio
+
{{ $t('sections.productSpecificParameters.standardGearRatio') }}
-
Speed resistance
+
{{ $t('sections.productSpecificParameters.speedResistance') }}
@@ -118,7 +118,7 @@ >
diff --git a/src/components/passport/sections/SparePartSupplier.vue b/src/components/passport/sections/SparePartSupplier.vue index c82e8bfc8..5c9194e90 100644 --- a/src/components/passport/sections/SparePartSupplier.vue +++ b/src/components/passport/sections/SparePartSupplier.vue @@ -29,7 +29,7 @@
diff --git a/src/components/passport/sections/StateOfHealth.vue b/src/components/passport/sections/StateOfHealth.vue index 774a701b3..ce509eb45 100644 --- a/src/components/passport/sections/StateOfHealth.vue +++ b/src/components/passport/sections/StateOfHealth.vue @@ -31,7 +31,7 @@
@@ -39,14 +39,14 @@ @@ -159,19 +159,7 @@
- -
- -
-
-
+
+ +
+ +
+
@@ -282,7 +284,7 @@ export default { contractItems: reactive([]), radios: "0.0", details: false, - detailsTitle: "More details", + detailsTitle: this.$t("passportView.policyAgreement.details.moreDetails"), policies: [], declineContractModal: false, showContractModal: true, @@ -363,6 +365,8 @@ export default { return Array.isArray(value) ? value.length > 0 : Object.keys(value).length > 0; + }else if (Array.isArray(value) && value !== null){ + return value.length > 0; } return true; // Include if it's not an object/array or if it's a non-empty primitive value }); @@ -424,9 +428,9 @@ export default { toggleDetails() { this.details = !this.details; if (this.details) { - this.detailsTitle = "Less details"; + this.detailsTitle = this.$t("passportView.policyAgreement.details.lessDetails"); } else { - this.detailsTitle = "More details"; + this.detailsTitle = this.$t("passportView.policyAgreement.details.moreDetails"); } }, chooseContract(contract, policy) { @@ -552,6 +556,7 @@ export default { this.error = false; } // Stop loading + this.$store.commit("resetLoadingState"); this.loading = false; this.declineLoading = false; } @@ -588,8 +593,8 @@ export default { "Timeout! Failed to negotiate and return the passport!"; this.errorObj.description = "The request took too long... Please retry or try again later."; - this.status = 408; - this.statusText = "Request Timeout"; + this.errorObj.status = 408; + this.errorObj.statusText = "Request Timeout"; } this.data = result; } catch (e) { @@ -617,11 +622,29 @@ export default { this.errorObj.reload = false; this.error = true; } else { + let additionalData = []; + let sources = []; + // In order to have the additional data available we need to copy it in deep + if(jsonUtil.exists("additionalData", this.data["data"]["aspect"])){ + additionalData = jsonUtil.copy(this.data["data"]["aspect"]["additionalData"]); + } + // When extend deep is called this property will be replaced + if(jsonUtil.exists("sources", this.data["data"]["aspect"])){ + sources = jsonUtil.copy(this.data["data"]["aspect"]["sources"]); + } this.data = configUtil.normalizePassport( jsonUtil.get("data.aspect", this.data), jsonUtil.get("data.metadata", this.data), jsonUtil.get("data.semanticId", this.data) ); + // Re-add the additionalData + if(jsonUtil.exists("additionalData", this.data["aspect"])){ + this.data["aspect"]["additionalData"] = additionalData; + } + // Re-add the sources + if(jsonUtil.exists("sources", this.data["aspect"])){ + this.data["aspect"]["sources"] = sources; + } this.error = false; this.processId = this.$store.getters.getProcessId; // Get process id from the store this.irsData = this.backendService.getIrsData( @@ -636,6 +659,7 @@ export default { } } // Stop loading + this.$store.commit("resetLoadingState"); this.loading = false; this.contractItems = []; }