From daab14bd058de198c80b71d63e108fd788b7f5ee Mon Sep 17 00:00:00 2001 From: Jozsef Csongvai Date: Mon, 26 Jul 2021 12:00:59 -0400 Subject: Revert "Renaming Files having BluePrint to have Blueprint" The renaming in CCSDK-3098 caused breaking changes to the grpc api and compile issues for kotlin scripts. Issue-ID: CCSDK-3385 Change-Id: I0d745cb858371678eabcb2284671c1fd76a1ab6d Signed-off-by: Jozsef Csongvai --- .../search-template/search-template.component.ts | 4 +-- .../src/app/common/constants/app-constants.ts | 2 +- .../packages/blueprint.page.mock.ts | 4 +-- .../configuration-dashboard.component.html | 6 ++-- .../configuration-dashboard.component.ts | 14 ++++---- .../configuration-dashboard.service.ts | 8 ++--- .../packages/designer/designer.component.html | 8 ++--- .../packages/designer/designer.component.ts | 16 ++++----- .../packages/designer/designer.service.ts | 8 ++--- .../designer/source-view/source-view.component.ts | 4 +-- .../designer/source-view/source-view.service.ts | 8 ++--- .../packages/model/BluePrint.detail.model.ts | 42 ++++++++++++++++++++++ .../packages/model/BluePrint.model.ts | 41 +++++++++++++++++++++ .../packages/model/Blueprint.detail.model.ts | 42 ---------------------- .../packages/model/Blueprint.model.ts | 41 --------------------- .../packages/model/package-dashboard.state.ts | 4 +-- .../packages/model/packages-dashboard.state.ts | 6 ++-- .../metadata-tab/metadata-tab.component.ts | 2 +- .../package-creation-extraction.service.ts | 4 +-- .../package-creation.component.html | 6 ++-- .../package-creation/package-creation.component.ts | 6 ++-- .../package-creation/package-creation.service.ts | 10 +++--- .../packages/packages-api.service.ts | 8 ++--- .../filter-by-tags/filter-by-tags.component.ts | 4 +-- .../package-list/package-list.component.spec.ts | 4 +-- .../package-list/package-list.component.ts | 2 +- .../packages-header.component.spec.ts | 2 +- .../packages/packages.store.spec.ts | 6 ++-- .../feature-modules/packages/packages.store.ts | 10 +++--- .../blueprint-management-service-grpc-client.ts | 6 ++-- cds-ui/server/src/config/app-config.ts | 2 +- .../src/controllers/blueprint-rest.controller.ts | 8 ++--- .../datasources/blueprint.datasource-template.ts | 4 +-- cds-ui/server/src/services/blueprint.service.ts | 4 +-- 34 files changed, 173 insertions(+), 173 deletions(-) create mode 100644 cds-ui/designer-client/src/app/modules/feature-modules/packages/model/BluePrint.detail.model.ts create mode 100644 cds-ui/designer-client/src/app/modules/feature-modules/packages/model/BluePrint.model.ts delete mode 100644 cds-ui/designer-client/src/app/modules/feature-modules/packages/model/Blueprint.detail.model.ts delete mode 100644 cds-ui/designer-client/src/app/modules/feature-modules/packages/model/Blueprint.model.ts (limited to 'cds-ui') diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts index bc523c33c..ed01e63b2 100644 --- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts +++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts @@ -39,7 +39,7 @@ import { FormGroup, FormBuilder, Validators } from '@angular/forms'; }) export class SearchTemplateComponent implements OnInit { file: File; - localBlueprintData: IBlueprint; + localBluePrintData: IBlueprint; fileText: object[]; blueprintState: IBlueprintState; bpState: Observable; @@ -99,7 +99,7 @@ export class SearchTemplateComponent implements OnInit { entryDefinition: this.entryDefinition } this.store.dispatch(new SetBlueprintState(blueprintState)) - + } async buildFileViewData(zip) { diff --git a/cds-ui/designer-client/src/app/common/constants/app-constants.ts b/cds-ui/designer-client/src/app/common/constants/app-constants.ts index 83b56a623..6f64ee1e8 100644 --- a/cds-ui/designer-client/src/app/common/constants/app-constants.ts +++ b/cds-ui/designer-client/src/app/common/constants/app-constants.ts @@ -98,7 +98,7 @@ export const BlueprintURLs = { download: '/controllerblueprint/download-blueprint/', deploy: '/controllerblueprint/deploy-blueprint', getMetaDate: '/controllerblueprint/meta-data/', - countOfAllBlueprints: '/controllerblueprint/list/count', + countOfAllBluePrints: '/controllerblueprint/list/count', getMetaDatePageable: '/controllerblueprint/metadata/paged', getBlueprintByName: '/controllerblueprint/by-name/' }; diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/blueprint.page.mock.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/blueprint.page.mock.ts index 1cd054d75..d69f2fa8a 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/blueprint.page.mock.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/blueprint.page.mock.ts @@ -1,7 +1,7 @@ -import {BlueprintPage} from './model/Blueprint.model'; +import {BluePrintPage} from './model/BluePrint.model'; import {PackagesDashboardState} from './model/packages-dashboard.state'; -export function getBlueprintPageMock(): BlueprintPage { +export function getBluePrintPageMock(): BluePrintPage { return { content: [ { diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html index 12396209f..e3c584ac0 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html @@ -84,7 +84,7 @@
- @@ -726,7 +726,7 @@
- diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts index 0625394f4..0d92aadfb 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts @@ -1,6 +1,6 @@ import { Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; -import { BlueprintDetailModel } from '../model/Blueprint.detail.model'; +import { BluePrintDetailModel } from '../model/BluePrint.detail.model'; import { PackageCreationStore } from '../package-creation/package-creation.store'; import { FilesContent, FolderNodeElement } from '../package-creation/mapping-models/metadata/MetaDataTab.model'; import { MetadataTabComponent } from '../package-creation/metadata-tab/metadata-tab.component'; @@ -28,7 +28,7 @@ import { NgxUiLoaderService } from 'ngx-ui-loader'; styleUrls: ['./configuration-dashboard.component.css'], }) export class ConfigurationDashboardComponent extends ComponentCanDeactivate implements OnInit, OnDestroy { - viewedPackage: BlueprintDetailModel = new BlueprintDetailModel(); + viewedPackage: BluePrintDetailModel = new BluePrintDetailModel(); @ViewChild(MetadataTabComponent, { static: false }) metadataTabComponent: MetadataTabComponent; public customActionName = ''; @@ -129,7 +129,7 @@ export class ConfigurationDashboardComponent extends ComponentCanDeactivate impl }); } - private downloadCBAPackage(bluePrintDetailModels: BlueprintDetailModel) { + private downloadCBAPackage(bluePrintDetailModels: BluePrintDetailModel) { this.configurationDashboardService.downloadResource( this.viewedPackage.artifactName + '/' + this.viewedPackage.artifactVersion).subscribe(response => { const blob = new Blob([response], { type: 'application/octet-stream' }); @@ -144,11 +144,11 @@ export class ConfigurationDashboardComponent extends ComponentCanDeactivate impl }); } - editBlueprint() { + editBluePrint() { this.ngxService.start(); this.configurationDashboardService.deletePackage(this.packageId).subscribe(res => { this.formTreeData(); - this.saveBlueprintToDataBase(); + this.saveBluePrintToDataBase(); }); } @@ -167,7 +167,7 @@ export class ConfigurationDashboardComponent extends ComponentCanDeactivate impl this.metadataTabComponent.saveMetaDataToStore(); } - saveBlueprintToDataBase() { + saveBluePrintToDataBase() { this.create(); this.zipFile.generateAsync({ type: 'blob' }) .then(blob => { @@ -253,7 +253,7 @@ export class ConfigurationDashboardComponent extends ComponentCanDeactivate impl this.cbaPackage.templateTopology.content = this.vlbDefinition.topology_template.content; } - enrichBlueprint() { + enrichBluePrint() { this.ngxService.start(); this.packageCreationStore.addTopologyTemplate(this.cbaPackage.templateTopology); this.formTreeData(); diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.service.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.service.ts index a8dfeafbb..c7f557121 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.service.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.service.ts @@ -2,23 +2,23 @@ import { Injectable } from '@angular/core'; import { ApiService } from '../../../../common/core/services/api.typed.service'; import { BlueprintURLs } from '../../../../common/constants/app-constants'; import { Observable } from 'rxjs'; -import { BlueprintDetailModel } from '../model/Blueprint.detail.model'; +import { BluePrintDetailModel } from '../model/BluePrint.detail.model'; @Injectable({ providedIn: 'root' }) export class ConfigurationDashboardService { - constructor(private api: ApiService) { + constructor(private api: ApiService) { } - private getBlueprintModel(id: string): Observable { + private getBluePrintModel(id: string): Observable { return this.api.getOne(BlueprintURLs.getOneBlueprint + '/' + id); } getPagedPackages(id: string) { - return this.getBlueprintModel(id); + return this.getBluePrintModel(id); } public downloadResource(path: string) { diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.html index 0c542e089..d1b5eca98 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.html @@ -90,13 +90,13 @@ @@ -340,7 +340,7 @@ - + diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts index adcc08cb1..652d235a0 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts @@ -37,7 +37,7 @@ import { GraphGenerator } from './graph.generator.util'; import { FunctionsStore } from './functions.store'; import { Subject } from 'rxjs'; import { distinctUntilChanged, takeUntil } from 'rxjs/operators'; -import { BlueprintDetailModel } from '../model/Blueprint.detail.model'; +import { BluePrintDetailModel } from '../model/BluePrint.detail.model'; import { ActivatedRoute, Router } from '@angular/router'; import { DesignerService } from './designer.service'; import { FilesContent, FolderNodeElement } from '../package-creation/mapping-models/metadata/MetaDataTab.model'; @@ -66,7 +66,7 @@ export class DesignerComponent implements OnInit, OnDestroy { controllerSideBar: boolean; actionAttributesSideBar: boolean; functionAttributeSidebar: boolean; - viewedPackage: BlueprintDetailModel = new BlueprintDetailModel(); + viewedPackage: BluePrintDetailModel = new BluePrintDetailModel(); customActionName: string; showAction: boolean; cl = 'editBar'; @@ -125,7 +125,7 @@ export class DesignerComponent implements OnInit, OnDestroy { this.actionAttributesSideBar = !this.actionAttributesSideBar; } - publishBlueprint() { + publishBluePrint() { this.create(); this.zipFile.generateAsync({ type: 'blob' }) .then(blob => { @@ -138,7 +138,7 @@ export class DesignerComponent implements OnInit, OnDestroy { this.toastService.error(error.message, 'Package error'); console.log(error); }, () => { - // this.deployBlueprint = false; + // this.deployBluePrint = false; }); }); } @@ -456,7 +456,7 @@ export class DesignerComponent implements OnInit, OnDestroy { this.ngUnsubscribe.complete(); } - saveBlueprint() { + saveBluePrint() { this.ngxService.start(); FilesContent.clear(); let packageCreationModes: PackageCreationModes; @@ -468,11 +468,11 @@ export class DesignerComponent implements OnInit, OnDestroy { }); packageCreationModes.execute(this.cbaPackage, this.packageCreationUtils); this.filesData.push(this.folder.TREE_DATA); - this.saveBlueprintToDataBase(); + this.saveBluePrintToDataBase(); } - enrichBlueprint() { + enrichBluePrint() { this.ngxService.start(); console.log('start enrich ------------'); this.packageCreationStore.addTopologyTemplate(this.cbaPackage.templateTopology); @@ -529,7 +529,7 @@ export class DesignerComponent implements OnInit, OnDestroy { } - saveBlueprintToDataBase() { + saveBluePrintToDataBase() { this.create(); this.zipFile.generateAsync({ type: 'blob' }) .then(blob => { diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.service.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.service.ts index 28ef7ee1e..c0d79cae1 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.service.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.service.ts @@ -26,7 +26,7 @@ import { Observable } from 'rxjs'; import { ApiService } from '../../../../common/core/services/api.typed.service'; import { ResourceDictionaryURLs, BlueprintURLs } from '../../../../common/constants/app-constants'; import { ModelType } from './model/ModelType.model'; -import { BlueprintDetailModel } from '../model/Blueprint.detail.model'; +import { BluePrintDetailModel } from '../model/BluePrint.detail.model'; @Injectable({ @@ -36,7 +36,7 @@ export class DesignerService { constructor( private api: ApiService, - private api2: ApiService + private api2: ApiService ) { } @@ -44,12 +44,12 @@ export class DesignerService { return this.api.get(ResourceDictionaryURLs.getResourceDictionary + '/' + modelDefinitionType); } - private getBlueprintModel(id: string): Observable { + private getBluePrintModel(id: string): Observable { return this.api2.getOne(BlueprintURLs.getOneBlueprint + '/' + id); } getPagedPackages(id: string) { - return this.getBlueprintModel(id); + return this.getBluePrintModel(id); } publishBlueprint(body: any | null, options?: any): Observable { diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/source-view/source-view.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/source-view/source-view.component.ts index c48136eba..ae4d09d20 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/source-view/source-view.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/source-view/source-view.component.ts @@ -3,7 +3,7 @@ import { DesignerStore } from '../designer.store'; import { PackageCreationUtils } from '../../package-creation/package-creation.utils'; import { RouterLink, Router, ActivatedRoute } from '@angular/router'; import { Subject } from 'rxjs'; -import { BlueprintDetailModel } from '../../model/Blueprint.detail.model'; +import { BluePrintDetailModel } from '../../model/BluePrint.detail.model'; import { viewClassName } from '@angular/compiler'; import { SourceViewService } from './source-view.service'; @@ -19,7 +19,7 @@ export class DesignerSourceViewComponent implements OnInit, OnDestroy { lang = 'json'; controllerSideBar: boolean; ngUnsubscribe = new Subject(); - viewedPackage: BlueprintDetailModel = new BlueprintDetailModel(); + viewedPackage: BluePrintDetailModel = new BluePrintDetailModel(); public customActionName = ''; cl = 'editBar'; packageId: string; diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/source-view/source-view.service.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/source-view/source-view.service.ts index 4ffd8a18e..758952221 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/source-view/source-view.service.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/source-view/source-view.service.ts @@ -1,7 +1,7 @@ import {Injectable} from '@angular/core'; import {Observable} from 'rxjs'; import { ApiService } from 'src/app/common/core/services/api.typed.service'; -import { BlueprintDetailModel } from '../../model/Blueprint.detail.model'; +import { BluePrintDetailModel } from '../../model/BluePrint.detail.model'; import { ModelType } from '../model/ModelType.model'; import { ResourceDictionaryURLs, BlueprintURLs } from 'src/app/common/constants/app-constants'; @@ -12,15 +12,15 @@ import { ResourceDictionaryURLs, BlueprintURLs } from 'src/app/common/constants/ }) export class SourceViewService { - constructor(private api1: ApiService) { + constructor(private api1: ApiService) { } - private getBlueprintModel(id: string): Observable { + private getBluePrintModel(id: string): Observable { return this.api1.getOne(BlueprintURLs.getOneBlueprint + '/' + id); } getPagedPackages(id: string) { - return this.getBlueprintModel(id); + return this.getBluePrintModel(id); } } diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/BluePrint.detail.model.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/BluePrint.detail.model.ts new file mode 100644 index 000000000..ff01695ab --- /dev/null +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/BluePrint.detail.model.ts @@ -0,0 +1,42 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2019 Orange. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software except in compliance with the License. +You may obtain a copy of the License at + + http://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. +============LICENSE_END============================================ +*/ + +import {Page} from 'src/app/common/model/page'; +import {BlueprintModel} from './BluePrint.model'; + +export class BluePrintDetailModel extends BlueprintModel { + blueprintModelContent: BlueprintModelContent; +} + +export class BlueprintModelContent { + id: string; + name: string; + description: string; + fileContent: any; + + +} + +/* +export class BluePrintDetailModelContent { + bluePrintDetailsModels: BluePrintDetailModel[]; + +}*/ diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/BluePrint.model.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/BluePrint.model.ts new file mode 100644 index 000000000..712b53b9a --- /dev/null +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/BluePrint.model.ts @@ -0,0 +1,41 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2019 Orange. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software except in compliance with the License. +You may obtain a copy of the License at + + http://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. +============LICENSE_END============================================ +*/ + +import { Page } from 'src/app/common/model/page'; + +export class BlueprintModel { + + + id: string; + artifactUUId?: null; + artifactType: string; + artifactVersion: string; + artifactDescription: string; + internalVersion?: null; + createdDate: string; + artifactName: string; + published: string; + updatedBy: string; + tags: string; +} + +export class BluePrintPage extends Page { +} diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/Blueprint.detail.model.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/Blueprint.detail.model.ts deleted file mode 100644 index 160285b83..000000000 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/Blueprint.detail.model.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* -============LICENSE_START========================================== -=================================================================== -Copyright (C) 2019 Orange. All rights reserved. -=================================================================== - -Unless otherwise specified, all software contained herein is licensed -under the Apache License, Version 2.0 (the License); -you may not use this software except in compliance with the License. -You may obtain a copy of the License at - - http://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. -============LICENSE_END============================================ -*/ - -import {Page} from 'src/app/common/model/page'; -import {BlueprintModel} from './Blueprint.model'; - -export class BlueprintDetailModel extends BlueprintModel { - blueprintModelContent: BlueprintModelContent; -} - -export class BlueprintModelContent { - id: string; - name: string; - description: string; - fileContent: any; - - -} - -/* -export class BlueprintDetailModelContent { - bluePrintDetailsModels: BlueprintDetailModel[]; - -}*/ diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/Blueprint.model.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/Blueprint.model.ts deleted file mode 100644 index ecc0062d9..000000000 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/Blueprint.model.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* -============LICENSE_START========================================== -=================================================================== -Copyright (C) 2019 Orange. All rights reserved. -=================================================================== - -Unless otherwise specified, all software contained herein is licensed -under the Apache License, Version 2.0 (the License); -you may not use this software except in compliance with the License. -You may obtain a copy of the License at - - http://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. -============LICENSE_END============================================ -*/ - -import { Page } from 'src/app/common/model/page'; - -export class BlueprintModel { - - - id: string; - artifactUUId?: null; - artifactType: string; - artifactVersion: string; - artifactDescription: string; - internalVersion?: null; - createdDate: string; - artifactName: string; - published: string; - updatedBy: string; - tags: string; -} - -export class BlueprintPage extends Page { -} diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/package-dashboard.state.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/package-dashboard.state.ts index b6cf7fbdb..b010f7a69 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/package-dashboard.state.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/package-dashboard.state.ts @@ -20,11 +20,11 @@ limitations under the License. */ -import { BlueprintDetailModel } from './Blueprint.detail.model'; +import { BluePrintDetailModel } from './BluePrint.detail.model'; import { Mapping, Scripts, Template } from '../package-creation/mapping-models/CBAPacakge.model'; export class PackageDashboardState { - configuration: BlueprintDetailModel; + configuration: BluePrintDetailModel; public scripts: Scripts; public templates: Template; public mapping: Mapping; diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/packages-dashboard.state.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/packages-dashboard.state.ts index f7c5bb786..f4f56c591 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/packages-dashboard.state.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/packages-dashboard.state.ts @@ -19,12 +19,12 @@ limitations under the License. ============LICENSE_END============================================ */ -import {BlueprintPage} from './Blueprint.model'; +import {BluePrintPage} from './BluePrint.model'; export class PackagesDashboardState { - page: BlueprintPage; - filteredPackages: BlueprintPage; + page: BluePrintPage; + filteredPackages: BluePrintPage; command: string; currentPage = 0; totalPackages: number; diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.ts index 0c1d0cfd9..d5a2f112f 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.ts @@ -111,7 +111,7 @@ export class MetadataTabComponent implements OnInit , OnDestroy { console.log('in validate'); console.log('in this.metaDataTab.name' + this.metaDataTab.name); if (this.metaDataTab.name && this.metaDataTab.version) { - this.packageCreationService.checkBlueprintNameAndVersion(this.metaDataTab.name, this.metaDataTab.version).then(element => { + this.packageCreationService.checkBluePrintNameAndVersion(this.metaDataTab.name, this.metaDataTab.version).then(element => { if (element) { this.errorMessage = 'Package name already exists with this version. Use different name or different version number.'; } else if (!this.metaDataTab.version.match(this.versionPattern)) { diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation-extraction.service.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation-extraction.service.ts index 389e95712..585c16929 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation-extraction.service.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation-extraction.service.ts @@ -7,7 +7,7 @@ import * as JSZip from 'jszip'; import {PackageCreationUtils} from './package-creation.utils'; import {MetadataTabComponent} from './metadata-tab/metadata-tab.component'; import {DesignerStore} from '../designer/designer.store'; -import {BlueprintDetailModel} from '../model/Blueprint.detail.model'; +import {BluePrintDetailModel} from '../model/BluePrint.detail.model'; @Injectable({ providedIn: 'root' @@ -140,7 +140,7 @@ export class PackageCreationExtractionService { this.packageCreationStore.changeMetaData(metaDataObject); } - public setMetaDataWithObject(metaDataObject: MetaDataTabModel, bluePrintDetailModel: BlueprintDetailModel) { + public setMetaDataWithObject(metaDataObject: MetaDataTabModel, bluePrintDetailModel: BluePrintDetailModel) { metaDataObject.description = bluePrintDetailModel.artifactDescription; this.packageCreationStore.changeMetaData(metaDataObject); diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.html index 9398bb961..d188dbfa2 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.html @@ -78,13 +78,13 @@
- +
- -
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.ts index dc2b4dc03..1d2340534 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.ts @@ -109,7 +109,7 @@ export class PackageCreationComponent extends ComponentCanDeactivate implements // this.tourService.goto(step); } - saveBlueprint() { + saveBluePrint() { this.ngxService.start(); console.log(this.cbaPackage); FilesContent.clear(); @@ -121,13 +121,13 @@ export class PackageCreationComponent extends ComponentCanDeactivate implements // this.cbaPackage.templateTopology.content = this.designerStore.state.sourceContent; packageCreationModes.execute(this.cbaPackage, this.packageCreationUtils); this.filesData.push(this.folder.TREE_DATA); - this.saveBlueprintToDataBase(); + this.saveBluePrintToDataBase(); } - saveBlueprintToDataBase() { + saveBluePrintToDataBase() { this.create(); this.zipFile.generateAsync({ type: 'blob' }) .then(blob => { diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.service.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.service.ts index ee8644ee3..1e0e36a51 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.service.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.service.ts @@ -67,12 +67,12 @@ export class PackageCreationService { return this.api.post(BlueprintURLs.enrichandpublish, body, {responseType: 'text'}); } - private deployBlueprint(body: any | null, options?: any): Observable { + private deployBluePrint(body: any | null, options?: any): Observable { return this.api.post(BlueprintURLs.deploy, body, {responseType: 'text'}); } - async checkBlueprintNameAndVersion(name: string, version: string): Promise { - return await this.packagesListService.checkBlueprintIfItExists(name, version) + async checkBluePrintNameAndVersion(name: string, version: string): Promise { + return await this.packagesListService.checkBluePrintIfItExists(name, version) .then(bluePrintModelsResult => bluePrintModelsResult != null && bluePrintModelsResult.length > 0); } @@ -97,7 +97,7 @@ export class PackageCreationService { deploy(blob) { const formData = this.getFormData(blob); - return this.deployBlueprint(formData); + return this.deployBluePrint(formData); } private getFormData(blob) { @@ -114,7 +114,7 @@ export class PackageCreationService { return this.api.getCustomized(BlueprintURLs.download + id, {responseType: 'blob'}); } - public saveBlueprintToDataBase(): Observable { + public saveBluePrintToDataBase(): Observable { this.formTreeData(); this.create(); const subject = new Subject(); diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-api.service.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-api.service.ts index 1fab559d4..8275f8c6c 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-api.service.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-api.service.ts @@ -23,7 +23,7 @@ import {Injectable} from '@angular/core'; import {Observable} from 'rxjs'; import {ApiService} from '../../../common/core/services/api.typed.service'; import {BlueprintURLs} from '../../../common/constants/app-constants'; -import {BlueprintModel, BlueprintPage} from './model/Blueprint.model'; +import {BlueprintModel, BluePrintPage} from './model/BluePrint.model'; @Injectable({ @@ -33,10 +33,10 @@ export class PackagesApiService { packages: BlueprintModel[] = []; private numberOfPackages: number; - constructor(private api: ApiService) { + constructor(private api: ApiService) { } - getPagedPackages(pageNumber: number, pageSize: number, sortBy: string): Observable { + getPagedPackages(pageNumber: number, pageSize: number, sortBy: string): Observable { const sortType = sortBy.includes('DATE') ? 'DESC' : 'ASC'; return this.api.get(BlueprintURLs.getPagedBlueprints, { offset: pageNumber, @@ -46,7 +46,7 @@ export class PackagesApiService { }); } - async checkBlueprintIfItExists(name: string, version: string): Promise { + async checkBluePrintIfItExists(name: string, version: string): Promise { return await this.api.get(BlueprintURLs.getBlueprintByName + '/' + name + '/version/' + version).toPromise(); } diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/filter-by-tags/filter-by-tags.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/filter-by-tags/filter-by-tags.component.ts index b32b2b1e8..6f02bbab8 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/filter-by-tags/filter-by-tags.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/filter-by-tags/filter-by-tags.component.ts @@ -21,7 +21,7 @@ limitations under the License. import {Component, ElementRef, OnInit, QueryList, ViewChildren} from '@angular/core'; import {PackagesStore} from '../../packages.store'; -import {BlueprintModel, BlueprintPage} from '../../model/Blueprint.model'; +import {BlueprintModel, BluePrintPage} from '../../model/BluePrint.model'; @Component({ selector: 'app-filter-by-tags', @@ -31,7 +31,7 @@ import {BlueprintModel, BlueprintPage} from '../../model/Blueprint.model'; export class TagsFilteringComponent implements OnInit { - page: BlueprintPage; + page: BluePrintPage; tags: string[] = []; viewedTags: string[] = []; searchTag = ''; diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.spec.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.spec.ts index 6068697d4..000f9eda1 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.spec.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.spec.ts @@ -2,7 +2,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { PackageListComponent } from './package-list.component'; import { PackagesStore } from '../../packages.store'; -import { getBlueprintPageMock } from '../../blueprint.page.mock'; +import { getBluePrintPageMock } from '../../blueprint.page.mock'; import { of } from 'rxjs'; import {PackagesDashboardState} from '../../model/packages-dashboard.state'; @@ -14,7 +14,7 @@ describe('PackageListComponent', () => { beforeEach(async(() => { const dashBoard = new PackagesDashboardState(); - dashBoard.page = getBlueprintPageMock(); + dashBoard.page = getBluePrintPageMock(); store = { state$: of(dashBoard) }; TestBed.configureTestingModule({ diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.ts index c2b597c9e..2f151d1bf 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.ts @@ -1,5 +1,5 @@ import {Component, OnInit} from '@angular/core'; -import {BlueprintModel} from '../../model/Blueprint.model'; +import {BlueprintModel} from '../../model/BluePrint.model'; import {PackagesStore} from '../../packages.store'; import {Router} from '@angular/router'; import {ConfigurationDashboardService} from '../../configuration-dashboard/configuration-dashboard.service'; diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/packages-header/packages-header.component.spec.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/packages-header/packages-header.component.spec.ts index 4b572e054..39228af76 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/packages-header/packages-header.component.spec.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/packages-header/packages-header.component.spec.ts @@ -4,7 +4,7 @@ import {PackagesHeaderComponent} from './packages-header.component'; import {PackagesStore} from '../../packages.store'; import {BrowserDynamicTestingModule, platformBrowserDynamicTesting} from '@angular/platform-browser-dynamic/testing'; import {PackagesDashboardState} from '../../model/packages-dashboard.state'; -import {getBlueprintPageMock} from '../../blueprint.page.mock'; +import {getBluePrintPageMock} from '../../blueprint.page.mock'; import {of} from 'rxjs'; import {By} from '@angular/platform-browser'; diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.spec.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.spec.ts index e65f05944..379aaddf2 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.spec.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.spec.ts @@ -3,14 +3,14 @@ import { PackagesStore } from './packages.store'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { PackagesApiService } from './packages-api.service'; import { of } from 'rxjs'; -import { BlueprintPage } from './model/Blueprint.model'; -import { getBlueprintPageMock } from './blueprint.page.mock'; +import { BluePrintPage } from './model/BluePrint.model'; +import { getBluePrintPageMock } from './blueprint.page.mock'; import { PackagesDashboardState } from './model/packages-dashboard.state'; describe('PackagesStore', () => { // store: PackagesStore; - const MOCK_BLUEPRINTS_PAGE: BlueprintPage = getBlueprintPageMock(); + const MOCK_BLUEPRINTS_PAGE: BluePrintPage = getBluePrintPageMock(); let httpMock: HttpTestingController; diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.ts index 02682aafb..1e52e31dd 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.ts @@ -20,7 +20,7 @@ limitations under the License. */ import {Injectable} from '@angular/core'; -import {BlueprintPage} from './model/Blueprint.model'; +import {BluePrintPage} from './model/BluePrint.model'; import {Store} from '../../../common/core/stores/Store'; import {PackagesApiService} from './packages-api.service'; import {PackagesDashboardState} from './model/packages-dashboard.state'; @@ -33,7 +33,7 @@ import {NgxUiLoaderService} from 'ngx-ui-loader'; export class PackagesStore extends Store { // TDOD fixed for now as there is no requirement to change it from UI public pageSize = 15; - private bluePrintContent: BlueprintPage = new BlueprintPage(); + private bluePrintContent: BluePrintPage = new BluePrintPage(); constructor( private packagesServiceList: PackagesApiService, @@ -83,7 +83,7 @@ export class PackagesStore extends Store { protected getPagedPackages(pageNumber: number, pageSize: number, sortBy: string = this.state.sortBy) { this.packagesServiceList.getPagedPackages(pageNumber, pageSize, sortBy) - .subscribe((pages: BlueprintPage[]) => { + .subscribe((pages: BluePrintPage[]) => { this.setState({ ...this.state, page: pages[0], @@ -105,7 +105,7 @@ export class PackagesStore extends Store { private searchPagedPackages(keyWord: string, pageNumber: number, pageSize: number, sortBy: string = this.state.sortBy) { this.packagesServiceList.getPagedPackagesByKeyWord(keyWord, pageNumber, pageSize, sortBy) - .subscribe((pages: BlueprintPage[]) => { + .subscribe((pages: BluePrintPage[]) => { this.setState({ ...this.state, page: pages[0], @@ -129,7 +129,7 @@ export class PackagesStore extends Store { private getPagedPackagesByTags(keyWord: string, currentPage1: number, pageSize: number, sortBy1: string, tagsSearchable: string[]) { this.getPagedPackagesByKeyWordFilteredByTags(tagsSearchable) - .subscribe((pages: BlueprintPage) => { + .subscribe((pages: BluePrintPage) => { this.setState({ ...this.state, page: this.state.page, diff --git a/cds-ui/server/src/clients/blueprint-management-service-grpc-client.ts b/cds-ui/server/src/clients/blueprint-management-service-grpc-client.ts index b54a1d10c..8975f4501 100644 --- a/cds-ui/server/src/clients/blueprint-management-service-grpc-client.ts +++ b/cds-ui/server/src/clients/blueprint-management-service-grpc-client.ts @@ -35,14 +35,14 @@ const packageDefinition: protoLoader.PackageDefinition = protoLoader.loadSync( const protoDescriptor = grpc.loadPackageDefinition(packageDefinition); // The protoDescriptor object has the full package hierarchy -const stub = new protoDescriptor.org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementService( +const stub = new protoDescriptor.org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementService( "" + processorApiConfig.grpc.host + ":" + processorApiConfig.grpc.port + "", grpc.credentials.createInsecure()); const metadata = new grpc.Metadata(); metadata.add('Authorization', processorApiConfig.grpc.authToken); -class BlueprintManagementServiceGrpcClient { +class BluePrintManagementServiceGrpcClient { async uploadBlueprint(filePath: string, actionName: string): Promise { @@ -115,5 +115,5 @@ class BlueprintManagementServiceGrpcClient { } } -export const bluePrintManagementServiceGrpcClient = new BlueprintManagementServiceGrpcClient(); +export const bluePrintManagementServiceGrpcClient = new BluePrintManagementServiceGrpcClient(); diff --git a/cds-ui/server/src/config/app-config.ts b/cds-ui/server/src/config/app-config.ts index 68bb74ce0..5b4a6ec54 100644 --- a/cds-ui/server/src/config/app-config.ts +++ b/cds-ui/server/src/config/app-config.ts @@ -39,7 +39,7 @@ export const processorApiConfig = Object.freeze({ authToken: process.env.API_BLUEPRINT_PROCESSOR_GRPC_AUTH_TOKEN || "Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==", bluePrintManagement: Object.freeze({ //this path is relative to 'dist' folder - protoPath: __dirname + '../../../proto/BlueprintManagement.proto' + protoPath: __dirname + '../../../proto/BluePrintManagement.proto' }) }) }); diff --git a/cds-ui/server/src/controllers/blueprint-rest.controller.ts b/cds-ui/server/src/controllers/blueprint-rest.controller.ts index 3bbb7f631..a8b989ff4 100644 --- a/cds-ui/server/src/controllers/blueprint-rest.controller.ts +++ b/cds-ui/server/src/controllers/blueprint-rest.controller.ts @@ -58,8 +58,8 @@ export class BlueprintRestController { }, }, }) - async getOneBlueprint(@param.path.string('id') id: string) { - return await this.bpservice.getOneBlueprint(id); + async getOneBluePrint(@param.path.string('id') id: string) { + return await this.bpservice.getOneBluePrint(id); } @del('/controllerblueprint/{id}', { @@ -70,8 +70,8 @@ export class BlueprintRestController { }, }, }) - async deleteBlueprint(@param.path.string('id') id: string) { - return await this.bpservice.deleteBlueprint(id); + async deleteBluePrint(@param.path.string('id') id: string) { + return await this.bpservice.deleteBluePrint(id); } diff --git a/cds-ui/server/src/datasources/blueprint.datasource-template.ts b/cds-ui/server/src/datasources/blueprint.datasource-template.ts index e2bf58295..dc1cd3734 100644 --- a/cds-ui/server/src/datasources/blueprint.datasource-template.ts +++ b/cds-ui/server/src/datasources/blueprint.datasource-template.ts @@ -33,7 +33,7 @@ export default { "responsePath": "$.*" }, "functions": { - "getOneBlueprint": ["id"] + "getOneBluePrint": ["id"] } }, @@ -49,7 +49,7 @@ export default { "responsePath": "$.*" }, "functions": { - "deleteBlueprint": ["id"] + "deleteBluePrint": ["id"] } }, diff --git a/cds-ui/server/src/services/blueprint.service.ts b/cds-ui/server/src/services/blueprint.service.ts index 433301175..a017e6ef2 100644 --- a/cds-ui/server/src/services/blueprint.service.ts +++ b/cds-ui/server/src/services/blueprint.service.ts @@ -3,8 +3,8 @@ import { inject, Provider } from '@loopback/core'; import { BlueprintDataSource } from '../datasources'; export interface BlueprintService { - getOneBlueprint(id: string): any; - deleteBlueprint(id: string): any; + getOneBluePrint(id: string): any; + deleteBluePrint(id: string): any; getAllblueprints(): Promise; getBlueprintsByKeyword(keyword: string): Promise; getByTags(tags: string): Promise; -- cgit 1.2.3-korg