diff options
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition')
3 files changed, 30 insertions, 4 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/dashboard-report-grid/dashboard-report-grid.service.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/dashboard-report-grid/dashboard-report-grid.service.ts index 3cd72584..0c1781bc 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/dashboard-report-grid/dashboard-report-grid.service.ts +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/dashboard-report-grid/dashboard-report-grid.service.ts @@ -12,6 +12,6 @@ export class DashboardReportGridService { getReportList() : Observable<any> { - return this._http.get(environment.baseUrl + "raptor.htm?action=report.search.execute&r_page=0"); + return this._http.get(environment.baseUrl + "raptor.htm?action=report.search.execute&r_page=0&show_all=true"); } } diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.spec.ts index 762d780f..c5fe0a6c 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.spec.ts +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.spec.ts @@ -59,6 +59,7 @@ describe('PilotPageComponent', () => { it('should test first if condition in saveDefinitionInfo method',()=>{ component.IncomingReportId=-1; component.reportMode="Create"; + component.reportTitle='Report'; component.allowScheduler=true; component.sizedByContent = true; component.saveDefinitionInfo(); @@ -83,7 +84,7 @@ describe('PilotPageComponent', () => { expect(component.finalPostObj["dataContainerWidth"]).toEqual(component.widthContainer); expect(component.finalPostObj["runtimeColSortDisabled"]).toEqual(component.disableColumnSort); expect(component.finalPostObj["numFormCols"]).toEqual(component.runTimeFormNum); - expect(component.finalPostObj["reportTitle"]).toEqual(component.reportTitle); + expect(component.finalPostObj["reportTitle"]).toEqual('Report'); expect(component.finalPostObj["reportSubTitle"]).toEqual(component.reportSubTitle); expect(component.finalPostObj["oneTimeRec"]).toEqual(component.oneTime); expect(component.finalPostObj["hourlyRec"]).toEqual(component.hourly); @@ -103,6 +104,7 @@ describe('PilotPageComponent', () => { component.allowScheduler=true; component.sizedByContent = true; component.reportType="Dashboard"; + component.reportTitle='Report'; component.saveDefinitionInfo(); expect(component.finalPostObj["tabName"]).toEqual("Definition"); @@ -123,6 +125,7 @@ describe('PilotPageComponent', () => { component.IncomingReportId=1; component.reportMode="Edit"; component.reportType!="dashboard"; + component.reportTitle='Report'; component.saveDefinitionInfo(); expect(component.finalPostObj["reportTypeList"]).toEqual(null); expect(component.finalPostObj["dbInfo"]).toEqual(component.dataSrc); @@ -134,6 +137,7 @@ describe('PilotPageComponent', () => { component.IncomingReportId=1; component.reportMode="Edit"; component.showDialog=true; + component.reportTitle='Report'; let spy=spyOn(_definitionService,'portDefinitionPageDetails').and.returnValue(Observable.of('')) component.saveDefinitionInfo(); expect(spy).toHaveBeenCalled() diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.ts index ccd6dbcb..059c90b5 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.ts +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.ts @@ -385,7 +385,11 @@ export class DefinitionComponent implements OnInit, OnDestroy { ]; this.finalPostObj['runtimeColSortDisabled'] = this.disableColumnSort; this.finalPostObj['numFormCols'] = this.runTimeFormNum; - this.finalPostObj['reportTitle'] = this.reportTitle; + if (this.reportTitle.length > 0) { + this.finalPostObj['reportTitle'] = this.reportTitle; + } else { + this.finalPostObj['reportTitle'] = this.reportName; + } this.finalPostObj['reportSubTitle'] = this.reportSubTitle; this.finalPostObj['oneTimeRec'] = this.oneTime; this.finalPostObj['hourlyRec'] = this.hourly; @@ -397,6 +401,13 @@ export class DefinitionComponent implements OnInit, OnDestroy { this.finalPostObj['sizedByContent'] = (this.sizedByContent == true ? 'Y' : 'N'); this.finalPostObj['repDefType'] = this.reportDefinition; if (this.reportType === 'Dashboard') { + this.dashboardObj = this.dashboardObj.sort(function (a, b) { + if (a['x'] === b['x']) { + return a['y'] - b['y']; + } else { + return a['x'] - b['x']; + } + }); this.finalPostObj['dashboardLayoutJSON'] = JSON.stringify(this.dashboardObj); this.finalPostObj['dashboardLayoutHTML'] = this.dashboardLayoutHTML; } @@ -434,6 +445,13 @@ export class DefinitionComponent implements OnInit, OnDestroy { this.IncomingReportId = -1; } if (this.reportType === 'Dashboard') { + this.dashboardObj = this.dashboardObj.sort(function (a, b) { + if (a['x'] === b['x']) { + return a['y'] - b['y']; + } else { + return a['x'] - b['x']; + } + }); this.finalPostObj['dashboardLayoutJSON'] = JSON.stringify(this.dashboardObj); this.finalPostObj['dashboardLayoutHTML'] = this.dashboardLayoutHTML; } else { @@ -496,7 +514,11 @@ export class DefinitionComponent implements OnInit, OnDestroy { ]; this.finalPostObj['runtimeColSortDisabled'] = this.disableColumnSort; this.finalPostObj['numFormCols'] = this.runTimeFormNum; - this.finalPostObj['reportTitle'] = this.reportTitle; + if ( this.reportTitle.length > 0) { + this.finalPostObj['reportTitle'] = this.reportTitle; + } else { + this.finalPostObj['reportTitle'] = this.reportName;; + } this.finalPostObj['reportSubTitle'] = this.reportSubTitle; this.finalPostObj['oneTimeRec'] = this.oneTime; this.finalPostObj['hourlyRec'] = this.hourly; |