Change new login/logout/userInfo properties in development. Seach Communities: make request only in first load

This commit is contained in:
Konstantinos Triantafyllou 2021-11-05 13:38:48 +02:00
parent 89810c107b
commit 69b4d10384
4 changed files with 29 additions and 25 deletions

@ -1 +1 @@
Subproject commit 104c54a3e861d65817aac59c56640457664eeaab
Subproject commit 0aa44646b1c57974569aadcaa4ba67a8a5028ef4

View File

@ -23,7 +23,7 @@ import {Subscriber} from "rxjs";
[hasPrefix]=true prefix="OpenAIRE Connect | " [piwikSiteId]="piwikSiteId"
searchFormClass="communitiesSearchForm"
[formPlaceholderText]="'Search for Research Gateways…'"
type="communities" entityType="community"
[type]="(results.length > 1)?'communities':'community'" entityType="community"
[results]="results" [searchUtils]="searchUtils"
[showResultCount]=true
[disableForms]="disableForms"
@ -40,7 +40,7 @@ export class SearchCommunitiesComponent {
private errorCodes: ErrorCodes;
private errorMessages: ErrorMessagesComponent;
public results: CommunityInfo[] = [];
public totalResults: CommunityInfo[] = [];
public totalResults: CommunityInfo[];
public subscriptions = [];
public filters = [];
public searchFields: SearchFields = new SearchFields();
@ -67,7 +67,6 @@ export class SearchCommunitiesComponent {
properties: EnvProperties;
@ViewChild(NewSearchPageComponent, {static: true}) searchPage: NewSearchPageComponent;
private user: User;
private userFilterLoaded: boolean = false;
constructor(private route: ActivatedRoute,
private _communitiesService: CommunitiesService,
@ -124,6 +123,10 @@ export class SearchCommunitiesComponent {
* @param params
*/
private initCommunities(params) {
if(this.totalResults) {
this._getResults(params);
} else {
this.totalResults = [];
this.subscriptions.push(this._communitiesService.getCommunitiesState().subscribe(
data => {
if (!data) {
@ -143,6 +146,7 @@ export class SearchCommunitiesComponent {
}
));
}
}
/**

@ -1 +1 @@
Subproject commit 363790356aeb20339fab6d36516864ab44931dd7
Subproject commit 443ef4d544d370c698ed0856481b71e489a044d8

View File

@ -57,9 +57,9 @@ export let properties: EnvProperties = {
piwikBaseUrl: 'https://analytics.openaire.eu/piwik.php?idsite=',
piwikSiteId: '80',
registryUrl: 'http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/api/registry/',
loginUrl: "http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/openid_connect_login",
userInfoUrl: "http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/api/users/getUserInfo?accessToken=",
logoutUrl: 'http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/openid_logout',
loginUrl: "http://mpagasas.di.uoa.gr:8080/login-service//openid_connect_login",
userInfoUrl: "http://mpagasas.di.uoa.gr:8080/login-service/userInfo",
logoutUrl: "http://mpagasas.di.uoa.gr:8080/login-service/openid_logout",
cookieDomain: '.di.uoa.gr',
feedbackmail: 'openaire.test@gmail.com',
cacheUrl: 'http://dl170.madgik.di.uoa.gr:3000/get?url=',