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

IRS Policy support #207

Merged
merged 52 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
a8c88c9
feature(view):[TRACEFOSS-1549] create alert detailed view
ds-mmaul Jun 27, 2023
6b326d4
feature(view):[TRACEFOSS-1549] update investigation detailed view
ds-mmaul Jun 28, 2023
6a4872d
feature(view):[TRACEFOSS-1549] delete label in all notification modals
ds-mmaul Jun 29, 2023
69d46c4
feature(view):[TRACEFOSS-1549] fix tests
ds-mmaul Jun 29, 2023
d27af1c
Merge branch 'main' into feature/TRACEFOSS-1549-Create-alert-detailed…
ds-mmaul Jun 29, 2023
6fb52e3
feature(view):[TRACEFOSS-1549] fix tests
ds-mmaul Jun 29, 2023
70adf3f
feature(view):[TRACEFOSS-1549] added test for back button
ds-mmaul Jun 29, 2023
f214843
feature(view):[TRACEFOSS-1549] added test for back button
ds-mmaul Jun 30, 2023
5e3fc8e
feature(view):[TRACEFOSS-1549] added E2E-A testenvironemnt
ds-mmaul Jun 30, 2023
b941415
feature(view):[TRACEFOSS-1549] added alert detailed view
ds-mmaul Jun 30, 2023
fcf3e23
Merge branch 'main' into feature/TRACEFOSS-1549-Create-alert-detailed…
ds-mmaul Jun 30, 2023
412e870
feature(view):[TRACEFOSS-1549] added alert detailed view
ds-mmaul Jun 30, 2023
e0cfd96
feature(view):[TRACEFOSS-1549] added test
ds-mmaul Jul 3, 2023
2234d60
feature(view):[TRACEFOSS-1549] added test
ds-mmaul Jul 3, 2023
d8cce3e
feature(view):[TRACEFOSS-1549] added test
ds-mmaul Jul 3, 2023
2dde7f9
feature(view):[TRACEFOSS-1549] added test
ds-mmaul Jul 3, 2023
31fba06
feature: TRACEFOSS-1473 irs policies support
ds-ext-sceronik Jul 4, 2023
5d2f64d
feature: TRACEFOSS-1473 add changelog info
ds-ext-sceronik Jul 4, 2023
16a86a0
feature: TRACEFOSS-1473 add tests
ds-ext-sceronik Jul 4, 2023
1e2e3da
feature: TRACEFOSS-1473 merge main into the branch
ds-ext-sceronik Jul 6, 2023
e64c810
feature: TRACEFOSS-1473 register java time module for Instant deseria…
ds-ext-sceronik Jul 6, 2023
eaa0725
feature: TRACEFOSS-1473 test
ds-ext-sceronik Jul 6, 2023
a388127
feature: TRACEFOSS-1473 test
ds-ext-sceronik Jul 6, 2023
2374513
feature: TRACEFOSS-1473 test
ds-ext-sceronik Jul 6, 2023
e3d3209
feature: TRACEFOSS-1473 test
ds-ext-sceronik Jul 6, 2023
633698b
feature: TRACEFOSS-1473 test
ds-ext-sceronik Jul 6, 2023
59c4c53
feature: TRACEFOSS-1473 test
ds-ext-sceronik Jul 6, 2023
d3a0281
Merge branch 'main' into feature/TRACEFOSS-1473-irs-policies-support
ds-ext-sceronik Jul 7, 2023
abb1f5f
feature: TRACEFOSS-1473 new open api file generated
ds-ext-sceronik Jul 7, 2023
5cfa76b
Merge pull request #368 from catenax-ng/feature/TRACEFOSS-1473-irs-po…
ds-mwesener Jul 7, 2023
a214bd2
chore: TRACEFOSS-XXX Update dep file for tx-models
ds-mwesener Jul 7, 2023
aa5ba96
Chore/tracefoss 1653 fix language switch bug (#375)
ds-mmaul Jul 7, 2023
30ef20b
Update Dependencies Backend Action
ds-mmaul Jul 7, 2023
41fb332
chore: TRACEFOSS-XXX Update dep file for tx-models
ds-mwesener Jul 7, 2023
6956932
Merge remote-tracking branch 'origin/main'
ds-mwesener Jul 7, 2023
ba3b531
Merge pull request #376 from catenax-ng/action/dependencies
ds-ext-sceronik Jul 7, 2023
c6ec341
Merge remote-tracking branch 'origin/main'
ds-mwesener Jul 7, 2023
66637b0
chore: TRACEFOSS-1948 Updated docker notice for frontend.
ds-mwesener Jul 7, 2023
a3f48f9
chore: TRACEFOSS-1948 Updated docker notice for frontend.
ds-mwesener Jul 7, 2023
b527a9c
chore: TRACEFOSS-XXX add unit test
ds-lcapellino Jul 7, 2023
0f7a118
Merge pull request #377 from catenax-ng/chore/TRACEFOSS-1948-notice-d…
ds-mwesener Jul 7, 2023
9ef8e03
chore: TRACEFOSS-XXX add unit test
ds-lcapellino Jul 7, 2023
4ef1bd3
chore: TRACEFOSS-XXX add unit test
ds-lcapellino Jul 7, 2023
61a78af
Merge branch 'main' into chore/TRACEFOSS-XXX-increase-code-coverage
ds-lcapellino Jul 7, 2023
3391b6c
chore: TRACEFOSS-1955 - updated resource management for values.yaml
ds-mwesener Jul 7, 2023
f90defb
Merge pull request #378 from catenax-ng/chore/TRACEFOSS-XXX-increase-…
ds-mwesener Jul 8, 2023
be2d769
Update Dependencies Backend Action
ds-mwesener Jul 8, 2023
f21e75e
Merge pull request #379 from catenax-ng/action/dependencies
ds-ext-sceronik Jul 10, 2023
bfaed17
chore(trg):[TRACEFOSS-1959] added helm upgrade workflow
ds-mmaul Jul 10, 2023
5d9222f
Merge pull request #380 from catenax-ng/chore/TRACEFOSS-1959-helm-upg…
ds-mwesener Jul 10, 2023
623cec2
Merge branch 'main' into feature/TRACEFOSS-1549-Create-alert-detailed…
ds-mmaul Jul 10, 2023
55c5ffa
Merge pull request #366 from catenax-ng/feature/TRACEFOSS-1549-Create…
ds-mwesener Jul 10, 2023
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
43 changes: 43 additions & 0 deletions .github/workflows/helm-upgrade.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Upgrade Charts

on:
pull_request:
paths:
- 'charts/traceability-foss/**'
workflow_dispatch:

jobs:
upgrade:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Kubernetes KinD Cluster
uses: container-tools/kind-action@v2

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.9.3

- name: Add repos
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add irs-helm https://eclipse-tractusx.github.io/item-relationship-service
helm repo add postgresql https://charts.bitnami.com/bitnami
helm repo add tractusx-connector https://eclipse-tractusx.github.io/charts/dev
helm repo add runix https://helm.runix.net

- name: Run helm install
# Install latest released traceability-foss version
run: |
helm install traceability-foss traceability-foss

- name: Run helm upgrade
# Upgrade the installed traceability-foss version with the locally available charts
run: |
helm dependency update traceability-foss charts/traceability-foss
helm upgrade traceability-foss charts/traceability-foss
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

### Added
- Added back button in notification detailed view
- Added alert detail view
- EDC SPI Dependency for using provided models
- Added default response types to apis
- Irs policies support ( on application startup registers policies in irs instance )

### Changed
- Changed Layout in notification detailed view
- Changed request parameter for registerjob request to irs to match requirements of irs
- Migration of edc 0.4.1 endpoints and api flow
- fixed bug where language switcher did not update to the selected language

### Removed

Expand Down
2 changes: 1 addition & 1 deletion DEPENDENCIES_BACKEND
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.14.2, Apache-2.
maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.14.3, Apache-2.0, approved, #4105
maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.14.0, Apache-2.0, approved, #5933
maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.14.3, Apache-2.0, approved, #5933
maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jakarta-jsonp/2.14.3, , restricted, clearlydefined
maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jakarta-jsonp/2.14.3, Apache-2.0, approved, #9302
maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jakarta-jsonp/2.15.1, Apache-2.0, approved, #9179
maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jdk8/2.14.3, Apache-2.0, approved, #8597
maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.14.3, Apache-2.0, approved, #4699
Expand Down
2 changes: 1 addition & 1 deletion DEPENDENCIES_FRONTEND
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ npm/npmjs/@jridgewell/gen-mapping/0.3.3, MIT, approved, clearlydefined
npm/npmjs/@jridgewell/resolve-uri/3.0.6, MIT, approved, clearlydefined
npm/npmjs/@jridgewell/resolve-uri/3.1.0, MIT, approved, clearlydefined
npm/npmjs/@jridgewell/set-array/1.1.2, MIT, approved, clearlydefined
npm/npmjs/@jridgewell/source-map/0.3.3, MIT, approved, clearlydefined
npm/npmjs/@jridgewell/source-map/0.3.3, MIT, approved, #9304
npm/npmjs/@jridgewell/sourcemap-codec/1.4.14, MIT, approved, clearlydefined
npm/npmjs/@jridgewell/sourcemap-codec/1.4.15, MIT, approved, clearlydefined
npm/npmjs/@jridgewell/trace-mapping/0.3.18, MIT, approved, clearlydefined
Expand Down
24 changes: 16 additions & 8 deletions DOCKER_NOTICE.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
## Notice for Docker image

This application provides container images for demonstration purposes.

DockerHub Backend: https://hub.docker.com/r/tractusx/traceability-foss

DockerHub Frontend : https://hub.docker.com/r/tractusx/traceability-foss-frontend

Eclipse Tractus-X product(s) installed within the image:

- GitHub: https://github.com/eclipse-tractusx/traceability-foss
- Project home: https://projects.eclipse.org/projects/automotive.tractusx
- Dockerfile: https://github.com/eclipse-tractusx/traceability-foss/blob/main/Dockerfile
- Dockerfile Backend: https://github.com/eclipse-tractusx/traceability-foss/blob/main/Dockerfile
- Dockerfile Frontend: https://github.com/eclipse-tractusx/traceability-foss/blob/main/frontend/Dockerfile
- Project license: [Apache License, Version 2.0](https://github.com/eclipse-tractusx/traceability-foss/blob/main/LICENSE)

**Used base image**
- [eclipse-temurin](https://hub.docker.com/_/eclipse-temurin)
- Official Eclipse Temurin DockerHub page: https://hub.docker.com/_/eclipse-temurin
- Eclipse Temurin Project: https://projects.eclipse.org/projects/adoptium.temurin
- Additional information about the Eclipse Temurin images: https://github.com/docker-library/repo-info/tree/master/repos/eclipse-temurin
**Used base image backend**

- [Official Eclipse Temurin DockerHub page](https://hub.docker.com/_/eclipse-temurin)
- [GitHub repo eclipse-temurin:17-jre-alpine](https://github.com/adoptium/containers)
- [Eclipse Temurin Project](https://projects.eclipse.org/projects/adoptium.temurin)
- [Additional information about the Eclipse Temurin images](https://github.com/docker-library/repo-info/tree/master/repos/eclipse-temurin)

**Used base image frontend**

- [nginx-unprivileged](https://hub.docker.com/r/nginxinc/nginx-unprivileged)
- [Dockerfile (alpine)](https://github.com/nginxinc/docker-nginx-unprivileged/blob/main/Dockerfile-alpine.template)
- [GitHub project:](https://github.com/nginxinc/docker-nginx-unprivileged)
- [DockerHub](https://hub.docker.com/r/nginxinc/nginx-unprivileged)

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Expand Down
4 changes: 2 additions & 2 deletions charts/traceability-foss/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ frontend:
cpu: 500m
memory: 512Mi
requests:
cpu: 500m
cpu: 125m
memory: 512Mi

nodeSelector: {}
Expand Down Expand Up @@ -222,7 +222,7 @@ backend:
cpu: 500m
memory: 512Mi
requests:
cpu: 500m
cpu: 125m
memory: 512Mi

nodeSelector: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const buildMockAlerts = (
};
});

const MockEmptyAlert: NotificationResponse = {
export const MockEmptyAlert: NotificationResponse = {
id: `${AlertIdPrefix}000`,
description: `Alert No 000`,
status: NotificationStatus.CREATED,
Expand Down
11 changes: 9 additions & 2 deletions frontend/src/app/modules/page/alerts/alerts.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@ import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { getI18nPageProvider } from '@core/i18n';
import { AlertsRoutingModule } from '@page/alerts/alerts.routing';
import { AlertDetailFacade } from '@page/alerts/core/alert-detail.facade';
import { AlertDetailState } from '@page/alerts/core/alert-detail.state';
import { AlertHelperService } from '@page/alerts/core/alert-helper.service';
import { AlertsFacade } from '@page/alerts/core/alerts.facade';
import { AlertsState } from '@page/alerts/core/alerts.state';
import { AlertDetailComponent } from '@page/alerts/detail/alert-detail.component';
import { PartsModule } from '@page/parts/parts.module';
import { NotificationModule } from '@shared/modules/notification/notification.module';
import { SharedModule } from '@shared/shared.module';
import { TemplateModule } from '@shared/template.module';
Expand All @@ -32,20 +36,23 @@ import { AlertsComponent } from './presentation/alerts.component';

@NgModule({
declarations: [
AlertsComponent
AlertsComponent, AlertDetailComponent
],
imports: [
CommonModule,
TemplateModule,
SharedModule,
AlertsRoutingModule,
NotificationModule,
PartsModule
],
providers: [
AlertsFacade,
AlertsState,
AlertDetailFacade,
AlertDetailState,
AlertHelperService,
...getI18nPageProvider('page.alerts'),
...getI18nPageProvider('page.alert'),
]
})
export class AlertsModule { }
11 changes: 10 additions & 1 deletion frontend/src/app/modules/page/alerts/alerts.routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AlertDetailComponent } from '@page/alerts/detail/alert-detail.component';
import { AlertsComponent } from '@page/alerts/presentation/alerts.component';
import { I18NEXT_NAMESPACE_RESOLVER } from 'angular-i18next';

Expand All @@ -28,7 +29,14 @@ const ALERTS_ROUTING: Routes = [
path: '',
pathMatch: 'full',
component: AlertsComponent,
data: { i18nextNamespaces: ['page.alerts'] },
data: { i18nextNamespaces: ['page.alert'] },
resolve: { i18next: I18NEXT_NAMESPACE_RESOLVER },
},
{
path: ':alertId',
pathMatch: 'full',
component: AlertDetailComponent,
data: { i18nextNamespaces: ['page.alert'] },
resolve: { i18next: I18NEXT_NAMESPACE_RESOLVER },
},
];
Expand All @@ -38,3 +46,4 @@ const ALERTS_ROUTING: Routes = [
exports: [RouterModule],
})
export class AlertsRoutingModule {}

Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/********************************************************************************
* Copyright (c) 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

import { TitleCasePipe } from '@angular/common';
import { TestBed } from '@angular/core/testing';
import { CalendarDateModel } from '@core/model/calendar-date.model';
import { AlertDetailFacade } from '@page/alerts/core/alert-detail.facade';
import { AlertDetailState } from '@page/alerts/core/alert-detail.state';
import { Notification } from '@shared/model/notification.model';
import { Severity } from '@shared/model/severity.model';
import { PartsService } from '@shared/service/parts.service';

describe('AlertDetailFacade', () => {
let alertDetailFacade: AlertDetailFacade;
let alertDetailState: AlertDetailState;
let partsService: jasmine.SpyObj<PartsService>;
let titleCasePipe: jasmine.SpyObj<TitleCasePipe>;

let testNotification: Notification = {
id: 'id-1',
description: 'Alert No 1',
createdBy: { name: 'OEM xxxxxxxxxxxxxxx A', bpn: 'BPN10000000OEM0A' },
sendTo: { name: 'OEM xxxxxxxxxxxxxxx B', bpn: 'BPN20000000OEM0B' },
reason: { close: '', accept: '', decline: '' },
isFromSender: true,
assetIds: [],
status: null,
severity: Severity.MINOR,
createdDate: new CalendarDateModel('2022-05-01T10:34:12.000Z'),
}

beforeEach(() => {
/*
alertDetailState = jasmine.createSpyObj('AlertDetailState', [
'getIdsFromPartList',
'setAlertPartsInformation',
'getAlertPartsInformation',
'setSupplierPartsInformation',
'getSupplierPartsInformation'
]);
*/
alertDetailState = new AlertDetailState();
partsService = jasmine.createSpyObj('PartsService', [ 'getPartDetailOfIds' ]);
titleCasePipe = jasmine.createSpyObj('TitleCasePipe', [ 'transform' ]);

TestBed.configureTestingModule({
providers: [
AlertDetailFacade,
{ provide: AlertDetailState, useValue: alertDetailState },
{ provide: PartsService, useValue: partsService },
{ provide: TitleCasePipe, useValue: titleCasePipe }
]
});

alertDetailFacade = TestBed.inject(AlertDetailFacade);
});

it('should create the component facade', () => {
expect(alertDetailFacade).toBeTruthy();
});

it('should set empty data if no asset ids are provided', () => {

let callSpy = spyOn(alertDetailFacade, 'setAlertPartsInformation');
let setSpy = spyOnProperty(alertDetailState, 'alertPartsInformation', 'set').and.callThrough();

alertDetailFacade.setAlertPartsInformation(testNotification);
expect(callSpy).toHaveBeenCalledWith(testNotification);

})
});
Loading
Loading