From 83bfb08fcce2844b84b0c46873812cc74d885e26 Mon Sep 17 00:00:00 2001 From: ds-ashanmugavel <143817136+ds-ashanmugavel@users.noreply.github.com> Date: Tue, 5 Dec 2023 11:00:07 +0100 Subject: [PATCH 01/14] chore: [TRACEFOSS-XXX] Update argo.yml --- .github/workflows/argo.yml | 40 +++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/.github/workflows/argo.yml b/.github/workflows/argo.yml index 3162be4150..aa44dadf8b 100644 --- a/.github/workflows/argo.yml +++ b/.github/workflows/argo.yml @@ -35,7 +35,7 @@ on: - E2E-A/E2E-B - int-a/int-b testdata_version: - description: Which Testdata Version CX_Testdata_MessagingTest_v.json + description: Which Testdata Version CX_Testdata_MessagingTest_v.json e.g., 1.1.12" required: true argo_token: description: Argo Token @@ -73,8 +73,46 @@ env: ARGO_INT_B_RegistryReload: "https://traceability-int-b.int.demo.catena-x.net/api/registry/reload" jobs: + test_input: + runs-on: ubuntu-latest + steps: + - name: mask token + run: | + ARGO_TOKEN=$(jq -r '.inputs.argo_token' $GITHUB_EVENT_PATH) + echo ::add-mask::$ARGO_TOKEN + echo ARGO_TOKEN=$ARGO_TOKEN >> $GITHUB_ENV + + - name: Check Testdata Version Format + run: | + if [[ ! "${{ github.event.inputs.testdata_version }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "Invalid Testdata Version format. Please use X.X.X, e.g., 1.1.12" + exit 1 + fi + + - name: Check Argo Token + run: | + + source ./.github/argo/argo_config.sh + if [ "${{ github.event.inputs.environment }}" == "Dev/Test" ]; then + resources=("${DEV_TEST_RESOURCES[2]}") + elif [ "${{ github.event.inputs.environment }}" == "E2E-A/E2E-B" ]; then + resources=("${E2E_RESOURCES[2]}") + elif [ "${{ github.event.inputs.environment }}" == "int-a/int-b" ]; then + resources=("${INT_RESOURCES[2]}") + fi + json_data=$(curl -X GET -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" "$resources") + + if [status=$(echo "$json_data" | jq -r '.status.sync.status') != null ]; then + echo "Argo Token is valid." + else + echo "Argo Token is invalid." + exit 1 + fi + + print_environment: + needs: test_input runs-on: ubuntu-latest steps: - name: ${{ github.event.inputs.environment }} From 85d9247a4bf1ef436a67f5ca9032fec91ed32989 Mon Sep 17 00:00:00 2001 From: ds-ashanmugavel <143817136+ds-ashanmugavel@users.noreply.github.com> Date: Tue, 5 Dec 2023 11:12:13 +0100 Subject: [PATCH 02/14] chore: [TRACEFOSS-XXX] Update argo.yml --- .github/workflows/argo.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/argo.yml b/.github/workflows/argo.yml index aa44dadf8b..2321e6224d 100644 --- a/.github/workflows/argo.yml +++ b/.github/workflows/argo.yml @@ -92,23 +92,24 @@ jobs: - name: Check Argo Token run: | - source ./.github/argo/argo_config.sh + source ./.github/argo/argo_config.sh + if [ "${{ github.event.inputs.environment }}" == "Dev/Test" ]; then - resources=("${DEV_TEST_RESOURCES[2]}") + resources="${DEV_TEST_RESOURCES[2]}" elif [ "${{ github.event.inputs.environment }}" == "E2E-A/E2E-B" ]; then - resources=("${E2E_RESOURCES[2]}") + resources="${E2E_RESOURCES[2]}" elif [ "${{ github.event.inputs.environment }}" == "int-a/int-b" ]; then - resources=("${INT_RESOURCES[2]}") + resources="${INT_RESOURCES[2]}" fi - json_data=$(curl -X GET -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" "$resources") + json_data=$(curl -X GET -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" "$resources") - if [status=$(echo "$json_data" | jq -r '.status.sync.status') != null ]; then + if [status=$(echo "$json_data" | jq -r '.status.sync.status') != null ]; then echo "Argo Token is valid." - else + else echo "Argo Token is invalid." exit 1 - fi + fi print_environment: From 6adc8b1d40aa93d62833cb3b5ecd733c1dbb0588 Mon Sep 17 00:00:00 2001 From: ds-ashanmugavel <143817136+ds-ashanmugavel@users.noreply.github.com> Date: Tue, 5 Dec 2023 11:15:44 +0100 Subject: [PATCH 03/14] chore: [TRACEFOSS-XXX] Update argo.yml --- .github/workflows/argo.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/argo.yml b/.github/workflows/argo.yml index 2321e6224d..c84666d0bf 100644 --- a/.github/workflows/argo.yml +++ b/.github/workflows/argo.yml @@ -76,6 +76,10 @@ jobs: test_input: runs-on: ubuntu-latest steps: + + - name: Checkout-Repository + uses: actions/checkout@v4 + - name: mask token run: | ARGO_TOKEN=$(jq -r '.inputs.argo_token' $GITHUB_EVENT_PATH) From 2ed7adf876d1a282dc107f8b7b1fce0c57265cd0 Mon Sep 17 00:00:00 2001 From: ds-ashanmugavel <143817136+ds-ashanmugavel@users.noreply.github.com> Date: Wed, 6 Dec 2023 08:59:45 +0100 Subject: [PATCH 04/14] chore: [TRACEFOSS-XXX] Update argo.yml --- .github/workflows/argo.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/argo.yml b/.github/workflows/argo.yml index c84666d0bf..de50d97fe7 100644 --- a/.github/workflows/argo.yml +++ b/.github/workflows/argo.yml @@ -107,8 +107,8 @@ jobs: fi json_data=$(curl -X GET -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" "$resources") - - if [status=$(echo "$json_data" | jq -r '.status.sync.status') != null ]; then + status=$(echo "$json_data" | jq -r '.status.sync.status') + if [ $status != null ]; then echo "Argo Token is valid." else echo "Argo Token is invalid." From e08130d94843556f429a0d8976874784191bc5a7 Mon Sep 17 00:00:00 2001 From: ds-ashanmugavel <143817136+ds-ashanmugavel@users.noreply.github.com> Date: Wed, 6 Dec 2023 10:10:30 +0100 Subject: [PATCH 05/14] chore: [TRACEFOSS-XXX] Update argo.yml --- .github/workflows/argo.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/argo.yml b/.github/workflows/argo.yml index de50d97fe7..47780782b2 100644 --- a/.github/workflows/argo.yml +++ b/.github/workflows/argo.yml @@ -106,9 +106,9 @@ jobs: resources="${INT_RESOURCES[2]}" fi - json_data=$(curl -X GET -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" "$resources") - status=$(echo "$json_data" | jq -r '.status.sync.status') - if [ $status != null ]; then + data=$(curl -X GET -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" "$resources") + status_app=$(echo "$data" | jq -r '.status.sync.status') + if [ $status_app != null ]; then echo "Argo Token is valid." else echo "Argo Token is invalid." @@ -211,14 +211,14 @@ jobs: old_TargetRevision2=$(echo "$json_data2" | jq -r '.spec.source.targetRevision') if [ "$old_TargetRevision1" != "$new_target_revision" ]; then - updated_json=$(echo "$json_data1" | jq ".spec.source.targetRevision = \"$new_target_revision\"") - curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" -d "$updated_json" "$ARGO_TEST_TRACE_X_INSTANCE" + updated_json1=$(echo "$json_data1" | jq ".spec.source.targetRevision = \"$new_target_revision\"") + curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" -d "$updated_json1" "$ARGO_TEST_TRACE_X_INSTANCE" echo "Target Revision for Test overwritten" fi if [ "$old_TargetRevision2" != "$new_target_revision" ]; then - updated_json=$(echo "$json_data2" | jq ".spec.source.targetRevision = \"$new_target_revision\"") - curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" -d "$updated_json" "$ARGO_DEV_TRACE_X_INSTANCE" + updated_json2=$(echo "$json_data2" | jq ".spec.source.targetRevision = \"$new_target_revision\"") + curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" -d "$updated_json2" "$ARGO_DEV_TRACE_X_INSTANCE" echo "Target Revision for Dev overwritten" fi @@ -231,14 +231,14 @@ jobs: old_TargetRevision2=$(echo "$json_data2" | jq -r '.spec.source.targetRevision') if [ "$old_TargetRevision1" != "$new_target_revision" ]; then - updated_json=$(echo "$json_data1" | jq ".spec.source.targetRevision = \"$new_target_revision\"") - curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" -d "$updated_json" "$ARGO_E2E_A_TRACE_X_INSTANCE" + updated_json1=$(echo "$json_data1" | jq ".spec.source.targetRevision = \"$new_target_revision\"") + curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" -d "$updated_json1" "$ARGO_E2E_A_TRACE_X_INSTANCE" echo "Target Revision for e2e-a overwritten" fi if [ "$old_TargetRevision2" != "$new_target_revision" ]; then - updated_json=$(echo "$json_data2" | jq ".spec.source.targetRevision = \"$new_target_revision\"") - curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" -d "$updated_json" "$ARGO_E2E_B_TRACE_X_INSTANCE" + updated_json2=$(echo "$json_data2" | jq ".spec.source.targetRevision = \"$new_target_revision\"") + curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" -d "$updated_json2" "$ARGO_E2E_B_TRACE_X_INSTANCE" echo "Target Revision for e2e-b overwritten" fi From 69f6086fcdae9ecee6a669bb131bccc6efb00ea9 Mon Sep 17 00:00:00 2001 From: ds-ashanmugavel <143817136+ds-ashanmugavel@users.noreply.github.com> Date: Mon, 11 Dec 2023 14:55:47 +0100 Subject: [PATCH 06/14] chore: [TRACEFOSS-XXX] Update argo.yml --- .github/workflows/argo.yml | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/.github/workflows/argo.yml b/.github/workflows/argo.yml index 47780782b2..4fb0587863 100644 --- a/.github/workflows/argo.yml +++ b/.github/workflows/argo.yml @@ -40,6 +40,13 @@ on: argo_token: description: Argo Token required: true + hard_refresh: + type: choice + description: Do you want a Hard Refresh? (+5min execution time) + required: true + options: + - Yes + - No env: ARGO_TEST_REGISTRY: "https://argo.dev.demo.catena-x.net/api/v1/applications/tracex-dt-registry-test" @@ -124,6 +131,7 @@ jobs: run: | echo "### inputs" >> $GITHUB_STEP_SUMMARY echo "- environment: ${{ github.event.inputs.environment }}" >> $GITHUB_STEP_SUMMARY + hard_refresh_environment: needs: print_environment @@ -143,19 +151,23 @@ jobs: run: | source ./.github/argo/argo_config.sh - if [ "${{ github.event.inputs.environment }}" == "Dev/Test" ]; then - resources=("${DEV_TEST_RESOURCES[@]}") - elif [ "${{ github.event.inputs.environment }}" == "E2E-A/E2E-B" ]; then - resources=("${E2E_RESOURCES[@]}") - elif [ "${{ github.event.inputs.environment }}" == "int-a/int-b" ]; then - resources=("${INT_RESOURCES[@]}") + if [ "${{ github.event.inputs.hard_refresh }}" == "Yes" ]; then + if [ "${{ github.event.inputs.environment }}" == "Dev/Test" ]; then + resources=("${DEV_TEST_RESOURCES[@]}") + elif [ "${{ github.event.inputs.environment }}" == "E2E-A/E2E-B" ]; then + resources=("${E2E_RESOURCES[@]}") + elif [ "${{ github.event.inputs.environment }}" == "int-a/int-b" ]; then + resources=("${INT_RESOURCES[@]}") + fi + + for resource in "${resources[@]}"; do + curl -X GET -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" "$resource?refresh=hard&appNamespace=argocd" + done + sleep 40 + elif [ "${{ github.event.inputs.hard_refresh }}" == "No" ]; then + echo "Hard refresh skipped" fi - for resource in "${resources[@]}"; do - curl -X GET -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" "$resource?refresh=hard&appNamespace=argocd" - done - sleep 40 - delete_environment: needs: hard_refresh_environment runs-on: ubuntu-latest From 72db40f278f719b40ac9d0657be999136ef6d636 Mon Sep 17 00:00:00 2001 From: ds-ashanmugavel <143817136+ds-ashanmugavel@users.noreply.github.com> Date: Mon, 11 Dec 2023 15:02:16 +0100 Subject: [PATCH 07/14] chore: [TRACEFOSS-XXX] Update argo.yml --- .github/workflows/argo.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/argo.yml b/.github/workflows/argo.yml index 4fb0587863..88c7e32f7f 100644 --- a/.github/workflows/argo.yml +++ b/.github/workflows/argo.yml @@ -151,7 +151,7 @@ jobs: run: | source ./.github/argo/argo_config.sh - if [ "${{ github.event.inputs.hard_refresh }}" == "Yes" ]; then + if [ "${{ github.event.inputs.hard_refresh }}" == "true" ]; then if [ "${{ github.event.inputs.environment }}" == "Dev/Test" ]; then resources=("${DEV_TEST_RESOURCES[@]}") elif [ "${{ github.event.inputs.environment }}" == "E2E-A/E2E-B" ]; then @@ -164,7 +164,7 @@ jobs: curl -X GET -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" "$resource?refresh=hard&appNamespace=argocd" done sleep 40 - elif [ "${{ github.event.inputs.hard_refresh }}" == "No" ]; then + elif [ "${{ github.event.inputs.hard_refresh }}" == "false" ]; then echo "Hard refresh skipped" fi From 882610010ba1b73d5017195878803b98267434ac Mon Sep 17 00:00:00 2001 From: ds-ashanmugavel <143817136+ds-ashanmugavel@users.noreply.github.com> Date: Tue, 12 Dec 2023 10:49:45 +0100 Subject: [PATCH 08/14] chore: [TRACEFOSS-XXX] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0376d3fe67..be0995d2fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Added BPN column to parts table - Emit change check to observables in frontend - Added an Entity Relationship Model (ERM) into the Architecture Documentation to visually represent our tables and their relationships. +- Added a step for testing input and included an option for a hard refresh in Argo Workflow ### Changed - Filter configuration for tables to be resuable and easy to adapt From 162a6079d0735087d4440502d77ca5ae3069f03c Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Tue, 12 Dec 2023 15:10:28 +0100 Subject: [PATCH 09/14] feature(table):[TRACEFOSS-2858] fix code smells --- .../multi-select-autocomplete.component.ts | 24 ++++++++++--------- .../notification-tab.component.ts | 4 ++-- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts b/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts index d389895129..dfdd3acfed 100644 --- a/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts +++ b/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts @@ -17,22 +17,24 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { DatePipe, registerLocaleData } from '@angular/common'; +import {DatePipe, registerLocaleData} from '@angular/common'; import localeDe from '@angular/common/locales/de'; import localeDeExtra from '@angular/common/locales/extra/de'; -import { Component, EventEmitter, Inject, Injector, Input, LOCALE_ID, OnChanges, ViewChild } from '@angular/core'; -import { FormControl } from '@angular/forms'; -import { DateAdapter, MAT_DATE_LOCALE } from '@angular/material/core'; -import { MatDatepickerInputEvent } from '@angular/material/datepicker'; -import { MatSelectChange } from '@angular/material/select'; +import {Component, EventEmitter, Inject, Injector, Input, LOCALE_ID, OnChanges, ViewChild} from '@angular/core'; +import {FormControl} from '@angular/forms'; +import {DateAdapter, MAT_DATE_LOCALE} from '@angular/material/core'; +import {MatDatepickerInputEvent} from '@angular/material/datepicker'; +import {MatSelectChange} from '@angular/material/select'; import { AutocompleteStrategy, AutocompleteStrategyMap, } from '@shared/components/multi-select-autocomplete/autocomplete-strategy'; -import { TableType } from '@shared/components/multi-select-autocomplete/table-type.model'; -import { FormatPartSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-part-semantic-data-model-to-camelcase.pipe'; -import { PartsService } from '@shared/service/parts.service'; -import { firstValueFrom } from 'rxjs'; +import {TableType} from '@shared/components/multi-select-autocomplete/table-type.model'; +import { + FormatPartSemanticDataModelToCamelCasePipe +} from '@shared/pipes/format-part-semantic-data-model-to-camelcase.pipe'; +import {PartsService} from '@shared/service/parts.service'; +import {firstValueFrom} from 'rxjs'; @Component({ selector: 'app-multiselect', @@ -167,7 +169,7 @@ export class MultiSelectAutocompleteComponent implements OnChanges { if (this.selectedValue?.length > 1) { suffix = (' + ' + (this.selectedValue?.length - 1)) + ' ' + this.placeholderMultiple; } - debugger; + // apply CamelCase to semanticDataModel labels if (this.filterColumn === 'semanticDataModel') { displayValue = [ this.formatPartSemanticDataModelToCamelCasePipe.transformModel(this.selectedValue[0]), suffix ]; diff --git a/frontend/src/app/modules/shared/modules/notification/notification-tab/notification-tab.component.ts b/frontend/src/app/modules/shared/modules/notification/notification-tab/notification-tab.component.ts index 029631f531..9570f7f57d 100644 --- a/frontend/src/app/modules/shared/modules/notification/notification-tab/notification-tab.component.ts +++ b/frontend/src/app/modules/shared/modules/notification/notification-tab/notification-tab.component.ts @@ -20,7 +20,7 @@ ********************************************************************************/ import {AfterViewInit, Component, EventEmitter, Input, Output, TemplateRef, ViewChild} from '@angular/core'; -import {TableType} from '@shared/components/multi-select-autocomplete/table-type.model'; +import {NotificationChannel, TableType} from '@shared/components/multi-select-autocomplete/table-type.model'; import { CreateHeaderFromColumns, DisplayColumns, @@ -96,7 +96,7 @@ export class NotificationTabComponent implements AfterViewInit { filterActivated(notificationFilter: any): void { this.notificationFilter = notificationFilter; - const channel = notificationFilter['createdBy'] ? 'RECEIVER' : 'SENDER'; + const channel = notificationFilter['createdBy'] ? NotificationChannel.RECEIVER : NotificationChannel.SENDER; if (this.notificationType === NotificationType.INVESTIGATION) { this.investigationsFilterChanged.emit({ channel: channel, From da8ab647e17c8b56ac7ffc52d74b47775e18a0f6 Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Tue, 12 Dec 2023 15:17:00 +0100 Subject: [PATCH 10/14] feature(table):[TRACEFOSS-2858] fix code smells --- .../alerts/presentation/alerts.component.ts | 35 ++++++++++--------- .../presentation/investigations.component.ts | 35 ++++++++++--------- .../notification.component.spec.ts | 30 +++++++++------- 3 files changed, 55 insertions(+), 45 deletions(-) diff --git a/frontend/src/app/modules/page/alerts/presentation/alerts.component.ts b/frontend/src/app/modules/page/alerts/presentation/alerts.component.ts index 5fcf87536b..5e2f4fedd9 100644 --- a/frontend/src/app/modules/page/alerts/presentation/alerts.component.ts +++ b/frontend/src/app/modules/page/alerts/presentation/alerts.component.ts @@ -17,21 +17,24 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ChangeDetectorRef, Component, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; -import { ALERT_BASE_ROUTE, getRoute } from '@core/known-route'; -import { AlertDetailFacade } from '@page/alerts/core/alert-detail.facade'; -import { AlertHelperService } from '@page/alerts/core/alert-helper.service'; -import { AlertsFacade } from '@page/alerts/core/alerts.facade'; -import { NotificationMenuActionsAssembler } from '@shared/assembler/notificationMenuActions.assembler'; -import { NotificationCommonModalComponent } from '@shared/components/notification-common-modal/notification-common-modal.component'; -import { TableSortingUtil } from '@shared/components/table/table-sorting.util'; -import { MenuActionConfig, TableEventConfig, TableHeaderSort } from '@shared/components/table/table.model'; -import { createDeeplinkNotificationFilter } from '@shared/helper/notification-helper'; -import { NotificationTabInformation } from '@shared/model/notification-tab-information'; -import { Notification, NotificationStatusGroup, NotificationType } from '@shared/model/notification.model'; -import { TranslationContext } from '@shared/model/translation-context.model'; -import { Subscription } from 'rxjs'; +import {ChangeDetectorRef, Component, ViewChild} from '@angular/core'; +import {ActivatedRoute, Router} from '@angular/router'; +import {ALERT_BASE_ROUTE, getRoute} from '@core/known-route'; +import {AlertDetailFacade} from '@page/alerts/core/alert-detail.facade'; +import {AlertHelperService} from '@page/alerts/core/alert-helper.service'; +import {AlertsFacade} from '@page/alerts/core/alerts.facade'; +import {NotificationMenuActionsAssembler} from '@shared/assembler/notificationMenuActions.assembler'; +import { + NotificationCommonModalComponent +} from '@shared/components/notification-common-modal/notification-common-modal.component'; +import {TableSortingUtil} from '@shared/components/table/table-sorting.util'; +import {MenuActionConfig, TableEventConfig, TableHeaderSort} from '@shared/components/table/table.model'; +import {createDeeplinkNotificationFilter} from '@shared/helper/notification-helper'; +import {NotificationTabInformation} from '@shared/model/notification-tab-information'; +import {Notification, NotificationStatusGroup, NotificationType} from '@shared/model/notification.model'; +import {TranslationContext} from '@shared/model/translation-context.model'; +import {Subscription} from 'rxjs'; +import {NotificationChannel} from "@shared/components/multi-select-autocomplete/table-type.model"; @Component({ selector: 'app-alerts', @@ -133,7 +136,7 @@ export class AlertsComponent { protected readonly NotificationType = NotificationType; filterNotifications(filterContext: any) { - if(filterContext.channel === 'RECEIVER') { + if(filterContext.channel === NotificationChannel.RECEIVER) { this.alertsFacade.setReceivedAlerts(this.pagination.page, this.pagination.pageSize, this.alertReceivedSortList,null, filterContext.filter); } else { this.alertsFacade.setQueuedAndRequestedAlerts(this.pagination.page, this.pagination.pageSize, this.alertQueuedAndRequestedSortList, null, filterContext.filter); diff --git a/frontend/src/app/modules/page/investigations/presentation/investigations.component.ts b/frontend/src/app/modules/page/investigations/presentation/investigations.component.ts index bb2326c9f3..a2862e1ccd 100644 --- a/frontend/src/app/modules/page/investigations/presentation/investigations.component.ts +++ b/frontend/src/app/modules/page/investigations/presentation/investigations.component.ts @@ -19,21 +19,24 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ChangeDetectorRef, Component, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; -import { getRoute, INVESTIGATION_BASE_ROUTE } from '@core/known-route'; -import { InvestigationDetailFacade } from '@page/investigations/core/investigation-detail.facade'; -import { InvestigationHelperService } from '@page/investigations/core/investigation-helper.service'; -import { NotificationMenuActionsAssembler } from '@shared/assembler/notificationMenuActions.assembler'; -import { NotificationCommonModalComponent } from '@shared/components/notification-common-modal/notification-common-modal.component'; -import { TableSortingUtil } from '@shared/components/table/table-sorting.util'; -import { MenuActionConfig, TableEventConfig, TableHeaderSort } from '@shared/components/table/table.model'; -import { createDeeplinkNotificationFilter } from '@shared/helper/notification-helper'; -import { NotificationTabInformation } from '@shared/model/notification-tab-information'; -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'; +import {ChangeDetectorRef, Component, ViewChild} from '@angular/core'; +import {ActivatedRoute, Router} from '@angular/router'; +import {getRoute, INVESTIGATION_BASE_ROUTE} from '@core/known-route'; +import {InvestigationDetailFacade} from '@page/investigations/core/investigation-detail.facade'; +import {InvestigationHelperService} from '@page/investigations/core/investigation-helper.service'; +import {NotificationMenuActionsAssembler} from '@shared/assembler/notificationMenuActions.assembler'; +import { + NotificationCommonModalComponent +} from '@shared/components/notification-common-modal/notification-common-modal.component'; +import {TableSortingUtil} from '@shared/components/table/table-sorting.util'; +import {MenuActionConfig, TableEventConfig, TableHeaderSort} from '@shared/components/table/table.model'; +import {createDeeplinkNotificationFilter} from '@shared/helper/notification-helper'; +import {NotificationTabInformation} from '@shared/model/notification-tab-information'; +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'; +import {NotificationChannel} from "@shared/components/multi-select-autocomplete/table-type.model"; @Component({ selector: 'app-investigations', @@ -130,7 +133,7 @@ export class InvestigationsComponent { protected readonly NotificationType = NotificationType; filterNotifications(filterContext: any) { - if(filterContext.channel === 'RECEIVER') { + if(filterContext.channel === NotificationChannel.RECEIVER) { this.investigationsFacade.setReceivedInvestigation(this.pagination.page, this.pagination.pageSize, this.investigationReceivedSortList, null, filterContext.filter /*Filter */); } else { diff --git a/frontend/src/app/modules/shared/modules/notification/presentation/notification.component.spec.ts b/frontend/src/app/modules/shared/modules/notification/presentation/notification.component.spec.ts index daea04c84d..575d08ab77 100644 --- a/frontend/src/app/modules/shared/modules/notification/presentation/notification.component.spec.ts +++ b/frontend/src/app/modules/shared/modules/notification/presentation/notification.component.spec.ts @@ -19,23 +19,27 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { CalendarDateModel } from '@core/model/calendar-date.model'; +import {CalendarDateModel} from '@core/model/calendar-date.model'; import { Notification, NotificationResponse, Notifications, - NotificationStatus, NotificationType, + NotificationStatus, + NotificationType, } from '@shared/model/notification.model'; -import { View } from '@shared/model/view.model'; -import { FormatPartSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-part-semantic-data-model-to-camelcase.pipe'; -import { SharedModule } from '@shared/shared.module'; -import { TemplateModule } from '@shared/template.module'; -import { fireEvent, screen, within } from '@testing-library/angular'; -import { renderComponent } from '@tests/test-render.utils'; -import { Observable, of } from 'rxjs'; -import { delay } from 'rxjs/operators'; -import { buildMockInvestigations } from '../../../../../mocks/services/investigations-mock/investigations.test.model'; -import { NotificationModule } from '../notification.module'; +import {View} from '@shared/model/view.model'; +import { + FormatPartSemanticDataModelToCamelCasePipe +} from '@shared/pipes/format-part-semantic-data-model-to-camelcase.pipe'; +import {SharedModule} from '@shared/shared.module'; +import {TemplateModule} from '@shared/template.module'; +import {fireEvent, screen, within} from '@testing-library/angular'; +import {renderComponent} from '@tests/test-render.utils'; +import {Observable, of} from 'rxjs'; +import {delay} from 'rxjs/operators'; +import {buildMockInvestigations} from '../../../../../mocks/services/investigations-mock/investigations.test.model'; +import {NotificationModule} from '../notification.module'; +import {NotificationChannel} from "@shared/components/multi-select-autocomplete/table-type.model"; describe('NotificationsInboxComponent', () => { let clickHandler; @@ -43,7 +47,7 @@ describe('NotificationsInboxComponent', () => { beforeEach(() => (clickHandler = jasmine.createSpy())); const mapNotificationResponse = (data: NotificationResponse): Notification => { - const isFromSender = data.channel === 'SENDER'; + const isFromSender = data.channel === NotificationChannel.SENDER; const createdDate = new CalendarDateModel(data.createdDate); const targetDate = new CalendarDateModel(data.targetDate); const createdBy = data.createdBy From 43ba3a2fc4836f9bd588bcc2e56098b267208208 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 12 Dec 2023 15:33:12 +0100 Subject: [PATCH 11/14] feat(release): 10.0.0 --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57b1e0c532..0db049aa8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,9 @@ 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). - - ## [UNRELEASED - DD.MM.YYYY] + +## [10.0.0 - 12.12.2024] ### Added - new filtering capabilities ( receivedQualityAlertIdsInStatusActive, sentQualityAlertIdsInStatusActive, receivedQualityInvestigationIdsInStatusActive, sentQualityInvestigationIdsInStatusActive ) - Validation check if table-settings correct and reset on invalid state From 2a4eb4252220c6c614e1cf2c380d65d2b24fcfdb Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 12 Dec 2023 15:38:38 +0100 Subject: [PATCH 12/14] feat(release): 10.0.0 --- charts/traceability-foss/Chart.yaml | 8 ++++---- charts/traceability-foss/charts/backend/Chart.yaml | 4 ++-- charts/traceability-foss/charts/frontend/Chart.yaml | 4 ++-- frontend/package.json | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/charts/traceability-foss/Chart.yaml b/charts/traceability-foss/Chart.yaml index ba2d410693..0fddf9e0ee 100644 --- a/charts/traceability-foss/Chart.yaml +++ b/charts/traceability-foss/Chart.yaml @@ -23,15 +23,15 @@ home: https://eclipse-tractusx.github.io/ sources: - https://github.com/eclipse-tractusx/traceability-foss type: application -version: 1.3.22 -appVersion: "9.0.0-rc3" +version: 1.3.23 +appVersion: "10.0.0" dependencies: - name: frontend repository: "file://charts/frontend" - version: 1.3.22 + version: 1.3.23 - name: backend repository: "file://charts/backend" - version: 1.3.22 + version: 1.3.23 - name: postgresql repository: https://charts.bitnami.com/bitnami version: 12.1.6 diff --git a/charts/traceability-foss/charts/backend/Chart.yaml b/charts/traceability-foss/charts/backend/Chart.yaml index 8a156a4e1f..65ee11eeca 100644 --- a/charts/traceability-foss/charts/backend/Chart.yaml +++ b/charts/traceability-foss/charts/backend/Chart.yaml @@ -20,8 +20,8 @@ apiVersion: v2 name: backend description: A Helm chart for Traceability backend application type: application -version: 1.3.22 -appVersion: "9.0.0-rc3" +version: 1.3.23 +appVersion: "10.0.0" dependencies: - name: postgresql repository: https://charts.bitnami.com/bitnami diff --git a/charts/traceability-foss/charts/frontend/Chart.yaml b/charts/traceability-foss/charts/frontend/Chart.yaml index 19c1f0b8bf..22a79ad503 100644 --- a/charts/traceability-foss/charts/frontend/Chart.yaml +++ b/charts/traceability-foss/charts/frontend/Chart.yaml @@ -20,5 +20,5 @@ apiVersion: v2 name: frontend description: A Helm chart for Traceability frontend application type: application -version: 1.3.22 -appVersion: "9.0.0-rc3" +version: 1.3.23 +appVersion: "10.0.0" diff --git a/frontend/package.json b/frontend/package.json index a1ec4a0d15..f16ef8d94a 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name" : "trace-x", - "version" : "9.0.0-rc3", + "version" : "10.0.0", "scripts" : { "analyze" : "ng build --configuration=production --stats-json && webpack-bundle-analyzer dist/stats.json", "build:prod" : "ng build --output-hashing=all --configuration=debugProd --base-href /{baseHrefPlaceholder}/ --deploy-url /{baseHrefPlaceholder}/ ", From 3eab988532c85ac97e4e8dd587c2b21d07167cd9 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 12 Dec 2023 15:41:36 +0100 Subject: [PATCH 13/14] feat(release): 10.0.0 --- charts/traceability-foss/Chart.yaml | 6 +++--- charts/traceability-foss/charts/backend/Chart.yaml | 2 +- charts/traceability-foss/charts/frontend/Chart.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/traceability-foss/Chart.yaml b/charts/traceability-foss/Chart.yaml index 0fddf9e0ee..17c4ff268f 100644 --- a/charts/traceability-foss/Chart.yaml +++ b/charts/traceability-foss/Chart.yaml @@ -23,15 +23,15 @@ home: https://eclipse-tractusx.github.io/ sources: - https://github.com/eclipse-tractusx/traceability-foss type: application -version: 1.3.23 +version: 1.3.24 appVersion: "10.0.0" dependencies: - name: frontend repository: "file://charts/frontend" - version: 1.3.23 + version: 1.3.24 - name: backend repository: "file://charts/backend" - version: 1.3.23 + version: 1.3.24 - name: postgresql repository: https://charts.bitnami.com/bitnami version: 12.1.6 diff --git a/charts/traceability-foss/charts/backend/Chart.yaml b/charts/traceability-foss/charts/backend/Chart.yaml index 65ee11eeca..105d76e552 100644 --- a/charts/traceability-foss/charts/backend/Chart.yaml +++ b/charts/traceability-foss/charts/backend/Chart.yaml @@ -20,7 +20,7 @@ apiVersion: v2 name: backend description: A Helm chart for Traceability backend application type: application -version: 1.3.23 +version: 1.3.24 appVersion: "10.0.0" dependencies: - name: postgresql diff --git a/charts/traceability-foss/charts/frontend/Chart.yaml b/charts/traceability-foss/charts/frontend/Chart.yaml index 22a79ad503..3ad788ec62 100644 --- a/charts/traceability-foss/charts/frontend/Chart.yaml +++ b/charts/traceability-foss/charts/frontend/Chart.yaml @@ -20,5 +20,5 @@ apiVersion: v2 name: frontend description: A Helm chart for Traceability frontend application type: application -version: 1.3.23 +version: 1.3.24 appVersion: "10.0.0" From b8b12a41b511a4e88d5ff1e665cbabea6c8367e2 Mon Sep 17 00:00:00 2001 From: Maximilian Wesener Date: Tue, 12 Dec 2023 15:43:31 +0100 Subject: [PATCH 14/14] feat(release): 10.0.0 --- charts/traceability-foss/charts/backend/Chart.yaml | 2 +- charts/traceability-foss/charts/frontend/Chart.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/traceability-foss/charts/backend/Chart.yaml b/charts/traceability-foss/charts/backend/Chart.yaml index 105d76e552..fe49de5f9b 100644 --- a/charts/traceability-foss/charts/backend/Chart.yaml +++ b/charts/traceability-foss/charts/backend/Chart.yaml @@ -18,7 +18,7 @@ # apiVersion: v2 name: backend -description: A Helm chart for Traceability backend application +description: A Helm chart for Traceability backend application. type: application version: 1.3.24 appVersion: "10.0.0" diff --git a/charts/traceability-foss/charts/frontend/Chart.yaml b/charts/traceability-foss/charts/frontend/Chart.yaml index 3ad788ec62..10a21a36c0 100644 --- a/charts/traceability-foss/charts/frontend/Chart.yaml +++ b/charts/traceability-foss/charts/frontend/Chart.yaml @@ -18,7 +18,7 @@ # apiVersion: v2 name: frontend -description: A Helm chart for Traceability frontend application +description: A Helm chart for Traceability frontend application. type: application version: 1.3.24 appVersion: "10.0.0"