summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql-validate-success-dialog/sql-validate-success-dialog.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql-validate-success-dialog/sql-validate-success-dialog.component.ts')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql-validate-success-dialog/sql-validate-success-dialog.component.ts62
1 files changed, 62 insertions, 0 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql-validate-success-dialog/sql-validate-success-dialog.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql-validate-success-dialog/sql-validate-success-dialog.component.ts
new file mode 100644
index 00000000..c9763772
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql-validate-success-dialog/sql-validate-success-dialog.component.ts
@@ -0,0 +1,62 @@
+import { Component, OnInit, Input, ChangeDetectionStrategy } from '@angular/core';
+
+@Component({
+ selector: 'app-sql-validate-success-dialog-component',
+ templateUrl: './sql-validate-success-dialog.component.html',
+ styleUrls: ['./sql-validate-success-dialog.component.css'],
+ changeDetection: ChangeDetectionStrategy.OnPush
+})
+export class SQLValidateSuccessDialogComponent implements OnInit {
+
+ @Input('tableObj') tableObj : any;
+
+
+ headers = [];
+ rows = [];
+ finalDisplayObjArr : any[] = new Array();
+ subArr : string[] = new Array();
+ constructor() { }
+
+ ngOnInit() {
+
+ }
+
+ ngOnChanges(){
+ //console.log(this.tableObj);
+ this.rows = new Array();
+ this.headers = new Array();
+ this.finalDisplayObjArr = new Array();
+
+ this.tableObj = this.tableObj;
+
+ this.headers = JSON.parse(this.tableObj)["reportDataColumns"];
+ this.rows = JSON.parse(this.tableObj)["reportDataRows"];
+
+ // for(let i=0; i<this.headers.length; i++)
+ // {
+ // this.subArr.push(this.headers[i]);
+ // }
+ // this.finalDisplayObjArr.push(this.subArr);
+
+ for(let i=0; i<this.rows.length; i++)
+ {
+ this.subArr = [];
+
+ for(let j=0; j<this.headers.length; j++)
+ {
+ //console.log(this.rows[i][this.headers[j]]);
+ this.subArr.push(this.rows[i][this.headers[j]]);
+
+ }
+
+ // console.log(this.subArr);
+ this.finalDisplayObjArr.push(this.subArr);
+
+ }
+
+ console.log(this.finalDisplayObjArr);
+ }
+
+
+
+}