diff options
author | ShaabanEltanany <shaaban.eltanany.ext@orange.com> | 2020-11-01 15:07:40 +0200 |
---|---|---|
committer | ShaabanEltanany <shaaban.eltanany.ext@orange.com> | 2020-11-01 16:38:30 +0200 |
commit | a1ec53caf1953f26d32d01e1819a4b9239140f5b (patch) | |
tree | 7c193df75a60b845111c581464b50fb866f532fe /cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts | |
parent | 68b7d0df04387b709ed5a403a5a9f240b6dbffba (diff) |
adding import inputs and outputs from functions into actions
Issue-ID: CCSDK-2779
Signed-off-by: ShaabanEltanany <shaaban.eltanany.ext@orange.com>
Change-Id: I71ee51c6e641d05bb27cdf1807487e25b656e1cd
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts | 20 |
1 files changed, 18 insertions, 2 deletions
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 77e0ceed6..7d5a72735 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 @@ -51,6 +51,7 @@ import {PackageCreationExtractionService} from '../package-creation/package-crea import {CBAPackage} from '../package-creation/mapping-models/CBAPacakge.model'; import {TopologyTemplate} from './model/designer.topologyTemplate.model'; import {ToastrService} from 'ngx-toastr'; +import {DesignerDashboardState} from './model/designer.dashboard.state'; @Component({ selector: 'app-designer', @@ -81,6 +82,9 @@ export class DesignerComponent implements OnInit, OnDestroy { cbaPackage: CBAPackage; actions: string[] = []; dataTarget: string; + steps: string[]; + designerState: DesignerDashboardState; + currentActionName: string; constructor( private designerStore: DesignerStore, @@ -207,6 +211,7 @@ export class DesignerComponent implements OnInit, OnDestroy { distinctUntilChanged((a: any, b: any) => JSON.stringify(a) === JSON.stringify(b)), takeUntil(this.ngUnsubscribe)) .subscribe(state => { + this.designerState = state; if (state.sourceContent) { console.log('inside desinger.component---> ', state); // generate graph from store objects if exist @@ -478,9 +483,20 @@ export class DesignerComponent implements OnInit, OnDestroy { }); } - openFunctionAttributes(customActionName: string) { - console.log('opening here function attributes'); + openActionAttributes(customActionName: string) { + console.log('opening here action attributes'); + this.currentActionName = customActionName; this.actionAttributesSideBar = true; + this.functionAttributeSidebar = false; this.designerStore.setCurrentAction(customActionName); + /* tslint:disable:no-string-literal */ + this.steps = Object.keys(this.designerState.template.workflows[customActionName]['steps']); + } + + openFunctionAttributes(customFunctionName: string) { + this.actionAttributesSideBar = false; + this.functionAttributeSidebar = true; + this.designerStore.setCurrentFunction(this.designerState.template.workflows[this.currentActionName] + ['steps'][customFunctionName]['target']); } } |