From f2d847f92cf00e0c22d7e8089b8f0c5c4498b787 Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Fri, 18 Aug 2023 01:47:50 +0300 Subject: [PATCH 1/3] fix for resource order management api --- .../portalRepositoryAPI/models/portal-user.ts | 2 +- .../api-configuration.ts | 2 +- .../services/resource-order.service.ts | 20 +++++++++---------- src/app/shared/services/app.service.ts | 5 ++++- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/app/openApis/portalRepositoryAPI/models/portal-user.ts b/src/app/openApis/portalRepositoryAPI/models/portal-user.ts index 043e9be..8405728 100644 --- a/src/app/openApis/portalRepositoryAPI/models/portal-user.ts +++ b/src/app/openApis/portalRepositoryAPI/models/portal-user.ts @@ -16,7 +16,7 @@ export interface PortalUser { password?: string; passwordUnencrypted?: string; products?: Array; - roles?: Array<'ROLE_ADMIN' | 'ROLE_EXPERIMENTER' | 'ROLE_NFV_DEVELOPER' | 'ROLE_TESTBED_PROVIDER' | 'ROLE_MENTOR'>; + roles?: Array<'ADMIN' | 'ROLE_EXPERIMENTER' | 'ROLE_NFV_DEVELOPER' | 'ROLE_TESTBED_PROVIDER' | 'ROLE_MENTOR'>; subscribedResources?: Array; username?: string; vfimages?: Array; diff --git a/src/app/openApis/resourceOrderManagement/api-configuration.ts b/src/app/openApis/resourceOrderManagement/api-configuration.ts index 7b7804c..72ac846 100644 --- a/src/app/openApis/resourceOrderManagement/api-configuration.ts +++ b/src/app/openApis/resourceOrderManagement/api-configuration.ts @@ -8,7 +8,7 @@ import { Injectable } from '@angular/core'; providedIn: 'root', }) export class ApiConfiguration { - rootUrl: string = '//portal.openslice.io'; + rootUrl: string = '//portal.openslice.io/tmf-api'; } export interface ApiConfigurationInterface { diff --git a/src/app/openApis/resourceOrderManagement/services/resource-order.service.ts b/src/app/openApis/resourceOrderManagement/services/resource-order.service.ts index e7cb0e3..af935a2 100644 --- a/src/app/openApis/resourceOrderManagement/services/resource-order.service.ts +++ b/src/app/openApis/resourceOrderManagement/services/resource-order.service.ts @@ -15,11 +15,11 @@ import { ResourceOrderUpdate } from '../models/resource-order-update'; providedIn: 'root', }) class ResourceOrderService extends __BaseService { - static readonly listResourceOrderPath = '/tmf-api/resourceOrderingManagement/v4/resourceOrder'; - static readonly createResourceOrderPath = '/tmf-api/resourceOrderingManagement/v4/resourceOrder'; - static readonly retrieveResourceOrderPath = '/tmf-api/resourceOrderingManagement/v4/resourceOrder/{id}'; - static readonly deleteResourceOrderPath = '/tmf-api/resourceOrderingManagement/v4/resourceOrder/{id}'; - static readonly patchResourceOrderPath = '/tmf-api/resourceOrderingManagement/v4/resourceOrder/{id}'; + static readonly listResourceOrderPath = '/resourceOrderingManagement/v4/resourceOrder'; + static readonly createResourceOrderPath = '/resourceOrderingManagement/v4/resourceOrder'; + static readonly retrieveResourceOrderPath = '/resourceOrderingManagement/v4/resourceOrder/{id}'; + static readonly deleteResourceOrderPath = '/resourceOrderingManagement/v4/resourceOrder/{id}'; + static readonly patchResourceOrderPath = '/resourceOrderingManagement/v4/resourceOrder/{id}'; constructor( config: __Configuration, @@ -51,7 +51,7 @@ class ResourceOrderService extends __BaseService { if (params.fields != null) __params = __params.set('fields', params.fields.toString()); let req = new HttpRequest( 'GET', - this.rootUrl + `/tmf-api/resourceOrderingManagement/v4/resourceOrder`, + this.rootUrl + `/resourceOrderingManagement/v4/resourceOrder`, __body, { headers: __headers, @@ -106,7 +106,7 @@ class ResourceOrderService extends __BaseService { if (params.name != null) __params = __params.set('name', params.name.toString()); let req = new HttpRequest( 'POST', - this.rootUrl + `/tmf-api/resourceOrderingManagement/v4/resourceOrder`, + this.rootUrl + `/resourceOrderingManagement/v4/resourceOrder`, __body, { headers: __headers, @@ -159,7 +159,7 @@ class ResourceOrderService extends __BaseService { if (params.fields != null) __params = __params.set('fields', params.fields.toString()); let req = new HttpRequest( 'GET', - this.rootUrl + `/tmf-api/resourceOrderingManagement/v4/resourceOrder/${encodeURIComponent(params.id)}`, + this.rootUrl + `/resourceOrderingManagement/v4/resourceOrder/${encodeURIComponent(params.id)}`, __body, { headers: __headers, @@ -206,7 +206,7 @@ class ResourceOrderService extends __BaseService { let req = new HttpRequest( 'DELETE', - this.rootUrl + `/tmf-api/resourceOrderingManagement/v4/resourceOrder/${encodeURIComponent(id)}`, + this.rootUrl + `/resourceOrderingManagement/v4/resourceOrder/${encodeURIComponent(id)}`, __body, { headers: __headers, @@ -254,7 +254,7 @@ class ResourceOrderService extends __BaseService { __body = params.body; let req = new HttpRequest( 'PATCH', - this.rootUrl + `/tmf-api/resourceOrderingManagement/v4/resourceOrder/${encodeURIComponent(params.id)}`, + this.rootUrl + `/resourceOrderingManagement/v4/resourceOrder/${encodeURIComponent(params.id)}`, __body, { headers: __headers, diff --git a/src/app/shared/services/app.service.ts b/src/app/shared/services/app.service.ts index 2b6aa78..87353cd 100644 --- a/src/app/shared/services/app.service.ts +++ b/src/app/shared/services/app.service.ts @@ -14,6 +14,7 @@ import { ApiConfiguration as ResourceCatalogAPIconfig} from 'src/app/openApis/re import { ApiConfiguration as ResourceInventoryAPIconfig} from 'src/app/openApis/resourceInventoryManagement/api-configuration' import { ApiConfiguration as resourcePoolManagementAPIconfig} from 'src/app/openApis/resourcePoolManagement/api-configuration' import { ApiConfiguration as ProductCatalogAPIconfig} from 'src/app/openApis/productCatalogManagement/api-configuration' +import { ApiConfiguration as ResourceOrderingAPIconfig} from 'src/app/openApis/resourceOrderManagement/api-configuration' import { NavigationEnd, NavigationStart, Router } from '@angular/router'; import { filter, first } from 'rxjs/operators'; @@ -40,7 +41,8 @@ export class AppService { private tmfResourceCatalogConfig: ResourceCatalogAPIconfig, private tmfResourceInventoryConfig: ResourceInventoryAPIconfig, private resourcePoolManagementAPIconfig: resourcePoolManagementAPIconfig, - private tmfProductCatalogConfig: ProductCatalogAPIconfig + private tmfProductCatalogConfig: ProductCatalogAPIconfig, + private tmfResourceOrderingAPIconfig: ResourceOrderingAPIconfig ) { this.setAPIurls() this.recognizePortalDomain() @@ -64,6 +66,7 @@ export class AppService { this.serviceTestManagementAPIconfig.rootUrl = this.config.APITMFURL this.resourcePoolManagementAPIconfig.rootUrl = this.config.APITMFURL this.tmfProductCatalogConfig.rootUrl = this.config.APITMFURL + this.tmfResourceOrderingAPIconfig.rootUrl = this.config.APITMFURL } //recognition of which portal is used (services/testing/product) From 4b04b9492a8d358bd2d1a294cfee4ad105443c9d Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Mon, 21 Aug 2023 23:20:34 +0300 Subject: [PATCH 2/3] theming.scss must be present otherwise the deployment build fails --- src/assets/config/theming.scss | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/assets/config/theming.scss diff --git a/src/assets/config/theming.scss b/src/assets/config/theming.scss new file mode 100644 index 0000000..b5208cd --- /dev/null +++ b/src/assets/config/theming.scss @@ -0,0 +1,22 @@ +// Default theme + +$primary: #428bca; +$secondary: #6c6c6c; + +// ------------------------------ +// Predefined palette 1 theme + +// $primary: rgba(0,45,126); +// $secondary: #6c6c6c; + +// ------------------------------ +// Predefined palette 2 theme + +// $primary: rgba(255, 124, 0); +// $secondary: #6c6c6c; + +// ------------------------------ +// Predefined palette 3 theme + +// $primary: rgba(247,1, 2); +// $secondary: #6c6c6c; \ No newline at end of file From dab4cc49db0c89851903f2936bf8e68f39b04863 Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Tue, 22 Aug 2023 10:23:33 +0300 Subject: [PATCH 3/3] version change --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 20963d2..2573830 100644 --- a/.gitignore +++ b/.gitignore @@ -49,5 +49,4 @@ src/assets/config/config.prod.default.json src/assets/config/config.prod.json src/assets/config/config.theming.json src/assets/config/config.prod.default.json -/src/assets/config/theming.scss /.angular