Skip to content

Commit

Permalink
Merge branch 'eclipse-tractusx:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-crehm authored Jul 31, 2024
2 parents 2a40ca9 + efba57b commit 7c20d98
Show file tree
Hide file tree
Showing 23 changed files with 425 additions and 1,893 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/e2e-tests-xray_frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ on:
jobs:
install:
runs-on: ubuntu-latest
outputs:
http_result: ${{ steps.download.outputs.http_response }}
defaults:
run:
working-directory: frontend
Expand All @@ -53,6 +55,7 @@ jobs:

# Fetch feature files
- name: Fetch .feature files from Jira Xray
id: download
env:
JIRA_USERNAME: ${{ secrets.ASSOCIATION_TX_JIRA_USERNAME }}
JIRA_PASSWORD: ${{ secrets.ASSOCIATION_TX_JIRA_PASSWORD }}
Expand Down Expand Up @@ -86,7 +89,7 @@ jobs:
cypress-run-chrome:
timeout-minutes: 15
runs-on: ubuntu-latest
if: ${{ steps.download.outputs.http_response == '200' }}
if: ${{ needs.install.outputs.http_result == '200' }}
defaults:
run:
working-directory: frontend
Expand Down Expand Up @@ -130,14 +133,14 @@ jobs:
- name: Cypress run all tests
uses: cypress-io/github-action@v6.7.1 # use the explicit version number
uses: cypress-io/github-action@v6.7.2 # use the explicit version number
with:
browser: chrome
working-directory: frontend
# using wait-on parameter causes "Error: connect ECONNREFUSED 127.0.0.1:4200"
env:
CYPRESS_SUPERVISOR_LOGIN: ${{ secrets.ASSOCIATION_SUPERVISOR_CLIENT_ID }}
CYPRESS_SUPERVISOR_PW: ${{ secrets.ASSOCIATION_SUPERVISOR_PASSWORD }}
CYPRESS_SUPERVISOR_LOGIN: ${{ secrets.ASSOCIATION_SUPERVISOR_TX_A_CLIENT_ID }}
CYPRESS_SUPERVISOR_PW: ${{ secrets.ASSOCIATION_SUPERVISOR_TX_A_PASSWORD }}
CYPRESS_ADMIN_LOGIN: ${{ secrets.TRACE_X_ADMIN_LOGIN }}
CYPRESS_ADMIN_PW: ${{ secrets.TRACE_X_ADMIN_PW }}
CYPRESS_USER_LOGIN: ${{ secrets.TRACE_X_USER_LOGIN }}
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,18 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
_**For better traceability add the corresponding GitHub issue number in each changelog entry, please.**_
## [UNRELEASED - DD.MM.YYYY]

### Added
- #908 Add owner field to affected parts view in notification details

### Changed
- #1252 adapt IRS example response for integration tests to reflect current state
- #1122 Fixed editing notification sendTo attribute
- #1328 Fixed semanticDataModel translation and part name within notification detail / edit view.
- #908 Renamed header in notification detail for parts from Supplier Parts to Affected parts
- #1151 Display of null values within contracts in datepicker to be empty if null

### Removed
- #1227 Removed scrollbar on approval dialog

## [13.0.1 - 26.07.2024]

Expand Down
1 change: 1 addition & 0 deletions DEPENDENCIES_BACKEND
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ maven/mavencentral/com.jayway.jsonpath/json-path/2.9.0, Apache-2.0, approved, cl
maven/mavencentral/com.nimbusds/content-type/2.2, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.nimbusds/lang-tag/1.7, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.37.3, Apache-2.0, approved, #11701
maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.40, Apache-2.0, approved, #15156
maven/mavencentral/com.nimbusds/oauth2-oidc-sdk/9.43.4, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.squareup.okhttp3/okhttp-dnsoverhttps/4.12.0, Apache-2.0, approved, #11159
maven/mavencentral/com.squareup.okhttp3/okhttp/4.12.0, Apache-2.0, approved, #15227
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[![Kics](https://github.com/eclipse-tractusx/traceability-foss/actions/workflows/kics.yml/badge.svg)](https://github.com/eclipse-tractusx/traceability-foss/actions/workflows/kics.yml)
[![Trivy](https://github.com/eclipse-tractusx/traceability-foss/actions/workflows/trivy.yml/badge.svg)](https://github.com/eclipse-tractusx/traceability-foss/actions/workflows/trivy.yml)
[![Eclipse DASH IP Check](https://github.com/eclipse-tractusx/traceability-foss/actions/workflows/eclipse-dash.yml/badge.svg)](https://github.com/eclipse-tractusx/traceability-foss/actions/workflows/eclipse-dash.yml)
[![[BE] Dependency check](https://github.com/catenax-ng/tx-traceability-foss/actions/workflows/dependency-check.yml/badge.svg)](https://github.com/catenax-ng/tx-traceability-foss/actions/workflows/dependency-check.yml)
[![[BE] Dependency check](https://github.com/eclipse-tractusx/traceability-foss/actions/workflows/dependency-check.yml/badge.svg)](https://github.com/eclipse-tractusx/traceability-foss/actions/workflows/dependency-check.yml)

## Trace-X is a system for tracking parts along the supply chain.

Expand Down
2 changes: 1 addition & 1 deletion dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

- Hint you need to copy the access token for argo cd into the specific environment for requests against argo (argocd.token) in insomnia: argo_access_token

Here you can find the [Trace-X Insomnia Collection](https://github.com/catenax-ng/tx-traceability-foss/blob/main/tx-backend/collection/tracex.json). Use this [README](https://github.com/catenax-ng/tx-traceability-foss/blob/main/tx-backend/collection/README.md) to find out how to setup Insomnia with the Trace-X Collection.
Here you can find the [Trace-X Insomnia Collection](https://github.com/eclipse-tractusx/traceability-foss/blob/main/tx-backend/collection/tracex.json). Use this [README](https://github.com/eclipse-tractusx/traceability-foss/blob/main/tx-backend/collection/README.md) to find out how to setup Insomnia with the Trace-X Collection.

In the Collection you will find a directory named 'Argo', in which you can delete & sync all necessary application components. Go through every directory inside the 'Argo' directory and execute every request inside the Directory 'DELETE'. To make this step easier, you can install the Insomnia Plugin ['multiple requests'](https://insomnia.rest/plugins/insomnia-plugin-multiple-requests). With this Plugin you can execute all requests inside the 'DELETE' Directory by right-clicking the directory and choosing 'send Requests'.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ values.yaml

### Changes in Domain Model

https://github.com/catenax-ng/tx-traceability-foss/blob/5b07a12830d6ecf9f3d0141d49bb89825cc86cc3/docs/src/uml-diagrams/arc42/cross-cutting/domain-model/domain-model.puml
https://github.com/eclipse-tractusx/traceability-foss/blob/5b07a12830d6ecf9f3d0141d49bb89825cc86cc3/docs/src/uml-diagrams/arc42/cross-cutting/domain-model/domain-model.puml

### Changes in Detail View
![DetailViewWithPartSiteInformation](DetailViewWithPartSiteInformation.svg)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/docs/arc42/cross-cutting/domain-concepts.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

== API model

For detailed information about the API model, please refer to the link:https://catenax-ng.github.io/tx-traceability-foss/docs/api-specification/api-specification.html[API specification].
For detailed information about the API model, please refer to the link:https://eclipse-tractusx.github.io/traceability-foss/docs/api-specification/api-specification.html[API specification].

== Domain models

Expand Down
5 changes: 3 additions & 2 deletions docs/src/docs/arc42/introduction-goals/requirements.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
* List, view and publish planned parts based on BoM AsPlanned
* Filter and search functionality on part views
* Show detailed information on manufactured parts from AAS description assets and aspects
* Uses submodels SerialPart, AssemblyPartRelationship and Batch
* List and view supplier parts (AssemblyPartRelationship) based on BoM AsBuild lifecycle
* Uses submodels SerialPart, Batch, JustInSequence and PartAsPlanned
* List and view supplier parts (SingleLevelBomAsBuilt) based on BoM AsBuilt lifecycle
* List and view customer parts (SingleLevelUsageAsBuilt) based on BoM AsBuilt lifecycle
* View parts and parts relations in a visualized parts tree
* Send and receive top-down notifications (quality investigations) along the supply chain
* Compliance with Catena-X guidelines
2 changes: 1 addition & 1 deletion frontend/src/app/modules/page/admin/core/admin.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export function assembleContract(contractResponse: ContractResponse): Contract {
contractType: contractResponse.contractType,
counterpartyAddress: contractResponse.counterpartyAddress,
creationDate: new CalendarDateModel(contractResponse.creationDate),
endDate: new CalendarDateModel(contractResponse.endDate),
endDate: contractResponse.endDate !== null ? new CalendarDateModel(contractResponse.endDate): null,
state: contractResponse.state,
policy: contractResponse.policy,
globalAssetId: contractResponse.globalAssetId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class ContractsComponent {
if (data?.data?.content.length) {
return;
} else {
this.contractsFacade.setContracts(0, 10, [ null, null ]);
this.contractsFacade.setContracts(0, 10, [ ]);
}

});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ export class NotificationDetailComponent implements AfterViewInit, OnDestroy {
private setTableConfigs(data: Notification): void {
this.isReceived = !data.isFromSender;

const displayedColumns = [ 'id', 'semanticDataModel', 'nameAtManufacturer', 'semanticModelId' ];
const sortableColumns = { id: true, semanticDataModel: true, nameAtManufacturer: true, semanticModelId: true };
const displayedColumns = [ 'id', 'owner', 'semanticDataModel', 'nameAtManufacturer', 'semanticModelId' ];
const sortableColumns = { id: true, owner: true, semanticDataModel: true, nameAtManufacturer: true, semanticModelId: true };

const tableConfig = {
displayedColumns,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,14 +421,22 @@ <h3>{{ 'table.noResultFound' | i18n }}</h3>
<td
*matCellDef="let element" mat-cell class="table--cell" data-testid="table-component--cell-data"
[ngClass]="{'max-width-column': labelId === 'contracts' && column === 'contractId' }">
<ng-container *ngIf="!isDateElement(column)"
<ng-container *ngIf="!isDateElement(column) && !isOwnerElement(column)"
[ngTemplateOutlet]="tableConfig?.cellRenderers?.[column] ? tableConfig?.cellRenderers?.[column] : (column === 'constraints' ? constraintsFormat : (column === 'contractType' ? contractTypeFormat : autoFormat))"
[ngTemplateOutletContext]="{ value: element[column], row: element }"
>
</ng-container>
<ng-container *ngIf="isDateElement(column)">
<ng-container *ngIf="element[column] !== null">
{{ (element[column] | date:'yyyy-MM-dd HH:mm') }}
</ng-container>
<ng-container *ngIf="element[column] === null">
{{ (element[column]) }}
</ng-container>
</ng-container>
<ng-container *ngIf="isOwnerElement(column)">
{{'table.owner.' + element[column]?.toLowerCase() | i18n}}
</ng-container>
</td>
</ng-container>
</ng-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,11 @@ export class TableComponent {
return isDateFilter(key);
}

public isOwnerElement(key: string) {
const OWNER_KEY = [ 'owner'];
return OWNER_KEY.includes(key);
}

protected readonly MainAspectType = MainAspectType;
protected readonly ContractType = ContractType;
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<app-notification-overview [notification]="notification" [showNotification]="false"></app-notification-overview>
</mat-card-content>
</mat-card>
<mat-card class="max-h-74 overflow-y-scroll">
<mat-card *ngIf="notification?.messages !== null && notification?.messages?.length > 0" class="max-h-74 overflow-y-scroll">
<mat-card-content>
<app-notification-reason [notificationMessages]="notification?.messages"></app-notification-reason>
</mat-card-content>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/assets/locales/de/page.alert.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

"subHeadline": {
"affectedParts": "Betroffene Produkte",
"supplierParts": "Produkte von Lieferanten"
"supplierParts": "Betroffene Produkte"
}
}
}
2 changes: 1 addition & 1 deletion frontend/src/assets/locales/de/page.investigation.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

"subHeadline": {
"affectedParts": "Betroffene Produkte",
"supplierParts": "Produkte von Lieferanten"
"supplierParts": "Betroffene Produkte"
}
}
}
2 changes: 1 addition & 1 deletion frontend/src/assets/locales/en/page.alert.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

"subHeadline": {
"affectedParts": "Affected parts",
"supplierParts": "Supplier parts"
"supplierParts": "Affected parts"
}
}
}
2 changes: 1 addition & 1 deletion frontend/src/assets/locales/en/page.investigation.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

"subHeadline": {
"affectedParts": "Affected parts",
"supplierParts": "Supplier parts"
"supplierParts": "Affected parts"
}
}
}
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ SPDX-License-Identifier: Apache-2.0
<findsecbugs-plugin.version>1.13.0</findsecbugs-plugin.version>
<commons-compress.version>1.26.1</commons-compress.version>
<install-plugin.version>3.1.2</install-plugin.version>
<jacoco-plugin.version>0.8.11</jacoco-plugin.version>
<jacoco-plugin.version>0.8.12</jacoco-plugin.version>
<jar-plugin.version>3.3.0</jar-plugin.version>
<owasp-plugin.version>9.0.9</owasp-plugin.version>
<spotbugs-plugin.version>4.8.6.2</spotbugs-plugin.version>
Expand All @@ -64,7 +64,7 @@ SPDX-License-Identifier: Apache-2.0
<!-- versions for 3rd party dependecies -->
<logback.version>1.5.6</logback.version>
<eclipse-dash-ip.version>1.1.0</eclipse-dash-ip.version>
<nimbus-jose-jwt.version>9.37.3</nimbus-jose-jwt.version>
<nimbus-jose-jwt.version>9.40</nimbus-jose-jwt.version>
<ascii-doctor-j-diagram.version>2.3.0</ascii-doctor-j-diagram.version>
<ascii-dcotor-j.version>2.5.8</ascii-dcotor-j.version>
<auth-0-java-jwt.version>4.4.0</auth-0-java-jwt.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import assets.importpoc.ImportResponse;
import io.restassured.http.ContentType;
import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase;
import org.eclipse.tractusx.traceability.common.security.JwtRole;
import org.eclipse.tractusx.traceability.integration.IntegrationTestSpecification;
import org.eclipse.tractusx.traceability.integration.common.support.AssetsSupport;
Expand All @@ -33,6 +34,7 @@
import org.springframework.beans.factory.annotation.Autowired;

import java.io.File;
import java.util.List;

import static io.restassured.RestAssured.given;
import static org.assertj.core.api.Assertions.assertThat;
Expand All @@ -55,7 +57,6 @@ class IrsCallbackControllerIT extends IntegrationTestSpecification {
AssetAsBuiltSupportRepository assetAsBuiltSupportRepository;



@Test
void givenAssets_whenCallbackReceived_thenSaveThemAndStoreContractAgreementId() throws JoseException {
// given
Expand All @@ -80,7 +81,7 @@ void givenAssets_whenCallbackReceived_thenSaveThemAndStoreContractAgreementId()

// then
assertThat(bpnSupportRepository.findAll()).hasSize(1);
assetsSupport.assertAssetAsBuiltSize(16);
assetsSupport.assertAssetAsBuiltSize(2);
assetsSupport.assertAssetAsPlannedSize(0);

// Make the API call and store the response
Expand Down Expand Up @@ -171,12 +172,13 @@ void givenAssetExist_whenCallbackReceived_thenUpdateIt() {
.log().all()
.statusCode(200);


// then
assertThat(bpnSupportRepository.findAll()).hasSize(1);
assetsSupport.assertAssetAsBuiltSize(16);
assetsSupport.assertAssetAsBuiltSize(14);
assetsSupport.assertAssetAsPlannedSize(0);
String updatedIdShort = assetsSupport.findById("urn:uuid:d387fa8e-603c-42bd-98c3-4d87fef8d2bb").getIdShort();
assertThat(updatedIdShort).isEqualTo("vehicle_hybrid_v2.asm");
String updatedIdShort = assetsSupport.findById("urn:uuid:6dafbcec-2fce-4cbb-a5a9-b3b32aa5cffc").getIdShort();
assertThat(updatedIdShort).isEqualTo("ecu.asm");
//urn:uuid:d387fa8e-603c-42bd-98c3-4d87fef8d2bb
//vehicle_hybrid_v2.asm
}
Expand Down Expand Up @@ -221,7 +223,7 @@ void givenSuccessImportJob_whenCallbackReceivedWithTombsones_thenUpdateAsBuiltAs
.contentType(ContentType.JSON)
.log().all()
.when()
.pathParam("assetId", "urn:uuid:5205f736-8fc2-4585-b869-6bf36842369a")
.pathParam("assetId", "urn:uuid:b978ad2d-be06-47ea-a578-580d9b2eca77")
.get("/api/assets/as-built/{assetId}")
.then()
.log().all()
Expand Down Expand Up @@ -304,7 +306,7 @@ void givenNoAssets_whenCallbackReceived_thenSaveThem_withoutManufacturerName() t
.statusCode(200);

// then
assetsSupport.assertAssetAsBuiltSize(16);
assetsSupport.assertAssetAsBuiltSize(2);
assetsSupport.assertAssetAsPlannedSize(0);
String manufacturerName = given()
.header(oAuth2Support.jwtAuthorization(JwtRole.ADMIN))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ public void irsJobDetailsApiFailed() {
)
.then(
status(HttpStatus.INTERNAL_SERVER_ERROR_500),
header("Content-Type", "application/json"),
restitoProvider.jsonResponseFromFile("./stubs/irs/get/jobs/id/response_200.json")
header("Content-Type", "application/json")
);
}

Expand Down
Loading

0 comments on commit 7c20d98

Please sign in to comment.