summaryrefslogtreecommitdiffstats
path: root/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-08-22 22:06:53 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-22 22:06:53 +0000
commitd02e575d359c5a7707112e5e0afc53713d7796e7 (patch)
treef6485dd925d65e43123d52a27c6924390a91d0a4 /cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts
parent42847234a611cbfa367f7d011c9d397cb7906482 (diff)
parent5306da4cdbd068ec0785a785cc8d24bb1f03f549 (diff)
Merge "Passing Option from Search DB to metadata"
Diffstat (limited to 'cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts')
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts19
1 files changed, 9 insertions, 10 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 174bdf183..f49517017 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
@@ -48,7 +48,7 @@ export class MetadataComponent implements OnInit {
blueprintName: string;
uploadedFileName: string;
entryDefinition: string;
-
+
constructor(private formBuilder: FormBuilder, private store: Store<IAppState>,
private loader: LoaderService, private dataService: SelectTemplateService) {
this.bpState = this.store.select('blueprint');
@@ -60,12 +60,17 @@ export class MetadataComponent implements OnInit {
template_version: ['', Validators.required],
template_tags: ['', Validators.required]
});
+
}
ngOnInit() {
- this.dataService.getCbaOption().subscribe(
- res => {console.log("data from service " + res);}
+ this.dataService.currentMessage.subscribe(
+ res => {
+ let options = res;
+ console.log(options + " data from service ngoninit" + res);
+ }
);
+
this.bpState.subscribe(
blueprintdata => {
var blueprintState: IBlueprintState = { blueprint: blueprintdata.blueprint, isLoadSuccess: blueprintdata.isLoadSuccess, isSaveSuccess: blueprintdata.isSaveSuccess, isUpdateSuccess: blueprintdata.isUpdateSuccess };
@@ -76,8 +81,6 @@ export class MetadataComponent implements OnInit {
this.uploadedFileName = blueprintdata.uploadedFileName;
this.entryDefinition = blueprintdata.entryDefinition;
-
-
var blueprintState: IBlueprintState = { blueprint: blueprintdata.blueprint, isLoadSuccess: blueprintdata.isLoadSuccess, isSaveSuccess: blueprintdata.isSaveSuccess, isUpdateSuccess: blueprintdata.isUpdateSuccess };
this.metadata = blueprintState.blueprint.metadata;
this.blueprint = blueprintState.blueprint;
@@ -99,11 +102,7 @@ export class MetadataComponent implements OnInit {
});
})
}
-ngAfterInit(){
- this.dataService.getCbaOption().subscribe(
- res => {console.log("data from service after init" + res);}
- );
-}
+
UploadMetadata() {
this.loader.showLoader();
this.metadata = Object.assign({}, this.CBAMetadataForm.value);