summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition
diff options
context:
space:
mode:
authorSudarshan Kumar <sudarshan.kumar@att.com>2020-07-20 13:42:49 +0530
committerSudarshan Kumar <sudarshan.kumar@att.com>2020-07-20 23:54:00 +0530
commit05af2c42b57d71d375ba2e50fd10a3fd682ea226 (patch)
tree54b1d6ec489f7a5d037a1b52b504ec3804ed8260 /ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition
parent5b557b51c6e41315ad48727340df8d3247154330 (diff)
Integrated UI lazy loading and Raptor update
Integrated UI lazy loading and Raptor update Issue-ID: PORTAL-902 Change-Id: I0cf9f22a57c2be4e5b83981bdf0984768a5f44a6 Signed-off-by: Sudarshan Kumar <sudarshan.kumar@att.com>
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.spec.ts6
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.component.ts26
2 files changed, 29 insertions, 3 deletions
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;