diff options
author | Sudarshan Kumar <sudarshan.kumar@att.com> | 2020-06-02 19:29:08 +0530 |
---|---|---|
committer | Sudarshan Kumar <sudarshan.kumar@att.com> | 2020-06-03 16:39:50 +0530 |
commit | 1484acff4ddce388b61f46761c188d859a4309c5 (patch) | |
tree | 4c57886d841718c8ca6521d2e46b3159c1438cee /ecomp-sdk/epsdk-app-os/ngappsrc/src/app | |
parent | 6d48b04c34a009323b92b23efc507c63e40b1d87 (diff) |
Improved Profile Search performance
Improved Profile Search performance
Issue-ID: PORTAL-915
Change-Id: I05fa030ff326ff38b1f12a10f40c4bb28590ed61
Signed-off-by: Sudarshan Kumar <sudarshan.kumar@att.com>
Diffstat (limited to 'ecomp-sdk/epsdk-app-os/ngappsrc/src/app')
-rw-r--r-- | ecomp-sdk/epsdk-app-os/ngappsrc/src/app/app.module.ts | 9 | ||||
-rw-r--r-- | ecomp-sdk/epsdk-app-os/ngappsrc/src/app/pages/ext/profile/profile.service.ts | 23 |
2 files changed, 20 insertions, 12 deletions
diff --git a/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/app.module.ts b/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/app.module.ts index a86ea759..6dcdda67 100644 --- a/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/app.module.ts +++ b/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/app.module.ts @@ -36,7 +36,7 @@ * */ import { CommonModule } from '@angular/common'; -import { HttpClientModule } from '@angular/common/http'; +import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; @@ -47,6 +47,7 @@ import { SidebarService } from './shared/services/index'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { UserService } from './shared/services/user/user.service'; +import { HeaderInterceptor } from './shared/interceptors/header-interceptor'; @NgModule({ imports: [ @@ -60,7 +61,11 @@ import { UserService } from './shared/services/user/user.service'; ReactiveFormsModule, ], declarations: [AppComponent], - providers: [SidebarService,UserService], + providers: [SidebarService,UserService,{ + provide: HTTP_INTERCEPTORS, + useClass: HeaderInterceptor, + multi: true, + }], bootstrap: [AppComponent] }) export class AppModule {} diff --git a/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/pages/ext/profile/profile.service.ts b/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/pages/ext/profile/profile.service.ts index 7d14ee39..1c631347 100644 --- a/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/pages/ext/profile/profile.service.ts +++ b/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/pages/ext/profile/profile.service.ts @@ -10,56 +10,59 @@ export class ProfileService { constructor(private http:HttpClient) { } getUserPagination(){ - return this.http.get(environment.getUserPagination,{ withCredentials: true }); + return this.http.get(environment.getUserPagination); } + getAllUsers(){ + return this.http.get(environment.getAllUsers); + } getPostSearch(postSearchBean:any) { - return this.http.post(environment.postSearch,JSON.stringify({postSearchBean: postSearchBean}),{ withCredentials: true }); + return this.http.post(environment.postSearch,JSON.stringify({postSearchBean: postSearchBean})); } importUser(postSearchBean:any) { - return this.http.post(environment.importSearch,JSON.stringify({postSearchBean: postSearchBean}),{ withCredentials: true }); + return this.http.post(environment.importSearch,JSON.stringify({postSearchBean: postSearchBean})); } getPostProfile() { - return this.http.get(environment.getPostProfile,{ withCredentials: true }); + return this.http.get(environment.getPostProfile); } getSelfProfile() { - return this.http.get(environment.getSelfProfile,{ withCredentials: true }); + return this.http.get(environment.getSelfProfile); } getProfileById(profileId){ - return this.http.get(environment.getProfileById+"?profile_id="+profileId, {withCredentials: true }); + return this.http.get(environment.getProfileById+"?profile_id="+profileId); } removeRole(data,profileId) { - return this.http.post(environment.removeUserRole+'?profile_id='+profileId,JSON.stringify({role: data}),{ withCredentials: true }); + return this.http.post(environment.removeUserRole+'?profile_id='+profileId,JSON.stringify({role: data})); } addUserRole(data,profileId) { - return this.http.post(environment.addUserRole+'?profile_id='+profileId,JSON.stringify({role: data}),{ withCredentials: true }); + return this.http.post(environment.addUserRole+'?profile_id='+profileId,JSON.stringify({role: data})); } saveProfile(data,profileId) { - return this.http.post(environment.saveProfile+'?profile_id='+profileId,JSON.stringify({profile: data.profile,selectedCountry:data.selectedCountry, selectedState:data.selectedState, selectedTimeZone:data.selectedTimeZone}),{ withCredentials: true }); + return this.http.post(environment.saveProfile+'?profile_id='+profileId,JSON.stringify({profile: data.profile,selectedCountry:data.selectedCountry, selectedState:data.selectedState, selectedTimeZone:data.selectedTimeZone})); } toggleProfileActive(profileId){ - return this.http.get(environment.toggleProfileActive+profileId,{ withCredentials: true }); + return this.http.get(environment.toggleProfileActive+profileId); } |