[Explore|Trunk]
- add timeout interceptor in app module - update query params in home search bar git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@59742 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
245cb0768c
commit
097d63950a
|
@ -20,6 +20,7 @@ import {HttpInterceptorService} from "./openaireLibrary/http-interceptor.service
|
||||||
import {PageURLResolverModule} from "./openaireLibrary/utils/pageURLResolver.module";
|
import {PageURLResolverModule} from "./openaireLibrary/utils/pageURLResolver.module";
|
||||||
import {Schema2jsonldModule} from "./openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
|
import {Schema2jsonldModule} from "./openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
|
||||||
import {CacheInterceptorService} from "./openaireLibrary/cache-interceptor.service";
|
import {CacheInterceptorService} from "./openaireLibrary/cache-interceptor.service";
|
||||||
|
import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-interceptor.service";
|
||||||
|
|
||||||
//import { EnvironmentSpecificService, REQUEST_TOKEN} from './openaireLibrary/utils/properties/environment-specific.service';
|
//import { EnvironmentSpecificService, REQUEST_TOKEN} from './openaireLibrary/utils/properties/environment-specific.service';
|
||||||
|
|
||||||
|
@ -55,7 +56,9 @@ import {CacheInterceptorService} from "./openaireLibrary/cache-interceptor.servi
|
||||||
provide: HTTP_INTERCEPTORS,
|
provide: HTTP_INTERCEPTORS,
|
||||||
useClass: HttpInterceptorService,
|
useClass: HttpInterceptorService,
|
||||||
multi: true
|
multi: true
|
||||||
}
|
},
|
||||||
|
[{ provide: HTTP_INTERCEPTORS, useClass: TimeoutInterceptor, multi: true }],
|
||||||
|
[{ provide: DEFAULT_TIMEOUT, useValue: 30000 }]
|
||||||
],
|
],
|
||||||
bootstrap: [AppComponent]
|
bootstrap: [AppComponent]
|
||||||
})
|
})
|
||||||
|
|
|
@ -387,7 +387,6 @@ export class HomeComponent {
|
||||||
if (this.selectedEntity == "result") {
|
if (this.selectedEntity == "result") {
|
||||||
if (this.resultTypes) {
|
if (this.resultTypes) {
|
||||||
let values = [];
|
let values = [];
|
||||||
console.log(this.resultTypes.values)
|
|
||||||
for(let value of this.resultTypes.values){
|
for(let value of this.resultTypes.values){
|
||||||
if (value.selected) {
|
if (value.selected) {
|
||||||
values.push(value.id);
|
values.push(value.id);
|
||||||
|
@ -397,8 +396,6 @@ export class HomeComponent {
|
||||||
parameterNames.push("type");
|
parameterNames.push("type");
|
||||||
parameterValues.push(values.join(","));
|
parameterValues.push(values.join(","));
|
||||||
}
|
}
|
||||||
console.log(parameterNames)
|
|
||||||
console.log(parameterValues)
|
|
||||||
if (this.resultsQuickFilter) {
|
if (this.resultsQuickFilter) {
|
||||||
parameterNames.push("qf");
|
parameterNames.push("qf");
|
||||||
parameterValues.push("" + this.resultsQuickFilter.selected);
|
parameterValues.push("" + this.resultsQuickFilter.selected);
|
||||||
|
@ -406,10 +403,10 @@ export class HomeComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.keyword.length > 0) {
|
if(this.keyword.length > 0) {
|
||||||
parameterNames.push("q");
|
parameterNames.push("fv0");
|
||||||
parameterValues.push(this.keyword);
|
parameterValues.push(this.keyword);
|
||||||
parameterNames.push("op");
|
parameterNames.push("f0");
|
||||||
parameterValues.push("and");
|
parameterValues.push("q");
|
||||||
}
|
}
|
||||||
console.log( this.routerHelper.createQueryParams(parameterNames, parameterValues))
|
console.log( this.routerHelper.createQueryParams(parameterNames, parameterValues))
|
||||||
this._router.navigate([url], {queryParams: this.routerHelper.createQueryParams(parameterNames, parameterValues)});
|
this._router.navigate([url], {queryParams: this.routerHelper.createQueryParams(parameterNames, parameterValues)});
|
||||||
|
|
Loading…
Reference in New Issue