Skip to content

Commit

Permalink
chore: updated versions and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
saudkhan116 committed Oct 30, 2023
2 parents 53fb999 + c867253 commit 762bcd9
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 40 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@ The changelog format is based on [Keep a Changelog](https://keepachangelog.com/e
- Added new components to display the passport
- Added visualization of the "Digital Product Pass" aspect in the frontend

## Updated
### Updated
- The Submodels are search by their SemanticId instead of idShort parameter
- Updated DTR search as type instead of ID
- Updated the Apis that communicate with the backend


# Deleted
### Deleted
- Removed the passport's version requirement
- Removed version from the Search Api call
- Deleted configuration variables related with central search from application.yaml
- Deleted old version of DigitalTwin, Submodel and Endpoint, no longer used and renamed the most recent versions.
- Deleted all code related to the central search.


# Issues Fixed
### Issues Fixed
- Fixed a bug related to the discovery service when more than one search endpoint would be available


Expand Down
2 changes: 1 addition & 1 deletion DEPENDENCIES_FRONTEND
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ npm/npmjs/-/browserslist/4.21.4, MIT, approved, #7034
npm/npmjs/-/buffer-crc32/0.2.13, MIT, approved, clearlydefined
npm/npmjs/-/buffer/5.7.1, MIT, approved, clearlydefined
npm/npmjs/-/cachedir/2.3.0, MIT, approved, clearlydefined
npm/npmjs/-/call-bind/1.0.2, MIT, approved, clearlydefined
npm/npmjs/-/call-bind/1.0.2, MIT, approved, #11092
npm/npmjs/-/callforth/0.3.1, MIT, approved, clearlydefined
npm/npmjs/-/callsites/3.1.0, MIT, approved, clearlydefined
npm/npmjs/-/caniuse-lite/1.0.30001449, CC-BY-4.0, approved, #1196
Expand Down
3 changes: 1 addition & 2 deletions buildAndDeploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
CONTAINER_NAME=$1
IMAGE_NAME="consumer-ui"
IMAGE_TAG="latest"
PASSPORT_VERSION=""
VERSION=""
API_TIMEOUT=""
API_DELAY=""
Expand All @@ -43,6 +42,6 @@ echo "Build docker image..."
docker build -t ${IMAGE_NAME}:${IMAGE_TAG} .

echo "Run docker container..."
docker run --name ${CONTAINER_NAME} -p 8080:80 -d -e PASS_VERSION=${PASSPORT_VERSION} -e APP_VERSION=${VERSION} -e APP_API_TIMEOUT=${API_TIMEOUT} -e APP_API_MAX_RETRIES=${API_MAX_RETRIES} -e APP_API_DELAY=${API_DELAY} -e IDENTITY_PROVIDER_URL=${IDP_URL} -e HOST_URL=${SERVER_URL} -e DATA_URL=${BACKEND_URL} -e KEYCLOAK_CLIENTID=${KEYCLOAK_CLIENTID} -e KEYCLOAK_REALM=${KEYCLOAK_REALM} -e KEYCLOAK_ONLOAD=${KEYCLOAK_ONLOAD} ${IMAGE_NAME}:${IMAGE_TAG}
docker run --name ${CONTAINER_NAME} -p 8080:80 -d -e APP_VERSION=${VERSION} -e APP_API_TIMEOUT=${API_TIMEOUT} -e APP_API_MAX_RETRIES=${API_MAX_RETRIES} -e APP_API_DELAY=${API_DELAY} -e IDENTITY_PROVIDER_URL=${IDP_URL} -e HOST_URL=${SERVER_URL} -e DATA_URL=${BACKEND_URL} -e KEYCLOAK_CLIENTID=${KEYCLOAK_CLIENTID} -e KEYCLOAK_REALM=${KEYCLOAK_REALM} -e KEYCLOAK_ONLOAD=${KEYCLOAK_ONLOAD} ${IMAGE_NAME}:${IMAGE_TAG}

echo "Done"
4 changes: 2 additions & 2 deletions charts/digital-product-pass/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ type: application
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)

version: 1.1.0
version: 1.2.0


# 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: "1.1.0"
appVersion: "1.2.0"
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ spec:
- name: "IDP_URL"
value: "https://{{ .Values.frontend.productpass.idp_url }}"

