Skip to content

Commit

Permalink
Merge pull request #327 from catenax-ng/main
Browse files Browse the repository at this point in the history
Support for join Tables filtering
  • Loading branch information
ds-mwesener authored Nov 3, 2023
2 parents 0e3f847 + 6d8d0e2 commit 14b6035
Show file tree
Hide file tree
Showing 59 changed files with 5,250 additions and 4,481 deletions.
167 changes: 167 additions & 0 deletions .github/argo/argo_config.sh

Large diffs are not rendered by default.

348 changes: 348 additions & 0 deletions .github/workflows/argo.yml

Large diffs are not rendered by default.

69 changes: 69 additions & 0 deletions .github/workflows/dependency-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# 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

name: "[BE] Dependency check"

on:
workflow_dispatch: # Trigger manually
pull_request:

env:
GHCR_REGISTRY: ghcr.io
JAVA_VERSION: 17
DOCKER_HUB_REGISTRY_NAMESPACE: tractusx

jobs:
Dependency-analysis:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '${{ env.JAVA_VERSION }}'
distribution: 'temurin'
cache: 'maven'

- name: install tx-models
run: mvn install -pl tx-models

- name: Dependency rules report # possible severity values: <'fail'|'warn'|'ignore'>
run: mvn -pl tx-models,tx-backend -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn --batch-mode site -Pdependency-check

- name: Upload Test results Tx-Backend
if: always()
uses: actions/upload-artifact@master
with:
name: Depcheck report tx-backend
path: tx-backend/target

- name: Upload Test results Tx-Models
if: always()
uses: actions/upload-artifact@master
with:
name: Depcheck report tx-models
path: tx-models/target

- name: add PR comment
uses: mshick/add-pr-comment@v2
if: failure()
with:
message: |
## ‼️ Dependency Check findings ‼️
One or more high/critical findings have been found during dependency check. Please check the depenency report:
https://github.com/catenax-ng/tx-traceability-foss/actions/runs/${{ github.run_id }}
21 changes: 0 additions & 21 deletions .github/workflows/pull-request_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,24 +107,3 @@ jobs:
push: true
tags: ${{ env.GHCR_REGISTRY }}/${{ github.repository }}:${{ github.event.pull_request.head.sha }}

Dependency-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '${{ env.JAVA_VERSION }}'
distribution: 'temurin'
cache: 'maven'

- name: install tx-models
run: mvn install -pl tx-models

- name: Dependency rules report # possible severity values: <'fail'|'warn'|'ignore'>
run: mvn -pl tx-models,tx-backend -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn --batch-mode site -Pdependency-check

- name: Dependency analysis report Tx-Backend
run: cat tx-backend/target/dependency-check-report.html

- name: Dependency analysis report Tx-Models
run: cat tx-models/target/dependency-check-report.html
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,5 @@ tslint-report.json
yarn-error.log

