summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.html8
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.spec.ts9
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.ts25
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/sidebar/sidebar.component.html12
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/sidebar/sidebar.component.ts2
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/admin.service.ts28
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.spec.ts5
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.ts9
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.service.ts57
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/column-list/column-list.component.ts2
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/dashboard-report-grid/dashboard-report-grid.service.ts2
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.ts6
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/log/log.component.ts2
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql.component.ts1
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.component.html2
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.service.ts2
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.html10
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.scss37
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.ts13
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/interceptors/header-interceptor.ts41
20 files changed, 169 insertions, 104 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.html
index 04701ca7..77ced1b1 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.html
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.html
@@ -7,7 +7,7 @@
<ul class="navbar-nav ml-auto">
<li class="nav-item dropdown" ngbDropdown>
<a href="javascript:void(0)" class="nav-link" ngbDropdownToggle>
- <i class="fa fa-user"></i> {{userFirstName}} <b class="caret"></b>
+ <i class="icon ion-md-person"></i> {{userFirstName}} <b class="caret"></b>
</a>
<div class="dropdown-menu-right" ngbDropdownMenu>
@@ -16,13 +16,13 @@
<br/>
<div ><span class="reg-userEmail-value-spn">
- <div>Email:</div>{{userEmail}}</span></div>
+ <div style="font-weight: bold;">Email:</div>{{userEmail}}</span></div>
<br/>
<div ><span class="reg-userEmail-value-spn">
- <div>userId:</div>{{userId}}</span></div>
+ <div style="font-weight: bold;">User Id:</div>{{userId}}</span></div>
<br/>
<div id="reg-logout-div" style="padding-top: 8px">
- <a href="logout.htm" id="allLogout" class="btn btn-primary">
+ <a href="{{logOutURL}}" id="allLogout" class="btn btn-primary">
Log out
</a>
</div>
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.spec.ts
index bd9bea48..4b3e1c7c 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.spec.ts
@@ -47,7 +47,6 @@ import { LayoutModule } from '../../layout.module';
import { CookieService } from 'ngx-cookie-service';
import { HeaderService } from 'src/app/shared/services/header/header.service';
import { HttpClientTestingModule } from '@angular/common/http/testing';
-import { Router } from '@angular/router';
import 'rxjs/add/observable/of';
import { Observable } from 'rxjs/Observable';
@@ -55,11 +54,8 @@ import { Observable } from 'rxjs/Observable';
describe('HeaderComponent', () => {
let headerService:HeaderService;
- let cookieService:CookieService;
- let router:Router;
let component: HeaderComponent;
let fixture: ComponentFixture<HeaderComponent>;
- let spy: any;
beforeEach(async(() => {
TestBed.configureTestingModule({
@@ -83,7 +79,6 @@ describe('HeaderComponent', () => {
component = fixture.componentInstance;
fixture.detectChanges();
headerService = TestBed.get(HeaderService);
- cookieService=TestBed.get(CookieService);
});
@@ -96,6 +91,10 @@ describe('HeaderComponent', () => {
let spy=spyOn(headerService, 'getTopMenuItems').and.returnValue(Observable.of('you object'));
component.ngOnInit();
expect(spy).toHaveBeenCalled();
+ expect(component.userFirstName).toEqual(component.response.firstName);
+ expect(component.userEmail).toEqual(component.response.email);
+ expect(component.userId).toEqual(component.response.userid);
+ expect(component.userName).toEqual(component.userName);
})
})
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.ts
index 7bf5c649..8cfcdbe4 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.ts
@@ -38,9 +38,8 @@
import { Component, OnInit } from '@angular/core';
import { Router, NavigationEnd } from '@angular/router';
import { HeaderService } from '../../../shared/services/header/header.service';
-import { UserService } from 'src/app/shared/services/user/user.service';
-import { User } from 'src/app/shared/services/user/user';
import { CookieService } from 'ngx-cookie-service';
+import { environment } from 'src/environments/environment';
@Component({
selector: 'app-header',
@@ -57,9 +56,18 @@ export class HeaderComponent implements OnInit {
userName;
appName:string;
showHeader:boolean = true;
+ logOutURL = environment.baseUrl;
- constructor(public router: Router,public headerService: HeaderService,public cookieService: CookieService) {
+ constructor(public router: Router,public headerService: HeaderService,public cookieService: CookieService) {
+
+ if(window.location.pathname.split('/').length > 3) {
+ var portNum = ( window.location.port === '' || window.location.port === '0' ) ? '' : ':'+ window.location.port;
+ this.logOutURL = window.location.protocol + "//" + window.location.hostname + portNum + window.location.pathname.substring(0, this.nthIndex(window.location.pathname, "/", 2) + 0) + '/logout.htm';
+ } else {
+ this.logOutURL = environment.baseUrl + 'logout.htm';
+ }
+
this.router.events.subscribe(val => {
if (
@@ -78,7 +86,7 @@ export class HeaderComponent implements OnInit {
}
this.pushRightClass = 'push-right';
- this.appName= 'ONAP Portal' ;
+ this.appName= 'Portal SDK' ;
let result = this.headerService.getTopMenuItems();
result.subscribe(res => {
this.response = res;
@@ -103,4 +111,13 @@ export class HeaderComponent implements OnInit {
onLoggedout() {
localStorage.removeItem('isLoggedin');
}
+
+ nthIndex(str, pat, n) {
+ var L = str.length, i = -1;
+ while (n-- && i++ < L) {
+ i = str.indexOf(pat, i);
+ if (i < 0) break;
+ }
+ return i;
+ }
}
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/sidebar/sidebar.component.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/sidebar/sidebar.component.html
index e640f84f..5f8a2ec5 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/sidebar/sidebar.component.html
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/sidebar/sidebar.component.html
@@ -1,7 +1,11 @@
-<div class="sidebar" [ngClass]="{'siderbar-height': showHeader, 'siderbar-height-noHeader': !showHeader}" >
+<div class="sidebar" [ngClass]="{'siderbar-height': showHeader, 'siderbar-height-noHeader': !showHeader, collapsed:collapsed}" >
<nav [ngClass]="{sidebarPushRight: isActive, collapsed: collapsed}">
<div class="toggle-button" [ngClass]="{collapsed: collapsed}" (click)="toggleCollapsed()">
- <i class="fa fa-angle-double-{{collapsed?'right':'left'}}"></i>&nbsp;
+ <!--<i class="fa fa-angle-double-{{collapsed?'right':'left'}}"></i>&nbsp;-->
+ <i class="icon ion-md-arrow-{{collapsed?'dropright':'dropleft'}}" style="float:right"></i>
+ <i class="icon ion-md-arrow-{{collapsed?'dropright':'dropleft'}}" style="float:right"></i>&nbsp;
+
+
</div>
<div class="list-group" *ngFor="let menu of menuData ; index as item">
@@ -23,7 +27,7 @@
<a href="javascript:void(0)" class="list-group-item"
(click)="addExpandClass(menu.name)">
<i class="{{menu.imageSrc}}"></i>&nbsp;
- <i style="float: right;" class="icon ion-ios-add-circle-outline"></i>&nbsp;
+ <i *ngIf = "!collapsed" style="float: right;" class="icon ion-ios-add-circle-outline"></i>&nbsp;
<span>{{menu.name}}</span>
</a>
<li class="nested" [class.expand]="showMenu === menu.name">
@@ -45,4 +49,4 @@
</div>
</div>
</nav>
-</div> \ No newline at end of file
+</div> \ No newline at end of file
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/sidebar/sidebar.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/sidebar/sidebar.component.ts
index 6487d745..fbe38c9d 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/sidebar/sidebar.component.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/sidebar/sidebar.component.ts
@@ -144,6 +144,8 @@ export class SidebarComponent implements OnInit {
} else {
this.showMenu = element;
}
+ this.collapsed=false;
+ this.collapsedEvent.emit(false);
}
toggleCollapsed() {
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/admin.service.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/admin.service.ts
index 1240e981..c42235be 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/admin.service.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/admin.service.ts
@@ -51,7 +51,7 @@ export class AdminService {
constructor(private http:HttpClient) { }
getRoleFunctionList(){
- return this.http.get(environment.roleFunctionList,{ withCredentials: true });
+ return this.http.get(environment.roleFunctionList);
}
saveRoleFunction(roleData:string){
@@ -60,65 +60,65 @@ export class AdminService {
getUsageList()
{
- return this.http.get(environment.usageList,{ withCredentials: true });
+ return this.http.get(environment.usageList);
}
getCacheRegions(){
- return this.http.get(environment.cachedRegions,{ withCredentials: true });
+ return this.http.get(environment.cachedRegions);
}
getRole(roleId){
- return this.http.get(environment.getRole+'?role_id=' + roleId,{ withCredentials: true });
+ return this.http.get(environment.getRole+'?role_id=' + roleId);
}
getFnMenuItems()
{
- return this.http.get(environment.getFnMenuItems,{ withCredentials: true });
+ return this.http.get(environment.getFnMenuItems);
}
updateFnMenuItem(menuObj: any): Observable<any> {
let updateMenuURL = environment.updateFnMenuItem;
- return this.http.post(updateMenuURL, menuObj, {withCredentials: true})
+ return this.http.post(updateMenuURL, menuObj)
}
getFunctionCdList(): Observable<any>{
let getFunctionCdListURL = environment.getFunctionCdList;
- return this.http.get(getFunctionCdListURL , { withCredentials: true } );
+ return this.http.get(getFunctionCdListURL);
}
getParentData(): Observable<any>{
let getParentDataURL = environment.getParentList;
- return this.http.get(getParentDataURL , { withCredentials: true } );
+ return this.http.get(getParentDataURL);
}
deleteRole(roleData:any){
- return this.http.post(environment.deleteRole,JSON.stringify({role: roleData}),{ withCredentials: true });
+ return this.http.post(environment.deleteRole,JSON.stringify({role: roleData}));
}
deleteRoleFunction(roleFunc:any)
{
- return this.http.post(environment.deleteRoleFunction,roleFunc,{ withCredentials: true });
+ return this.http.post(environment.deleteRoleFunction,roleFunc);
}
removeRoleFunction(roleFunc:any, roleId:any){
let removeRoleFunctionURL = environment.removeRoleFunction+roleId;
- return this.http.post(removeRoleFunctionURL,JSON.stringify({roleFunction:roleFunc}),{ withCredentials: true });
+ return this.http.post(removeRoleFunctionURL,JSON.stringify({roleFunction:roleFunc}));
}
saveRole(roleObj:any, roleId:any){
let saveRoleURL = environment.saveRole+roleId;
- return this.http.post(saveRoleURL,JSON.stringify(roleObj),{ withCredentials: true });
+ return this.http.post(saveRoleURL,JSON.stringify(roleObj));
}
deleteMenu(fnMenuItem:any){
- return this.http.post(environment.deleteMenu,JSON.stringify({fnMenuItem: fnMenuItem}),{ withCredentials: true });
+ return this.http.post(environment.deleteMenu,JSON.stringify({fnMenuItem: fnMenuItem}));
}
getCacheRegionDetails(cacheName:any){
- return this.http.get(environment.getRegion+'?cacheName='+cacheName,{ withCredentials: true });
+ return this.http.get(environment.getRegion+'?cacheName='+cacheName);
}
}
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.spec.ts
index eb8b63dd..a32b2e3e 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.spec.ts
@@ -56,11 +56,6 @@ describe('MenusComponent', () => {
expect(component).toBeTruthy();
});
- // it('should test getFnMenuItems method inside getMenus',()=>{
- // let spy=spyOn(adminService,'getFnMenuItems').and.returnValue(Observable.of(stubData))
- // component.getMenus();
- // expect(spy).toHaveBeenCalled();
- // })
describe('test getMenus',()=>{
it('should test getMenus',()=>{
let spy=spyOn(adminService,'getParentData').and.returnValue(Observable.of('you object'))
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.ts
index 5d996964..c6fbc8c4 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.ts
@@ -72,12 +72,12 @@ export class MenusComponent implements OnInit {
public columns: any = [];
activeStatusOptions = [
- {index: 0, value: 'true', name: 'Y'},
- {index: 1, value: 'false', name: 'N'}
+ {id: '0', name: 'Y'},
+ {id: '1', name: 'N'}
];
separatorStatusOptions = [
- {index: 0, value: 'true', name: 'Y'},
- {index: 1, value: 'false', name: 'N'}
+ {id: '0', name: 'Y'},
+ {id: '1', name: 'N'}
];
functionCDselectData = [];
parentListSelectData = [];
@@ -192,6 +192,7 @@ export class MenusComponent implements OnInit {
this.parentList.push({id: _data[i][0], name: _data[i][1]});
}
console.log("Actual parent list : ", this.parentList);
+ this.menuService.getParentList(this.parentList);
}
}, error => {
this.showSpinner = false;
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.service.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.service.ts
index aeb8ea49..912b65bb 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.service.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.service.ts
@@ -104,23 +104,32 @@ export class MenusService implements RdpCrudInterface {
data.active = this.updateStatus(data.active);
data.separator = this.updateStatus(data.separator);
let keys = Object.keys(data);
+ let menuCache = this.menu;
keys.forEach(element => {
if (data[element] != null || data[element] != undefined) {
if (element == 'parentId') {
- this.menu[element] = 1;
+ if (isNaN(data[element])) {
+ menuCache[element] = this.updateParentNameToID(data[element]);
+ } else{
+ menuCache[element] = data[element];
+ }
+ console.log("Parent Id to update : ", menuCache[element]);
} else {
- this.menu[element] = data[element];
+ menuCache[element] = data[element];
}
}
});
- let result = { availableFnMenuItem: this.menu };
+ let result = { availableFnMenuItem: menuCache };
let postData = JSON.stringify(result);
console.log("postData >>>>>>", postData);
this.adminService.updateFnMenuItem(postData)
.subscribe(_data => {
+ console.log("Response : ", _data);
this.statusResponse.next("200");
+ menuCache = this.menu;
}, error => {
console.log("Error : ", error);
+ menuCache = this.menu;
});
}
@@ -130,11 +139,10 @@ export class MenusService implements RdpCrudInterface {
console.log(data.active);
data.active = this.updateStatus(data.active);
data.separator = this.updateStatus(data.separator);
- let result = { availableFnMenuItem: data };
- this.adminService.deleteMenu(result).subscribe(response => {
+ this.adminService.deleteMenu(data).subscribe(response => {
console.log("Response ", response);
this.statusResponse.next("200");
- }, error =>{
+ }, error => {
console.log("Error : ", error);
})
}
@@ -147,15 +155,44 @@ export class MenusService implements RdpCrudInterface {
}
}
+ private updateBooleanValue(data) {
+ if (data) {
+ return 'Y';
+ } else {
+ return 'N';
+ }
+ }
+
+ parentList: any;
+
+ getParentList(list) {
+ this.parentList = list;
+ }
+
+ private updateParentNameToID(data) {
+ let val;
+ this.parentList.forEach(ele => {
+ if (ele['name'] == data) {
+ val = ele['id'];
+ }
+ });
+ console.log("ParentId value ", val);
+ return val;
+ }
+
get() {
- console.log("get method is getting called from AppServie data:: ");
+ console.log("get method is getting called from MenuServie data:: ");
let response = this.adminService.getFnMenuItems();
let resp;
response.subscribe(res => {
- console.log("Get Response : ", res);
resp = res;
- console.log("edited : ",JSON.parse(resp.data).fnMenuItems);
- this.updatedData.next(JSON.parse(resp.data).fnMenuItems);
+ let responseData = JSON.parse(resp.data).fnMenuItems;
+ responseData.forEach(element => {
+ element.active = this.updateBooleanValue(element.active);
+ element.separator = this.updateBooleanValue(element.separator);
+ })
+ this.updatedData.next(responseData);
})
}
+
}
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/column-list/column-list.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/column-list/column-list.component.ts
index 2a8561e6..25f5109c 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/column-list/column-list.component.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/column-list/column-list.component.ts
@@ -114,7 +114,7 @@ export class ColumnListComponent implements OnInit {
}
ngOnInit() {
-
+ this.showSpinner = true;
this.displayTable = true;
this._columnService.getColumnList()
.subscribe((response) => {
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/form-fields/form-fields.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.ts
index fc34cccd..e3bab3bb 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.ts
@@ -76,16 +76,20 @@ export class FormFieldsComponent implements OnInit {
}
ngOnInit() {
+ this.showSpinner = true;
this._formFieldsService.getListOfFormFields()
.subscribe((responseFormFields) => {
+ this.showSpinner = true;
for (let m = 0; m < responseFormFields.length; m++) {
responseFormFields[m]["orderSeq"] = m + 1;
this.formFieldsListObj.push(responseFormFields[m]);
}
-
+ this.showSpinner = false;
this._formFieldsService.getFormFieldGroupsData(this.reportId1)
.subscribe((responseGroupsData) => {
+ this.showSpinner = true;
this.Groups = JSON.parse(responseGroupsData["formFieldGroupsJSON"]);
+ this.showSpinner = false;
});
});
}
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/log/log.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/log/log.component.ts
index 47ec2383..a90a1f8e 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/log/log.component.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/log/log.component.ts
@@ -22,7 +22,7 @@ export class LogComponent implements OnInit {
}
ngOnInit() {
-
+ this.showSpinner = true;
if(this.reportType === "Dashboard")
{
this.stepNo= "3";
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 62c7d7a4..897aa03e 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
@@ -46,6 +46,7 @@ export class SQLComponent implements OnInit {
}
ngOnInit() {
+ this.showSpinner = true;
this.showSaveSQLDialog = false;
this.SQLPostResponse = true;
this.ValidatePostResponse = {};
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.component.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.component.html
index 0295bdd6..7bb6729d 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.component.html
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.component.html
@@ -84,7 +84,7 @@
[length]="dataSource1?.data.length"
[pageIndex]="0"
[pageSize]="20"
- [pageSizeOptions]="[20]">
+ [pageSizeOptions]="[20,40,60,80,100]">
</mat-paginator>
</div>
</div>
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.service.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.service.ts
index 560bd6e1..aad435f5 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.service.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/report-list.service.ts
@@ -15,6 +15,6 @@ export class ReportListService {
return this._http.get(environment.baseUrl + "/raptor.htm?action=report.delete&c_master=" + reportId);
}
getAllReports():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/ext/profile/search/search.component.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.html
index 5f131fb6..a6682306 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.html
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.html
@@ -50,12 +50,12 @@
<ng-container matColumnDef="Last Name">
<th mat-header-cell *matHeaderCellDef id="heading2"> {{userHeaders[1]}} </th>
- <td mat-cell *matCellDef="let rowData"> {{rowData.lastName}} </td>
+ <td mat-cell *matCellDef="let rowData"> {{rowData.last_name}} </td>
</ng-container>
<ng-container matColumnDef="First Name">
<th mat-header-cell *matHeaderCellDef id="heading3">{{userHeaders[2]}} </th>
- <td mat-cell *matCellDef="let rowData"> {{rowData.firstName}}</td>
+ <td mat-cell *matCellDef="let rowData"> {{rowData.first_name}}</td>
</ng-container>
<ng-container matColumnDef="Email">
@@ -63,12 +63,12 @@
<td mat-cell *matCellDef="let rowData" > {{rowData.email}} </td>
</ng-container>
- <ng-container matColumnDef="orgUserId">
+ <ng-container matColumnDef="Org User ID">
<th mat-header-cell *matHeaderCellDef id="heading4"> {{userHeaders[4]}} </th>
<td mat-cell *matCellDef="let rowData" > {{rowData.orgUserId}} </td>
</ng-container>
- <ng-container matColumnDef="orgManagerUserId">
+ <ng-container matColumnDef="Org Manager User ID">
<th mat-header-cell *matHeaderCellDef id="heading4"> {{userHeaders[5]}} </th>
<td mat-cell *matCellDef="let rowData" > {{rowData.orgManagerUserId}} </td>
</ng-container>
@@ -86,7 +86,7 @@
<ng-container matColumnDef="Active?">
<th mat-header-cell *matHeaderCellDef id="heading6"> {{userHeaders[7]}} </th>
<td mat-cell *matCellDef="let rowData">
- <mat-slide-toggle [(ngModel)]="rowData.active" (change)="toggleUserActive(rowData)"></mat-slide-toggle>
+ <mat-slide-toggle [checked]="(rowData.active_yn =='Y' || rowData.active_yn == true) ? true : false" (change)="toggleUserActive(rowData,$event)"></mat-slide-toggle>
</td>
</ng-container>
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.scss b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.scss
index 3b9e9d3b..ec84c3b0 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.scss
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.scss
@@ -37,35 +37,18 @@
*/
table {
- width: 100%;
- }
-
- .mat-form-field {
- font-size: 14px;
- width: 100%;
- }
-
- td, th {
- width: 25%;
- }
- .mat-form-field[_ngcontent-c4] {
- font-size: 14px;
- width: 20%;
- float: right;
- }
+ width: 100%;
+}
- /*td.mat-cell, td.mat-footer-cell{
- padding: 0;
- border-bottom-width: 1px;
- border-bottom-style: solid;
- border-right-style: solid;
- border-right-color: rgba(0,0,0,.12);
- border-right-width: 1px;
- }
-*/
+::ng-deep .mat-header-cell{
+ font-weight: bold;
+ font-size: 14px;
+ color: #343a40;
+}
-td[_ngcontent-c4], th[_ngcontent-c4] {
- width: 15%;
+::ng-deep .mat-form-field[_ngcontent-c4] {
+ font-size: 14px;
+ width: 20%;
}
#edit-button{
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.ts
index 9ae59ca8..734aaf09 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/ext/profile/search/search.component.ts
@@ -57,14 +57,13 @@ export class SearchComponent implements OnInit {
response: any;
result: any;
profileList:any;
- userHeaders = ["User ID","Last Name","First Name","Email","orgUserId","orgManagerUserId","Edit","Active?"];
+ userHeaders = ["User ID","Last Name","First Name","Email","Org User ID","Org Manager User ID","Edit","Active?"];
constructor(public profileservice:ProfileService, public ngbModal: NgbModal,private _router: Router) { }
dataSource: MatTableDataSource<[]>;
@ViewChild(MatPaginator, {}) paginator: MatPaginator;
@ViewChild(MatSort, {}) sort: MatSort;
-
ngOnInit() {
this.getUsers();
}
@@ -72,7 +71,7 @@ export class SearchComponent implements OnInit {
getUsers(){
this.showSpinner = true;
let response;
- this.response = this.profileservice.getUserPagination();
+ this.response = this.profileservice.getAllUsers();
this.response.subscribe(data => {
response = data;
this.result = JSON.parse(response.data);
@@ -84,9 +83,9 @@ export class SearchComponent implements OnInit {
});
}
- toggleUserActive(user){
- let activeOrInactive = (user.active) ? 'activate' : 'inactivate';
- let confirmationMsg = 'You are about to ' + activeOrInactive + ' the user ' + user.firstName +" "+user.lastName+ '. Do you want to continue?';
+ toggleUserActive(user, e){
+ let activeOrInactive = (e.checked) ? 'activate' : 'inactivate';
+ let confirmationMsg = 'You are about to ' + activeOrInactive + ' the user ' + user.first_name +" "+user.last_name+ '. Do you want to continue?';
const modalInfoRef = this.ngbModal.open(InformationModalComponent);
modalInfoRef.componentInstance.title = 'Confirmation';
modalInfoRef.componentInstance.message = confirmationMsg;
@@ -104,7 +103,7 @@ export class SearchComponent implements OnInit {
this.openConfirmationModal("Error",error);
});
} else {
- user.active = !user.active;
+ this.ngOnInit();
}
}, (result) => {
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/interceptors/header-interceptor.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/interceptors/header-interceptor.ts
index 5a5a41a8..1539877c 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/interceptors/header-interceptor.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/interceptors/header-interceptor.ts
@@ -42,21 +42,27 @@ import {
HttpHandler,
HttpRequest,
HttpHeaders,
+ HttpErrorResponse
} from '@angular/common/http';
-import { Observable } from 'rxjs';
+import { Observable, throwError} from 'rxjs';
import { v4 as uuid } from 'uuid';
-declare const getWebJunctionXSRFToken: any;
+import { catchError } from 'rxjs/internal/operators/catchError';
+import { environment } from '../../../environments/environment';
+
+function nthIndex(str, pat, n) {
+ var L = str.length, i = -1;
+ while (n-- && i++ < L) {
+ i = str.indexOf(pat, i);
+ if (i < 0) break;
+ }
+ return i;
+}
+
export class HeaderInterceptor implements HttpInterceptor {
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
- // Clone the request to add the new header
- // HttpHeader object immutable - copy values
- var XSRFToken = getWebJunctionXSRFToken();
- console.log('XSRFToken:', XSRFToken);
const headerSettings: { [name: string]: string | string[]; } = {};
headerSettings['X-ECOMP-RequestID'] = uuid();
const requestType = req.params.get('requestType');
- if (XSRFToken.name && XSRFToken.value)
- headerSettings['X-XSRF-TOKEN'] = XSRFToken.value;
if(requestType!=null && requestType==='fileUpload'){
//headerSettings['Content-Type'] = 'multipart/form-data';
}else{
@@ -65,6 +71,23 @@ export class HeaderInterceptor implements HttpInterceptor {
const newHeader = new HttpHeaders(headerSettings);
const clonedRequest = req.clone({ headers: newHeader, withCredentials: true });
// Pass the cloned request instead of the original request to the next handle
- return next.handle(clonedRequest);
+ //return next.handle(clonedRequest);
+ var url = '';
+ return next.handle(clonedRequest).pipe(
+ catchError(error => {
+ if ( error instanceof HttpErrorResponse ) {
+ if ( error.status === 0 ) { // If 0(302) Redirect to Login Page
+ if(window.location.pathname.split('/').length > 3) {
+ var portNum = ( window.location.port === '' || window.location.port === '0' ) ? '' : ':'+ window.location.port;
+ url = window.location.protocol + "//" + window.location.hostname + portNum + window.location.pathname.substring(0, nthIndex(window.location.pathname, "/", 2) + 0) + '/login.htm';
+ window.open( url, '_self' );
+ } else {
+ window.open( environment.baseUrl + 'login.htm', '_self' );
+ }
+ }
+ }
+ return throwError(error);
+ })
+ );
}
} \ No newline at end of file