- name: "PASSPORT_VERSION"
value: "{{ .Values.frontend.productpass.passport.version }}"

- name: "API_TIMEOUT"
value: "{{ .Values.frontend.productpass.api.timeout }}"

Expand Down
5 changes: 3 additions & 2 deletions charts/digital-product-pass/values-beta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,9 @@ backend:
encrypt: true
indent: true
dir: "data/transfer"
versions:
- 'v3.0.1'
aspects:
- "urn:bamm:io.catenax.generic.digital_product_passport:1.0.0#DigitalProductPassport"
- "urn:bamm:io.catenax.battery.battery_pass:3.0.1#BatteryPass"
vault:
type: 'local'
Expand Down
5 changes: 3 additions & 2 deletions charts/digital-product-pass/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,9 @@ backend:
encrypt: true
indent: true
dir: "data/transfer"
versions:
- 'v3.0.1'
aspects:
- "urn:bamm:io.catenax.generic.digital_product_passport:1.0.0#DigitalProductPassport"
- "urn:bamm:io.catenax.battery.battery_pass:3.0.1#BatteryPass"
vault:
type: 'local'
Expand Down
5 changes: 3 additions & 2 deletions charts/digital-product-pass/values-int.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,9 @@ backend:
encrypt: true
indent: true
dir: "data/transfer"
versions:
- 'v3.0.1'
aspects:
- "urn:bamm:io.catenax.generic.digital_product_passport:1.0.0#DigitalProductPassport"
- "urn:bamm:io.catenax.battery.battery_pass:3.0.1#BatteryPass"
vault:
type: 'local'
Expand Down
11 changes: 5 additions & 6 deletions charts/digital-product-pass/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ frontend:
backend_url: ""
# -- url of the identity provider service
idp_url: ""
# -- required: digital product passport version number - default value: v3.0.1
passport:
version: "v3.0.1" ## Mandatory Field, passport version must be available (Semantic Structure)
# -- api timeouts
api:
# -- max retries for getting status
max_retries: 30
Expand Down Expand Up @@ -197,9 +195,10 @@ backend:
indent: true
# -- directory to store the passport when is not linked to a process
dir: "data/transfer"
# -- passport versions allowed
versions:
- 'v3.0.1'
# -- passport versions and aspects allowed
aspects:
- "urn:bamm:io.catenax.generic.digital_product_passport:1.0.0#DigitalProductPassport"
- "urn:bamm:io.catenax.battery.battery_pass:3.0.1#BatteryPass"
# -- configuration of the spring boot server
server:
# -- configuration of backend errors
Expand Down
2 changes: 1 addition & 1 deletion docs/RELEASE_USER.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ User friendly relase notes without especific technical details.
#### Availability of the DPP aspect model
There is now a possibility to retrieve any type of passport aspect from a submodel endpoint searched by the semanticId of the aspect.

### Visualization of the "Digital Product Passport" aspect in the frontend
#### Visualization of the "Digital Product Passport" aspect in the frontend
It is now possible to visualize the digital product passports aspect model in the DPP frontend component.

### Updated
Expand Down
1 change: 0 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ echo "Replacing docker environment constants in JavaScript files"
for file in $ROOT_DIR/assets/index-*.js* $ROOT_DIR/index.html;
do
echo "Processing $file ...";
sed -i 's|PASS_VERSION|'${PASSPORT_VERSION}'|g' $file
sed -i 's|IDENTITY_PROVIDER_URL|'${IDP_URL}'|g' $file
sed -i 's|HOST_URL|'${SERVER_URL}'|g' $file
sed -i 's|DATA_URL|'${BACKEND_URL}'|g' $file
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions src/services/BackendService.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default class BackendService {
}
}

