diff options
3 files changed, 22 insertions, 20 deletions
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.ts index 3c76b8506..3e8f4f8d6 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.ts @@ -87,6 +87,7 @@ export class SourcesTemplateComponent implements OnInit { this.resources.sources = Object.assign({},originalSources); }; + // to remove this method selected(sourceValue){ this.sourcesData= [];//this.sources[value]; this.apiService.getModelType(sourceValue.value) @@ -153,25 +154,25 @@ export class SourcesTemplateComponent implements OnInit { if (typeof (dataitem) == "object") { for (let key1 in dataitem) { if (key1 == 'properties') { - let newPropOnj = {} + let newPropObj = {}; + newPropObj["name"] = event.item.element.nativeElement.innerText; + newPropObj['data'] = {}; + let newSoruceObj = {}; for (let key2 in dataitem[key1]) { - console.log(dataitem[key1][key2]); - let varType = dataitem[key1][key2].type - // let property : varType = - newPropOnj[key2] = dataitem[key1][key2]; + newSoruceObj[key2] = '';; } + newPropObj['data']['properties'] = newSoruceObj; + this.sourcesOptions.forEach(sourcesOptionsitem => { + if (sourcesOptionsitem.name == item.name) { + sourcesOptionsitem.data = newPropObj['data']; + } + }); } } } }); - this.sourcesData = data; - this.sourcesOptions.forEach(sourcesOptionsitem => { - if (sourcesOptionsitem.name == item.name) { - sourcesOptionsitem.data = data; - } - }) - }) - } + }); + } }); } } diff --git a/cds-ui/server/src/controllers/blueprint-rest.controller.ts b/cds-ui/server/src/controllers/blueprint-rest.controller.ts index 14aba5617..c73f7a6f8 100644 --- a/cds-ui/server/src/controllers/blueprint-rest.controller.ts +++ b/cds-ui/server/src/controllers/blueprint-rest.controller.ts @@ -57,7 +57,7 @@ export class BlueprintRestController { public bpservice: BlueprintService, ) { } - @get('/blueprints', { + @get('/controllerblueprint/all', { responses: { '200': { description: 'Blueprint model instance', @@ -69,7 +69,7 @@ export class BlueprintRestController { return await this.bpservice.getAllblueprints(); } - @get('/searchByTags/{tags}', { + @get('/controllerblueprint/searchByTags/{tags}', { responses: { '200': { content: { 'application/json': {} }, @@ -80,7 +80,7 @@ export class BlueprintRestController { return await this.bpservice.getByTags(tags); } - @post('/create-blueprint') + @post('/controllerblueprint/create-blueprint') async upload( @requestBody({ description: 'multipart/form-data value.', @@ -109,7 +109,7 @@ export class BlueprintRestController { }); } - @post('/publish') + @post('/controllerblueprint/publish') async publish( @requestBody({ description: 'multipart/form-data value.', @@ -138,7 +138,7 @@ export class BlueprintRestController { }); } - @post('/enrich-blueprint') + @post('/controllerblueprint/enrich-blueprint') async enrich( @requestBody({ description: 'multipart/form-data value.', @@ -167,7 +167,7 @@ export class BlueprintRestController { }); } - @get('/download-blueprint/{name}/{version}') + @get('/controllerblueprint/download-blueprint/{name}/{version}') async download( @param.path.string('name') name: string, @param.path.string('version') version: string, @@ -191,7 +191,7 @@ export class BlueprintRestController { }) } - @post('/deploy-blueprint') + @post('/controllerblueprint/deploy-blueprint') async deploy( @requestBody({ description: 'multipart/form-data value.', diff --git a/cds-ui/server/src/controllers/index.ts b/cds-ui/server/src/controllers/index.ts index 59f635149..fd4d9c8ac 100644 --- a/cds-ui/server/src/controllers/index.ts +++ b/cds-ui/server/src/controllers/index.ts @@ -20,4 +20,5 @@ limitations under the License. */ export * from './ping.controller'; +export * from './blueprint-rest.controller'; export * from './data-dictionary.controller'; |