aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts')
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts25
1 files changed, 21 insertions, 4 deletions
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts
index a58be6eb3..3a344c9fc 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts
+++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts
@@ -19,7 +19,9 @@ limitations under the License.
============LICENSE_END============================================
*/
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit, EventEmitter, Output } from '@angular/core';
+import { Store } from '@ngrx/store';
+import { IBlueprint} from '../../../../common/core/store/models/blueprint.model';
@Component({
selector: 'app-search-template',
@@ -27,10 +29,25 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./search-template.component.scss']
})
export class SearchTemplateComponent implements OnInit {
-
+ file: any;
+ localBluePrintData: IBlueprint;
+ fileText: object[];
+
constructor() { }
- ngOnInit() {
+ ngOnInit() { }
+
+ fileChanged(e: any) {
+ this.file = e.target.files[0];
+ let fileReader = new FileReader();
+ fileReader.readAsText(e.srcElement.files[0]);
+ var me = this;
+ fileReader.onload = function () {
+ let fileData = JSON.stringify(fileReader.result);
+ me.localBluePrintData = JSON.parse(fileData);
+ console.log(me.localBluePrintData);
+ }
+ }
+ extractBlueprint(){
}
-
}