Compare commits

...

46 Commits

Author SHA1 Message Date
Konstantinos Triantafyllou bb9f4dfc9a Merge pull request 'Production Release Irish Monitor (1.0.3)' (#54) from develop into master
Reviewed-on: #54
2024-10-30 10:00:41 +01:00
Konstantina Galouni ebff30414f [develop | WIP | ADDED]: Added regex and checks for new RRID identifier (pid) - not added yet in the data, TODO: check again. 2024-10-29 16:20:00 +02:00
argirok c44077f8b9 [develop | CHANGED | FIXED] fix scholarly typo 2024-10-25 14:39:36 +03:00
argirok 5b207ef3d1 [develop | ADDED| DONE ] add claims service in dl170 for dev 2024-10-22 21:15:20 +03:00
argirok 19b5225396 [develop | CHANGED | DONE] update dev properties to dl170 instances 2024-10-15 14:17:26 +03:00
Konstantinos Triantafyllou 4716913427 [develop]: Make verificationType to lowercase in conditions. 2024-10-14 13:42:45 +03:00
Konstantinos Triantafyllou 42d5e1e4b0 [develop]: Fix URL for get invited users for a portal. 2024-10-14 13:10:50 +03:00
Konstantinos Triantafyllou 1301b89ef0 [develop]: Update user management property in developement to dl170. 2024-10-14 12:16:21 +03:00
Konstantina Galouni a0e1763387 [develop | DONE | FIXED]: dataProvider.component.ts: Get type (dataprovider or service) from route.snapshot.data | app-routing.module.ts: Updated routes to load library files for landing pages instead of the intermediate ones (BUG FIX in datasets, software, other). 2024-10-11 17:12:09 +03:00
Konstantina Galouni 14f3766cd1 [develop | DONE | FIXED]: searchResultsInDeposit.component & newSearchPage.component.html: Added options for compactView in Deposit. 2024-10-08 15:50:55 +03:00
Konstantinos Triantafyllou 2b8725e1fb Merge remote-tracking branch 'origin/develop' 2024-10-08 13:16:03 +03:00
Konstantinos Triantafyllou 3d9e0f25e1 [develop]: Fix a bug with subcateogory link in case of umbrella dashboards with children. 2024-10-08 13:15:46 +03:00
Konstantinos Triantafyllou 59cb69736c Merge pull request 'Production Release Monitor (1.0.4) and Monitor Dashboard (1.1.1)' (#53) from develop into master
Reviewed-on: #53
2024-10-07 14:31:44 +02:00
Alex Martzios bef6dda2c2 [develop | WIP | CHANGED] help-content.service.ts: mark some functions as unused - some moved to different services. TODO: deletion 2024-09-24 10:52:51 +03:00
Konstantinos Triantafyllou 2c609d3bd0 [develop]: HasDashboardGuard: Add stakeholder? to handle null values. 2024-09-23 17:25:10 +03:00
Konstantinos Triantafyllou c762858427 [develop]: Fix options in input component. Add error handler in cache-indicators. 2024-09-23 16:43:31 +03:00
Konstantina Galouni f1fd1ef60c Merge pull request 'Production release September 2024 [EXPLORE]' (#52) from develop into master
Reviewed-on: #52
2024-09-23 13:07:57 +02:00
Konstantinos Triantafyllou 42d6430cc4 Merge pull request 'Irish Monitor Release September 2024' (#51) from develop into master
Reviewed-on: #51
2024-09-18 12:05:41 +02:00
Argiro Kokogiannaki d6735a566f Merge pull request 'Connect Production release September' (#50) from develop into master
Reviewed-on: #50
2024-09-09 12:04:16 +02:00
Konstantina Galouni fa2938f84b Merge pull request 'EXPLORE Production release August 2024' (#49) from develop into master
Reviewed-on: #49
2024-08-02 09:38:05 +02:00
Konstantinos Triantafyllou 78bcd9c80a Merge pull request 'Irish Monitor Release July 2024' (#48) from develop into master
Reviewed-on: #48
2024-07-25 09:53:44 +02:00
Konstantina Galouni fe09fbfdcb Merge remote-tracking branch 'origin/develop' 2024-07-23 11:23:20 +03:00
Konstantina Galouni 9b1e662f4b Merge pull request 'Production release July 2024 [EXPLORE]' (#47) from develop into master
Reviewed-on: #47
2024-07-12 10:03:50 +02:00
Konstantinos Triantafyllou df789fddff Merge pull request 'Irish Monitor Release June 2024' (#46) from develop into master
Reviewed-on: #46
2024-06-26 13:47:50 +02:00
Konstantinos Triantafyllou 4396999ce0 Merge pull request 'Production release June 2024 [Monitor Dashboard, Irish Monitor]' (#45) from develop into master
Reviewed-on: #45
2024-06-20 11:31:06 +02:00
Argiro Kokogiannaki 2e2a71c310 Merge pull request 'Production release June 2024 [CONNECT]' (#44) from develop into master
Reviewed-on: #44
2024-06-13 10:03:56 +02:00
Konstantina Galouni b57c46d969 Merge pull request 'Production release June 2024 [EXPLORE]' (#41) from develop into master
Reviewed-on: #41
2024-06-04 16:34:02 +02:00
Konstantina Galouni d1392adc2d Merge pull request 'Production release May 2024 [EXPLORE]' (#40) from develop into master
Reviewed-on: #40
2024-05-23 18:26:50 +02:00
Konstantinos Triantafyllou 44e821b1f1 Merge pull request 'Production release March 2024 [Monitor Dashboard]' (#38) from develop into master
Reviewed-on: #38
2024-04-01 18:02:04 +02:00
Konstantina Galouni 6ab50b04cc Merge pull request 'Production release March 2024 [EXPLORE]' (#35) from develop into master
Reviewed-on: #35
2024-03-04 17:44:23 +01:00
Konstantina Galouni e30672043b Merge pull request 'Production release February 2024 [CONNECT]' (#34) from develop into master
Reviewed-on: #34
2024-02-15 11:04:19 +01:00
Konstantina Galouni c3cb2d56ca Merge pull request 'Production release February 2024' (#31) from develop into master
Reviewed-on: #31
2024-02-08 18:03:26 +01:00
Konstantina Galouni 0757b7a98f Merge pull request 'Production release February 2024' (#30) from develop into master
Reviewed-on: #30
2024-02-07 21:37:50 +01:00
Konstantina Galouni d9465d5d05 Merge remote-tracking branch 'origin/develop' 2024-02-01 21:50:22 +02:00
Konstantina Galouni 7b8ca9ca66 Merge pull request 'Production release January 2024' (#29) from develop into master
Reviewed-on: #29
2024-02-01 20:07:59 +01:00
Konstantinos Triantafyllou 9fc6d0c0a0 Merge pull request 'Production release December 2023' (#27) from develop into master
Reviewed-on: #27
2023-12-21 13:46:37 +01:00
Konstantina Galouni c12cadf0f1 Merge pull request 'Production release (for EOSC EXPLORE) December 2023' (#24) from develop into master
Reviewed-on: #24
2023-12-12 11:43:47 +01:00
Konstantinos Triantafyllou 1a7624eed1 Merge pull request 'Production release November 2023 v3' (#23) from develop into master
Reviewed-on: #23
2023-11-28 09:45:06 +01:00
Konstantina Galouni e8ed5da8ba Merge pull request 'Production release November 2023 v2' (#21) from develop into master
Reviewed-on: #21
2023-11-10 18:27:47 +01:00
Konstantina Galouni e63d61b469 Merge remote-tracking branch 'origin/develop' 2023-11-07 13:34:30 +02:00
Argiro Kokogiannaki f42d160308 Merge pull request 'Production release November 2023' (#20) from develop into master
Reviewed-on: #20
2023-11-07 09:48:31 +01:00
Konstantina Galouni b06e41c9a3 Merge pull request 'Merging develop branch into master for PROD Explore October 2023 release' (#10) from develop into master
Reviewed-on: #10
2023-10-16 12:38:55 +02:00
argirok 1a030e2a0d Merge branch 'develop' 2023-10-06 17:55:08 +03:00
Konstantina Galouni 9b2524c1c7 Merge remote-tracking branch 'origin/develop' 2023-09-11 18:18:09 +03:00
Konstantinos Triantafyllou 31f42cfc71 Merge remote-tracking branch 'origin/develop' 2023-09-05 13:24:11 +03:00
Konstantinos Triantafyllou c292215ada Merge pull request 'Connect Admin release 30th August 2023' (#8) from develop into master
Reviewed-on: #8
2023-08-30 12:47:45 +02:00
17 changed files with 117 additions and 116 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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;

View File

@ -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() {

View File

@ -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>());
}

View File

@ -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;
}
}

View File

@ -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() {

View File

@ -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"));

View File

@ -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}});

View File

@ -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();

View File

@ -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"

View File

@ -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}`);

View File

@ -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));
}

View File

@ -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;
}

View File

@ -51,6 +51,7 @@ export interface EnvProperties {
isniURL?: string;
wikiDataURL?: string;
fundRefURL?: string;
rridURL?: string;
fairSharingURL?: string,
openScienceCloudURL?: string,
eoscMarketplaceURL?: string,

View File

@ -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',

View File

@ -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 {