scripts/download/*
/frontend/cypress/.env.local
/frontend/cypress/environment/cypress.local.config.js
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- support for date ranges BEFORE_LOCAL_DATE and AFTER_LOCAL_DATE providing both will cause filter result to return only relevant date ranges
- added supported searchCriteriaFieldsMappers for investigations, alerts, assetsAsBuilt and assetAsPlanned related endpoints
- added cache busting to build output of FE application
- added Argo Github-Action
- handling for invalid LocalDate string provided in filterCriteria for date related filtering
- support for filtering join tables for Specification searchCriteria
- added PR comment in case of HIGH/CRITICAL dependency check findings

### Changed
- Updated user manual to reflect the table column settings feature
Expand All @@ -31,6 +35,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- changed qualityNotification filtering changed from side to channel as response field name
- changed assetAsBuilt filtering manufacturerId to businessPartner
- IRS-Client-Lib from 1.2.1-SNAPSHOT to 1.4.0
- Decoupled dependency check in a separate GitHub action

### Removed
- Removed &filterOperator=AND from filtering requests
Expand Down Expand Up @@ -76,6 +81,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- Changed date formats of assets to have offsetDateTime instead of Date or LocalDateTime
- Aligned date formats in the rest api for assets
- Increased version of jetty-http from 11.0.15 to 11.0.17 and excluded from edc package
- Bump versions in frontend dependencies

### Removed

Expand Down
12 changes: 6 additions & 6 deletions DEPENDENCIES_FRONTEND
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ npm/npmjs/-/gopd/1.0.1, MIT, approved, #4863
npm/npmjs/-/graceful-fs/4.2.10, ISC, approved, #7413
npm/npmjs/-/graceful-fs/4.2.11, ISC, approved, #7413
npm/npmjs/-/grapheme-splitter/1.0.4, MIT, approved, #1645
npm/npmjs/-/graphql/16.6.0, MIT, approved, clearlydefined
npm/npmjs/-/graphql/16.8.1, MIT, approved, clearlydefined
npm/npmjs/-/gzip-size/6.0.0, MIT, approved, clearlydefined
npm/npmjs/-/handle-thing/2.0.1, MIT, approved, clearlydefined
npm/npmjs/-/hard-rejection/2.1.0, MIT, approved, clearlydefined
Expand Down Expand Up @@ -808,7 +808,7 @@ npm/npmjs/-/postcss-selector-parser/6.0.11, MIT, approved, #5056
npm/npmjs/-/postcss-selector-parser/6.0.12, MIT, approved, #5056
npm/npmjs/-/postcss-value-parser/4.2.0, MIT, approved, clearlydefined
npm/npmjs/-/postcss/8.4.21, MIT, approved, #3545
npm/npmjs/-/postcss/8.4.23, MIT, approved, #3545
npm/npmjs/-/postcss/8.4.31, MIT, approved, #3545
npm/npmjs/-/prelude-ls/1.2.1, MIT, approved, clearlydefined
npm/npmjs/-/prettier/2.8.8, MIT AND (0BSD AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-SA-4.0 AND ISC AND MIT) AND BSD-2-Clause, approved, #6871
npm/npmjs/-/pretty-bytes/5.6.0, MIT, approved, clearlydefined
Expand Down Expand Up @@ -896,10 +896,10 @@ npm/npmjs/-/schema-utils/4.0.1, MIT, approved, #8213
npm/npmjs/-/seed-random/2.2.0, MIT, approved, clearlydefined
npm/npmjs/-/select-hose/2.0.0, MIT, approved, #145
npm/npmjs/-/selfsigned/2.1.1, MIT, approved, clearlydefined
npm/npmjs/-/semver/5.7.1, ISC, approved, #5900
npm/npmjs/-/semver/6.3.0, ISC, approved, clearlydefined
npm/npmjs/-/semver/5.7.2, ISC, approved, #5900
npm/npmjs/-/semver/6.3.1, ISC, approved, clearlydefined
npm/npmjs/-/semver/7.3.8, ISC, approved, clearlydefined
npm/npmjs/-/semver/7.5.0, ISC, approved, clearlydefined
npm/npmjs/-/semver/7.5.4, ISC, approved, clearlydefined
npm/npmjs/-/send/0.18.0, MIT, approved, clearlydefined
npm/npmjs/-/serialize-javascript/6.0.1, BSD-3-Clause, approved, clearlydefined
npm/npmjs/-/serve-index/1.9.1, MIT, approved, clearlydefined
Expand Down Expand Up @@ -1090,7 +1090,7 @@ npm/npmjs/-/wide-align/1.1.5, ISC, approved, clearlydefined
npm/npmjs/-/wildcard/2.0.1, MIT, approved, #8274
npm/npmjs/-/winston-transport/4.5.0, MIT, approved, clearlydefined
npm/npmjs/-/winston/3.8.2, MIT, approved, clearlydefined
npm/npmjs/-/word-wrap/1.2.3, MIT, approved, clearlydefined
npm/npmjs/-/word-wrap/1.2.5, MIT, approved, clearlydefined
npm/npmjs/-/wrap-ansi/6.2.0, MIT, approved, clearlydefined
npm/npmjs/-/wrap-ansi/7.0.0, MIT, approved, clearlydefined
npm/npmjs/-/wrappy/1.0.2, ISC, approved, clearlydefined
Expand Down
4 changes: 2 additions & 2 deletions dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.12.json -s http
Sample invocation (STABLE A)

```
python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.12.json -s https://traceability-stable-a.stable.demo.catena-x.net/api/submodel -edc https://trace-x-edc-stable-a.stable.demo.catena-x.net -a https://tx-registry-stable-a.stable.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-int-a-dataplane.int.demo.catena-x.net -p id-3.0-trace -k <apiKey> --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC BPNL00000003AZQP BPNL00000003CSGV
python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.12.json -s https://traceability-stable-a.stable.demo.catena-x.net/api/submodel -edc https://trace-x-edc-stable-a.stable.demo.catena-x.net -a https://trace-x-registry-stable-a.stable.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-stable-a-dataplane.stable.demo.catena-x.net -p id-3.0-trace -k <apiKey> --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC BPNL00000003AZQP BPNL00000003CSGV
```

Sample invocation (STABLE B)

```
python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.12.json -s https://traceability-stable-b.stable.demo.catena-x.net/api/submodel -edc https://trace-x-edc-stable-b.stable.demo.catena-x.net -a https://tx-registry-stable-b.stable.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-int-b-dataplane.int.demo.catena-x.net -p id-3.0-trace -k <apiKey> --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC BPNL00000003AZQP BPNL00000003CSGV
python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.12.json -s https://traceability-stable-b.stable.demo.catena-x.net/api/submodel -edc https://trace-x-edc-stable-b.stable.demo.catena-x.net -a https://trace-x-registry-stable-b.stable.demo.catena-x.net/semantics/registry/api/v3.0 -d https://trace-x-edc-stable-b-dataplane.stable.demo.catena-x.net -p id-3.0-trace -k <apiKey> --aas3 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC BPNL00000003AZQP BPNL00000003CSGV
```

where:
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"keycloak-angular": "13.0.0",
"keycloak-js": "21.0.2",
"lodash-es": "4.17.21",
"postcss": "8.4.23",
"postcss": "8.4.31",
"rxjs": "7.8.0",
"tailwindcss": "3.3.1",
"tslib": "2.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ import { DashboardStatsResponse } from '@page/dashboard/model/dashboard.model';

export const mockDashboardStats: DashboardStatsResponse = {
otherParts: 5,
myItems: 3,
myParts: 3,
investigations: 20,
};
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
></app-notification-common-modal>

<app-notification
[notificationType]="NotificationType.ALERT"
[queuedAndRequestedNotifications$]="alertsQueuedAndRequested$"
[receivedNotifications$]="alertsReceived$"
[translationContext]="TranslationContext.COMMONALERT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { NotificationCommonModalComponent } from '@shared/components/notificatio
import { TableSortingUtil } from '@shared/components/table/table-sorting.util';
import { MenuActionConfig, TableEventConfig, TableHeaderSort } from '@shared/components/table/table.model';
import { NotificationTabInformation } from '@shared/model/notification-tab-information';
import { Notification, NotificationStatusGroup } from '@shared/model/notification.model';
import { Notification, NotificationStatusGroup, NotificationType } from '@shared/model/notification.model';
import { TranslationContext } from '@shared/model/translation-context.model';
import { Subscription } from 'rxjs';

Expand Down Expand Up @@ -124,4 +124,5 @@ export class AlertsComponent {
}

protected readonly TranslationContext = TranslationContext;
protected readonly NotificationType = NotificationType;
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('DashboardAssembler', () => {
expect(
DashboardAssembler.assembleDashboard({
otherParts: 100,
myItems: 200,
myParts: 200,
}),
).toEqual({
otherParts: 100,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class DashboardAssembler {
public static assembleDashboard(dashboard: DashboardStatsResponse): DashboardStats {
return {
otherParts: dashboard.otherParts,
myItems: dashboard.myItems,
myItems: dashboard.myParts,
investigations: dashboard.investigations,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ export interface DashboardStats {

export interface DashboardStatsResponse {
otherParts: number | null;
myItems: number;
myParts: number;
investigations?: number;
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ <h3 class="mb-4 flex items-center">

<mat-card-content>
<app-notifications-tab
[notificationType]="NotificationType.INVESTIGATION"
[notificationsView$]="investigations$"
[translationContext]="'commonInvestigation'"
[labelId]="'dashboard-investigations'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { getRoute, INVESTIGATION_BASE_ROUTE } from '@core/known-route';
import { Notification, Notifications, NotificationStatusGroup } from '@shared/model/notification.model';
import {Notification, Notifications, NotificationStatusGroup, NotificationType} from '@shared/model/notification.model';
import { View } from '@shared/model/view.model';
import { CloseNotificationModalComponent } from '@shared/modules/notification/modal/close/close-notification-modal.component';
import { Observable } from 'rxjs';
Expand Down Expand Up @@ -69,4 +69,6 @@ export class DashboardComponent implements OnInit, OnDestroy {
const { link } = getRoute(INVESTIGATION_BASE_ROUTE);
this.router.navigate([`/${link}/${notification.id}`]).then();
}

protected readonly NotificationType = NotificationType;
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
></app-notification-common-modal>

<app-notification
[notificationType]="NotificationType.INVESTIGATION"
[queuedAndRequestedNotifications$]="investigationsQueuedAndRequested$"
[receivedNotifications$]="investigationsReceived$"
[translationContext]="TranslationContext.COMMONINVESTIGATION"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { NotificationCommonModalComponent } from '@shared/components/notificatio
import { TableSortingUtil } from '@shared/components/table/table-sorting.util';
import { MenuActionConfig, TableEventConfig, TableHeaderSort } from '@shared/components/table/table.model';
import { NotificationTabInformation } from '@shared/model/notification-tab-information';
import { Notification, NotificationStatusGroup } from '@shared/model/notification.model';
import { Notification, NotificationStatusGroup, NotificationType } from '@shared/model/notification.model';
import { TranslationContext } from '@shared/model/translation-context.model';
import { Subscription } from 'rxjs';
import { InvestigationsFacade } from '../core/investigations.facade';
Expand Down Expand Up @@ -123,4 +123,5 @@ export class InvestigationsComponent {
}

protected readonly TranslationContext = TranslationContext;
protected readonly NotificationType = NotificationType;
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
(configChanged)="onAsBuiltTableConfigChange($event)"
[multiSortList]="tableCustomerAsBuiltSortList"
[multiSelectActive]="true"
[tableHeader]='"page.asBuiltParts" | i18n'
(filterActivated)="filterActivated(true, $event )"
[tableType]="PartTableType.AS_BUILT_CUSTOMER"
></app-parts-table>
Expand All @@ -58,6 +59,7 @@
[paginationData]="parts.data | formatPaginationSemanticDataModelToCamelCase"
[noShadow]="true"
[labelId]="customContext.labelId"
[tableHeader]='"page.asPlannedParts" | i18n'
(selected)="onSelectItem($event)"
(configChanged)="onAsPlannedTableConfigChange($event)"
[multiSortList]="tableCustomerAsPlannedSortList"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
SPDX-License-Identifier: Apache-2.0
-->
<div class="other-parts-container">
<div class="parts-search-input-wrapper" [formGroup]="searchFormGroup">
<div class="searchbar-wrapper">
<div class="searchbar-container" [formGroup]="searchFormGroup">
<app-input
[label]="'parts.input.global-search.placeholder' | i18n"
[suffixIconHover]="true"
Expand All @@ -33,26 +34,27 @@
[parentControlName]="'partSearch'"
suffixIconColor="primary"
></app-input>
</div>
</div>
<div class="app-bom-lifecycle-activator-container">
<app-bom-lifecycle-activator [view]="UserSettingView.OTHER_PARTS"
(buttonClickEvent)="handleTableActivationEvent($event)"></app-bom-lifecycle-activator>
</div>
<as-split direction="horizontal" class="split-container">
<as-split-area [size]="this.bomLifecycleSize.asBuiltSize">
<p class="large-text">{{'page.asBuiltParts' | i18n }}</p>

<mat-tab-group
(selectedTabChange)="onTabChange($event)"
appTabAsPanel
mat-stretch-tabs="false"
mat-align-tabs="start"
class="other-parts-mat-tab-group"
>

<mat-tab>
<ng-template mat-tab-label>
<span [id]="supplierTabLabelId">{{ 'pageOtherParts.tab.supplier' | i18n }} </span>
</ng-template>

<app-supplier-parts
[bomLifecycle]="MainAspectType.AS_BUILT"
></app-supplier-parts>
Expand All @@ -62,15 +64,13 @@
<ng-template mat-tab-label>
<span [id]="customerTabLabelId">{{ 'pageOtherParts.tab.customer' | i18n }} </span>
</ng-template>

<app-customer-parts
[bomLifecycle]="MainAspectType.AS_BUILT"
></app-customer-parts>
</mat-tab>
</mat-tab-group>
</as-split-area>
<as-split-area [size]="this.bomLifecycleSize.asPlannedSize">
<p class="large-text">{{'page.asPlannedParts' | i18n }}</p>
<mat-tab-group
(selectedTabChange)="onTabChange($event)"
appTabAsPanel
Expand All @@ -92,7 +92,6 @@
<ng-template mat-tab-label>
<span [id]="customerTabLabelId">{{ 'pageOtherParts.tab.customer' | i18n }} </span>
</ng-template>

<app-customer-parts
[bomLifecycle]="MainAspectType.AS_PLANNED"
></app-customer-parts>
Expand Down
Loading

0 comments on commit 14b6035

Please sign in to comment.