diff options
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.ts | 40 |
1 files changed, 19 insertions, 21 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 index c9763772..70fd6f67 100644 --- 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 @@ -15,6 +15,11 @@ export class SQLValidateSuccessDialogComponent implements OnInit { rows = []; finalDisplayObjArr : any[] = new Array(); subArr : string[] = new Array(); + showMessage:boolean; + errorMessage:string; + Validatestatus:string; + + constructor() { } ngOnInit() { @@ -22,39 +27,32 @@ export class SQLValidateSuccessDialogComponent implements OnInit { } ngOnChanges(){ - //console.log(this.tableObj); this.rows = new Array(); this.headers = new Array(); - this.finalDisplayObjArr = 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); - + if(JSON.parse(this.tableObj)["errormessage"] != undefined){ + this.showMessage = true; + this.errorMessage = JSON.parse(this.tableObj)["errormessage"]; + this.Validatestatus = "Sql Verify: failed! " + + } else{ + this.showMessage = false; + this.headers = JSON.parse(this.tableObj)["reportDataColumns"]; + this.rows = JSON.parse(this.tableObj)["reportDataRows"]; 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]]); - + this.subArr.push(this.rows[i][this.headers[j]]); } - - // console.log(this.subArr); this.finalDisplayObjArr.push(this.subArr); - - } - - console.log(this.finalDisplayObjArr); + + } + } } |