summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.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/definition/definition.component.ts')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.ts26
1 files changed, 24 insertions, 2 deletions
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;