diff options
author | 2019-02-14 19:27:31 +0530 | |
---|---|---|
committer | 2019-02-14 14:28:27 +0000 | |
commit | b8615b2844cf4141aa449898b16c2c1f57902217 (patch) | |
tree | 847393dc16abe7e2897df3e507d8a7abf04df01b /cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.ts | |
parent | 6c9efd47bfae32b811761e3c2f2ceba545411bb7 (diff) |
Update state of blueprint
Change-Id: I11da8bc3ac64f88b47691575ea34ad0b25ef0e6d
Issue-ID: CCSDK-703
Signed-off-by: Ezhilarasi <ezhrajam@in.ibm.com>
Diffstat (limited to 'cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.ts')
-rw-r--r-- | cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.ts | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.ts index b4356a601..091dd35b2 100644 --- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.ts +++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.ts @@ -21,6 +21,11 @@ limitations under the License. import { Component, OnInit } from '@angular/core'; import { Observable } from 'rxjs'; import { Store } from '@ngrx/store'; +import { IBlueprint } from 'src/app/common/core/store/models/blueprint.model'; +import { IBlueprintState } from 'src/app/common/core/store/models/blueprintState.model'; +import { IMetaData } from 'src/app/common/core/store/models/metadata.model'; +import { IImportModel } from 'src/app/common/core/store/models/imports.model'; +import { ITopologyTemplate } from 'src/app/common/core/store/models/itopologytemplate.model'; @Component({ selector: 'app-select-template', @@ -28,19 +33,33 @@ import { Store } from '@ngrx/store'; styleUrls: ['./select-template.component.scss'] }) export class SelectTemplateComponent implements OnInit { - blueprint: any - myFile: File; /* property of File type */ + blueprint: IBlueprint; + topologyTemplate: ITopologyTemplate; + metaData: IMetaData; + blueprintState: IBlueprintState; + importModel: IImportModel; - constructor() { + constructor(private store: Store<IBlueprintState>) { + this.importModel.file = ''; } - ngOnInit() { + ngOnInit() { } - fileChange(files: any) { - console.log(files); - this.myFile = files[0].nativeElement; + fileChange(topologyTemp: ITopologyTemplate) { + this.topologyTemplate = topologyTemp; + console.log(topologyTemp); } - upload(){ + metaDataDetail(data: IMetaData) { + this.metaData = data; + console.log("parent" + this.metaData.author_email); + } + upload() { + + } + saveBlueprintModel(){ + this.blueprint.toplogyTemplates=this.topologyTemplate; + this.blueprint.metadata= this.metaData; + // this.store.dispatch(new CreateBlueprint(this.blueprint)); } } |