diff options
author | Ahmedeldeeb50 <ahmed.eldeeb.ext@orange.com> | 2020-10-19 22:39:16 +0200 |
---|---|---|
committer | KAPIL SINGAL <ks220y@att.com> | 2020-10-20 13:31:11 +0000 |
commit | bb8b842d5d405874c745e054afeffb0e20bc2865 (patch) | |
tree | 781a1a858d88367900d2224322bc6905a5f14c08 /cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts | |
parent | 83c0cd2c078f89a386701b7f8e680fd3fc70ecfd (diff) |
handle integer and checkbox in functional attribute.
Fix finish problem in Mapping.
Issue-ID: CCSDK-2900
Signed-off-by: Ahmedeldeeb50 <ahmed.eldeeb.ext@orange.com>
Change-Id: I08697cb61814db37144f66f7f15773d3c02c9848
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts index 4eee1f30c..624f9c7a8 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts @@ -6,6 +6,7 @@ import { distinctUntilChanged, takeUntil } from 'rxjs/operators'; import { CBAPackage } from '../../package-creation/mapping-models/CBAPacakge.model'; import { TemplateAndMapping } from '../../package-creation/template-mapping/TemplateAndMapping'; import { FunctionsStore } from '../functions.store'; +import { NodeProcess, NodeTemplate } from '../model/desinger.nodeTemplate.model'; @Component({ selector: 'app-functions-attribute', @@ -25,6 +26,8 @@ export class FunctionsAttributeComponent implements OnInit, OnDestroy { OptionalInputs = new Map<string, {}>(); optionalOutputs = new Map<string, {}>(); artifactPrefix = false; + currentFuncion = new NodeProcess(); + nodeTemplates = new NodeTemplate(''); constructor( private designerStore: DesignerStore, @@ -70,8 +73,42 @@ export class FunctionsAttributeComponent implements OnInit, OnDestroy { this.ngUnsubscribe.next(); this.ngUnsubscribe.complete(); } - // Template logic + displayFunctionData() { + this.selectedTemplates.forEach((value, key) => { + console.log(key); + console.log(value); + + if (value.isMapping) { + this.nodeTemplates.artifacts[key + '-mapping'] = { + type: 'artifact-mapping-resource', + file: 'Templates/' + key + '-mapping.json' + }; + } + + if (value.isTemplate) { + this.nodeTemplates.artifacts[key + '-template'] = { + type: 'artifact-template-resource', + file: 'Templates/' + key + '-template.vtl' + }; + } + }); + this.nodeTemplates.interfaces = { + ResourceResolutionComponent: { + operations: { + process: { + ...this.currentFuncion + } + } + } + }; + setTimeout(() => { + console.log(this.currentFuncion); + console.log(this.nodeTemplates); + + }, 1500); + } + // Template logic private setIsMappingOrTemplate(key: string, templateAndMapping: TemplateAndMapping, isFromTemplate: boolean) { const nameOfFile = isFromTemplate ? key.split('/')[1].split('.')[0].split('-template')[0] @@ -88,6 +125,13 @@ export class FunctionsAttributeComponent implements OnInit, OnDestroy { } addTemplates() { } + setArtifact(predefined: boolean) { + if (predefined) { + + } else { + this.currentFuncion.inputs['artifact-prefix-names'] = { get_input: 'template-prefix' }; + } + } addToInputs(optionalInput) { this.requiredInputs.set(optionalInput, this.OptionalInputs.get(optionalInput)); this.OptionalInputs.delete(optionalInput); |