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

Semantic Data Model displayed in camel case #215

Merged
merged 20 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2e6c152
chore: TRACEFOSS-1952 Add name overrides for services
ds-mwesener Jul 10, 2023
efcb873
chore: TRACEFOSS-1952 Add home / sources
ds-mwesener Jul 10, 2023
bb657bb
chore: TRACEFOSS-1952 Helm ignore values and readme change of charts.
ds-mwesener Jul 10, 2023
0a6e09c
chore(semanticDataModel):[TRACEFOSS-1535] changed semanticDataModel t…
ds-mmaul Jul 11, 2023
5cee4e4
chore(semanticDataModel):[TRACEFOSS-1535] changed semanticDataModel t…
ds-mmaul Jul 11, 2023
2fd0c1f
chore(semanticDataModel):[TRACEFOSS-1535] changed semanticDataModel t…
ds-mmaul Jul 11, 2023
503c196
chore(semanticDataModel):[TRACEFOSS-1535] changed semanticDataModel t…
ds-mmaul Jul 11, 2023
1151086
chore(semanticDataModel):[TRACEFOSS-1535] changed semanticDataModel t…
ds-mmaul Jul 11, 2023
c45dcc2
chore(semanticDataModel):[TRACEFOSS-1535] changed semanticDataModel t…
ds-mmaul Jul 11, 2023
12447ce
chore(semanticDataModel):[TRACEFOSS-1535] changed semanticDataModel t…
ds-mmaul Jul 11, 2023
db8dd18
chore(semanticDataModel):[TRACEFOSS-1535] changed semanticDataModel t…
ds-mmaul Jul 11, 2023
8aea34c
chore(fix):[TRACEFOSS-1535] remove code smells
ds-mmaul Jul 12, 2023
cc9c655
chore(fix):[TRACEFOSS-1535] remove code smells
ds-mmaul Jul 12, 2023
463b375
Merge branch 'main' into chore/TRACEFOSS-1952-Helm-Chart-Requirements
ds-mwesener Jul 12, 2023
a0cd215
chore: TRACEFOSS-1952 Added CHANGELOG.md
ds-mwesener Jul 12, 2023
8ff66c3
chore: TRACEFOSS-1952 Added good nameoverrides
ds-mwesener Jul 12, 2023
1e516cc
chore: TRACEFOSS-1952 Added good nameoverrides
ds-mwesener Jul 12, 2023
0c28baf
Merge pull request #385 from catenax-ng/chore/TRACEFOSS-1952-Helm-Cha…
ds-mwesener Jul 12, 2023
cd37249
chore: TRACEFOSS-1952 Added good nameoverrides
ds-mwesener Jul 12, 2023
b5e69a0
Merge pull request #395 from catenax-ng/chore/TRACEFOSS-1535-FE-camel…
ds-ext-sceronik Jul 12, 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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased]

### Added
- Helmignore config params for wrong values.yaml files
- Home / Source URL in Helm Chart
- Name Overrides in Helmchart for pgadmin, irs-helm and tractusx-connector

### Changed

- Modified IRS Policies support to handle multiple policies
- Readme titles to match TRGs


### Removed
- unused classes and methods
Expand All @@ -35,6 +40,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- fixed bug where language switcher did not update to the selected language
- Changed SerialPartTypization aspect model to SerialPart
- Changed AssemblyPartRelationship aspect model to SingleLevelBomAsBuilt
- Changed semantic data model to be displayed in camel case

### Removed

Expand Down
3 changes: 3 additions & 0 deletions charts/traceability-foss/.helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@
.idea/
*.tmproj
.vscode/
# Accept only values.yaml
values?*.yaml
values?*.yml
3 changes: 3 additions & 0 deletions charts/traceability-foss/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
apiVersion: v2
name: traceability-foss
description: An umbrella Helm chart for eclipse-tractusx/traceability-foss project
home: https://eclipse-tractusx.github.io/
sources:
- https://github.com/eclipse-tractusx/traceability-foss
type: application
version: 1.3.10
appVersion: "5.0.0"
Expand Down
6 changes: 3 additions & 3 deletions charts/traceability-foss/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
This Helm chart provides a way to deploy the Umbrella component of Eclipse-TractusX-Traceability-FOSS on Kubernetes.
The chart includes the necessary configuration files, resources, and dependencies to deploy the Umbrella component in an kubernetes environment.

## Requirements
## Prerequisites

To use this Helm chart, you must have the following:

- Kubernetes cluster version 1.16+
- Helm version 3+

## Installation
## TL;DR

