summaryrefslogtreecommitdiffstats
path: root/cds-ui
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-02-21 21:43:47 +0000
committerGerrit Code Review <gerrit@onap.org>2019-02-21 21:43:47 +0000
commitc574909d9c2451f5468040a5e7ffbbd39cb5bbc8 (patch)
tree05ec76b426e85a97136ab2fa2485b04b1f49a91b /cds-ui
parentae4eab51d49443c1ae9a2b92c72caa189f4a0f5d (diff)
parent2ad57600b660cb98c683edfddf825ee2a5ced9c1 (diff)
Merge "Update metadata change to stores"
Diffstat (limited to 'cds-ui')
-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