diff --git a/.env.local-dev b/.env.local-dev index 68360b73a..131d53dd2 100644 --- a/.env.local-dev +++ b/.env.local-dev @@ -5,11 +5,11 @@ EDC_UI_ACTIVE_PROFILE=sovity-open-source EDC_UI_USE_FAKE_BACKEND=true EDC_UI_DATA_MANAGEMENT_API_URL=http://edc.fake-backend EDC_UI_DATA_MANAGEMENT_API_KEY=no-api-key-required-in-local-dev -EDC_UI_CATALOG_URLS=http://existing-other-connector/v1/ids/data,http://does-not-exist-but-is-super-long-so-we-can-test/v1/ids/data, http://how-wrapping-works-in-subtext-of-catalog-url-select/v1/ids/data +EDC_UI_CATALOG_URLS=http://existing-other-connector/api/dsp,http://does-not-exist-but-is-super-long-so-we-can-test/api/dsp, http://how-wrapping-works-in-subtext-of-catalog-url-select/api/dsp EDC_UI_LOGOUT_URL=https://example.com/logout -EDC_UI_CONNECTOR_ENDPOINT=http://localhost:3000/v1/ids/data +EDC_UI_CONNECTOR_ENDPOINT=http://localhost:3000/api/dsp -EDC_UI_CONNECTOR_ID=https://example-connector-id/ +EDC_UI_CONNECTOR_ID=https://localhost:3000 EDC_UI_CONNECTOR_NAME=example-connector-name EDC_UI_IDS_ID=urn:connector:example EDC_UI_IDS_TITLE=Example Connector Title diff --git a/README.md b/README.md index d3fb5a1f5..faea5d4cc 100644 --- a/README.md +++ b/README.md @@ -86,21 +86,8 @@ for a list of extensions used. ## Getting Started -The fastest way to get started is to run our -[docker-compose.yaml](docs/getting-started/docker-compose.yaml). - -```shell -cd docs/getting-started - -# Pull latest images -docker compose pull - -# On ARM64, e.g. MAC with M1, you need to cross compile your own UI image -# (cd ../../ && docker buildx build -f "docker/Dockerfile" --platform linux/arm64 -t "ghcr.io/sovity/edc-ui:latest" .) - -# Runs EDC and EDC UI at localhost:11000 -docker compose up -``` +The fastest way to get started is using our Getting Started Guide in +[sovity EDC CE Getting Started Guide](https://github.com/sovity/edc-extensions#getting-started).
diff --git a/docs/getting-started/docker-compose.yaml b/docs/getting-started/docker-compose.yaml deleted file mode 100644 index 34305a563..000000000 --- a/docs/getting-started/docker-compose.yaml +++ /dev/null @@ -1,59 +0,0 @@ -version: '3.8' -services: - edc-ui: - image: ghcr.io/sovity/edc-ui:latest - ports: - - '11000:80' - environment: - - EDC_UI_ACTIVE_PROFILE=sovity-open-source - - EDC_UI_CONFIG_URL=edc-ui-config - - EDC_UI_DATA_MANAGEMENT_API_URL=http://localhost:11002/api/v1/management - - EDC_UI_DATA_MANAGEMENT_API_KEY=ApiKeyDefaultValue - - EDC_UI_CATALOG_URLS=http://edc:11003/api/v1/ids/data - edc: - image: ghcr.io/sovity/edc-dev:latest - depends_on: - - postgresql - environment: - MY_EDC_NAME_KEBAB_CASE: 'example-connector' - MY_EDC_TITLE: 'EDC Connector' - MY_EDC_DESCRIPTION: 'sovity Community Edition EDC Connector' - MY_EDC_CURATOR_URL: 'https://example.com' - MY_EDC_CURATOR_NAME: 'Example GmbH' - MY_EDC_MAINTAINER_URL: 'https://sovity.de' - MY_EDC_MAINTAINER_NAME: 'sovity GmbH' - - # Data Management API Key - EDC_API_AUTH_KEY: ApiKeyDefaultValue - - MY_EDC_FQDN: 'edc' - MY_EDC_PROTOCOL: 'http://' - MY_EDC_IDS_BASE_URL: 'http://edc:11003' # adds missing port - - MY_EDC_JDBC_URL: jdbc:postgresql://postgresql:5432/edc - MY_EDC_JDBC_USER: edc - MY_EDC_JDBC_PASSWORD: edc - EDC_WEB_REST_CORS_ENABLED: 'true' - EDC_WEB_REST_CORS_HEADERS: 'origin,content-type,accept,authorization,x-api-key' - EDC_WEB_REST_CORS_ORIGINS: '*' - ports: - - '11001:11001' - - '11002:11002' - - '11003:11003' - - '11004:11004' - - '11005:5005' - postgresql: - image: docker.io/bitnami/postgresql:11 - restart: always - environment: - POSTGRESQL_USERNAME: edc - POSTGRESQL_PASSWORD: edc - POSTGRESQL_DATABASE: edc - ports: - - '54321:5432' - volumes: - - 'postgresql:/bitnami/postgresql' - -volumes: - postgresql: - driver: local diff --git a/package-lock.json b/package-lock.json index b24ec3946..fe10f78a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "@ng-apimock/core": "^3.11.0", "@ngxs/store": "^3.8.1", "@sovity.de/broker-server-client": "0.20230712.71619-main-a4860cff", - "@sovity.de/edc-client": "0.20230921.115850-main-5e87f14f", + "@sovity.de/edc-client": "0.20230926.105529-main-44861eac", "clean-deep": "^3.4.0", "date-fns": "^2.30.0", "dotenv": "^16.3.1", @@ -59,9 +59,9 @@ } }, "node_modules/@adobe/css-tools": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.2.0.tgz", - "integrity": "sha512-E09FiIft46CmH5Qnjb0wsW54/YQd69LsxeKUOWawmws1XWvyFGURnAChH0mlr7YPFR1ofwvUQfcL0J3lMxXqPA==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.1.tgz", + "integrity": "sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg==", "dev": true }, "node_modules/@alloc/quick-lru": { @@ -3607,9 +3607,9 @@ "integrity": "sha512-305vHJj38Ma9x9YADM3SJh3sdqePeLcrUB1hHlYsuPdx7wYe9vwgb503KYStJ+5iN/ojP2xu8k6Unt+y+Bu5iQ==" }, "node_modules/@sovity.de/edc-client": { - "version": "0.20230921.115850-main-5e87f14f", - "resolved": "https://registry.npmjs.org/@sovity.de/edc-client/-/edc-client-0.20230921.115850-main-5e87f14f.tgz", - "integrity": "sha512-G875A/e88tKgsqcZCq6NS4bHb8FLMcxjjpixJ7qnnG9BNety3cG76IM+Iesii8Ino4+T/J2+9MG9lGquV+Au2g==" + "version": "0.20230926.105529-main-44861eac", + "resolved": "https://registry.npmjs.org/@sovity.de/edc-client/-/edc-client-0.20230926.105529-main-44861eac.tgz", + "integrity": "sha512-mhvZvwcN7ZNLKgg9ApbDVmGhyA5BAAYmpUeEmG//uTGU9abfmepRxHozv59anN3SpixhnU2MDCQJSlADmEfZsQ==" }, "node_modules/@tootallnate/once": { "version": "2.0.0", diff --git a/package.json b/package.json index 78d738497..c3edb3894 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "@ng-apimock/core": "^3.11.0", "@ngxs/store": "^3.8.1", "@sovity.de/broker-server-client": "0.20230712.71619-main-a4860cff", - "@sovity.de/edc-client": "0.20230921.115850-main-5e87f14f", + "@sovity.de/edc-client": "0.20230926.105529-main-44861eac", "clean-deep": "^3.4.0", "date-fns": "^2.30.0", "dotenv": "^16.3.1", diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index bd24b9e0f..452cff27c 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,12 +1,7 @@ import {NgModule} from '@angular/core'; -import { - ROUTES, - RouterModule, - Routes, -} from '@angular/router'; +import {ROUTES, RouterModule, Routes} from '@angular/router'; +import {PageNotFoundComponent} from './component-library/error-404-component/page-not-found.component'; import {APP_CONFIG, AppConfig} from './core/config/app-config'; -import {PageNotFoundComponent} from "./component-library/error-404-component/page-not-found.component"; - @NgModule({ imports: [RouterModule.forRoot([], {paramsInheritanceStrategy: 'always'})], @@ -22,24 +17,26 @@ import {PageNotFoundComponent} from "./component-library/error-404-component/pag switch (config.routes) { case 'broker-ui': routes.push({ - path: '', loadChildren: () => + path: '', + loadChildren: () => import('./routes/broker-ui/broker-ui.module').then( (m) => m.BrokerUiModule, - ) + ), }); break; case 'connector-ui': routes.push({ - path: '', loadChildren: () => + path: '', + loadChildren: () => import('./routes/connector-ui/connector-ui.module').then( (m) => m.ConnectorUiModule, - ) + ), }); break; default: throw new Error(`Unhandled PageSet: ${config.routes}`); } - routes.push({path: '**', component: PageNotFoundComponent}) + routes.push({path: '**', component: PageNotFoundComponent}); return routes; }, }, diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 0729036c4..97215ff6c 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -7,7 +7,6 @@ import {FaviconService} from './core/services/favicon.service'; templateUrl: './app.component.html', }) export class AppComponent implements OnInit { - constructor( @Inject(APP_CONFIG) private config: AppConfig, private faviconService: FaviconService, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index cd65d149f..c0da7ce11 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -22,12 +22,7 @@ import {AppRoutingModule} from './app-routing.module'; import {AppComponent} from './app.component'; import {PageNotFoundComponent} from './component-library/error-404-component/page-not-found.component'; import {provideAppConfig} from './core/config/app-config-initializer'; -import {provideAppConfigProperty} from './core/config/app-config-injection-utils'; import {ApiKeyInterceptor} from './core/services/api/api-key.interceptor'; -import { - API_KEY, - CONNECTOR_DATAMANAGEMENT_API, -} from './core/services/api/legacy-managent-api-client'; @NgModule({ imports: [ @@ -61,10 +56,6 @@ import { providers: [ provideAppConfig(), - // Provide individual properties of config for better Angular Component APIs - provideAppConfigProperty(CONNECTOR_DATAMANAGEMENT_API, 'managementApiUrl'), - provideAppConfigProperty(API_KEY, 'managementApiKey'), - {provide: HTTP_INTERCEPTORS, multi: true, useClass: ApiKeyInterceptor}, {provide: MAT_DATE_LOCALE, useValue: 'en-GB'}, diff --git a/src/app/component-library/catalog/asset-detail-dialog/asset-detail-dialog-data.service.ts b/src/app/component-library/catalog/asset-detail-dialog/asset-detail-dialog-data.service.ts index a670c4a52..2b2d45096 100644 --- a/src/app/component-library/catalog/asset-detail-dialog/asset-detail-dialog-data.service.ts +++ b/src/app/component-library/catalog/asset-detail-dialog/asset-detail-dialog-data.service.ts @@ -1,6 +1,6 @@ import {Injectable} from '@angular/core'; import {Asset} from '../../../core/services/models/asset'; -import {ContractOffer} from '../../../core/services/models/contract-offer'; +import {DataOffer} from '../../../core/services/models/data-offer'; import {BrokerDataOffer} from '../../../routes/broker-ui/catalog-page/catalog-page/mapping/broker-data-offer'; import {ContractAgreementCardMapped} from '../../../routes/connector-ui/contract-agreement-page/contract-agreement-cards/contract-agreement-card-mapped'; import {AssetDetailDialogData} from './asset-detail-dialog-data'; @@ -26,9 +26,9 @@ export class AssetDetailDialogDataService { }; } - contractOfferDetails(contractOffer: ContractOffer): AssetDetailDialogData { - let asset = contractOffer.asset; - let contractPolicy = contractOffer.policy; + dataOfferDetails(dataOffer: DataOffer): AssetDetailDialogData { + let asset = dataOffer.asset; + let contractPolicy = dataOffer.contractOffers[0].policy; const propertyGridGroups = [ this.assetPropertyGridGroupBuilder.buildAssetPropertiesGroup(asset, null), @@ -40,9 +40,9 @@ export class AssetDetailDialogDataService { ].filter((it) => it.properties.length); return { - type: 'contract-offer', - asset: contractOffer.asset, - contractOffer, + type: 'data-offer', + asset: dataOffer.asset, + dataOffer, propertyGridGroups, }; } @@ -51,9 +51,6 @@ export class AssetDetailDialogDataService { contractAgreement: ContractAgreementCardMapped, ): AssetDetailDialogData { let asset = contractAgreement.asset; - let contractPolicy = JSON.parse( - contractAgreement.contractPolicy.policyJsonLd, - ); const propertyGridGroups = [ this.assetPropertyGridGroupBuilder.buildContractAgreementGroup( @@ -61,7 +58,7 @@ export class AssetDetailDialogDataService { ), this.assetPropertyGridGroupBuilder.buildPolicyGroup( asset, - contractPolicy, + contractAgreement.contractPolicy, ), this.assetPropertyGridGroupBuilder.buildAssetPropertiesGroup( asset, @@ -89,7 +86,7 @@ export class AssetDetailDialogDataService { ), this.assetPropertyGridGroupBuilder.buildAdditionalPropertiesGroup(asset), ...dataOffer.contractOffers.map((contractOffer, i) => - this.assetPropertyGridGroupBuilder.buildContractOfferGroup( + this.assetPropertyGridGroupBuilder.buildBrokerContractOfferGroup( asset, contractOffer, i, diff --git a/src/app/component-library/catalog/asset-detail-dialog/asset-detail-dialog-data.ts b/src/app/component-library/catalog/asset-detail-dialog/asset-detail-dialog-data.ts index c896e769f..2677414e3 100644 --- a/src/app/component-library/catalog/asset-detail-dialog/asset-detail-dialog-data.ts +++ b/src/app/component-library/catalog/asset-detail-dialog/asset-detail-dialog-data.ts @@ -1,5 +1,5 @@ import {Asset} from 'src/app/core/services/models/asset'; -import {ContractOffer} from '../../../core/services/models/contract-offer'; +import {DataOffer} from '../../../core/services/models/data-offer'; import {BrokerDataOffer} from '../../../routes/broker-ui/catalog-page/catalog-page/mapping/broker-data-offer'; import {ContractAgreementCardMapped} from '../../../routes/connector-ui/contract-agreement-page/contract-agreement-cards/contract-agreement-card-mapped'; import {PropertyGridGroup} from '../../property-grid/property-grid-group/property-grid-group'; @@ -7,12 +7,12 @@ import {PropertyGridGroup} from '../../property-grid/property-grid-group/propert export interface AssetDetailDialogData { type: | 'asset-details' - | 'contract-offer' + | 'data-offer' | 'contract-agreement' | 'broker-data-offer'; propertyGridGroups: PropertyGridGroup[]; asset: Asset; - contractOffer?: ContractOffer; + dataOffer?: DataOffer; contractAgreement?: ContractAgreementCardMapped; brokerDataOffer?: BrokerDataOffer; showDeleteButton?: boolean; diff --git a/src/app/component-library/catalog/asset-detail-dialog/asset-detail-dialog.component.html b/src/app/component-library/catalog/asset-detail-dialog/asset-detail-dialog.component.html index af0ebcb10..3cacbe1ee 100644 --- a/src/app/component-library/catalog/asset-detail-dialog/asset-detail-dialog.component.html +++ b/src/app/component-library/catalog/asset-detail-dialog/asset-detail-dialog.component.html @@ -1,5 +1,5 @@