To install the Helm chart, use the following command:
`helm install traceability-foss .`
Expand All @@ -32,4 +32,4 @@ You can customize the configuration options by creating a `values.yaml` file and

## License
This project is licensed under the Apache License, Version 2.0. See the `LICENSE` file for more information.

14 changes: 10 additions & 4 deletions charts/traceability-foss/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,8 @@ backend:
# PG Admin configuration #
#########################
pgadmin4:
nameOverride: "tracex-pgadmin4"
fullnameOverride: "tracex-pgadmin4"
enabled: false # <pgadmin4.enabled>
ingress:
enabled: false # <pgadmin4.ingress.enabled>
Expand All @@ -328,8 +330,8 @@ pgadmin4:
postgresql:
enabled: true

nameOverride: "traceability-foss-backend-postgresql"
fullnameOverride: "traceability-foss-backend-postgresql"
nameOverride: "tracex-backend-postgresql"
fullnameOverride: "tracex-backend-postgresql"

auth:
postgresPassword: "CHANGEME"
Expand All @@ -342,13 +344,15 @@ postgresql:
#########################
irs-helm:
enabled: false # <irs-helm.enabled>

nameOverride: "tracex-irs"
fullnameOverride: "tracex-irs"
###################################
# EDC Consumer configuration #
###################################
tractusx-connector:
enabled: false

nameOverride: "tracex-consumer-edc"
fullnameOverride: "tracex-consumer-edc"
participant:
id: "BPN"

