Change new login/logout/userInfo properties in development. Seach Communities: make request only in first load
This commit is contained in:
parent
89810c107b
commit
69b4d10384
|
@ -1 +1 @@
|
|||
Subproject commit 104c54a3e861d65817aac59c56640457664eeaab
|
||||
Subproject commit 0aa44646b1c57974569aadcaa4ba67a8a5028ef4
|
|
@ -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,24 +123,29 @@ export class SearchCommunitiesComponent {
|
|||
* @param params
|
||||
*/
|
||||
private initCommunities(params) {
|
||||
this.subscriptions.push(this._communitiesService.getCommunitiesState().subscribe(
|
||||
data => {
|
||||
if (!data) {
|
||||
return;
|
||||
if(this.totalResults) {
|
||||
this._getResults(params);
|
||||
} else {
|
||||
this.totalResults = [];
|
||||
this.subscriptions.push(this._communitiesService.getCommunitiesState().subscribe(
|
||||
data => {
|
||||
if (!data) {
|
||||
return;
|
||||
}
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
this.totalResults[i] = data[i];
|
||||
this.totalResults[i].isManager = this.isCommunityManager(this.totalResults[i]);
|
||||
this.totalResults[i].isSubscribed = Session.isSubscribedTo('community', this.totalResults[i].communityId, this.user);
|
||||
}
|
||||
this._getResults(params);
|
||||
},
|
||||
err => {
|
||||
this.handleError('Error getting communities', err);
|
||||
this.searchUtils.status = this.errorMessages.getErrorCode(err.status);
|
||||
this.disableForms = false;
|
||||
}
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
this.totalResults[i] = data[i];
|
||||
this.totalResults[i].isManager = this.isCommunityManager(this.totalResults[i]);
|
||||
this.totalResults[i].isSubscribed = Session.isSubscribedTo('community', this.totalResults[i].communityId, this.user);
|
||||
}
|
||||
this._getResults(params);
|
||||
},
|
||||
err => {
|
||||
this.handleError('Error getting communities', err);
|
||||
this.searchUtils.status = this.errorMessages.getErrorCode(err.status);
|
||||
this.disableForms = false;
|
||||
}
|
||||
));
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 363790356aeb20339fab6d36516864ab44931dd7
|
||||
Subproject commit 443ef4d544d370c698ed0856481b71e489a044d8
|
|
@ -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=',
|
||||
|
|
Loading…
Reference in New Issue