summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp
diff options
context:
space:
mode:
authorjz385p <jz385p@us.att.com>2020-07-03 18:18:28 +0530
committerJegadeesh Babu <jegadeesh.babu@att.com>2020-07-07 14:17:17 +0000
commitf8d4c458a54063cf5695ce97f9decafa4bf2f35e (patch)
tree267d0c6bbd6bcb9c3bba0df379be259964622ff2 /ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp
parent5aa5ee5ba06bc361fe078274d8dea05d408ab706 (diff)
Added new component for SDK report
Added display area report Issue-ID: PORTAL-940 Change-Id: Ie8a176d21e09757baa454f0da380c34fd5128ccf Signed-off-by: jz385p <jegadeesh.babu@att.com>
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/display-area/display-area.component.html14
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/display-area/display-area.component.scss10
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/display-area/display-area.component.spec.ts26
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/display-area/display-area.component.ts65
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/pages.module.ts2
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/services/displayArea/display-area.service.spec.ts13
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/services/displayArea/display-area.service.ts16
7 files changed, 146 insertions, 0 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/display-area/display-area.component.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/display-area/display-area.component.html
new file mode 100644
index 00000000..eb07a769
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/display-area/display-area.component.html
@@ -0,0 +1,14 @@
+
+<div >
+<div class="tab-content">
+ <h3>{{this.menuId}} Reports</h3>
+</div>
+<span class="ecomp-spinner" *ngIf="showSpinner"></span>
+<div>
+
+<ng-container *ngFor="let item of finalRowArr">
+ <li><a href="javascript:void(0);" (click)="runReport(item.reportURL)">{{item.reportName}}</a></li>
+</ng-container>
+
+</div>
+</div>
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/display-area/display-area.component.scss b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/display-area/display-area.component.scss
new file mode 100644
index 00000000..bc189348
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/display-area/display-area.component.scss
@@ -0,0 +1,10 @@
+
+button{
+ margin: 0;
+ font-size: 100%;
+ vertical-align: middle;
+ color:white;
+ background-color: #0568ae
+}
+
+ \ No newline at end of file
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/display-area/display-area.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/display-area/display-area.component.spec.ts
new file mode 100644
index 00000000..27329a9b
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/display-area/display-area.component.spec.ts
@@ -0,0 +1,26 @@
+// import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+// import { DisplayAreaComponent } from './display-area.component';
+
+// describe('DisplayAreaComponent', () => {
+// let component: DisplayAreaComponent;
+// let fixture: ComponentFixture<DisplayAreaComponent>;
+
+// beforeEach(async(() => {
+// TestBed.configureTestingModule({
+// declarations: [ DisplayAreaComponent ]
+// })
+// .compileComponents();
+// }));
+
+// beforeEach(() => {
+// fixture = TestBed.createComponent(DisplayAreaComponent);
+// component = fixture.componentInstance;
+// fixture.detectChanges();
+// });
+
+// it('should create', () => {
+// expect(component).toBeTruthy();
+// });
+// });
+
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/display-area/display-area.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/display-area/display-area.component.ts
new file mode 100644
index 00000000..e08190e7
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/display-area/display-area.component.ts
@@ -0,0 +1,65 @@
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { ActivatedRoute, Router } from '@angular/router';
+import { DisplayAreaService } from 'src/app/shared/services/displayArea/display-area.service';
+import { MatPaginator } from '@angular/material/paginator';
+import { MatSort } from '@angular/material/sort';
+import { MatTable, MatTableDataSource } from '@angular/material/table';
+
+@Component({
+ selector: 'app-display-area',
+ templateUrl: './display-area.component.html',
+ styleUrls: ['./display-area.component.scss']
+})
+export class DisplayAreaComponent implements OnInit {
+
+ @ViewChild( MatPaginator, { static: false } as any ) paginator: MatPaginator;
+ @ViewChild( MatSort, { static: false } as any ) sort: MatSort;
+ @ViewChild( MatTable, { static: false } as any ) table: MatTable<any>;
+ menuId:string;
+ showSpinner: boolean;
+ dataSource1: any;
+ displayedColumns = ["reportName", "reportDescr","reportURL"];
+ finalGETObj: {};
+ finalRowArr: any[];
+ rowObj: any;
+ reportId: string;
+
+ constructor(private _route: ActivatedRoute, private _router: Router, private _displayAreaService: DisplayAreaService) { }
+
+ ngOnInit() {
+ this._route.params.subscribe(params => {
+ this.menuId = params['menuId'];
+ console.log("displayArea " +this.menuId);
+ this.initializeReportList(this.menuId);
+ });
+
+
+
+ }
+
+ initializeReportList(menuId:string) {
+ this.showSpinner = true;
+ this.dataSource1 = new MatTableDataSource();
+ this.finalGETObj = new Object();
+//this.finalGETObjRowsArr = new Array();
+ this.finalRowArr = new Array();
+ this._displayAreaService.getMenuIdSpecificReports(this.menuId)
+ .subscribe(( responseObj ) => {
+ this.finalGETObj = responseObj;
+ for (let entry of responseObj) {
+ this.rowObj = new Object();
+ this.rowObj["reportName"] = entry["reportName"];
+ this.rowObj["reportDescr"] = entry["reportDescr"];
+ this.rowObj["reportURL"] = entry["reportURL"];
+ this.finalRowArr.push( this.rowObj );
+ }
+ this.showSpinner = false;
+ } );
+}
+
+runReport( reportId: string ) {
+ this.reportId = reportId;
+ this._router.navigate( [reportId] );
+}
+
+}
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/pages.module.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/pages.module.ts
index 37231147..45789f27 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/pages.module.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/pages.module.ts
@@ -67,6 +67,7 @@ import { LayoutModule } from '@angular/cdk/layout';
import { DashboardReportGridComponent } from './analytics/Report_List/Report/definition/dashboard-report-grid/dashboard-report-grid.component';
import { DataChartComponent } from './analytics/Report_List/Report/definition/dashboard-report-grid/data-chart/data-chart.component';
import { RunDashboardReportComponent } from './analytics/Report_List/Report/run/run-report/run-dashboard-report/run-dashboard-report.component';
+import { DisplayAreaComponent } from './analytics/Report_List/display-area/display-area.component';
@@ -118,6 +119,7 @@ import { RdpModule } from 'portalsdk-tag-lib';
DashboardReportGridComponent, DataChartComponent, RunDashboardReportComponent,
DialogOverviewExampleDialog,
+ DisplayAreaComponent
],
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/services/displayArea/display-area.service.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/services/displayArea/display-area.service.spec.ts
new file mode 100644
index 00000000..f8324dac
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/services/displayArea/display-area.service.spec.ts
@@ -0,0 +1,13 @@
+// import { TestBed } from '@angular/core/testing';
+
+// import { DisplayAreaService } from './display-area.service';
+
+// describe('DisplayAreaService', () => {
+// beforeEach(() => TestBed.configureTestingModule({}));
+
+// it('should be created', () => {
+// const service: DisplayAreaService = TestBed.get(DisplayAreaService);
+// expect(service).toBeTruthy();
+// });
+// });
+
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/services/displayArea/display-area.service.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/services/displayArea/display-area.service.ts
new file mode 100644
index 00000000..71433031
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/services/displayArea/display-area.service.ts
@@ -0,0 +1,16 @@
+import { Injectable } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import { Observable } from 'rxjs';
+import { environment } from '../../../../environments/environment';
+@Injectable({
+ providedIn: 'root'
+})
+export class DisplayAreaService {
+
+ constructor(private _http : HttpClient) { }
+
+ getMenuIdSpecificReports(menuId : string) : Observable<any>
+ {
+ return this._http.get(environment.baseUrl + "raptor.htm?action=quicklinks.json&quick_links_menu_id=" + menuId);
+ }
+}