Merge "Existing model changes"
authorDan Timoney <dtimoney@att.com>
Sun, 31 Mar 2019 12:45:03 +0000 (12:45 +0000)
committerGerrit Code Review <gerrit@onap.org>
Sun, 31 Mar 2019 12:45:03 +0000 (12:45 +0000)
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.html
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.ts

index f780ef8..9fdc388 100644 (file)
 */
 
 import { Component, OnInit } from '@angular/core';
+import { Store } from '@ngrx/store';
+import { IResources } from 'src/app/common/core/store/models/resources.model';
+import { IAppState } from 'src/app/common/core/store/state/app.state';
+import { LoadResourcesSuccess } from 'src/app/common/core/store/actions/resources.action';
 
 @Component({
   selector: 'app-existing-model',
@@ -27,9 +31,27 @@ import { Component, OnInit } from '@angular/core';
 })
 export class ExistingModelComponent implements OnInit {
 
-  constructor() { }
+  resourceName:string;
+  
+ constructor(private store: Store<IAppState>) { }
 
   ngOnInit() {
-  }
+ }
+ selectedResource(value){
+  console.log(value);
+  this.resourceName=value;
+ }
+
+ getDataUsingResouceName(){
+ }
+
+ updateResourcesState() {
+    var me = this; 
+    var data:IResources;
+    me.store.dispatch(new LoadResourcesSuccess(data));   
+ }
+
 
 }