Expand All @@ -368,6 +372,8 @@ tractusx-connector:
# IRS EDC Consumer configuration #
###################################
edc-postgresql:
nameOverride: "tracex-consumer-edc-postgresql"
fullnameOverride: "tracex-consumer-edc-postgresql"
enabled: false
auth:
postgresPassword: "CHANGEME"
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/app/modules/page/alerts/alerts.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ 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 { FormatPartSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-part-semantic-data-model-to-camelcase.pipe';
import { FormatPaginationSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-pagination-semantic-data-model-to-camelcase.pipe';
import { FormatPartlistSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-partlist-semantic-data-model-to-camelcase.pipe';
import { SharedModule } from '@shared/shared.module';
import { TemplateModule } from '@shared/template.module';
import { AlertsComponent } from './presentation/alerts.component';
Expand All @@ -52,6 +55,9 @@ import { AlertsComponent } from './presentation/alerts.component';
AlertDetailFacade,
AlertDetailState,
AlertHelperService,
FormatPartSemanticDataModelToCamelCasePipe,
FormatPaginationSemanticDataModelToCamelCasePipe,
FormatPartlistSemanticDataModelToCamelCasePipe,
...getI18nPageProvider('page.alert'),
]
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ 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 { FormatPartlistSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-partlist-semantic-data-model-to-camelcase.pipe';
import { PartsService } from '@shared/service/parts.service';

describe('AlertDetailFacade', () => {
Expand Down Expand Up @@ -64,7 +65,7 @@ describe('AlertDetailFacade', () => {
AlertDetailFacade,
{ provide: AlertDetailState, useValue: alertDetailState },
{ provide: PartsService, useValue: partsService },
{ provide: TitleCasePipe, useValue: titleCasePipe }
FormatPartlistSemanticDataModelToCamelCasePipe
]
});

Expand Down
12 changes: 5 additions & 7 deletions frontend/src/app/modules/page/alerts/core/alert-detail.facade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

import { TitleCasePipe } from '@angular/common';
import { Injectable } from '@angular/core';
import { AlertDetailState } from '@page/alerts/core/alert-detail.state';
import { Part, SemanticDataModel } from '@page/parts/model/parts.model';
import { Part } from '@page/parts/model/parts.model';
import { Notification } from '@shared/model/notification.model';
import { View } from '@shared/model/view.model';
import { FormatPartlistSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-partlist-semantic-data-model-to-camelcase.pipe';
import { PartsService } from '@shared/service/parts.service';
import { Observable, of, Subscription } from 'rxjs';
import { filter, map, switchMap } from 'rxjs/operators';
Expand All @@ -36,7 +36,7 @@ export class AlertDetailFacade {
constructor(
private readonly partsService: PartsService,
private readonly alertDetailState: AlertDetailState,
private readonly titleCasePipe: TitleCasePipe,
private readonly formatSemanticDataModelToCamelCasePipe: FormatPartlistSemanticDataModelToCamelCasePipe,
) {
}

Expand Down Expand Up @@ -73,9 +73,7 @@ export class AlertDetailFacade {
.getPartDetailOfIds(notification.assetIds)
.subscribe({
next: data => {
data.forEach(part => {
part.semanticDataModel = <SemanticDataModel>this.titleCasePipe.transform(part.semanticDataModel);
})
this.formatSemanticDataModelToCamelCasePipe.transform(data);
this.alertDetailState.alertPartsInformation = { data };
},
error: error => (this.alertDetailState.alertPartsInformation = { error }),
Expand All @@ -95,7 +93,7 @@ export class AlertDetailFacade {
.subscribe({
next: data => {
data.forEach(part => {
part.semanticDataModel = this.titleCasePipe.transform(part.semanticDataModel);
part.semanticDataModel = this.formatSemanticDataModelToCamelCasePipe.transform(part.semanticDataModel);
})
this.alertDetailState.supplierPartsInformation = { data };
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

import { TitleCasePipe } from '@angular/common';
import { FormatPartlistSemanticDataModelToCamelCasePipe} from '@shared/pipes/format-partlist-semantic-data-model-to-camelcase.pipe';
import { Injectable } from '@angular/core';
import { InvestigationDetailState } from '@page/investigations/core/investigation-detail.state';
import { Part, SemanticDataModel } from '@page/parts/model/parts.model';
import { Part } from '@page/parts/model/parts.model';
import { Notification } from '@shared/model/notification.model';
import { View } from '@shared/model/view.model';
import { PartsService } from '@shared/service/parts.service';
Expand All @@ -38,7 +38,8 @@ export class InvestigationDetailFacade {
constructor(
private readonly partsService: PartsService,
private readonly investigationDetailState: InvestigationDetailState,
private readonly titleCasePipe: TitleCasePipe,
private readonly formatPartlistSemanticDataModelToCamelCasePipe: FormatPartlistSemanticDataModelToCamelCasePipe

) {
}

Expand Down Expand Up @@ -75,9 +76,7 @@ export class InvestigationDetailFacade {
.getPartDetailOfIds(notification.assetIds)
.subscribe({
next: data => {
data.forEach(part => {
part.semanticDataModel = <SemanticDataModel>this.titleCasePipe.transform(part.semanticDataModel);
})
this.formatPartlistSemanticDataModelToCamelCasePipe.transform(data);
this.investigationDetailState.investigationPartsInformation = { data };
},
error: error => (this.investigationDetailState.investigationPartsInformation = { error }),
Expand All @@ -96,9 +95,7 @@ export class InvestigationDetailFacade {
)
.subscribe({
next: data => {
data.forEach(part => {
part.semanticDataModel = this.titleCasePipe.transform(part.semanticDataModel);
})
this.formatPartlistSemanticDataModelToCamelCasePipe.transform(data);
this.investigationDetailState.supplierPartsInformation = { data };
},
error: error => (this.investigationDetailState.supplierPartsInformation = { error }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { InvestigationDetailState } from '@page/investigations/core/investigatio
import { InvestigationHelperService } from '@page/investigations/core/investigation-helper.service';
import { PartsModule } from '@page/parts/parts.module';
import { NotificationModule } from '@shared/modules/notification/notification.module';
import { FormatPartlistSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-partlist-semantic-data-model-to-camelcase.pipe';
import { SharedModule } from '@shared/shared.module';
import { TemplateModule } from '@shared/template.module';
import { InvestigationsFacade } from './core/investigations.facade';
Expand All @@ -44,6 +45,7 @@ import { InvestigationsComponent } from './presentation/investigations.component
InvestigationDetailFacade,
InvestigationDetailState,
InvestigationHelperService,
FormatPartlistSemanticDataModelToCamelCasePipe,
...getI18nPageProvider('page.investigation'),
],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { getI18nPageProvider } from '@core/i18n';
import { PartDetailsModule } from '@shared/modules/part-details/partDetails.module';
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 { OtherPartsFacade } from './core/other-parts.facade';
Expand All @@ -40,6 +41,7 @@ import { CustomerPartsComponent } from './presentation/customer-parts/customer-p
OtherPartsState,
OtherPartsFacade,
OtherPartsService,
FormatPartSemanticDataModelToCamelCasePipe,
...getI18nPageProvider(['page.otherParts', 'partDetail']),
],
exports: [OtherPartsComponent],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<ng-template #mainTmp let-parts="view" let-customContext="customContext">
<app-table
[paginationData]="parts.data | formatSemanticDataModelToProperCase"
[paginationData]="parts.data | formatPaginationSemanticDataModelToCamelCase"
[tableConfig]="tableConfig"
[noShadow]="true"
[labelId]="customContext.labelId"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import { OtherPartsState } from '@page/other-parts/core/other-parts.state';
import { PartsState } from '@page/parts/core/parts.state';
import { PartsAssembler } from '@shared/assembler/parts.assembler';
import { FormatPartSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-part-semantic-data-model-to-camelcase.pipe';
import { fireEvent, screen, waitFor } from '@testing-library/angular';
import { renderComponent } from '@tests/test-render.utils';
import { firstValueFrom } from 'rxjs';
Expand All @@ -41,7 +42,12 @@ import { OtherPartsComponent } from './other-parts.component';

describe('Other Parts', () => {
let otherPartsState: OtherPartsState;
beforeEach(() => (otherPartsState = new OtherPartsState()));
let formatPartSemanticToCamelCase: FormatPartSemanticDataModelToCamelCasePipe;
beforeEach(() => {
otherPartsState = new OtherPartsState()
formatPartSemanticToCamelCase = new FormatPartSemanticDataModelToCamelCasePipe();
});


const renderOtherParts = ({ roles = [] } = {}) =>
renderComponent(OtherPartsComponent, {
Expand Down Expand Up @@ -96,6 +102,10 @@ describe('Other Parts', () => {


describe('onTableConfigChange', () => {
let formatPartSemanticToCamelCase: FormatPartSemanticDataModelToCamelCasePipe;
beforeEach(() => {
formatPartSemanticToCamelCase = new FormatPartSemanticDataModelToCamelCasePipe();
})
it('should request supplier parts if first tab is selected', async () => {
await renderOtherParts({ roles: ['user'] });
fireEvent.click(screen.getByText('pageOtherParts.tab.supplier'));
Expand All @@ -108,10 +118,10 @@ describe('Other Parts', () => {
expect(supplierParts).toEqual({
data: {
content: [
PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6),
PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_7),
PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_8),
PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_9),
formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_6)),
formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_7)),
formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_8)),
formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_9)),
],
page: 0,
pageCount: 1,
Expand All @@ -137,11 +147,11 @@ describe('Other Parts', () => {
expect(customerParts).toEqual({
data: {
content: [
PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_1),
PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_2),
PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_3),
PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_4),
PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_5),
formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_1)),
formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_2)),
formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_3)),
formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_4)),
formatPartSemanticToCamelCase.transform(PartsAssembler.assembleOtherPart(OTHER_PARTS_MOCK_5)),
],
page: 0,
pageCount: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<ng-template #mainTmp let-parts="view" let-customContext="customContext">
<app-table
[paginationData]="parts.data | formatSemanticDataModelToProperCase"
[paginationData]="parts.data | formatPaginationSemanticDataModelToCamelCase"
[tableConfig]="tableConfig"
[selectedPartsInfoLabel]="'page.selectedParts.info'"
[selectedPartsActionLabel]="'page.selectedParts.action'"
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/app/modules/page/parts/model/parts.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ export enum SemanticDataModel {
PARTASPLANNED = 'PARTASPLANNED'
}

export enum SemanticDataModelInCamelCase {
BATCH = "Batch",
SERIALPART = 'SerialPart',
PARTASPLANNED = 'PartAsPlanned',
UNKNOWN = 'Unknown'
}

export interface Part {
id: string;
name: string;
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/app/modules/page/parts/parts.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { PartsFacade } from '@page/parts/core/parts.facade';
import { PartsState } from '@page/parts/core/parts.state';
import { PartDetailsModule } from '@shared/modules/part-details/partDetails.module';
import { RelationsModule } from '@shared/modules/relations/relations.module';
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 { PartsRoutingModule } from './parts.routing';
Expand All @@ -35,6 +36,6 @@ import { RelationComponent } from './presentation/relation/relation.component';
@NgModule({
declarations: [PartsComponent, RelationComponent],
imports: [CommonModule, TemplateModule, SharedModule, PartsRoutingModule, RelationsModule, PartDetailsModule],
providers: [PartsState, PartsFacade, ...getI18nPageProvider(['page.parts', 'partDetail'])],
providers: [PartsState, PartsFacade, FormatPartSemanticDataModelToCamelCasePipe, ...getI18nPageProvider(['page.parts', 'partDetail'])],
})
export class PartsModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<ng-container *viewContainer="parts$ | async; main: mainTmp; error: errorTmp; loading: loaderTmp"></ng-container>
<ng-template #mainTmp let-parts="view">
<app-table
[paginationData]="parts.data | formatSemanticDataModelToProperCase"
[paginationData]="parts.data | formatPaginationSemanticDataModelToCamelCase"
[labelId]="titleId"
[tableConfig]="tableConfig"
[selectedPartsInfoLabel]="'page.selectedParts.info'"
Expand Down
Loading
Loading