aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSwapnali Shadanan Pode <sp00501638@techmahindra.com>2019-03-29 16:36:41 +0530
committerSwapnali Pode <sp00501638@techmahindra.com>2019-03-29 19:19:44 +0000
commita4900b643dbccdeaa499d3b0ceace5524b12a67a (patch)
tree22e89ae3102c201edc302bd2d8896ad5d8f0e47b
parent67ef9b7f4cb9b59e1da4c93bce86d57bb9276d37 (diff)
Existing model changes
Change-Id: I41ddfbe6780f96b0f6ce6955322fa835162db320 Issue-ID: CCSDK-804 Signed-off-by: sp00501638 <sp00501638@techmahindra.com>
-rw-r--r--cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.html2
-rw-r--r--cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.ts26
2 files changed, 25 insertions, 3 deletions
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.html
index 491066310..4a738b79c 100644
--- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.html
+++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.html
@@ -19,4 +19,4 @@
*/-->
-<app-search-resource></app-search-resource> \ No newline at end of file
+<app-search-resource (resourcesData)="selectedResource($event)"></app-search-resource> \ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.ts
index f780ef851..9fdc38886 100644
--- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.ts
+++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.ts
@@ -19,6 +19,10 @@
*/
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));
+ }
+
}