Template option populate to Select template 21/90521/3
authorEzhilarasi <ezhrajam@in.ibm.com>
Wed, 26 Jun 2019 13:06:34 +0000 (18:36 +0530)
committerEzhilarasi R <ezhrajam@in.ibm.com>
Wed, 3 Jul 2019 09:48:39 +0000 (09:48 +0000)
Change-Id: I0d949283906493f1471377619fdc5615a310b690
Issue-Id: CCSDK-1275
Signed-off-by: Ezhilarasi <ezhrajam@in.ibm.com>
cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.html
cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.ts

index d11b371..97c65b2 100644 (file)
@@ -22,7 +22,7 @@ limitations under the License.
     <mat-step [stepControl]="step1FormGroup">
         <ng-template matStepLabel>Choose CBA Template file</ng-template>
         <div class="matStepContent">
-            <app-template-options></app-template-options>
+            <app-template-options (option)="templateSelected($event)"></app-template-options>
             <br>
             <div>
                 <button mat-button matStepperNext class="matStepNextBtn">Proceed</button>
@@ -30,10 +30,10 @@ limitations under the License.
         </div>
     </mat-step>
 
-    <mat-step [stepControl]="step2FormGroup">
+    <mat-step [stepControl]="step2FormGroup" *ngIf="templateOption==1 || templateOption == 2">
         <ng-template matStepLabel>Browse CBA Template file</ng-template>
         <div class="matStepContent">
-            <app-search-template (cbaFile)="fileChange($event)"></app-search-template>
+            <app-search-template [optionSelected]="templateOption" (cbaFile)="fileChange($event)"></app-search-template>
             <!-- <div>
                 <button mat-button matStepperNext class="matStepNextBtn">Upload</button>
             </div>-->
index d9591dd..561f15a 100644 (file)
@@ -38,6 +38,7 @@ export class SelectTemplateComponent implements OnInit {
   metaData: IMetaData;
   blueprintState: IBlueprintState;
   importModel: IImportModel;
+  templateOption: any;
 
   constructor(private store: Store<IBlueprintState>) {
     // this.importModel.file = '';
@@ -45,6 +46,12 @@ export class SelectTemplateComponent implements OnInit {
 
   ngOnInit() {
   }
+
+  templateSelected(option: any) {
+    this.templateOption = option;
+    console.log(this.templateOption);
+  }
+  
   fileChange(topologyTemp: ITopologyTemplate) {
     this.topologyTemplate = topologyTemp;
     console.log(topologyTemp);
@@ -57,6 +64,7 @@ export class SelectTemplateComponent implements OnInit {
   upload() {
 
   }
+  
   // saveBlueprintModel(){
   //   this.blueprint.toplogyTemplates=this.topologyTemplate;
   //   this.blueprint.metadata= this.metaData;