Compare commits
46 Commits
orcid-open
...
master
Author | SHA1 | Date |
---|---|---|
Konstantinos Triantafyllou | bb9f4dfc9a | |
Konstantina Galouni | ebff30414f | |
argirok | c44077f8b9 | |
argirok | 5b207ef3d1 | |
argirok | 19b5225396 | |
Konstantinos Triantafyllou | 4716913427 | |
Konstantinos Triantafyllou | 42d5e1e4b0 | |
Konstantinos Triantafyllou | 1301b89ef0 | |
Konstantina Galouni | a0e1763387 | |
Konstantina Galouni | 14f3766cd1 | |
Konstantinos Triantafyllou | 2b8725e1fb | |
Konstantinos Triantafyllou | 3d9e0f25e1 | |
Konstantinos Triantafyllou | 59cb69736c | |
Alex Martzios | bef6dda2c2 | |
Konstantinos Triantafyllou | 2c609d3bd0 | |
Konstantinos Triantafyllou | c762858427 | |
Konstantina Galouni | f1fd1ef60c | |
Konstantinos Triantafyllou | 42d6430cc4 | |
Argiro Kokogiannaki | d6735a566f | |
Konstantina Galouni | fa2938f84b | |
Konstantinos Triantafyllou | 78bcd9c80a | |
Konstantina Galouni | fe09fbfdcb | |
Konstantina Galouni | 9b1e662f4b | |
Konstantinos Triantafyllou | df789fddff | |
Konstantinos Triantafyllou | 4396999ce0 | |
Argiro Kokogiannaki | 2e2a71c310 | |
Konstantina Galouni | b57c46d969 | |
Konstantina Galouni | d1392adc2d | |
Konstantinos Triantafyllou | 44e821b1f1 | |
Konstantina Galouni | 6ab50b04cc | |
Konstantina Galouni | e30672043b | |
Konstantina Galouni | c3cb2d56ca | |
Konstantina Galouni | 0757b7a98f | |
Konstantina Galouni | d9465d5d05 | |
Konstantina Galouni | 7b8ca9ca66 | |
Konstantinos Triantafyllou | 9fc6d0c0a0 | |
Konstantina Galouni | c12cadf0f1 | |
Konstantinos Triantafyllou | 1a7624eed1 | |
Konstantina Galouni | e8ed5da8ba | |
Konstantina Galouni | e63d61b469 | |
Argiro Kokogiannaki | f42d160308 | |
Konstantina Galouni | b06e41c9a3 | |
argirok | 1a030e2a0d | |
Konstantina Galouni | 9b2524c1c7 | |
Konstantinos Triantafyllou | 31f42cfc71 | |
Konstantinos Triantafyllou | c292215ada |
|
@ -22,7 +22,7 @@
|
|||
(selectionChange)="entityChanged($event);advanced.focusNext(input, $event)"
|
||||
(disableSelectEmitter)="disableSelectChange($event)"
|
||||
[onChangeNavigate]="false"></entities-selection>
|
||||
<div input #input class="uk-width-expand" placeholder="Scholary works" [searchable]="true"
|
||||
<div input #input class="uk-width-expand" placeholder="Scholarly works" [searchable]="true"
|
||||
[hint]="'Search in OpenAIRE'" [(value)]="keyword"></div>
|
||||
</advanced-search-input>
|
||||
</div>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<li *ngFor="let result of results">
|
||||
<result-preview [properties]="properties" [showOrganizations]="true"
|
||||
[showSubjects]="true" [result]="getResultPreview(result)" [promoteWebsiteURL]="true"
|
||||
[isCard]="true" deposit="true" [isMobile]="isMobile">
|
||||
[isCard]="true" deposit="true" [isMobile]="isMobile" [compactView]="compactView">
|
||||
</result-preview>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -20,7 +20,7 @@ export class SearchResultsInDepositComponent {
|
|||
@Input() type: string;
|
||||
@Input() properties:EnvProperties = properties;
|
||||
@Input() isMobile: boolean = false;
|
||||
|
||||
@Input() compactView: boolean = false;
|
||||
|
||||
public urlParam: string;
|
||||
public linkToAdvancedSearchPage: string;
|
||||
|
|
|
@ -191,7 +191,9 @@ export class DataProviderComponent {
|
|||
this.fetchOrps = new FetchResearchResults(this._searchResearchResultsService);
|
||||
this.fetchProjects = new FetchProjects(this._searchProjectsService);
|
||||
this.fetchDataproviders = new FetchDataproviders(this._searchDataprovidersService);
|
||||
|
||||
if(route.snapshot.data && route.snapshot.data['type']) {
|
||||
this.type = route.snapshot.data['type'];
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
|
|
@ -598,7 +598,8 @@ export class ParsingFunctions {
|
|||
if (pid.hasOwnProperty("classid") && pid['classid'] != "") {
|
||||
if (pid.classid == "doi" || pid.classid == "pmc" || pid.classid == "handle" || pid.classid == "pmid" || pid.classid == "re3data"
|
||||
|| pid.classid == "swhid"
|
||||
|| pid.classid == "ROR" || pid.classid == "ISNI" || pid.classid == "Wikidata" || pid.classid == "FundRef") {
|
||||
|| pid.classid == "ROR" || pid.classid == "ISNI" || pid.classid == "Wikidata" || pid.classid == "FundRef"
|
||||
|| pid.classid == "RRID") {
|
||||
if (!identifiers.has(pid.classid)) {
|
||||
identifiers.set(pid.classid, new Array<string>());
|
||||
}
|
||||
|
@ -608,7 +609,8 @@ export class ParsingFunctions {
|
|||
for (let i = 0; i < pid.length; i++) {
|
||||
if (pid[i].classid == "doi" || pid[i].classid == "pmc" || pid[i].classid == "handle" || pid[i].classid == "pmid" || pid[i].classid == "re3data"
|
||||
|| pid[i].classid == "swhid"
|
||||
|| pid[i].classid == "ROR" || pid[i].classid == "ISNI" || pid[i].classid == "Wikidata" || pid[i].classid == "FundRef") {
|
||||
|| pid[i].classid == "ROR" || pid[i].classid == "ISNI" || pid[i].classid == "Wikidata" || pid[i].classid == "FundRef"
|
||||
|| pid[i].classid == "RRID") {
|
||||
if (!identifiers.has(pid[i].classid)) {
|
||||
identifiers.set(pid[i].classid, new Array<string>());
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ import {properties} from "../../../../environments/environment";
|
|||
<span [class.uk-margin-small-left]="modal">
|
||||
<ng-container *ngFor="let item of identifiers.get(key) let j=index">
|
||||
<a *ngIf="key == 'doi' || key == 'pmc' || key == 'pmid' || key == 'handle' || key == 're3data' || key == 'swhid'
|
||||
|| key == 'ROR' || key == 'ISNI' || key == 'Wikidata' || key == 'FundRef'"
|
||||
|| key == 'ROR' || key == 'ISNI' || key == 'Wikidata' || key == 'FundRef' || key == 'RRID'"
|
||||
[href]="getUrl(key, item) + item" target="_blank" class="uk-display-inline-block custom-external">
|
||||
{{item}}
|
||||
</a>
|
||||
|
@ -138,6 +138,8 @@ export class ShowIdentifiersComponent implements AfterViewInit {
|
|||
return properties.wikiDataURL;
|
||||
} else if(key == "FundRef") {
|
||||
return properties.fundRefURL;
|
||||
} else if(key == "RRID") {
|
||||
return properties.rridURL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,18 +1,33 @@
|
|||
import {Component, Inject, Input, OnChanges, OnDestroy, OnInit, PLATFORM_ID, SimpleChanges} from "@angular/core";
|
||||
import {
|
||||
Component,
|
||||
Inject,
|
||||
InjectionToken,
|
||||
Input,
|
||||
OnChanges,
|
||||
OnDestroy,
|
||||
OnInit,
|
||||
PLATFORM_ID,
|
||||
SimpleChanges
|
||||
} from "@angular/core";
|
||||
import {Report} from "./cache-indicators";
|
||||
import {CacheIndicatorsService} from "./cache-indicators.service";
|
||||
import {interval, Subject, Subscription} from "rxjs";
|
||||
import {map, switchMap, takeUntil} from "rxjs/operators";
|
||||
import {isPlatformBrowser} from "@angular/common";
|
||||
|
||||
@Component({
|
||||
selector: 'cache-indicators',
|
||||
template: `
|
||||
<div *ngIf="report" class="cache-progress">
|
||||
<div class="uk-position-relative" [attr.uk-tooltip]="'Caching indicators process for ' + alias">
|
||||
<div class="uk-progress-circle" [attr.percentage]="report.percentage?report.percentage:0" [style]="'--percentage: ' + (report.percentage?report.percentage:0)"></div>
|
||||
<button *ngIf="report.percentage === 100" (click)="clear()" class="uk-icon-button uk-icon-button-xsmall uk-button-default uk-position-top-right"><icon name="close" [flex]="true" ratio="0.8"></icon></button>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="report" class="cache-progress">
|
||||
<div class="uk-position-relative" [attr.uk-tooltip]="'Caching indicators process for ' + alias">
|
||||
<div class="uk-progress-circle" [attr.percentage]="report.percentage?report.percentage:0"
|
||||
[style]="'--percentage: ' + (report.percentage?report.percentage:0)"></div>
|
||||
<button *ngIf="report.percentage === 100" (click)="clear()"
|
||||
class="uk-icon-button uk-icon-button-xsmall uk-button-default uk-position-top-right">
|
||||
<icon name="close" [flex]="true" ratio="0.8"></icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
styleUrls: ['cache-indicators.component.less']
|
||||
})
|
||||
|
@ -24,7 +39,7 @@ export class CacheIndicatorsComponent implements OnInit, OnChanges, OnDestroy {
|
|||
@Input() alias: string;
|
||||
|
||||
constructor(private cacheIndicatorsService: CacheIndicatorsService,
|
||||
@Inject(PLATFORM_ID) private platformId) {
|
||||
@Inject(PLATFORM_ID) private platformId: any) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
@ -32,28 +47,30 @@ export class CacheIndicatorsComponent implements OnInit, OnChanges, OnDestroy {
|
|||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
if(changes.alias) {
|
||||
if (changes.alias) {
|
||||
this.clear();
|
||||
this.getReport();
|
||||
}
|
||||
}
|
||||
|
||||
getReport() {
|
||||
this.clear();
|
||||
this.subscriptions.push(this.cacheIndicatorsService.getReport(this.alias).subscribe(report => {
|
||||
this.getReportInterval(report);
|
||||
}, error => {
|
||||
this.report = null;
|
||||
}));
|
||||
}
|
||||
|
||||
getReportInterval(report: Report) {
|
||||
if(this.isBrowser && (this.report || !report?.completed)) {
|
||||
if (this.isBrowser && (this.report || !report?.completed)) {
|
||||
this.report = report;
|
||||
this.subscriptions.push(interval(this.interval).pipe(
|
||||
map(() => this.cacheIndicatorsService.getReport(this.alias)),
|
||||
switchMap(report => report),
|
||||
takeUntil(this.destroy$)).subscribe(report => {
|
||||
console.log(this.alias);
|
||||
takeUntil(this.destroy$)).
|
||||
subscribe(report => {
|
||||
this.report = report;
|
||||
if(this.report.completed) {
|
||||
if (this.report.completed) {
|
||||
this.destroy$.next();
|
||||
}
|
||||
}));
|
||||
|
@ -62,14 +79,15 @@ export class CacheIndicatorsComponent implements OnInit, OnChanges, OnDestroy {
|
|||
|
||||
clear() {
|
||||
this.subscriptions.forEach(subscription => {
|
||||
subscription.unsubscribe();
|
||||
})
|
||||
if (subscription instanceof Subscription) {
|
||||
subscription.unsubscribe();
|
||||
}
|
||||
});
|
||||
this.report = null;
|
||||
}
|
||||
|
||||
|
||||
get isBrowser() {
|
||||
return this.platformId === 'browser';
|
||||
return isPlatformBrowser(this.platformId);
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
|
|
@ -201,6 +201,18 @@ export abstract class MonitorIndicatorStakeholderBaseComponent extends Indicator
|
|||
}
|
||||
}
|
||||
|
||||
protected get isChild(): boolean {
|
||||
return !!this.stakeholder?.parent;
|
||||
}
|
||||
|
||||
protected get aliasPrefix(): string {
|
||||
if(this.isChild) {
|
||||
return this.stakeholder.parent.alias + '/browse/' + this.stakeholder.type + '/';
|
||||
} else {
|
||||
return '/';
|
||||
}
|
||||
}
|
||||
|
||||
protected getFullUrl(indicatorPath: IndicatorPath) {
|
||||
let fosValues = this.getSelectedFilterValues("fos");
|
||||
return this.indicatorUtils.getFullUrlWithFilters(this.stakeholder, indicatorPath,null, this.periodFilter.selectedFromValue, this.periodFilter.selectedToValue, false, fosValues?fosValues.lvl1:[],fosValues?fosValues.lvl2:[], this.getSelectedFilterValues("publiclyfunded"));
|
||||
|
|
|
@ -17,7 +17,7 @@ export class HasDashboardGuard {
|
|||
|
||||
check(path: string, alias: string, type: string, child: string): Observable<boolean> | boolean {
|
||||
return (child?this.stakeholderService.getChildStakeholder(alias, type, child):this.stakeholderService.getStakeholder(alias)).pipe(take(1), map(stakeholder => {
|
||||
return stakeholder.standalone || (!!stakeholder && !!child);
|
||||
return stakeholder?.standalone || (!!stakeholder && !!child);
|
||||
}),tap(authorized => {
|
||||
if(!authorized){
|
||||
this.router.navigate([LinksResolver.default.errorLink], {queryParams: {'page': path}});
|
||||
|
|
|
@ -131,9 +131,9 @@ export class RoleVerificationComponent extends BaseComponent implements OnInit,
|
|||
this.subscriptions.push(this.userRegistryService.getInvitation(params['verify']).subscribe(verification => {
|
||||
this.verification = verification;
|
||||
if (this.user.email === this.verification.email.toLowerCase() && this.id === this.verification.entity && this._type === this.verification.type) {
|
||||
if (this.verification.verificationType === 'manager') {
|
||||
if (this.verification.verificationType.toLowerCase() === 'manager') {
|
||||
this.openManagerModal();
|
||||
} else if (this.verification.verificationType === 'member') {
|
||||
} else if (this.verification.verificationType.toLowerCase() === 'member') {
|
||||
this.openMemberModal();
|
||||
} else {
|
||||
this.openErrorModal();
|
||||
|
|
|
@ -418,7 +418,8 @@
|
|||
[type]="entityType"
|
||||
[zenodoInformation]="zenodoInformation"
|
||||
[properties]=properties
|
||||
[isMobile]="mobile">
|
||||
[isMobile]="mobile"
|
||||
[compactView]="compactView">
|
||||
</deposit-result>
|
||||
<orcid-result *ngIf="usedBy == 'orcid'"
|
||||
[results]="results"
|
||||
|
|
|
@ -54,14 +54,6 @@ export class HelpContentService {
|
|||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
// toggleEntity(selectedCommunityId: string, id : string,status : boolean) {
|
||||
// let headers = new Headers({'Content-Type': 'application/json'});
|
||||
// let options = new RequestOptions({headers: headers});
|
||||
//
|
||||
// return this.http.post(helpContentUrl + 'community/'+selectedCommunityId+'/entity/toggle?status='+ status.toString()+'&entityId='+id.toString(), options)
|
||||
// .catch(this.handleError);
|
||||
// }
|
||||
|
||||
getCommunityEntities(pid: string) {
|
||||
return this.http.get<Array<Entity>>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/'+pid+'/entities')
|
||||
.pipe(catchError(this.handleError));
|
||||
|
@ -81,27 +73,8 @@ export class HelpContentService {
|
|||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
// getDivIdsFull(page_id: string, helpContentUrl:string, pid: string = null) {
|
||||
// let parameters: string = "";
|
||||
// if(page_id || pid) {
|
||||
// parameters = "?";
|
||||
// if(page_id) {
|
||||
// parameters += "&page="+page_id;
|
||||
// }
|
||||
// if(pid) {
|
||||
// parameters += "&portal="+pid;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// return this.http.get<Array<DivId>>(helpContentUrl + 'div/full'+parameters)
|
||||
// //.map(res => <Array<DivId>> res.json())
|
||||
// .pipe(catchError(this.handleError));
|
||||
// }
|
||||
|
||||
// Replacing getDivIdsFull
|
||||
getAllDivIdsFull() {
|
||||
return this.http.get<Array<DivId>>(properties.adminToolsAPIURL + 'div/full')
|
||||
//.map(res => <Array<DivId>> res.json())
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
|
@ -111,7 +84,6 @@ export class HelpContentService {
|
|||
return this.http.get<Array<DivId>>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/'+pid + '/div/full'+parameters)
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
// End of replacing getDivIdsFull
|
||||
|
||||
// unused
|
||||
getDivId(divId: string, helpContentUrl:string) {
|
||||
|
@ -119,6 +91,7 @@ export class HelpContentService {
|
|||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
// unused
|
||||
getDivIdFull(divId: string, helpContentUrl:string, pid: string) {
|
||||
return this.http.get<DivId>(helpContentUrl + properties.adminToolsPortalType + "/" + pid + '/div/'+divId+"/full")
|
||||
.pipe(catchError(this.handleError));
|
||||
|
@ -173,7 +146,6 @@ export class HelpContentService {
|
|||
}
|
||||
|
||||
toggleDivHelpContents(ids : string[], status : boolean, pid: string) {
|
||||
|
||||
return this.http.post(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + pid + '/divhelpcontent/toggle?status='+ status.toString(),
|
||||
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||
.pipe(catchError(this.handleError));
|
||||
|
@ -196,7 +168,6 @@ export class HelpContentService {
|
|||
}
|
||||
getPageHelpContent(id : string, helpContentUrl:string, pid: string) {
|
||||
return this.http.get<PageHelpContent>(helpContentUrl + properties.adminToolsPortalType + '/' + pid + '/pagehelpcontent/' + id)
|
||||
//.map(res => <PageHelpContent> res.json())
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
|
@ -208,6 +179,7 @@ export class HelpContentService {
|
|||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
// unused
|
||||
updatePageHelpContent(pageHelpContent: PageHelpContent, helpContentUrl:string, pid: string) {
|
||||
HelpContentService.removeNulls(pageHelpContent);
|
||||
|
||||
|
@ -216,50 +188,43 @@ export class HelpContentService {
|
|||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
deletePageHelpContents(ids : string[], pid: string) {
|
||||
deletePageHelpContents(ids: string[], pid: string) {
|
||||
return this.http.post(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + pid + '/pagehelpcontent/delete',
|
||||
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
togglePageHelpContents(ids : string[],status : boolean, pid: string) {
|
||||
togglePageHelpContents(ids : string[], status : boolean, pid: string) {
|
||||
return this.http.post(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + pid + '/pagehelpcontent/toggle?status='+ status.toString(),
|
||||
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
// unused
|
||||
getCommunityPagesWithDivId(pid: string, helpContentUrl:string) {
|
||||
return this.http.get<Array<Page>>(helpContentUrl + properties.adminToolsPortalType + '/'+pid+'/pages?div=true')
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
// getCommunityPages(pid: string, params: string, helpContentUrl:string) {
|
||||
// return this.http.get<Array<Page>>(helpContentUrl + properties.adminToolsPortalType + '/'+pid+'/pages'+params, CustomOptions.getAuthOptions())
|
||||
// //.map(res => <Array<Page>> res.json())
|
||||
// .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
|
||||
getCommunityPagesByType(pid: string, type: string) {
|
||||
return this.http.get<Array<Page>>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/'+pid+'/pages'
|
||||
+ (type ? '?page_type='+type : ''))
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
// End of replacing getCommunityPages
|
||||
|
||||
// Replacing part of getPages (now getAllPages)
|
||||
// unused
|
||||
getCommunityPagesWithPositions(pid: string, helpContentUrl:string) {
|
||||
return this.http.get<Array<Page>>(helpContentUrl + properties.adminToolsPortalType + '/'+pid+'/pages?with_positions=true')
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
// End of replacing part of getPages (now getAllPages)
|
||||
//TODO double check with konstantina - there is no param that we are asking the community pages. without pid we get all portalTypes
|
||||
|
||||
// TODO: double check with konstantina - there is no param that we are asking the community pages. without pid we get all portalTypes
|
||||
getAllPages(pid:string = null) {//with_positions:boolean=null) {
|
||||
// let parameters: string = "";
|
||||
// if(pid || with_positions == true || with_positions == false) {
|
||||
|
@ -278,7 +243,6 @@ export class HelpContentService {
|
|||
|
||||
getAllPagesFull() {
|
||||
return this.http.get<Array<Page>>(properties.adminToolsAPIURL + 'page/full')//+(pid?("?pid="+pid):""))
|
||||
//.map(res => <Array<Page>> res.json())
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
|
@ -286,10 +250,13 @@ export class HelpContentService {
|
|||
return this.http.get<Page>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + pid + '/page/'+pageId)
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
getPageById(pageId:string) {
|
||||
return this.http.get<Page>(properties.adminToolsAPIURL + 'page/' + pageId)
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
// unused
|
||||
getCommunityPageByRoute(route:string, helpContentUrl:string, pid: string) {
|
||||
return this.http.get<Page>(helpContentUrl + properties.adminToolsPortalType +'/' + pid + '/page/?page_route='+route)
|
||||
.pipe(catchError(this.handleError));
|
||||
|
@ -299,12 +266,10 @@ export class HelpContentService {
|
|||
HelpContentService.removeNulls(page);
|
||||
|
||||
return this.http.post<Page>(properties.adminToolsAPIURL + 'page/save', JSON.stringify(page), CustomOptions.getAuthOptionsWithBody())
|
||||
//.map(res => <Page> res.json())
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
updatePage(page: Page) {
|
||||
|
||||
HelpContentService.removeNulls(page);
|
||||
|
||||
return this.http.post<Page>(properties.adminToolsAPIURL + 'page/update', JSON.stringify(page), CustomOptions.getAuthOptionsWithBody())
|
||||
|
@ -312,14 +277,12 @@ export class HelpContentService {
|
|||
}
|
||||
|
||||
togglePages(selectedPortalPid: string, ids : string[], status: boolean) {
|
||||
|
||||
return this.http.post(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + selectedPortalPid + '/page/toggle?status='+ status.toString(),
|
||||
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
deletePages(ids : string[]) {
|
||||
|
||||
return this.http.post(properties.adminToolsAPIURL + 'page/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
@ -363,7 +326,6 @@ export class HelpContentService {
|
|||
return this.http.post<Menu>(properties.adminToolsAPIURL + properties.adminToolsPortalType + "/" + portalPid + "/menu/align?alignment=" + alignment, {}, CustomOptions.getAuthOptionsWithBody())
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
|
||||
// unused
|
||||
getCommunities( helpContentUrl:string) {
|
||||
|
@ -371,11 +333,13 @@ export class HelpContentService {
|
|||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
// unused
|
||||
getCommunity(pid: string, helpContentUrl:string) {
|
||||
return this.http.get<Portal>(helpContentUrl + properties.adminToolsPortalType + '/'+pid)
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
// unused
|
||||
getCommunitiesFull( helpContentUrl:string) {
|
||||
return this.http.get<Array<Portal>>(helpContentUrl + properties.adminToolsPortalType + '/full')
|
||||
.pipe(catchError(this.handleError));
|
||||
|
@ -383,18 +347,16 @@ export class HelpContentService {
|
|||
|
||||
getPortalsFull() {
|
||||
return this.http.get<Array<Portal>>(properties.adminToolsAPIURL + 'portal/full')
|
||||
//.map(res => <Array<Portal>> res.json())
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
// unused
|
||||
getCommunityFull(portal_pid: string, helpContentUrl:string) {
|
||||
return this.http.get<Portal>(helpContentUrl + properties.adminToolsPortalType + '/'+portal_pid+'/full')
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
saveCommunity(portal: Portal) {
|
||||
// let headers = new Headers({'Content-Type': 'application/json'});
|
||||
// let options = new RequestOptions({headers: headers});
|
||||
|
||||
HelpContentService.removeNulls(portal);
|
||||
|
||||
return this.http.post<Portal>(properties.adminToolsAPIURL + portal.type + '/save', JSON.stringify(portal), CustomOptions.getAuthOptionsWithBody())
|
||||
|
@ -402,19 +364,13 @@ export class HelpContentService {
|
|||
}
|
||||
|
||||
updateCommunity(portal: Portal) {
|
||||
// let headers = new Headers({'Content-Type': 'application/json'});
|
||||
// let options = new RequestOptions({headers: headers});
|
||||
|
||||
HelpContentService.removeNulls(portal);
|
||||
|
||||
return this.http.post<Portal>(properties.adminToolsAPIURL + portal.type + '/update', JSON.stringify(portal), CustomOptions.getAuthOptionsWithBody())
|
||||
//.map(res => <Portal> res.json())
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
deleteCommunities(ids : string[], portalType:string) {
|
||||
// let headers = new Headers({'Content-Type': 'application/json'});
|
||||
// let options = new RequestOptions({headers: headers});
|
||||
deleteCommunities(ids: string[], portalType:string) {
|
||||
return this.http.post(properties.adminToolsAPIURL + portalType + '/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
@ -426,10 +382,6 @@ export class HelpContentService {
|
|||
return throwError(error.error || 'Server error');
|
||||
}
|
||||
|
||||
// getDataProviders() {
|
||||
// return this.http.get('https://beta.services.openaire.eu/search/v2/api/datasources?format=json').map(res => <any> res.json()).map(res => res.results).do(res => {console.log(res)}).catch(this.handleError);
|
||||
// }
|
||||
|
||||
getCommunityStatistics(apiUrl: string, portalId: string): Observable<StatisticsSummary> {
|
||||
const url = `${apiUrl}communities/${portalId}`;
|
||||
//console.log(`getting statistics summary from: ${url}`);
|
||||
|
|
|
@ -71,7 +71,7 @@ export class UserRegistryService {
|
|||
}
|
||||
|
||||
public getPending(type: string, id: string, role: "member" | "manager" = "manager", admin = false): Observable<any[]> {
|
||||
let url = properties.registryUrl + 'invite/' + Role.GROUP + type + '/' +id + "/" + role + 's/';
|
||||
let url = properties.registryUrl + 'invite/' + Role.GROUP + type + '/' +id + "/" + role + 's';
|
||||
return this.http.get<any>((properties.useCache && !admin) ? (properties.cacheUrl + encodeURIComponent(url)) : url,
|
||||
CustomOptions.registryOptions()).pipe(map((response: any) => response.response));
|
||||
}
|
||||
|
|
|
@ -374,21 +374,25 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
|
||||
@Input()
|
||||
set options(options: (Option | string | number) []) {
|
||||
this.optionsArray = options.map(option => {
|
||||
if (option === null) {
|
||||
return {
|
||||
label: this.noValueSelected,
|
||||
value: ''
|
||||
};
|
||||
} else if (typeof option === 'string' || typeof option === 'number') {
|
||||
return {
|
||||
label: option.toString(),
|
||||
value: option
|
||||
};
|
||||
} else {
|
||||
return option;
|
||||
}
|
||||
});
|
||||
if(options) {
|
||||
this.optionsArray = options.map(option => {
|
||||
if (option === null) {
|
||||
return {
|
||||
label: this.noValueSelected,
|
||||
value: ''
|
||||
};
|
||||
} else if (typeof option === 'string' || typeof option === 'number') {
|
||||
return {
|
||||
label: option.toString(),
|
||||
value: option
|
||||
};
|
||||
} else {
|
||||
return option;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.optionsArray = [];
|
||||
}
|
||||
if (!this.tooltip) {
|
||||
this.tooltip = this.optionsArray.length > 0;
|
||||
}
|
||||
|
|
|
@ -51,6 +51,7 @@ export interface EnvProperties {
|
|||
isniURL?: string;
|
||||
wikiDataURL?: string;
|
||||
fundRefURL?: string;
|
||||
rridURL?: string;
|
||||
fairSharingURL?: string,
|
||||
openScienceCloudURL?: string,
|
||||
eoscMarketplaceURL?: string,
|
||||
|
|
|
@ -24,6 +24,7 @@ export let common: EnvProperties = {
|
|||
isniURL: "https://isni.org/isni/",
|
||||
wikiDataURL: "https://www.wikidata.org/wiki/",
|
||||
fundRefURL: "https://data.crossref.org/fundingdata/funder/",
|
||||
rridURL: "https://scicrunch.org/resolver/",
|
||||
fairSharingURL: "https://fairsharing.org/",
|
||||
openScienceCloudURL: "https://open-science-cloud.ec.europa.eu/resources/services/",
|
||||
sherpaURL: "http://sherpa.ac.uk/romeo/issn/",
|
||||
|
@ -101,23 +102,23 @@ export let commonDev: EnvProperties = {
|
|||
statisticsAPIURL: "https://beta.services.openaire.eu/stats-api/",
|
||||
statisticsFrameAPIURL: "https://beta.openaire.eu/stats/",
|
||||
statisticsFrameNewAPIURL: "https://beta.services.openaire.eu/stats-tool/",
|
||||
claimsAPIURL: "http://scoobydoo.di.uoa.gr:8880/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/",
|
||||
claimsAPIURL: "http://dl170.madgik.di.uoa.gr:19780/uoa-claims-service/claimsService/",
|
||||
searchAPIURLLAst: "http://beta.services.openaire.eu/search/v2/api/",
|
||||
searchResourcesAPIURL: "https://beta.services.openaire.eu/search/v2/api/resources",
|
||||
|
||||
openCitationsAPIURL: "https://services.openaire.eu/opencitations/getCitations?id=",
|
||||
csvAPIURL: "https://beta.services.openaire.eu/search/v2/api/reports",
|
||||
orcidAPIURL: "http://duffy.di.uoa.gr:19480/uoa-orcid-service/",
|
||||
orcidAPIURL: "http://dl170.madgik.di.uoa.gr:19480/uoa-orcid-service/",
|
||||
orcidTokenURL: "https://sandbox.orcid.org/oauth/authorize?",
|
||||
orcidClientId: "APP-A5M3KTX6NCN67L91",
|
||||
utilsService: "http://scoobydoo.di.uoa.gr:8000",
|
||||
utilsService: "http://dl170.madgik.di.uoa.gr:8000",
|
||||
vocabulariesAPI: "https://services.openaire.eu/provision/mvc/vocabularies/",
|
||||
loginServiceURL: "http://dl170.madgik.di.uoa.gr:19080/login-service/",
|
||||
cookieDomain: ".di.uoa.gr",
|
||||
feedbackmail: "kostis30fylloy@gmail.com",
|
||||
cacheUrl: "http://dl170.madgik.di.uoa.gr:3000/get?url=",
|
||||
monitorServiceAPIURL: "http://mpagasas.di.uoa.gr:19380/uoa-monitor-service/",
|
||||
adminToolsAPIURL: "http://duffy.di.uoa.gr:19280/uoa-admin-tools/",
|
||||
adminToolsAPIURL: "http://dl170.madgik.di.uoa.gr:19280/uoa-admin-tools/",
|
||||
datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/api/",
|
||||
contextsAPI: "https://dev-openaire.d4science.org/openaire/context",
|
||||
communityAPI: "https://dev-openaire.d4science.org/openaire/community/",
|
||||
|
@ -129,7 +130,7 @@ export let commonDev: EnvProperties = {
|
|||
adminPortalURL: "https://beta.admin.connect.openaire.eu",
|
||||
//connect
|
||||
communitiesAPI: 'https://dev-openaire.d4science.org/openaire/community/communities',
|
||||
registryUrl: 'http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/api/registry/',
|
||||
registryUrl: 'http://dl170.madgik.di.uoa.gr:19180/uoa-user-management/api/registry/',
|
||||
reCaptchaSiteKey: "6LcVtFIUAAAAAB2ac6xYivHxYXKoUvYRPi-6_rLu",
|
||||
//admin
|
||||
miningBackendURL: 'https://beta.services.openaire.eu/interactive-mining',
|
||||
|
|
|
@ -150,7 +150,7 @@ export class DOI {
|
|||
}
|
||||
|
||||
export class Identifier {
|
||||
class: "doi" | "pmc" | "pmid" | "handle" | "ORCID" | "re3data" | "swhid" | "ror" | "wikidata" | "fundref" | "isni" = null;
|
||||
class: "doi" | "pmc" | "pmid" | "handle" | "ORCID" | "re3data" | "swhid" | "ror" | "wikidata" | "fundref" | "isni" | "RRID" = null;
|
||||
id: string;
|
||||
|
||||
public static getDOIsFromString(str: string): string[] {
|
||||
|
@ -213,13 +213,15 @@ export class Identifier {
|
|||
return {"class": "wikidata", "id": pid};
|
||||
} else if (Identifier.isValidIsni(pid)) {
|
||||
return {"class": "isni", "id": pid};
|
||||
} else if(Identifier.isValidRrid(pid)) {
|
||||
return {"class": "RRID", "id": pid};
|
||||
}
|
||||
//set it as a doi, to catch the case that doi has not valid format
|
||||
return (strict?null:{"class": "doi", "id": pid});
|
||||
}
|
||||
|
||||
public static getPIDFromIdentifiers(identifiers: Map<string, string[]>): Identifier {
|
||||
let classes:string [] = ["doi", "handle", "pmc", "pmid", "re3data", "swhid", "ror", "wikidata", "fundref", "isni"];
|
||||
let classes:string [] = ["doi", "handle", "pmc", "pmid", "re3data", "swhid", "ror", "wikidata", "fundref", "isni", "rrid"];
|
||||
if(identifiers && identifiers.size > 0) {
|
||||
for (let cl of classes) {
|
||||
if (identifiers.get(cl)) {
|
||||
|
@ -303,6 +305,10 @@ export class Identifier {
|
|||
return str.match(exp) != null;
|
||||
}
|
||||
|
||||
public static isValidRrid(str: string): boolean {
|
||||
let exp = /^RRID:.*$/g;
|
||||
return str.match(exp) != null;
|
||||
}
|
||||
}
|
||||
|
||||
export class StringUtils {
|
||||
|
|
Loading…
Reference in New Issue