Merge remote-tracking branch 'origin/develop' into orcid-openaireId-claim
This commit is contained in:
commit
3067ad973f
|
@ -154,7 +154,7 @@
|
||||||
[tabNumber]="resultLandingInfo.relatedResults.length">
|
[tabNumber]="resultLandingInfo.relatedResults.length">
|
||||||
</my-tab>
|
</my-tab>
|
||||||
<my-tab *ngIf="resultLandingInfo.relatedServices?.length > 0"
|
<my-tab *ngIf="resultLandingInfo.relatedServices?.length > 0"
|
||||||
[tabTitle]="openaireEntities.DATASOURCES" [tabId]="'dataProviders'"
|
[tabTitle]="properties.adminToolsPortalType == 'eosc' ? openaireEntities.SERVICES : openaireEntities.DATASOURCES" [tabId]="'dataProviders'"
|
||||||
[tabNumber]="resultLandingInfo.relatedServices.length">
|
[tabNumber]="resultLandingInfo.relatedServices.length">
|
||||||
</my-tab>
|
</my-tab>
|
||||||
<my-tab *ngIf="resultLandingInfo.bioentities && bioentitiesNum> 0"
|
<my-tab *ngIf="resultLandingInfo.bioentities && bioentitiesNum> 0"
|
||||||
|
@ -188,7 +188,7 @@
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<div *ngIf="resultLandingInfo.relatedServices?.length > 0"
|
<div *ngIf="resultLandingInfo.relatedServices?.length > 0"
|
||||||
id="dataProviders" class="landing-section">
|
id="dataProviders" class="landing-section">
|
||||||
<ng-container *ngTemplateOutlet="relation_in_tab; context: { related: filteredRelatedServices, props: relatedServices, type: 'datasource', header: ''}"></ng-container>
|
<ng-container *ngTemplateOutlet="relation_in_tab; context: { related: filteredRelatedServices, props: relatedServices, type: properties.adminToolsPortalType == 'eosc' ? 'service' : 'datasource', header: ''}"></ng-container>
|
||||||
</div>
|
</div>
|
||||||
<ng-container *ngIf="resultLandingInfo.bioentities && bioentitiesNum> 0">
|
<ng-container *ngIf="resultLandingInfo.bioentities && bioentitiesNum> 0">
|
||||||
<div id="bioentities" class="landing-section">
|
<div id="bioentities" class="landing-section">
|
||||||
|
@ -467,8 +467,8 @@
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="resultLandingInfo.relatedServices?.length > 0">
|
<ng-container *ngIf="resultLandingInfo.relatedServices?.length > 0">
|
||||||
<div class="clickable uk-flex uk-flex-middle uk-flex-between"
|
<div class="clickable uk-flex uk-flex-middle uk-flex-between"
|
||||||
(click)="openFsModal(servicesFsModal, openaireEntities.DATASOURCES); onSelectActiveTab('dataProviders')">
|
(click)="openFsModal(servicesFsModal, properties.adminToolsPortalType == 'eosc' ? openaireEntities.SERVICES : openaireEntities.DATASOURCES); onSelectActiveTab('dataProviders')">
|
||||||
<span>{{openaireEntities.DATASOURCES}}</span>
|
<span>{{properties.adminToolsPortalType == 'eosc' ? openaireEntities.SERVICES : openaireEntities.DATASOURCES}}</span>
|
||||||
<icon name="chevron_right" [ratio]="1.5" [flex]="true"></icon>
|
<icon name="chevron_right" [ratio]="1.5" [flex]="true"></icon>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
@ -662,7 +662,7 @@
|
||||||
<fs-modal *ngIf="isMobile" #servicesFsModal classTitle="uk-tile-default uk-border-bottom">
|
<fs-modal *ngIf="isMobile" #servicesFsModal classTitle="uk-tile-default uk-border-bottom">
|
||||||
<div *ngIf="activeTab == 'dataProviders' && resultLandingInfo.relatedServices?.length > 0"
|
<div *ngIf="activeTab == 'dataProviders' && resultLandingInfo.relatedServices?.length > 0"
|
||||||
class="landing-section">
|
class="landing-section">
|
||||||
<ng-container *ngTemplateOutlet="relation_in_tab; context: { related: filteredRelatedServices, props: relatedServices, type: 'datasource', header: ''}"></ng-container>
|
<ng-container *ngTemplateOutlet="relation_in_tab; context: { related: filteredRelatedServices, props: relatedServices, type: properties.adminToolsPortalType == 'eosc' ? 'service' : 'datasource', header: ''}"></ng-container>
|
||||||
</div>
|
</div>
|
||||||
</fs-modal>
|
</fs-modal>
|
||||||
|
|
||||||
|
@ -800,7 +800,7 @@
|
||||||
(valueChange)="relatedClassChanged(type)"></div>
|
(valueChange)="relatedClassChanged(type)"></div>
|
||||||
|
|
||||||
<results-and-pages
|
<results-and-pages
|
||||||
[type]="((type == 'datasource') ? openaireEntities.DATASOURCES : openaireEntities.RESULTS)"
|
[type]="((type == 'datasource') ? openaireEntities.DATASOURCES : (type == 'service' ? openaireEntities.SERVICES : openaireEntities.RESULTS))"
|
||||||
[page]="props.page" [pageSize]="pageSize"
|
[page]="props.page" [pageSize]="pageSize"
|
||||||
[totalResults]="related.length">
|
[totalResults]="related.length">
|
||||||
</results-and-pages>
|
</results-and-pages>
|
||||||
|
|
|
@ -210,7 +210,8 @@ export class ResultLandingService {
|
||||||
this.resultLandingInfo.relatedResults = this.parsingFunctions.parseResults(this.resultLandingInfo.relatedResults, relation, provenanceAction, relationName);
|
this.resultLandingInfo.relatedResults = this.parsingFunctions.parseResults(this.resultLandingInfo.relatedResults, relation, provenanceAction, relationName);
|
||||||
} else if (relation['to'].class && relation['to'].class.toLowerCase() == "hasauthorinstitution") {
|
} else if (relation['to'].class && relation['to'].class.toLowerCase() == "hasauthorinstitution") {
|
||||||
this.resultLandingInfo.organizations = this.parseRelatedOrganizations(this.resultLandingInfo.organizations, relation);
|
this.resultLandingInfo.organizations = this.parseRelatedOrganizations(this.resultLandingInfo.organizations, relation);
|
||||||
} else if (relation['to'].scheme && relation['to'].scheme == "dnet:result_datasource_relations") {
|
} else if (relation['to'].scheme && relation['to'].scheme == "dnet:result_datasource_relations" &&
|
||||||
|
(relation['datasourcetype']?.classname!== "service" || properties.adminToolsPortalType == "eosc")) {
|
||||||
let relationName: string = relation.to.class;
|
let relationName: string = relation.to.class;
|
||||||
if (!this.resultLandingInfo.relatedServicesClassFilters.has(relationName)) {
|
if (!this.resultLandingInfo.relatedServicesClassFilters.has(relationName)) {
|
||||||
this.resultLandingInfo.relatedServicesClassFilters.add(relationName);
|
this.resultLandingInfo.relatedServicesClassFilters.add(relationName);
|
||||||
|
|
|
@ -239,6 +239,12 @@ export class HelpContentService {
|
||||||
// .pipe(catchError(this.handleError));
|
// .pipe(catchError(this.handleError));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
getCommunityPagesByRoute(pid: string, route: string) {
|
||||||
|
return this.http.get<Array<Page>>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/'+pid+'/pages'
|
||||||
|
+ (route ? '?page_route='+route : ''))
|
||||||
|
.pipe(map(pages => (pages.length>0?pages[0]:null)), catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
// Replacing getCommunityPages
|
// Replacing getCommunityPages
|
||||||
getCommunityPagesByType(pid: string, type: string) {
|
getCommunityPagesByType(pid: string, type: string) {
|
||||||
return this.http.get<Array<Page>>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/'+pid+'/pages'
|
return this.http.get<Array<Page>>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/'+pid+'/pages'
|
||||||
|
@ -305,7 +311,7 @@ export class HelpContentService {
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
togglePages(selectedPortalPid: string, ids : string[], status : boolean) {
|
togglePages(selectedPortalPid: string, ids : string[], status: boolean) {
|
||||||
|
|
||||||
return this.http.post(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + selectedPortalPid + '/page/toggle?status='+ status.toString(),
|
return this.http.post(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + selectedPortalPid + '/page/toggle?status='+ status.toString(),
|
||||||
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||||
|
@ -432,22 +438,21 @@ export class HelpContentService {
|
||||||
.pipe(map(res => res['statistics']));
|
.pipe(map(res => res['statistics']));
|
||||||
}
|
}
|
||||||
|
|
||||||
getCommunityAdminStatisticsChoices(apiUrl: string, portalId: string): Observable<StatisticsDisplay> {
|
getCommunityAdminStatisticsChoices(portalId: string): Observable<StatisticsDisplay> {
|
||||||
const url = `${apiUrl}statistics/${portalId}`;
|
const url = `${properties.adminToolsAPIURL}statistics/${portalId}`;
|
||||||
//console.log(`getting admin choices for statistics from: ${url}`);
|
//console.log(`getting admin choices for statistics from: ${url}`);
|
||||||
return this.http.get<StatisticsDisplay>(url)
|
return this.http.get<StatisticsDisplay>(url)
|
||||||
//.map(stats => <StatisticsDisplay>stats.json())
|
//.map(stats => <StatisticsDisplay>stats.json())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
postCommunityAdminStatisticsChoices(apiUrl: string,
|
postCommunityAdminStatisticsChoices(portalId: string,
|
||||||
portalId: string,
|
|
||||||
entity: string,
|
entity: string,
|
||||||
chartsOrNumbers: string,
|
chartsOrNumbers: string,
|
||||||
title: string,
|
title: string,
|
||||||
status: boolean,
|
status: boolean,
|
||||||
monitor: boolean): Observable<any> {
|
monitor: boolean): Observable<any> {
|
||||||
const url = `${apiUrl}statistics/${portalId}/${entity}/${chartsOrNumbers}?status=${status.toString()}&monitor=${monitor.toString()}`;
|
const url = `${properties.adminToolsAPIURL}statistics/${portalId}/${entity}/${chartsOrNumbers}?status=${status.toString()}&monitor=${monitor.toString()}`;
|
||||||
//console.log(`getting admin choices for statistics from: ${url}`);
|
//console.log(`getting admin choices for statistics from: ${url}`);
|
||||||
|
|
||||||
return this.http.post(url, title, CustomOptions.getAuthOptionsWithBody())
|
return this.http.post(url, title, CustomOptions.getAuthOptionsWithBody())
|
||||||
|
@ -455,8 +460,8 @@ export class HelpContentService {
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
statisticsIsActiveToggle(apiURL: string, id: string): Observable<boolean> {
|
statisticsIsActiveToggle(id: string): Observable<boolean> {
|
||||||
const url = apiURL + '/statistics/' + encodeURIComponent(id) + '/toggle';
|
const url = properties.adminToolsAPIURL + 'statistics/' + encodeURIComponent(id) + '/toggle';
|
||||||
return this.http.post<boolean>(url, {}, CustomOptions.getAuthOptionsWithBody()).pipe(catchError(this.handleError));
|
return this.http.post<boolean>(url, {}, CustomOptions.getAuthOptionsWithBody()).pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue