Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving Notifications & Providing EDC Contract API #735

Merged
merged 67 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
35ccd34
feature: 420 persist contract agreement id
ds-lcapellino Feb 22, 2024
c4b507c
chore(notifications): 515 - adding send notification xception.
ds-mwesener Mar 1, 2024
7953630
chore(notifications): 515 - adding send notification xception.
ds-mwesener Mar 1, 2024
74a935e
chore(bug): 542 bugfix filter and sorting in other parts
ds-mmaul Mar 1, 2024
943b1aa
chore(bug): 542 add tests
ds-mmaul Mar 4, 2024
ca55dc1
chore(documentation): Update RELEASE.md documentation
ds-mmaul Mar 4, 2024
b52071a
chore(documentation): Update RELEASE.md documentation
ds-mmaul Mar 4, 2024
6560dd9
Merge pull request #1033 from eclipse-tractusx/main
ds-mmaul Mar 4, 2024
950aca7
Merge pull request #1032 from catenax-ng/chore/xxx-update-release-doc…
ds-mmaul Mar 4, 2024
1af9677
Merge pull request #1028 from catenax-ng/chore/542-fix-filtering-and-…
ds-mmaul Mar 4, 2024
a7a4093
feature: 420 add contracts api to fetch EDC contract agreements
ds-lcapellino Mar 5, 2024
0ec18a4
feature: 533 override tombstone to empty string after successful sync
ds-lcapellino Mar 5, 2024
2bf690e
feature: 533 add integration test
ds-lcapellino Mar 5, 2024
71c2105
chore(notifications): 515 - adding send notification xception.
ds-mwesener Mar 5, 2024
e738794
Merge branch 'main' into chore/515-notification-status
ds-mwesener Mar 5, 2024
d546813
Merge branch 'main' into feature/533-handle-asset-after-tombstone
ds-lcapellino Mar 5, 2024
7e0523f
feature: 533 fix ambiguous method call
ds-lcapellino Mar 5, 2024
5a0b327
Merge pull request #1034 from catenax-ng/feature/533-handle-asset-aft…
ds-lcapellino Mar 5, 2024
1b62bc2
Merge branch 'main' into chore/515-notification-status
ds-mwesener Mar 5, 2024
39485ef
feature: 420 use PageAbleFilterRequest as request body; add integrati…
ds-lcapellino Mar 5, 2024
bdc27c9
Merge branch 'main' into feature/420-edc-contract-api
ds-lcapellino Mar 5, 2024
a499f83
feature: 420 fix merge problems
ds-lcapellino Mar 5, 2024
7479b88
add informartion to add issue number to changelog
mkanal Mar 5, 2024
ab7a916
Update CONTRIBUTING and Changelog maintainance
mkanal Mar 5, 2024
4342829
feature: 420 add CHANGELOG.md
ds-lcapellino Mar 6, 2024
ca4a04c
feature: 420 update swagger with new /contracts endpoint
ds-lcapellino Mar 6, 2024
9c8aec0
feature: 420 fix code smells
ds-lcapellino Mar 6, 2024
cfc5587
chore(notifications): 515 - adding send notification xception.
ds-mwesener Mar 6, 2024
99ae062
chore(515): change error message of toast
ds-mmaul Mar 6, 2024
52b99aa
Merge branch 'main' into chore/515-improve-uux-of-notification-crash
ds-mmaul Mar 6, 2024
6022e59
Merge branch 'chore/515-improve-uux-of-notification-crash' into chore…
ds-mmaul Mar 6, 2024
51ee31d
chore(515): fix test
ds-mmaul Mar 6, 2024
8f23726
chore(515): fix test
ds-mmaul Mar 6, 2024
986ea45
Merge pull request #1026 from catenax-ng/chore/515-notification-status
ds-mwesener Mar 6, 2024
f1cdce2
Merge pull request #1037 from catenax-ng/chore/#000-add-changelog-mai…
ds-mwesener Mar 6, 2024
35aa731
Merge pull request #1036 from catenax-ng/chore/#000-add-info-for-addi…
ds-mwesener Mar 6, 2024
9ee16db
feature: 420 refactor
ds-lcapellino Mar 6, 2024
8397017
feature: 420 add ContracException to ErrorHandlingConfig.java; refactor
ds-lcapellino Mar 6, 2024
722a32a
Merge branch 'main' into feature/420-edc-contract-api
ds-lcapellino Mar 6, 2024
02c208d
feature: 420 refactor
ds-lcapellino Mar 6, 2024
8934711
feature: 420 add ROLE_SUPERVISOR to ContractsController.java
ds-lcapellino Mar 6, 2024
4d28430
chore(docs): docu guru - some smaller doc fixxes and adding outdated …
ds-mwesener Mar 6, 2024
62b8106
feature: 420 not use null values in contract_agreement_info_view.cont…
ds-lcapellino Mar 6, 2024
7ba6508
chore(notifications): 515 fixed notification toast click area
ds-mmaul Mar 6, 2024
bb6b438
feature: 420 refactor
ds-lcapellino Mar 7, 2024
2b98b21
Merge pull request #1041 from catenax-ng/chore/515-notification-status
ds-mwesener Mar 7, 2024
c0172d3
feature: 420 refactor
ds-lcapellino Mar 7, 2024
93ea2f0
feat(notifications): 423 - quality notification refactoring.
ds-mwesener Mar 7, 2024
5cde372
feature: 420 add logs
ds-lcapellino Mar 7, 2024
6d95d7c
Merge pull request #1042 from catenax-ng/feature/423-qualitynotificat…
ds-mwesener Mar 7, 2024
2ad088f
chore(contracts): 625 removed breadcrumbs and header section from layout
ds-mmaul Mar 7, 2024
7a2b54b
feature: 420 add logs
ds-lcapellino Mar 7, 2024
c5ac140
Merge pull request #1043 from catenax-ng/chore/625-remove-header-section
ds-mwesener Mar 7, 2024
477aa0e
Update docs/src/docs/arc42/cross-cutting/development-concepts.adoc
ds-mwesener Mar 7, 2024
9a6c8ec
Update docs/src/docs/arc42/solution-strategy/structure.adoc
ds-mwesener Mar 7, 2024
c7c21bd
Update docs/src/docs/arc42/solution-strategy/structure.adoc
ds-mwesener Mar 7, 2024
71fddeb
Update docs/src/docs/arc42/solution-strategy/structure.adoc
ds-mwesener Mar 7, 2024
b7e701e
Merge branch 'main' into chore/docu-guru
ds-mwesener Mar 7, 2024
3e69290
Merge pull request #1039 from catenax-ng/chore/docu-guru
ds-mwesener Mar 7, 2024
58b53e6
feature: 420 respond 404 if assets ids are unknown
ds-lcapellino Mar 7, 2024
ed1347a
feat(notifications): 423 - Adding notification list to response
ds-mwesener Mar 7, 2024
b8b549a
feature: 420 refactor
ds-lcapellino Mar 7, 2024
782f2cb
Merge pull request #1035 from catenax-ng/feature/420-edc-contract-api
ds-mwesener Mar 7, 2024
07223cf
Merge branch 'main' into feature/423-qualitynotification-messages
ds-mwesener Mar 7, 2024
9a5ada4
feat(notifications): 423 - Adding notification domain diagram to doma…
ds-mwesener Mar 7, 2024
1407a16
feat(notifications): 423 - Adding notification domain diagram to doma…
ds-mwesener Mar 7, 2024
2fb3a5b
Merge pull request #1044 from catenax-ng/feature/423-qualitynotificat…
ds-mwesener Mar 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,30 @@ 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).

_**For better traceability add the corresponding GitHub issue number in each changelog entry, please.**_

## [UNRELEASED - DD.MM.YYYY]

### Added
- #515 Service Unavailable Response on Notification failure

- #420 add /contracts api to fetch contract agreement information from EDC for assets

### Changed
- Updated RELEASE.md to the latest release guide (added more steps)
- #515 Fixed notification toast click area
- #423 Moved errorMessages from investigation/alert to notification list

### Removed
- #625 Removed the header and breadcrumbs section from app layout

## [10.6.0 - 04.03.2024]

### Added
- Added concept #638: Contract agreement admin view
- Added support for meta key for multi sorting on tables
- Added concept #578: Consistent null values

- Added concept #578: Consistent null values
### Changed
- Spring-core bumped from 6.0.16 to 6.0.17
- Updated user manual
Expand All @@ -25,6 +40,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- Bumped version ts-graphviz/setup-graphviz@v1 to ts-graphviz/setup-graphviz@v2
- Bumped version Schedlock 5.10.0 to 5.11.0
- updated yarn.lock file
- [#542](https://github.com/eclipse-tractusx/traceability-foss/issues/542) Fixed bug where it where filter was reset when sorting in other parts table

### Removed
- Removed EDC notification asset classes and replaced with IRS lib implementation
Expand Down
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ https://www.eclipse.org/projects/handbook/#resources-commit

## <ins>General contribution to the project</ins> <a name="general"></a>

### Maintaining [CHANGELOG.md](CHANGELOG.md)
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).

_**For better traceability add the corresponding GitHub issue number in each changelog entry, please.**_

### Dash IP
Prerequisites:
1) Create access token
Expand Down
13 changes: 5 additions & 8 deletions docs/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,11 @@ Make sure eclipse / catena git repositories are in sync
16) Verify that an automatic pull request has been opened (Prepare Helm release for next version)
17) Validate that the versions within that pull requests are correct
18) Merge pull request (Prepare Helm release for next version)
19) Merge release branch into main
19) Merge release branch into main (when merging make sure to restore release branch since it should stay)
20) Open the github action for helm release generation: https://github.com/catenax-ng/tx-traceability-foss/actions/workflows/helm-chart-release.yaml
21) Execute it from main branch
22) Validate that the helm charts release has been generated within the release page
23) Repeat step 8 to 23 for tractus-x: [GitHub Releases page](https://github.com/eclipse-tractusx/traceability-foss/releases)
24) Sync catena and eclipse main branch

// TODO @Martin Maul:
//1 We need to create a branch from the helm-environments branch which reflects the release state
// Create /release/helm-environments-<app-version> not the helm version
//2 Make sure that the merged release branch will not be deleted
23) Create a new branch from release/1.0.0 and name it release/helm-environments-1.0.0 (helm app version not chart version)
24) Repeat step 8 to 23 for tractus-x: [GitHub Releases page](https://github.com/eclipse-tractusx/traceability-foss/releases)
25) Sync catena and eclipse main branch
26) Create a message in the Trace-X channel of the Eclipse Foundation Chat to notify the community about the new release (add a link to the tractus-x release)
8 changes: 6 additions & 2 deletions docs/src/docs/arc42/building-block-view/whitebox-overall.adoc
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
= Whitebox overall system

== Component diagram
== [Outdated] Component diagram

[plantuml, target=whitebox-overview, format=svg]
....
include::../../../uml-diagrams/arc42/building-block-view/whitebox_overall.puml[]
....

== Component description
== [Outdated] Component description

|===
|Components |Description

|IRS
|The IRS consumes relationship information across the CX-Network and builds the graph view. Within this Documentation, the focus lies on the IRS

Expand All @@ -23,3 +26,4 @@ include::../../../uml-diagrams/arc42/building-block-view/whitebox_overall.puml[]

|IAM/DAPS
|DAPS as central Identity Provider
|===
3 changes: 1 addition & 2 deletions docs/src/docs/arc42/cross-cutting/development-concepts.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ The generated OpenAPI specification file is automatically compared to a fixed, s

== Migration

There currently is no data migration mechanism for TraceX.
In case the model of the persisted data (Jobs) changes, data is dropped and Jobs will need to be recreated.
Data migration is handled by flyway.

== Configurability

Expand Down
10 changes: 8 additions & 2 deletions docs/src/docs/arc42/cross-cutting/domain-concepts.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@

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].

== Domain Model

== Domain Models

=== Assets
[plantuml, target=level-1, format=svg]
....
include::../../../uml-diagrams/arc42/cross-cutting/domain-model/domain-model.puml[]
....

=== Quality Notifications
[plantuml, target=level-2, format=svg]
....
include::../../../uml-diagrams/arc42/cross-cutting/domain-model/domain-model-quality-notifications.puml[]
....


6 changes: 3 additions & 3 deletions docs/src/docs/arc42/scope-context/technical-context.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ In order to use Trace-X frontend with Trace-X backend, users need to authenticat
By the frontend UI users provide valid credentials and the system generates a bearer token that it gets from Keycloak and attaches it to the HTTP header parameter Authorization.
Then once a user is authorized and has proper role within Trace-X backend, the backend delegates HTTP calls to specific service in their behalf as technical user in order to fulfill specific functionality.

=== Registry API
=== [Outdated] Registry API

[plantuml, target=technical-context-registry, format=svg]
....
Expand All @@ -34,7 +34,7 @@ include::../../../uml-diagrams/arc42/scope-context/technical-context/irs-api-vie
The Trace-X acts as a consumer of the IRS component. The Trace-X contains a Restful client (REST template) that build a REST call to the mentioned IRS API based on its known URL (the IRS URL is configurable in the Trace-X).
Request contains details required to start IRS fetch job provided by the component during assets synchronization. Like described in the above section, the security aspect is required in order to achieve a REST call against the IRS. As a response, the Trace-X gets the created job id and periodically pulls for the job details that contains assets that will be uploaded to the system. And as mentioned above, the transport protocol HTTP(S) is used for the REST call communication.

=== Portal API
=== [Outdated] Portal API

[plantuml, target=technical-context-portal, format=svg]
....
Expand All @@ -44,7 +44,7 @@ include::../../../uml-diagrams/arc42/scope-context/technical-context/portal-api-
The Trace-X acts as a consumer of the Portal component. The Trace-X contains a Restful client (REST template) that build a REST call to the mentioned Portal API based on its known URL (the Portal URL is configurable in the Trace-X).
Request contains "bpns" provided by the component during sending notifications. Like described in the above section, the security aspect is required in order to achieve a REST call against the Portal. As a response, the Trace-X gets the corresponding BPN mappings to EDC urls where a notification should be send over. And as mentioned above, the transport protocol HTTP(S) is used for the REST call communication.

=== EDC API
=== [Outdated] EDC API

[plantuml, target=technical-context-edc, format=svg]
....
Expand Down
8 changes: 7 additions & 1 deletion docs/src/docs/arc42/solution-strategy/structure.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ It roughly can be broken down into the following parts:
* Asset controllers to get the asset information
* Dashboard controller to get dashboard related summed up information
* Registry controller to fetch assets from the Digital Twin Registry
* Notification controllers to get notification information
* Notification controllers to get notification information and create EDC notification offers
* Submodel controller for providing asset data functionality
* Import controller for importing Trace-X data for data provisioning
* Contract controller to get information about contract agreements
* EDC controller to retrieve notifications
* IRS callback controller to retrieve asynchronous jobs completed by IRS
* Policy controller to retrieve information about policies
* BPN controller to retrieve information about business partners

The backend does a request to the Digital Twin Registry utilizing the Registry controller. Extracted data from the response is made available through the Asset controller and the Dashboard controller to the Frontend.

Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
@startuml
skinparam monochrome true
skinparam shadowing false
skinparam defaultFontName "Architects daughter"
skinparam linetype ortho
title: Quality Notification Domain

class QualityNotification {
bpn : BPN;
notificationId : QualityNotificationId;
notificationStatus : QualityNotificationStatus;
description: String;
createdAt: Instant;
notificationSide: QualityNotificationSide;
assetIds: ArrayList<String>();
closeReason: String;
acceptReason: String;
declineReason: String;
notifications: Map<String, QualityNotificationMessage>;
}

class QualityNotificationId {
id: Long;
}

enum QualityNotificationSide{
SENDER;
RECEIVER;
}
class BPN{
bpn: String;
}

enum QualityNotificationStatus{
CREATED(QualityNotificationSide.SENDER, emptySet()),
SENT(QualityNotificationSide.SENDER, Set.of(QualityNotificationSide.SENDER)),
RECEIVED(QualityNotificationSide.RECEIVER, emptySet()),
ACKNOWLEDGED(QualityNotificationSide.RECEIVER, Set.of(QualityNotificationSide.RECEIVER, QualityNotificationSide.SENDER)),
ACCEPTED(QualityNotificationSide.RECEIVER, Set.of(QualityNotificationSide.RECEIVER)),
DECLINED(QualityNotificationSide.RECEIVER, Set.of(QualityNotificationSide.RECEIVER)),
CANCELED(QualityNotificationSide.SENDER, Set.of(QualityNotificationSide.SENDER)),
CLOSED(QualityNotificationSide.SENDER, of(QualityNotificationSide.SENDER, QualityNotificationSide.RECEIVER));
}

QualityNotification *-- QualityNotificationId
QualityNotification *-- BPN
QualityNotification *-- QualityNotificationStatus
QualityNotification *-- QualityNotificationSide
@enduml

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ skinparam monochrome true
skinparam shadowing false
skinparam defaultFontName "Architects daughter"
skinparam linetype ortho
title: Domain Model
title: Asset Domain

class ImportJobs {
importId : String (max = 255)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('HttpErrorInterceptor', () => {
it('should intercept', async () => {
await initErrorInterceptor('403');
expect(
await waitFor(() => screen.getByText('Backend returned code 403: Permission denied error message')),
).toBeInTheDocument();
await waitFor(() => screen.queryByText('Backend returned code 403: Permission denied error message')),
).not.toBeInTheDocument();
});
});
4 changes: 2 additions & 2 deletions frontend/src/app/modules/core/api/http-error.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class HttpErrorInterceptor implements HttpInterceptor {
const errorMessage = !error.message ? message : `Backend returned code ${ error.status }: ${ error.message }`;

// Check if the request URL matches any pattern in the avoidList
if (this.shouldShowToast(request.url)) {
if (!this.isOnAlreadyHandledUrlList(request.url)) {
this.toastService.error(errorMessage);
}

Expand All @@ -56,7 +56,7 @@ export class HttpErrorInterceptor implements HttpInterceptor {
}

// Helper method to check if the URL matches any pattern in the avoidList
private shouldShowToast(url: string): boolean {
private isOnAlreadyHandledUrlList(url: string): boolean {
return !this.avoidList.some(pattern => this.urlMatchesPattern(url, pattern));
}

Expand Down
10 changes: 0 additions & 10 deletions frontend/src/app/modules/core/layout/header/header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,6 @@
<app-user-navigation></app-user-navigation>
</div>
</nav>

<div class="header--breadcrumb-container">
<app-breadcrumbs></app-breadcrumbs>
</div>

<div *ngIf="activeMenu" class="header--app-header">
<h3>{{ 'pageTitle.' + activeMenu | i18n }}</h3>
</div>

<img src="/assets/images/header-subtract.png" class="header--stylish-curve" alt="" />
</div>

<ng-template let-type="value" let-role="role" #menuItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('LayoutComponent', () => {
imports: [ LayoutModule ],
providers: [ LayoutComponent ],
});
let header = fixture.debugElement.query(By.css('.header--breadcrumb-container'));
let header = fixture.debugElement.query(By.css('.layout-content__box-modal'));
expect(header).not.toBeNull();
let toast = fixture.debugElement.query(By.css('.layout-toast-component'));
let headerDistanceToTop = header.nativeElement.getBoundingClientRect().y + 'px';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ export class LayoutComponent {
* This Block positions the toast component to the start of the header breadcrumb component (vertical top distance)
* so that on every screen size the position stays the same (not relative)
*/
const headerBreadCrumbRef = this.elementRef.nativeElement.querySelector('.header--breadcrumb-container');
const layoutContentRef = this.elementRef.nativeElement.querySelector('.layout-content__box-modal');
const toastLayoutRef = this.elementRef.nativeElement.querySelector('.layout-toast-component');
const elementTopDistance = headerBreadCrumbRef.getBoundingClientRect().top;
const elementTopDistance = layoutContentRef.getBoundingClientRect().top;
this.renderer.setStyle(toastLayoutRef, 'top', `${ elementTopDistance }px`);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
<ng-template #mainTmp let-parts="view" let-customContext="customContext">
<app-parts-table
[paginationData]="parts.data | formatPaginationSemanticDataModelToCamelCase"
[selectedPartsInfoLabel]="'page.selectedParts.info'"
[selectedPartsActionLabel]="'page.selectedParts.action'"
[noShadow]="true"
[labelId]="customContext.labelId"
(selected)="onSelectItem($event)"
Expand Down
Loading
Loading