summaryrefslogtreecommitdiffstats
path: root/cds-ui/client/src/app/feature-modules/blueprint
diff options
context:
space:
mode:
authorEzhilarasi <ezhrajam@in.ibm.com>2019-02-21 21:28:48 +0530
committerEzhilarasi <ezhrajam@in.ibm.com>2019-02-21 21:28:56 +0530
commit2ad57600b660cb98c683edfddf825ee2a5ced9c1 (patch)
treef252ed74c9ff7299f363e45e645ef70d518a8bb0 /cds-ui/client/src/app/feature-modules/blueprint
parentfdd6331215678fd5c84e1514c48946825530d101 (diff)
Update metadata change to stores
Changes done in Metadata form updated to stores Change-Id: Ia6dcc7b2983716cff12ffe9d0ecec7532261fe77 Issue-ID: CCSDK-704 Signed-off-by: Ezhilarasi <ezhrajam@in.ibm.com>
Diffstat (limited to 'cds-ui/client/src/app/feature-modules/blueprint')
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts18
1 files changed, 11 insertions, 7 deletions
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts
index cfcb6471a..033950b3a 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts
+++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts
@@ -19,14 +19,17 @@ limitations under the License.
============LICENSE_END============================================
*/
-import { Component, OnInit, EventEmitter, Output, AfterViewInit, AfterContentInit, OnChanges, DoCheck, AfterViewChecked } from '@angular/core';
+import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
-import { IMetaData } from '../../../../common/core/store/models/metadata.model';
+import { Observable } from 'rxjs';
+import { Store } from '@ngrx/store';
import { A11yModule } from '@angular/cdk/a11y';
+
import { IAppState } from '../../../../common/core/store/state/app.state';
-import { Store } from '@ngrx/store';
-import { Observable } from 'rxjs';
import { IBlueprintState } from 'src/app/common/core/store/models/blueprintState.model';
+import { IBlueprint } from 'src/app/common/core/store/models/blueprint.model';
+import { IMetaData } from '../../../../common/core/store/models/metadata.model';
+import { LoadBlueprintSuccess } from 'src/app/common/core/store/actions/blueprint.action';
@Component({
selector: 'app-metadata',
@@ -37,8 +40,8 @@ export class MetadataComponent implements OnInit {
CBAMetadataForm: FormGroup;
metadata: IMetaData;
bpState: Observable<IBlueprintState>;
- @Output() metadataform = new EventEmitter<IMetaData>();
-
+ blueprint: IBlueprint;
+
constructor(private formBuilder: FormBuilder, private store: Store<IAppState>) {
this.bpState = this.store.select('blueprint');
this.CBAMetadataForm = this.formBuilder.group({
@@ -77,7 +80,8 @@ export class MetadataComponent implements OnInit {
UploadMetadata() {
this.metadata = Object.assign({}, this.CBAMetadataForm.value);
- this.metadataform.emit(this.metadata);
+ this.blueprint.metadata = this.metadata;
+ this.store.dispatch(new LoadBlueprintSuccess(this.blueprint));
}
} \ No newline at end of file