diff options
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics')
13 files changed, 234 insertions, 205 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/chart-wizard/chart-wizard.component.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/chart-wizard/chart-wizard.component.html index 1c0dc5a2..bc6bf83e 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/chart-wizard/chart-wizard.component.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/chart-wizard/chart-wizard.component.html @@ -51,6 +51,7 @@ <mat-form-field> <mat-label class="b2b-dro">Chart Type:</mat-label> <mat-select data-select-color="blue" [(ngModel)]="chartJson.chartType" aria-label="reportType" placeholder="Select chart Type"> + <mat-option value="none">--select--</mat-option> <mat-option value="BarChart3D" (onSelectionChange)="setBarChartOptions()">Bar Chart</mat-option> <mat-option value="TimeSeriesChart" (onSelectionChange)="setTimeSeriesChartOptions()">Time Series/Area Chart</mat-option> <mat-option value="PieChart">Pie Chart</mat-option> 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; diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report-form-fields/run-report-form-fields.component.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report-form-fields/run-report-form-fields.component.html index 60eb927f..fcfcf4d4 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report-form-fields/run-report-form-fields.component.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report-form-fields/run-report-form-fields.component.html @@ -21,12 +21,12 @@ <div *ngIf="!showformFiledSpinner" class="stdForm"> <div *ngIf="formFieldList" class="wrapper"> <div *ngFor="let item of formFieldList; let i = index;"> - <div *ngIf="item.fieldType == 'TEXT' && item.validationType !== 'DATE' && item.visible" + <div *ngIf="item.fieldType == 'TEXT' && item.validationType !== 'DATE'" class="fieldWidth"> <label class="labelWidth">{{item.fieldDisplayName}} :</label> <textarea placement="right" ngbTooltip="comma seperated" [ngModel]="formFieldListValueMap.get(item.fieldId)" (ngModelChange)="formFieldListValueMap.set(item.fieldId, $event)" [(ngModel)]="formFieldListValueArr[i]" class="defaultFontSizeTextArea" id="item.fieldId"></textarea> </div> - <div *ngIf="item.fieldType == 'LIST_BOX' && item.visible" class="fieldWidth"> + <div *ngIf="item.fieldType == 'LIST_BOX'" class="fieldWidth"> <label class="labelWidth" for="reportType">{{item.fieldDisplayName}} :</label> <select [ngModel]="formFieldListValueMap.get(item.fieldId)" (ngModelChange)="formFieldListValueMap.set(item.fieldId, $event)" class="browser-default custom-select defaultFontSize" required="required" @@ -35,7 +35,7 @@ class="defaultFontSize" value="{{listItem.id}}">{{listItem.name}}</option> </select> </div> - <div *ngIf="item.fieldType == 'LIST_MULTI_SELECT' && item.visible" class="fieldWidth"> + <div *ngIf="item.fieldType == 'LIST_MULTI_SELECT'" class="fieldWidth"> <label class="labelWidth" for="reportType">{{item.fieldDisplayName}} :</label> <mat-form-field> <mat-select [ngModel]="formFieldListValueMap.get(item.fieldId)" (ngModelChange)="formFieldListValueMap.set(item.fieldId, $event)" multiple> @@ -44,7 +44,7 @@ </mat-select> </mat-form-field> </div> - <div *ngIf="item.validationType == 'DATE' && item.visible" class="fieldWidth"> + <div *ngIf="item.validationType == 'DATE'" class="fieldWidth"> <label class="labelWidth" for="reportType">{{item.fieldDisplayName}} :</label> <mat-form-field><input [ngModel]="formFieldListValueMap.get(item.fieldId)" (ngModelChange)="formFieldListValueMap.set(item.fieldId, $event)" [matDatepicker]="picker" @@ -71,11 +71,11 @@ <div *ngIf="formFieldList" class="wrapper"> <div *ngFor="let item of toggleFormFieldRenderArr; let i = index;"> - <div *ngIf="item.fieldType == 'TEXT' && item.validationType !== 'DATE' && item.visible" class="fieldWidth"> + <div *ngIf="item.fieldType == 'TEXT' && item.validationType !== 'DATE'" class="fieldWidth"> <label class="labelWidth">{{item.fieldDisplayName}} :</label><textarea placement="right" ngbTooltip="comma seperated" [ngModel]="formFieldListValueMap.get(item.fieldId)" (ngModelChange)="formFieldListValueMap.set(item.fieldId, $event)" class="defaultFontSizeTextArea" id="item.fieldId"></textarea> </div> - <div *ngIf="item.fieldType == 'LIST_BOX' && item.visible" class="fieldWidth"> + <div *ngIf="item.fieldType == 'LIST_BOX'" class="fieldWidth"> <label class="labelWidth" for="reportType">{{item.fieldDisplayName}} :</label> <select [ngModel]="formFieldListValueMap.get(item.fieldId)" (ngModelChange)="formFieldListValueMap.set(item.fieldId, $event)" class="browser-default custom-select defaultFontSize" required="required" @@ -85,7 +85,7 @@ </select> </div> - <div *ngIf="item.fieldType == 'LIST_MULTI_SELECT' && item.visible" class="fieldWidth"> + <div *ngIf="item.fieldType == 'LIST_MULTI_SELECT'" class="fieldWidth"> <label class="labelWidth" for="reportType">{{item.fieldDisplayName}} :</label> <mat-form-field> <mat-select [ngModel]="formFieldListValueMap.get(item.fieldId)" (ngModelChange)="formFieldListValueMap.set(item.fieldId, $event)" @@ -97,7 +97,7 @@ <br/> </div> - <div *ngIf="item.validationType == 'DATE' && item.visible" class="fieldWidth"> + <div *ngIf="item.validationType == 'DATE'" class="fieldWidth"> <label class="labelWidth" for="reportType">{{item.fieldDisplayName}} :</label> <mat-form-field><input [ngModel]="formFieldListValueMap.get(item.fieldId)" (ngModelChange)="formFieldListValueMap.set(item.fieldId, $event)" [matDatepicker]="picker" class="defaultFontSize" @@ -146,7 +146,7 @@ <app-run-report [DashboardReportObj]="DashboardReportObj" [TriggerFFArr]="triggerFormFieldArr" [hitCnt]="hitCnt" [queryString]="getQueryString()" - [reportId]="reportId" [reportMode]="reportMode" [runAgain]="runReportAgain" [groupSelectValue]="groupSelectValue" ></app-run-report> + [reportId]="reportId" [reportMode]="reportMode" [runAgain]="runReportAgain" [groupSelectValue]="groupSelectValue" [chartType]="chartType" ></app-run-report> </div> <div *ngIf="error == true"> @@ -156,4 +156,4 @@ <h1>Stack Trace:</h1> <p>{{stackTrace}}</p> -</div>
\ No newline at end of file +</div> diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report-form-fields/run-report-form-fields.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report-form-fields/run-report-form-fields.component.ts index d4baba66..c0856b44 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report-form-fields/run-report-form-fields.component.ts +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report-form-fields/run-report-form-fields.component.ts @@ -60,6 +60,7 @@ export class RunReportFormFieldsComponent implements OnInit, OnDestroy { commonFormFields: any[]; formFieldListValueMap: any; saveFormFieldListValueMap: any; + chartType = ''; constructor(private _runService: RunService, private _route: ActivatedRoute, private _router: Router) { this.formFieldListValueArr = []; @@ -79,6 +80,7 @@ export class RunReportFormFieldsComponent implements OnInit, OnDestroy { this.commonFormFields = []; this.formFieldListValueMap = new Map<any, any>(); this.saveFormFieldListValueMap = new Map<any, any>(); + this.chartType = ''; } ngOnDestroy(): void { @@ -126,6 +128,7 @@ export class RunReportFormFieldsComponent implements OnInit, OnDestroy { this.commonFormFields = []; this.formFieldListValueMap = new Map<any, any>(); this.saveFormFieldListValueMap = new Map<any, any>(); + this.chartType = ''; } ngOnInit() { @@ -165,6 +168,7 @@ export class RunReportFormFieldsComponent implements OnInit, OnDestroy { .subscribe((responseDefPage) => { this.reportName = responseDefPage['reportName']; this.reportSubTitle = responseDefPage['reportSubTitle']; + this.chartType = responseDefPage['chartType']; if (responseDefPage['reportType'] !== 'Dashboard') { if (this.calledWithFormFields == false) { this._runService.getReportData(this.reportId) @@ -733,7 +737,7 @@ export class RunReportFormFieldsComponent implements OnInit, OnDestroy { } editReport(reportId: string) { - this._router.navigate(['v2/reports', 'Edit', reportId]); + this._router.navigate(['v2/app/reports', 'Edit', reportId]); } showLabelFn() { @@ -762,8 +766,8 @@ export class RunReportFormFieldsComponent implements OnInit, OnDestroy { localStorage.clear(); localStorage.setItem('id', myItem); if (this.formFieldGroupObjList != null) { - this._router.navigateByUrl('v2/refresh', {skipLocationChange: true}).then(() => - this._router.navigate(['v2/run', this.reportId])); + this._router.navigateByUrl('v2/app/refresh', {skipLocationChange: true}).then(() => + this._router.navigate(['v2/app/run', this.reportId])); } else { this.avoidDoCheck = true; this.formFieldListValueMap = new Map<any, any>(); @@ -785,7 +789,9 @@ export class RunReportFormFieldsComponent implements OnInit, OnDestroy { for (let ffGrpValue = 0; ffGrpValue < formFieldGroupObjItem['formFieldList'].length; ffGrpValue++) { this.finalQueryParamsObj[formFieldGroupObjItem['formFieldList'][ffGrpValue]['fieldId']] = '-1'; this.formFieldListValueMap.delete(formFieldGroupObjItem['formFieldList'][ffGrpValue]['fieldId']); + this.triggerFormFieldArr= []; } + } } } diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-dashboard-report/run-dashboard-report.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-dashboard-report/run-dashboard-report.component.ts index 3a38eba4..ccf6212a 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-dashboard-report/run-dashboard-report.component.ts +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-dashboard-report/run-dashboard-report.component.ts @@ -9,9 +9,6 @@ import { environment } from '../../../../../../../../environments/environment'; import { DisplayHtml } from '../../../display-html'; import { RunService } from '../../run.service'; import {FormControl} from '@angular/forms'; - - - export interface PeriodicElement { } @@ -118,8 +115,8 @@ saveResponseObj:any; this.postFetchingReportDataFn(JSON.parse(localStorage.getItem(this.inputReportId))); localStorage.removeItem(this.inputReportId); } else { - this._dashboardReportService.getReportDataWithFormFields(this.queryString, this.inputReportId) - .subscribe((response) => { + this._dashboardReportService.getReportDataWithFormFields(this.queryString, this.inputReportId) + .subscribe((response) => { this.postFetchingReportDataFn(response); }); } @@ -128,79 +125,79 @@ saveResponseObj:any; postFetchingReportDataFn(response: any){ this.saveResponseObj = response; - this.formFieldPresent = false; - this.responseFormFieldListLength = 0; - this.reportName = response['reportName']; - let columnCntr = 0; - while (response['reportDataColumns'][columnCntr]) { - this.displayedColumnsArr.push(response['reportDataColumns'][columnCntr]['columnTitle'] + ',' - + response['reportDataColumns'][columnCntr]['colId']); - columnCntr++; - } - let totalCnt = 0; - while (response['reportTotalDataRows'][totalCnt]) { - this.displayTotal.push(response['reportTotalDataRows'][totalCnt]); - totalCnt++; - } - let rdr_cntr = 0; - while (response['reportDataRows'][rdr_cntr]) { - let dca_cntr = 0; - const obj = {}; - const reportDataRows = response['reportDataRows'][rdr_cntr]; - while (this.displayedColumnsArr[dca_cntr]) { - const rowColumnId = this.displayedColumnsArr[dca_cntr].split(',')[1]; - if (reportDataRows[rowColumnId]) { - let drillDownHtml = ''; - let displayValue = ''; - drillDownHtml = reportDataRows[rowColumnId]['drillDownURL']; - displayValue = reportDataRows[rowColumnId]['displayValue']; - if (drillDownHtml !== null && - drillDownHtml.length > 0 && - !displayValue.includes('linkToReport')) { - const value = this.convertToLinkToReport(drillDownHtml); - if (value.length > 0) { - this.replaceDisplayValue = value + ',' + - reportDataRows[rowColumnId]['displayValue']; - } else { - this.replaceDisplayValue = reportDataRows[rowColumnId]['displayValue']; - } - } else { - this.replaceDisplayValue = reportDataRows[rowColumnId]['displayValue']; - } - let displayObj: DisplayHtml = new class implements DisplayHtml { - 'background-color': string; - 'font-family': string; - 'font-size': string; - 'font-style': string; - 'font-weight': string; - 'text-align': string; - 'text-decoration': string; - color: string; - }; - if (reportDataRows[rowColumnId]['displayValueHtml'].includes('{')) { - displayObj = JSON.parse(reportDataRows[rowColumnId]['displayValueHtml']); - } - displayObj['text-align'] = reportDataRows[rowColumnId]['alignment']; - if (this.replaceDisplayValue.includes('linkToReport') || this.replaceDisplayValue.includes('linkToFeedback') || this.replaceDisplayValue.includes('linkToMail')) { - obj[reportDataRows[rowColumnId]['colId']] = this.replaceDisplayValue.split(',').join('|') - + '|' + JSON.stringify(displayObj); - } else { - obj[reportDataRows[rowColumnId]['colId']] = this.replaceDisplayValue - + '|' + JSON.stringify(displayObj); - } - } - dca_cntr++; + this.formFieldPresent = false; + this.responseFormFieldListLength = 0; + this.reportName = response['reportName']; + let columnCntr = 0; + while (response['reportDataColumns'][columnCntr]) { + this.displayedColumnsArr.push(response['reportDataColumns'][columnCntr]['columnTitle'] + ',' + + response['reportDataColumns'][columnCntr]['colId']); + columnCntr++; + } + let totalCnt = 0; + while (response['reportTotalDataRows'][totalCnt]) { + this.displayTotal.push(response['reportTotalDataRows'][totalCnt]); + totalCnt++; + } + let rdr_cntr = 0; + while (response['reportDataRows'][rdr_cntr]) { + let dca_cntr = 0; + const obj = {}; + const reportDataRows = response['reportDataRows'][rdr_cntr]; + while (this.displayedColumnsArr[dca_cntr]) { + const rowColumnId = this.displayedColumnsArr[dca_cntr].split(',')[1]; + if (reportDataRows[rowColumnId]) { + let drillDownHtml = ''; + let displayValue = ''; + drillDownHtml = reportDataRows[rowColumnId]['drillDownURL']; + displayValue = reportDataRows[rowColumnId]['displayValue']; + if (drillDownHtml !== null && + drillDownHtml.length > 0 && + !displayValue.includes('linkToReport')) { + const value = this.convertToLinkToReport(drillDownHtml); + if (value.length > 0) { + this.replaceDisplayValue = value + ',' + + reportDataRows[rowColumnId]['displayValue']; + } else { + this.replaceDisplayValue = reportDataRows[rowColumnId]['displayValue']; } - this.displayedRowObj.push(obj); - rdr_cntr++; + } else { + this.replaceDisplayValue = reportDataRows[rowColumnId]['displayValue']; } - for (let pushCounter = 0; pushCounter < this.displayedColumnsArr.length; pushCounter++) { - this.displayedColumns.push(this.displayedColumnsArr[pushCounter].split(',')[1]); + let displayObj: DisplayHtml = new class implements DisplayHtml { + 'background-color': string; + 'font-family': string; + 'font-size': string; + 'font-style': string; + 'font-weight': string; + 'text-align': string; + 'text-decoration': string; + color: string; + }; + if (reportDataRows[rowColumnId]['displayValueHtml'].includes('{')) { + displayObj = JSON.parse(reportDataRows[rowColumnId]['displayValueHtml']); } - this.showSpinner = false; - this.dataSource = new MatTableDataSource<PeriodicElement>(this.displayedRowObj); - this.dataSource.sort = this.sort; - this.dataSource.paginator = this.paginator; + displayObj['text-align'] = reportDataRows[rowColumnId]['alignment']; + if (this.replaceDisplayValue.includes('linkToReport') || this.replaceDisplayValue.includes('linkToFeedback') || this.replaceDisplayValue.includes('linkToMail')) { + obj[reportDataRows[rowColumnId]['colId']] = this.replaceDisplayValue.split(',').join('|') + + '|' + JSON.stringify(displayObj); + } else { + obj[reportDataRows[rowColumnId]['colId']] = this.replaceDisplayValue + + '|' + JSON.stringify(displayObj); + } + } + dca_cntr++; + } + this.displayedRowObj.push(obj); + rdr_cntr++; + } + for (let pushCounter = 0; pushCounter < this.displayedColumnsArr.length; pushCounter++) { + this.displayedColumns.push(this.displayedColumnsArr[pushCounter].split(',')[1]); + } + this.showSpinner = false; + this.dataSource = new MatTableDataSource<PeriodicElement>(this.displayedRowObj); + this.dataSource.sort = this.sort; + this.dataSource.paginator = this.paginator; } linkToReport(reportID: string, queryParameters: string) { @@ -212,11 +209,11 @@ saveResponseObj:any; length++; sessionStorage.setItem(length.toString(), this.parentId + '|' + this.queryString); } - this._router.navigate(['v2/run', reportID, queryParameters]); + this._router.navigate(['v2/app/run', reportID, queryParameters]); } linkToFeedback(feedBackId: string, queryParameters: string) { - this._router.navigate(['v2/feedback', feedBackId]); + this._router.navigate(['v2/app/feedback', feedBackId]); } linkToMail(mailId: string) { @@ -274,4 +271,5 @@ saveResponseObj:any; return outPut; } + } diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-report.component.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-report.component.html index 69de20bf..16c15710 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-report.component.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-report.component.html @@ -3,7 +3,7 @@ <div *ngIf="showDashboardReport"> <span *ngIf="download_in_progress" class="ecomp-small-spinner"></span> Download: - <a [routerLink]=""><img class="downloadImg" (click)="downloadReport('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xlsx')" + <a [routerLink]=""><img class="downloadImg" (click)="downloadReport('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xlsx')" placement="top" ngbTooltip="Download Dashboard Report" src="assets/images/xlsx.png"></a> @@ -33,10 +33,10 @@ </div> <span *ngIf="download_in_progress" class="ecomp-small-spinner"></span> <div *ngIf="!showDashboardReport"> - <div *ngIf="error == false && showChart" [hidden]="isChartAvailable == false" align="center"> + <div *ngIf="error == false" [hidden]="isChartAvailable == false" align="center"> <iframe #iframe height="500" style="border: none" width="70%"></iframe> </div> - + <div> <div class="field-group"> @@ -65,19 +65,18 @@ <ng-container matColumnDef="{{keys}}"> <th *matHeaderCellDef align="center" mat-header-cell mat-sort-header> {{displayedColumnsArr[i].split(",")[0]}}</th> - <td *matCellDef="let row" mat-cell> - <div *ngIf="row[keys].split('|')[0] == 'linkToReport'" - [ngStyle]="setStyle(row[keys].split('|')[4])"> + <td *matCellDef="let row" mat-cell [ngStyle]="setStyle(row[keys])"> + <div *ngIf="row[keys].split('|')[0] == 'linkToReport'"> <a (click)="linkToReport(row[keys].split('|')[1], row[keys].split('|')[2])" [routerLink]="">{{row[keys].split('|')[3]}}</a> </div> <div *ngIf="row[keys].split('|')[0] == 'linkToFeedback'" - [ngStyle]="setStyle(row[keys].split('|')[4])"> + > <a (click)="linkToFeedback(row[keys].split('|')[1], row[keys].split('|')[2])" [routerLink]="">{{row[keys].split('|')[3]}}</a> </div> <div *ngIf="row[keys].split('|')[0] == 'linkToMail'" - [ngStyle]="setStyle(row[keys].split('|')[3])"> + > <a (click)="linkToMail(row[keys].split('|')[1])" [routerLink]="">{{row[keys].split('|')[2]}}</a> </div> @@ -141,4 +140,3 @@ } </style> - diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-report.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-report.component.spec.ts index da718262..e1476421 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-report.component.spec.ts +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-report.component.spec.ts @@ -121,10 +121,6 @@ describe('RunReportComponent', () => { component.linkToReport("test", "abc"); }) - it('should test linkToFeedback', () => { - component.linkToFeedback("test", "abc"); - }) - it('should test linkToMail', () => { component.linkToMail("test"); }) diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-report.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-report.component.ts index 7e0ac549..7f1e8331 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-report.component.ts +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-report.component.ts @@ -1,28 +1,28 @@ import { AfterViewInit, + ChangeDetectionStrategy, + ChangeDetectorRef, Component, - OnInit, - ViewChild, + ElementRef, Input, - SimpleChange, + OnInit, SimpleChanges, - ChangeDetectorRef, - Inject, - ElementRef + ViewChild } from '@angular/core'; -import {MatPaginator} from '@angular/material/paginator'; -import {MatSort} from '@angular/material/sort'; -import {MatTable, MatTableDataSource} from '@angular/material/table'; -import {ActivatedRoute, Router} from '@angular/router'; -import {HttpClient} from '@angular/common/http'; -import {environment} from '../../../../../../../environments/environment'; -import {RunService} from '../run.service'; -import {GridsterConfig, GridsterItem, GridType} from 'angular-gridster2'; -import {Observable} from 'rxjs'; -import {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser'; -import {displayGrids} from 'angular-gridster2/lib/gridsterConfig.interface'; -import {DisplayHtml} from '../../display-html'; -import {FormControl} from '@angular/forms'; +import { MatPaginator } from '@angular/material/paginator'; +import { MatSort } from '@angular/material/sort'; +import { MatTableDataSource } from '@angular/material/table'; +import { ActivatedRoute, Router } from '@angular/router'; +import { HttpClient } from '@angular/common/http'; +import { environment } from '../../../../../../../environments/environment'; +import { RunService } from '../run.service'; +import { GridsterConfig, GridsterItem, GridType } from 'angular-gridster2'; +import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser'; +import { DisplayHtml } from '../../display-html'; +import { FormControl } from '@angular/forms'; +import { HeaderService } from 'src/app/shared/services/header/header.service'; +import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; +import { ConfirmationModalComponent } from 'src/app/modals/confirmation-modal/confirmation-modal.component'; export interface PeriodicElement { @@ -33,7 +33,8 @@ const ELEMENT_DATA: PeriodicElement[] = [{}]; @Component({ selector: 'app-run-report', templateUrl: './run-report.component.html', - styleUrls: ['./run-report.component.css'] + styleUrls: ['./run-report.component.css'], + changeDetection: ChangeDetectionStrategy.OnPush }) export class RunReportComponent implements OnInit, AfterViewInit { @Input('reportId') inputReportId: string; @@ -44,9 +45,10 @@ export class RunReportComponent implements OnInit, AfterViewInit { @Input('hitCnt') hitCnt: number; @Input('runAgain') runAgain: string; @Input('groupSelectValue') groupSelectValue: string; + @Input('chartType') chartType: string; @ViewChild('iframe') iframe: ElementRef; - @ViewChild(MatPaginator, {static: false} as any) paginator: MatPaginator; - @ViewChild(MatSort, {static: false} as any) sort: MatSort; + @ViewChild(MatPaginator, { static: false } as any) paginator: MatPaginator; + @ViewChild(MatSort, { static: false } as any) sort: MatSort; dataSource = new MatTableDataSource<PeriodicElement>(ELEMENT_DATA); displayedColumns: string[]; IncomingReportId: string; @@ -90,7 +92,6 @@ export class RunReportComponent implements OnInit, AfterViewInit { timeTaken = '...'; saveResponseObj: any; showBackButton = false; - showChart: boolean = false; constructor(private _http: HttpClient, private _route: ActivatedRoute, @@ -219,7 +220,7 @@ export class RunReportComponent implements OnInit, AfterViewInit { pushItems: true, disablePushOnDrag: false, disablePushOnResize: false, - pushDirections: {north: true, east: true, south: true, west: true}, + pushDirections: { north: true, east: true, south: true, west: true }, pushResizeItems: true, disableWindowResize: true, disableWarnings: false, @@ -245,7 +246,6 @@ export class RunReportComponent implements OnInit, AfterViewInit { this.hitCnt = this.runButtonHitCnt; this.initialQueryString = this.queryString; this.initCounter++; - } ngAfterViewInit() { @@ -310,22 +310,22 @@ export class RunReportComponent implements OnInit, AfterViewInit { this.showMoreVert = true; localStorage.removeItem(this.inputReportId); } else { - this._runService.getReportDataWithFormFields(this.queryString, this.inputReportId) - .subscribe((response) => { - if (response['errormessage']) { - this.showError(response); - } else { - this.chartRunUrl = environment.baseUrl + 'raptor.htm?action=chart.run&c_master=' + - this.inputReportId + this.queryString + '&refresh=Y&display_content=Y&r_page=0'; + this._runService.getReportDataWithFormFields(this.queryString, this.inputReportId) + .subscribe((response) => { + if (response['errormessage']) { + this.showError(response); + } else { + this.chartRunUrl = environment.baseUrl + 'raptor.htm?action=chart.run&c_master=' + + this.inputReportId + this.queryString + '&refresh=Y&display_content=Y&r_page=0'; this.saveResponseObj = response; - this.postFetchingReportDataFn(response, false); - const endDate: Date = new Date(); - const endTime = endDate.getTime(); - this.timeTaken = ((endTime - startTime) / 1000).toString(); - this.showMoreVert = true; - } - }); - } + this.postFetchingReportDataFn(response, false); + const endDate: Date = new Date(); + const endTime = endDate.getTime(); + this.timeTaken = ((endTime - startTime) / 1000).toString(); + this.showMoreVert = true; + } + }); + } } } else { this.showMoreVert = true; @@ -360,11 +360,9 @@ export class RunReportComponent implements OnInit, AfterViewInit { rdc_cntr++; } - if (response['chartWizardAvailable'] === true) { + if (response['chartWizardAvailable'] === true && this.chartType !== 'none') { this.isChartAvailable = true; - if(this.iframe){ - this.iframe.nativeElement.setAttribute('src', this.chartRunUrl); - } + this.iframe.nativeElement.setAttribute('src', this.chartRunUrl); } let totalCnt = 0; @@ -440,9 +438,6 @@ export class RunReportComponent implements OnInit, AfterViewInit { } this.dataSource.data = this.displayedRowObj; this.dataSource.sort = this.sort; - if(this.totalRecords >0){ - this.showChart = true; - } } @@ -455,13 +450,10 @@ export class RunReportComponent implements OnInit, AfterViewInit { length++; sessionStorage.setItem(length.toString(), this.inputReportId + '|' + this.queryString); } - this._router.navigate(['v2/run', reportID, queryParameters]); + this._router.navigate(['v2/app/run', reportID, queryParameters]); } - linkToFeedback(feedBackId: string, queryParameters: string) { - this._router.navigate(['v2/feedback', feedBackId]); - } linkToMail(mailId: string) { const email = 'mailto:' + mailId; @@ -509,13 +501,19 @@ export class RunReportComponent implements OnInit, AfterViewInit { } downLoadFile(data: any, type: string, extension: string, reportType: string) { - const blob = new Blob([data], {type: type}); - const dt = new Date(); - const utcDate = dt.getTime(); - let fileName = this.reportName + utcDate + '.' + extension; + const blob = new Blob([data], { type: type }); + const date = new Date(); + const dateStr = + ('00' + (date.getMonth() + 1)).slice(-2) + + ('00' + date.getDate()).slice(-2) + + date.getFullYear() + + ('00' + date.getHours()).slice(-2) + + ('00' + date.getMinutes()).slice(-2) + + ('00' + date.getMilliseconds()); + let fileName = this.reportName + dateStr + '.' + extension; if (reportType === 'Dashboard') { fileName = ''; - fileName = reportType + '-' + this.inputReportId + '.' + extension; + fileName = reportType + '_' + this.inputReportId + '_' + dateStr + '.' + extension; } if (window.navigator.msSaveOrOpenBlob) { window.navigator.msSaveBlob(blob, fileName); @@ -539,7 +537,15 @@ export class RunReportComponent implements OnInit, AfterViewInit { } } - setStyle(styles: string) { + setStyle(rowData: string) { + let styles = ''; + if (rowData.split('|')[0] === 'linkToReport') { + styles = rowData.split('|')[4]; + } else if (rowData.split('|')[0] === 'linkToMail') { + styles = rowData.split('|')[3]; + } else { + styles = rowData.split('|')[1]; + } if (styles.includes('{')) { return JSON.parse(styles); } else { @@ -547,6 +553,8 @@ export class RunReportComponent implements OnInit, AfterViewInit { } } + + getDisplayTotal(keys: string) { if (this.displayTotal.length > 0) { return this.displayTotal[0][keys].displayValue; @@ -633,7 +641,6 @@ export class RunReportComponent implements OnInit, AfterViewInit { } } const split = value.split('&'); - // const spltFirst = split[0].split('='); if (split[1].length <= 0) { return outPut; } @@ -651,10 +658,8 @@ export class RunReportComponent implements OnInit, AfterViewInit { return outPut; } - - takeToReport(queryString: string, reportID: string) { - this._router.navigate(['v2/run', reportID, queryString , this.groupSelectValue]); + this._router.navigate(['v2/app/run', reportID, queryString, this.groupSelectValue]); } goBack() { @@ -675,8 +680,7 @@ export class RunReportComponent implements OnInit, AfterViewInit { sessionStorage.removeItem('1'); } localStorage.removeItem(this.inputReportId); - this._router.navigate(['v2/run', repId, queryString]); + this._router.navigate(['v2/app/run', repId, queryString]); } } - diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run.component.ts index 46d7af7e..3d339b70 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run.component.ts +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run.component.ts @@ -38,14 +38,14 @@ export class RunComponent implements OnInit { runReport() { this.toggle = true; - + this._route.params.subscribe(params => { - + this.IncomingReportId = params["reportId"]; this.reportId1 = params["reportId"]; }); - this.router.navigate(['v2/run', this.reportId1]); + this.router.navigate(['v2/app/run', this.reportId1]); } diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/security/security.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/security/security.component.ts index 6c994723..b7e14bc6 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/security/security.component.ts +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/security/security.component.ts @@ -71,7 +71,7 @@ export class SecurityComponent implements OnInit { .subscribe((responseSecurityInfo) => { this.reportSecurityInfo = responseSecurityInfo; - //console.log(this.reportSecurityInfo); + console.log(this.reportSecurityInfo); this.reportOwnerId = this.reportSecurityInfo["ownerId"]; @@ -107,7 +107,7 @@ export class SecurityComponent implements OnInit { .subscribe((responseUserList) => { this.reportUserList = responseUserList; - //console.log(this.reportUserList); + console.log(this.reportUserList); for(let ru=0; ru<this.reportUserList.length; ru++) { @@ -132,7 +132,7 @@ export class SecurityComponent implements OnInit { .subscribe((responseSecurityRoles) => { this.reportSecurityRoles = responseSecurityRoles; - //console.log(this.reportSecurityRoles); + console.log(this.reportSecurityRoles); for(let sr=0; sr<this.reportSecurityRoles.length; sr++) { @@ -145,13 +145,13 @@ export class SecurityComponent implements OnInit { this.addRoleEditAccessArr[sr] = true; } } - //console.log(this.reportSecurityRoles); + console.log(this.reportSecurityRoles); this._securityService.getReportRoleList() .subscribe((responseRoleList) => { this.reportRoleList = responseRoleList; - //console.log(this.reportRoleList); + console.log(this.reportRoleList); for(let m=0; m<this.reportSecurityRoles.length; m++) { @@ -194,7 +194,7 @@ export class SecurityComponent implements OnInit { } } - //console.log(reportUserId); + console.log(reportUserId); this._securityService.addReportUser(reportUserId) .subscribe((responseAddUser) => { @@ -204,7 +204,7 @@ export class SecurityComponent implements OnInit { .subscribe((responseUserList) => { this.reportUserList = responseUserList; - //console.log(this.reportUserList); + console.log(this.reportUserList); this.showUserListSpinner = false; }); @@ -227,7 +227,7 @@ export class SecurityComponent implements OnInit { } } - //console.log(reportUserId); + console.log(reportUserId); this._securityService.removeReportUser(reportUserId) .subscribe((responseRemoveUser) => { @@ -237,7 +237,7 @@ export class SecurityComponent implements OnInit { .subscribe((responseUserList) => { this.reportUserList = responseUserList; - //console.log(this.reportUserList); + console.log(this.reportUserList); this.showUserListSpinner = false; }); @@ -248,8 +248,8 @@ export class SecurityComponent implements OnInit { addUserEditAccess(reportUserId : string, reportUserIndex : number) { - //console.log(reportUserId, reportUserIndex); - //console.log(this.userEditAccessArr); + console.log(reportUserId, reportUserIndex); + console.log(this.userEditAccessArr); let readOnly=""; if(this.userEditAccessArr[reportUserIndex] === true) @@ -273,7 +273,7 @@ export class SecurityComponent implements OnInit { let roleId; this.showRoleListSpinner = true; - //console.log(this.reportRoleList); + console.log(this.reportRoleList); for(let ro=0; ro<this.reportRoleList.length; ro++) { @@ -283,7 +283,7 @@ export class SecurityComponent implements OnInit { } } - //console.log(roleId); + console.log(roleId); this._securityService.addReportRole(roleId) .subscribe((addRoleResponse) => { @@ -292,13 +292,13 @@ export class SecurityComponent implements OnInit { .subscribe((responseSecurityRoles) => { this.reportSecurityRoles = responseSecurityRoles; - //console.log(this.reportSecurityRoles); + console.log(this.reportSecurityRoles); this._securityService.getReportRoleList() .subscribe((responseRoleList) => { this.reportRoleList = responseRoleList; - //console.log(this.reportRoleList); + console.log(this.reportRoleList); for(let m=0; m<this.reportSecurityRoles.length; m++) { @@ -338,13 +338,13 @@ export class SecurityComponent implements OnInit { .subscribe((responseSecurityRoles) => { this.reportSecurityRoles = responseSecurityRoles; - //console.log(this.reportSecurityRoles); + console.log(this.reportSecurityRoles); this._securityService.getReportRoleList() .subscribe((responseRoleList) => { this.reportRoleList = responseRoleList; - //console.log(this.reportRoleList); + console.log(this.reportRoleList); for(let m=0; m<this.reportSecurityRoles.length; m++) { @@ -366,7 +366,7 @@ export class SecurityComponent implements OnInit { addRoleEditAccess(roleId : string, roleIndex : number) { - //console.log(this.addRoleEditAccessArr); + console.log(this.addRoleEditAccessArr); let readOnly = ""; if(this.addRoleEditAccessArr[roleIndex] === true) @@ -391,7 +391,7 @@ export class SecurityComponent implements OnInit { this.fetchCnt = 0; let finalPostObj = new Object(); - // //console.log(this.reportOwnerList); + // console.log(this.reportOwnerList); for(let kl=0; kl<this.reportOwnerList.length; kl++) { if(this.reportOwnerList[kl]["name"] == this.reportOwner) @@ -408,7 +408,7 @@ export class SecurityComponent implements OnInit { { finalPostObj["isPublic"] = "false"; } - //console.log(finalPostObj); + // console.log(finalPostObj); this._securityService.saveSecurityTabInfo(finalPostObj) .subscribe((responseFinalPost) => { @@ -420,13 +420,13 @@ export class SecurityComponent implements OnInit { .subscribe((responseOwnerList) => { this.reportOwnerList = responseOwnerList; - //console.log(this.reportOwnerList); + console.log(this.reportOwnerList); this._securityService.getReportSecurityInfo() .subscribe((responseSecurityInfo) => { this.reportSecurityInfo = responseSecurityInfo; - //console.log(this.reportSecurityInfo); + console.log(this.reportSecurityInfo); this.reportOwnerId = this.reportSecurityInfo["ownerId"]; @@ -462,7 +462,7 @@ export class SecurityComponent implements OnInit { .subscribe((responseUserList) => { this.reportUserList = responseUserList; - //console.log(this.reportUserList); + console.log(this.reportUserList); for(let ru=0; ru<this.reportUserList.length; ru++) { @@ -487,7 +487,7 @@ export class SecurityComponent implements OnInit { .subscribe((responseSecurityRoles) => { this.reportSecurityRoles = responseSecurityRoles; - //console.log(this.reportSecurityRoles); + console.log(this.reportSecurityRoles); for(let sr=0; sr<this.reportSecurityRoles.length; sr++) { @@ -500,13 +500,13 @@ export class SecurityComponent implements OnInit { this.addRoleEditAccessArr[sr] = true; } } - //console.log(this.reportSecurityRoles); + console.log(this.reportSecurityRoles); this._securityService.getReportRoleList() .subscribe((responseRoleList) => { this.reportRoleList = responseRoleList; - //console.log(this.reportRoleList); + console.log(this.reportRoleList); for(let m=0; m<this.reportSecurityRoles.length; m++) { diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql.component.ts index 897aa03e..c1559c75 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql.component.ts +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql.component.ts @@ -136,7 +136,7 @@ export class SQLComponent implements OnInit { } else { this._http.get(environment.baseUrl + 'report/wizard/retrieve_def_tab_wise_data/InSession') .subscribe((response) => { - // console.log(response); + console.log(response); this._router.navigate(['v2/reports', 'Edit', response['reportId']]); }); } diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.component.ts index 1c2d443e..dfb485e1 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.component.ts +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.component.ts @@ -42,7 +42,7 @@ export class ReportListComponent implements AfterViewInit, OnInit { this.delete = false; this.initializeReportList(); } - + initializeReportList() { this.showSpinner = true; this.dataSource = new AllReportsDataSource(); @@ -148,12 +148,12 @@ export class ReportListComponent implements AfterViewInit, OnInit { displayReport( reportId: string ) { this.reportId = reportId; - this._router.navigate( ["v2/reports", "Edit", reportId] ); + this._router.navigate( ["v2/app/reports", "Edit", reportId] ); } runReport( reportId: string ) { this.reportId = reportId; - this._router.navigate( ['v2/run', reportId] ); + this._router.navigate( ['v2/app/run', reportId] ); } applyFilter( filterValue: string ) { @@ -182,15 +182,15 @@ export class ReportListComponent implements AfterViewInit, OnInit { this.showDialog = !this.showDialog; this.closable = false; } - + openReportSchedule( reportId: string ) { - this._router.navigate( ['v2/schedule_report', reportId] ); + this._router.navigate( ['v2/app/schedule_report', reportId] ); } copydisplayReport(reportId : string) { this.reportId = reportId; - this._router.navigate(["v2/reports", "Copy",reportId]); + this._router.navigate(["v2/app/reports", "Copy",reportId]); } } |