async getPassport(version, id, authentication) {
async getPassport(id, authentication) {
let processResponse = null;
// Try to get the negotiation contract
let ids = null;
Expand Down Expand Up @@ -105,7 +105,7 @@ export default class BackendService {

// Try to get the negotiation contract
try {
negotiationResponse = await this.searchContract(ids["serializedId"], version, processId, authentication);
negotiationResponse = await this.searchContract(ids["serializedId"], processId, authentication);
} catch (e) {
return negotiationResponse;
}
Expand Down Expand Up @@ -213,10 +213,9 @@ export default class BackendService {
}
}

getSearchBody(id, version, processId) {
getSearchBody(id, processId) {
return {
"id": id,
"version": version,
"processId": processId
}
}
Expand Down Expand Up @@ -278,9 +277,9 @@ export default class BackendService {
});
});
}
async searchContract(id, version, processId, authentication) {
async searchContract(id, processId, authentication) {
return new Promise(resolve => {
let body = this.getSearchBody(id, version, processId);
let body = this.getSearchBody(id, processId);
axios.post(`${BACKEND_URL}/api/contract/search`, body, this.getHeaders(authentication))
.then((response) => {
resolve(response.data);
Expand Down
5 changes: 1 addition & 4 deletions src/services/service.const.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const IDP_URL = "IDENTITY_PROVIDER_URL";
// Get urls that can be empty
let serverUrl = "HOST_URL";
let backendUrl = "DATA_URL";
let passVer = 'PASS_VERSION';
let retries = 'APP_API_MAX_RETRIES';
let timeout = 'APP_API_TIMEOUT';
let delay = 'APP_API_DELAY';
Expand All @@ -45,7 +44,6 @@ let repoEndpoint = "REPO_ENDPOINT_URL";
// Default values if the value is not specified
serverUrl = (serverUrl != null && serverUrl !== "") ? serverUrl : "https://materialpass.int.demo.catena-x.net"
backendUrl = (backendUrl != null && backendUrl !== "") ? backendUrl : serverUrl
passVer = (passVer != null && passVer !== "") ? passVer : "v3.0.1"
clientId = (clientId != null && clientId !== "") ? clientId : "Cl13-CX-Battery"
realm = (realm != null && realm !== "") ? realm : "CX-Central"
onLoad = (onLoad != null && onLoad !== "") ? onLoad : "login-required"
Expand All @@ -58,7 +56,6 @@ retries = numberUtil.parseInt(retries, 20);
// Define constants
const SERVER_URL = serverUrl;
const BACKEND_URL = backendUrl;
const PASSPORT_VERSION = passVer;
const API_MAX_RETRIES = retries;
const API_TIMEOUT = timeout;
const API_DELAY = delay;
Expand All @@ -85,4 +82,4 @@ if (window.location.href.includes("localhost")) { //Modify credentials for local
REDIRECT_URI = SERVER_URL;
}
// Export all the CONSTANTS and VARIABLES
export { INIT_OPTIONS, REDIRECT_URI, SERVER_URL, IDP_URL, BACKEND_URL, PASSPORT_VERSION, VERSION, API_TIMEOUT, API_DELAY, API_MAX_RETRIES, COMMIT_ID, REPO_ENDPOINT };
export { INIT_OPTIONS, REDIRECT_URI, SERVER_URL, IDP_URL, BACKEND_URL, VERSION, API_TIMEOUT, API_DELAY, API_MAX_RETRIES, COMMIT_ID, REPO_ENDPOINT };
6 changes: 2 additions & 4 deletions src/views/PassportView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ import BatteryCards from "@/components/passport/BatteryCards.vue";
import GeneralCards from "@/components/passport/GeneralCards.vue";
import FooterComponent from "@/components/general/Footer.vue";
import ErrorComponent from "@/components/general/ErrorComponent.vue";
import { API_TIMEOUT, PASSPORT_VERSION } from "@/services/service.const";
import { API_TIMEOUT } from "@/services/service.const";
import threadUtil from "@/utils/threadUtil.js";
import jsonUtil from "@/utils/jsonUtil.js";
import configUtil from "@/utils/configUtil.js";
Expand Down Expand Up @@ -225,8 +225,7 @@ export default {
type: "error",
status: 500,
statusText: "Internal Server Error",
},
version: PASSPORT_VERSION,
}
};
},

Expand Down Expand Up @@ -302,7 +301,6 @@ export default {
// Get access token from IDP
// Get the aspect for the selected version
response = await backendService.getPassport(
this.version,
id,
this.auth
);
Expand Down

0 comments on commit 762bcd9

Please sign in to comment.