Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop
This commit is contained in:
commit
293be5e1d2
|
@ -131,7 +131,7 @@ export class LayoutService {
|
|||
data['hasHeader'] === false) {
|
||||
this.setHasHeader(false);
|
||||
if (typeof document !== "undefined") {
|
||||
document.documentElement.style.setProperty('--header-height', '0');
|
||||
document.documentElement.style.setProperty('--header-height', '0px');
|
||||
}
|
||||
} else {
|
||||
this.setHasHeader(true);
|
||||
|
|
|
@ -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">
|
||||
[isCard]="true" deposit="true" [isMobile]="isMobile">
|
||||
</result-preview>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -19,6 +19,7 @@ export class SearchResultsInDepositComponent {
|
|||
@Input() status: number;
|
||||
@Input() type: string;
|
||||
@Input() properties:EnvProperties;
|
||||
@Input() isMobile: boolean = false;
|
||||
|
||||
|
||||
public urlParam: string;
|
||||
|
|
|
@ -394,8 +394,8 @@ export class DataProviderComponent {
|
|||
this.updateUrl(this.canonicalUrl);
|
||||
this.seoService.createLinkForCanonicalURL(this.properties.domain +this.properties.baseLink + this._router.url);
|
||||
if (typeof document !== 'undefined') {
|
||||
this.getDataProviderAggregationStatus(this.dataProviderInfo.originalId);
|
||||
// this.getCollectedFulltexts();
|
||||
// this.getDataProviderAggregationStatus(this.dataProviderInfo.originalId);
|
||||
this.getCollectedFulltexts();
|
||||
this.countResultsWithFundingInfo();
|
||||
} else {
|
||||
this.aggregationStatusIsInitialized = true;
|
||||
|
@ -454,34 +454,34 @@ export class DataProviderComponent {
|
|||
}
|
||||
}
|
||||
|
||||
private getDataProviderAggregationStatus(originalId: string) {
|
||||
this.subscriptions.push(this._dataproviderService.getDataproviderAggregationStatus(originalId, this.properties).subscribe(
|
||||
data => {
|
||||
this.dataProviderInfo.aggregationStatus = data;
|
||||
this.aggregationStatusIsInitialized = true;
|
||||
},
|
||||
err => {
|
||||
//console.log(err);
|
||||
this.aggregationStatusIsInitialized = true;
|
||||
this.handleError("Error getting "+this.getTypeName()+" aggregation status for id: " + this.datasourceId, err);
|
||||
}
|
||||
));
|
||||
}
|
||||
|
||||
// private getCollectedFulltexts() {
|
||||
// this.subscriptions.push(this._dataproviderService.getCollectedFulltexts(this.datasourceId).subscribe(
|
||||
// (data: string) => {
|
||||
// this.dataProviderInfo.aggregationStatus = {"fulltexts": data};
|
||||
// private getDataProviderAggregationStatus(originalId: string) {
|
||||
// this.subscriptions.push(this._dataproviderService.getDataproviderAggregationStatus(originalId, this.properties).subscribe(
|
||||
// data => {
|
||||
// this.dataProviderInfo.aggregationStatus = data;
|
||||
// this.aggregationStatusIsInitialized = true;
|
||||
// },
|
||||
// err => {
|
||||
// //console.log(err);
|
||||
// this.aggregationStatusIsInitialized = true;
|
||||
// this.handleError("Error getting "+this.getTypeName()+" collected fulltexts for id: " + this.datasourceId, err);
|
||||
// this.handleError("Error getting "+this.getTypeName()+" aggregation status for id: " + this.datasourceId, err);
|
||||
// }
|
||||
// ));
|
||||
// }
|
||||
|
||||
private getCollectedFulltexts() {
|
||||
this.subscriptions.push(this._dataproviderService.getCollectedFulltexts(this.datasourceId).subscribe(
|
||||
(data: string) => {
|
||||
this.dataProviderInfo.aggregationStatus = {"fulltexts": data};
|
||||
this.aggregationStatusIsInitialized = true;
|
||||
},
|
||||
err => {
|
||||
//console.log(err);
|
||||
this.aggregationStatusIsInitialized = true;
|
||||
this.handleError("Error getting "+this.getTypeName()+" collected fulltexts for id: " + this.datasourceId, err);
|
||||
}
|
||||
));
|
||||
}
|
||||
|
||||
private countResultsWithFundingInfo() {
|
||||
this.subscriptions.push(this._searchResearchResultsService.countCollectedResultsWithFundingInfo(this.datasourceId).subscribe(
|
||||
fundedContent => {
|
||||
|
|
|
@ -83,10 +83,10 @@ export class DataProviderService {
|
|||
.pipe(map(res => this.parseDataproviderAggregationStatus(res)));
|
||||
}
|
||||
|
||||
// getCollectedFulltexts(datasourceId: string) {
|
||||
// return this.http.get(properties.pdfStatisticsAPIURL+"/api/stats/getNumberOfPayloadsForDatasource?datasourceId="+datasourceId)
|
||||
// .pipe(map(res => res))
|
||||
// }
|
||||
getCollectedFulltexts(datasourceId: string) {
|
||||
return this.http.get(properties.pdfStatisticsAPIURL+"/stats/getNumberOfPayloadsForDatasource?datasourceId="+datasourceId)
|
||||
.pipe(map(res => res))
|
||||
}
|
||||
|
||||
private handleError (error: HttpErrorResponse) {
|
||||
// in a real world app, we may send the error to some remote logging infrastructure
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {HostedByCollectedFrom, Project, RelationResult} from "../../utils/result-preview/result-preview";
|
||||
import {Context, Measure, Metric, Reference} from "../../utils/entities/resultLandingInfo";
|
||||
import {Context, Measure, Metric, MetricPerDatasource, Reference} from "../../utils/entities/resultLandingInfo";
|
||||
import {Injectable} from '@angular/core';
|
||||
import {properties} from "../../../../environments/environment";
|
||||
import {StringUtils} from "../../utils/string-utils.class";
|
||||
|
@ -878,19 +878,43 @@ export class ParsingFunctions {
|
|||
if (elements && elements.length) {
|
||||
let bip: Metric[] = [];
|
||||
let counts: Metric[] = [];
|
||||
let countsPerDatasource: MetricPerDatasource[] = [];
|
||||
let measure: Measure = {};
|
||||
|
||||
let datasourcePosition: Map<string, number> = new Map<string, number>();
|
||||
|
||||
let views: number = 0;
|
||||
let downloads: number = 0;
|
||||
elements.forEach(element => {
|
||||
if (element.id == 'views') {
|
||||
counts.push({name: 'views', icon: 'visibility', value: element.count, order: 0});
|
||||
measure.views = element.count;
|
||||
views += element.count;
|
||||
let datasourceId = element.datasource;
|
||||
if(datasourceId) {
|
||||
if(datasourcePosition.has(element.datasource)) {
|
||||
countsPerDatasource[datasourcePosition.get(element.datasource)].views = element.count;
|
||||
} else {
|
||||
datasourcePosition.set(element.datasource, countsPerDatasource.length);
|
||||
countsPerDatasource.push({"datasourceId": element.datasource, "views": element.count, "downloads": 0})
|
||||
}
|
||||
}
|
||||
// measure.views = element.count;
|
||||
}
|
||||
if (element.id == 'downloads') {
|
||||
counts.push({name: 'downloads', icon: 'download', value: element.count, order: 1});
|
||||
measure.downloads = element.count;
|
||||
downloads += element.count;
|
||||
let datasourceId = element.datasource;
|
||||
if(datasourceId) {
|
||||
if(datasourcePosition.has(element.datasource)) {
|
||||
countsPerDatasource[datasourcePosition.get(element.datasource)].downloads = element.count;
|
||||
} else {
|
||||
datasourcePosition.set(element.datasource, countsPerDatasource.length);
|
||||
countsPerDatasource.push({"datasourceId": element.datasource, "views": 0, "downloads": element.count})
|
||||
}
|
||||
}
|
||||
// measure.downloads = element.count;
|
||||
}
|
||||
if (element.id == 'influence_alt' || element.id == 'citation_count') {
|
||||
bip.push({name: 'citations', icon: 'cite', value: element.score, order: 2});
|
||||
measure.citations = element.score;
|
||||
// measure.citations = element.score;
|
||||
}
|
||||
if (element.id == 'popularity') {
|
||||
let metric: Metric = {name: 'popularity', icon: 'fire', value: null, order: 3};
|
||||
|
@ -902,14 +926,10 @@ export class ParsingFunctions {
|
|||
metric.value = 'Top 1%';
|
||||
} else if (element.class == 'C4') {
|
||||
metric.value = 'Top 10%';
|
||||
} else if (element.class == 'A') {
|
||||
metric.value = 'Exceptional';
|
||||
} else if (element.class == 'B') {
|
||||
metric.value = 'Substantial';
|
||||
} else {
|
||||
metric.value = 'Average';
|
||||
}
|
||||
measure.popularity = metric.value;
|
||||
// measure.popularity = metric.value;
|
||||
bip.push(metric);
|
||||
}
|
||||
if (element.id == 'influence') {
|
||||
|
@ -922,14 +942,10 @@ export class ParsingFunctions {
|
|||
metric.value = 'Top 1%';
|
||||
} else if (element.class == 'C4') {
|
||||
metric.value = 'Top 10%';
|
||||
} else if (element.class == 'A') {
|
||||
metric.value = 'Exceptional';
|
||||
} else if (element.class == 'B') {
|
||||
metric.value = 'Substantial';
|
||||
} else {
|
||||
metric.value = 'Average';
|
||||
}
|
||||
measure.influence = metric.value;
|
||||
// measure.influence = metric.value;
|
||||
bip.push(metric);
|
||||
}
|
||||
if (element.id == 'impulse') {
|
||||
|
@ -942,17 +958,24 @@ export class ParsingFunctions {
|
|||
metric.value = 'Top 1%';
|
||||
} else if (element.class == 'C4') {
|
||||
metric.value = 'Top 10%';
|
||||
} else if (element.class == 'A') {
|
||||
metric.value = 'Exceptional';
|
||||
} else if (element.class == 'B') {
|
||||
metric.value = 'Substantial';
|
||||
} else {
|
||||
metric.value = 'Average';
|
||||
}
|
||||
measure.impulse = metric.value;
|
||||
// measure.impulse = metric.value;
|
||||
bip.push(metric);
|
||||
}
|
||||
});
|
||||
|
||||
if(views > 0) {
|
||||
counts.push({name: 'views', icon: 'visibility', value: views, order: 0});
|
||||
}
|
||||
if(downloads > 0) {
|
||||
counts.push({name: 'downloads', icon: 'download', value: downloads, order: 1});
|
||||
}
|
||||
if(countsPerDatasource && countsPerDatasource.length > 0) {
|
||||
measure.countsPerDatasource = countsPerDatasource;
|
||||
}
|
||||
|
||||
measure.bip = bip.sort((a, b) => a.order - b.order);
|
||||
measure.counts = counts.sort((a, b) => a.order - b.order);
|
||||
return measure;
|
||||
|
|
|
@ -1240,6 +1240,24 @@
|
|||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
<div *ngIf="resultLandingInfo.measure.countsPerDatasource" class="uk-margin-medium-top uk-width-auto">
|
||||
<table class="uk-table uk-table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="uk-width-expand uk-width-1-2@xl">Data source</th>
|
||||
<th class="uk-width-auto uk-text-center">Views</th>
|
||||
<th class="uk-width-auto uk-text-center">Downloads</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr *ngFor="let datasource of resultLandingInfo.measure.countsPerDatasource">
|
||||
<td class="uk-text-truncate"><a [routerLink]="properties.searchLinkToDataProvider.split('?')[0]" [queryParams]="{'datasourceId': datasource.datasourceId}">{{datasource.datasourceId}}</a></td>
|
||||
<td class="uk-text-center">{{datasource.views}}</td>
|
||||
<td class="uk-text-center">{{datasource.downloads}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="uk-text-center uk-margin-large-top">
|
||||
<span class="uk-text-meta">Powered by</span>
|
||||
<a href='https://usagecounts.openaire.eu/' target='_blank' class="uk-link-reset">
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard';
|
||||
import {ManageStakeholdersComponent} from "./manageStakeholders.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{
|
||||
path: '',
|
||||
component: ManageStakeholdersComponent,
|
||||
canDeactivate: [PreviousRouteRecorder]
|
||||
}
|
||||
])
|
||||
]
|
||||
})
|
||||
export class ManageStakeholdersRoutingModule {
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
<div page-content>
|
||||
<div header>
|
||||
<sidebar-mobile-toggle class="uk-margin-top uk-hidden@m uk-display-block"></sidebar-mobile-toggle>
|
||||
<div *ngIf="isCurator()" class="uk-margin-remove-bottom uk-margin-medium-top">
|
||||
<slider-tabs [type]="'dynamic'" (activeEmitter)="tab = $event">
|
||||
<slider-tab tabTitle="All" [tabId]="'all'" [active]="tab === 'all'"></slider-tab>
|
||||
<slider-tab tabTitle="Profile templates" [tabId]="'templates'" [active]="tab === 'templates'"></slider-tab>
|
||||
<slider-tab tabTitle="Profiles" [tabId]="'profiles'" [active]="tab === 'profiles'"></slider-tab>
|
||||
</slider-tabs>
|
||||
</div>
|
||||
</div>
|
||||
<div actions>
|
||||
<div class="uk-section-xsmall">
|
||||
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-wrap uk-flex-middle">
|
||||
<div search-input [searchControl]="filters.get('keyword')" [expandable]="true" placeholder="Search Profiles" searchInputClass="outer"
|
||||
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1 uk-flex uk-flex-right"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div inner>
|
||||
<div *ngIf="loading" class="uk-margin-medium-top uk-padding-large">
|
||||
<loading></loading>
|
||||
</div>
|
||||
<div *ngIf="!loading" uk-height-match="target: .titleContainer; row: false">
|
||||
<div uk-height-match="target: .logoContainer; row: false">
|
||||
<div *ngIf="tab != 'profiles' && isCurator()" class="uk-section">
|
||||
<h4>Profile Templates</h4>
|
||||
<div class="uk-grid uk-child-width-1-3@l uk-child-width-1-2@m uk-child-width-1-1 uk-grid-match" uk-grid>
|
||||
<ng-template ngFor [ngForOf]="displayDefaultStakeholders" let-stakeholder>
|
||||
<ng-container *ngTemplateOutlet="stakeholderBox; context: {stakeholder:stakeholder}"></ng-container>
|
||||
</ng-template>
|
||||
<div *ngIf="!loading && isCurator()">
|
||||
<ng-container *ngTemplateOutlet="newBox; context: {text:'Create a new default profile.', isDefault:true}"></ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="!isManager()" class="message">
|
||||
<h4 class="uk-text-center">
|
||||
No profiles to manage yet
|
||||
</h4>
|
||||
</div>
|
||||
<div *ngIf="tab != 'templates' && isManager()" class="uk-section">
|
||||
<h4>Profiles</h4>
|
||||
<div class="uk-grid uk-grid-match uk-child-width-1-3@l uk-child-width-1-2@m uk-child-width-1-1" uk-grid>
|
||||
<ng-template ngFor [ngForOf]="displayStakeholders" let-stakeholder>
|
||||
<ng-container *ngTemplateOutlet="stakeholderBox; context: {stakeholder:stakeholder}"></ng-container>
|
||||
</ng-template>
|
||||
<div *ngIf="!loading && isCurator()">
|
||||
<ng-container *ngTemplateOutlet="newBox; context: {text:'Create a new profile by selecting the type ('+typesAsString+') and ' +
|
||||
'select indicators based on a default or a blank profile.', isDefault:false}"></ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ng-template #stakeholderBox let-stakeholder="stakeholder">
|
||||
<div *ngIf="stakeholder">
|
||||
<div class="uk-card uk-card-default uk-card-body uk-position-relative" [ngClass]="stakeholder.type">
|
||||
<div class="uk-position-top-right uk-margin-small-right uk-margin-small-top">
|
||||
<a class="uk-link-reset uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" [name]="stakeholderUtils.visibilityIcon.get(stakeholder.visibility)" ratio="0.6"></icon>
|
||||
<icon [flex]="true" name="more_vert"></icon>
|
||||
</a>
|
||||
<div #element class="uk-dropdown" uk-dropdown="mode: click; pos: bottom-left; offset: 5; delay-hide: 0;">
|
||||
<ul class="uk-nav uk-dropdown-nav">
|
||||
<li>
|
||||
<a (click)="editStakeholder(stakeholder, !stakeholder.defaultId); hide(element)">Edit</a>
|
||||
</li>
|
||||
<li *ngIf="isCurator">
|
||||
<a (click)="createReport(stakeholder);hide(element)">Cache Indicators</a>
|
||||
</li>
|
||||
<li class="uk-nav-divider"></li>
|
||||
<ng-template ngFor [ngForOf]="stakeholderUtils.visibility" let-v>
|
||||
<li [class.uk-active]="stakeholder.visibility === v.value">
|
||||
<a (click)="changeStakeholderStatus(stakeholder, v.value);hide(element)">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" [name]="v.icon" ratio="0.6"></icon>
|
||||
<span class="uk-margin-small-left uk-width-expand">{{v.label}}</span>
|
||||
<icon *ngIf="stakeholder.visibility === v.value" [flex]="true" name="done" class="uk-text-secondary" ratio="0.8"></icon>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ng-template>
|
||||
<hr *ngIf="isProfileManager(stakeholder)" class="uk-nav-divider">
|
||||
<li *ngIf="isProfileManager(stakeholder)"><a
|
||||
(click)="deleteStakeholderOpen(stakeholder);hide(element)">Delete</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<a class="uk-display-block uk-text-center uk-link-reset" [routerLink]="'/admin/' + stakeholder.alias">
|
||||
<div class="titleContainer uk-h6 uk-margin-remove-bottom uk-margin-top multi-line-ellipsis lines-2">
|
||||
<p *ngIf="stakeholder.name" class="uk-margin-remove">
|
||||
{{stakeholder.name}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="logoContainer uk-margin-top uk-flex uk-flex-column uk-flex-center uk-flex-middle">
|
||||
<img [src]="stakeholder | logoUrl" class="uk-blend-multiply" style="max-height: 80px;">
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #newBox let-text="text" let-isDefault="isDefault">
|
||||
<ng-container *ngIf="!loading">
|
||||
<div class="uk-card uk-card-default uk-text-center uk-card-body clickable" (click)="editStakeholder(null, isDefault)">
|
||||
<div class="uk-text-small uk-text-muted">
|
||||
{{text}}
|
||||
</div>
|
||||
<div class="uk-margin-medium-top uk-margin-small-bottom">
|
||||
<span class="uk-text-secondary">
|
||||
<icon name="add" [ratio]="3"></icon>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
<modal-alert #editStakeholderModal [large]="true" classTitle="uk-background-primary uk-light"
|
||||
(alertOutput)="editStakeholderComponent.save(callback)" (cancelOutput)="editStakeholderComponent.removePhoto()"
|
||||
[okDisabled]="editStakeholderComponent.disabled">
|
||||
<div class="uk-height-large uk-position-relative" *ngIf="editStakeholderComponent.loading">
|
||||
<loading class="uk-position-center"></loading>
|
||||
</div>
|
||||
<div class="uk-padding" [class.uk-hidden]="editStakeholderComponent.loading">
|
||||
<edit-stakeholder #editStakeholderComponent></edit-stakeholder>
|
||||
</div>
|
||||
</modal-alert>
|
||||
<modal-alert #deleteStakeholderModal [overflowBody]="false" (alertOutput)="deleteStakeholder()">
|
||||
<div class="uk-height-medium uk-position-relative" *ngIf="deleteLoading">
|
||||
<loading class="uk-position-center"></loading>
|
||||
</div>
|
||||
<div *ngIf="!deleteLoading">
|
||||
This stakeholder will permanently be deleted. Are you sure you want to proceed?
|
||||
</div>
|
||||
</modal-alert>
|
|
@ -0,0 +1,23 @@
|
|||
@import (reference) "~src/assets/openaire-theme/less/color.less";
|
||||
|
||||
.setType(@color) {
|
||||
border-bottom: 4px solid fade(@color, 30%);
|
||||
|
||||
& .type {
|
||||
color: @color;
|
||||
}
|
||||
}
|
||||
|
||||
.uk-card {
|
||||
&.funder {
|
||||
.setType(@funder-color);
|
||||
}
|
||||
|
||||
&.ri {
|
||||
.setType(@ri-color);
|
||||
}
|
||||
|
||||
&.organization {
|
||||
.setType(@organization-color);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,311 @@
|
|||
import {Component, OnDestroy, OnInit, ViewChild} from "@angular/core";
|
||||
import {StakeholderService} from "../../monitor/services/stakeholder.service";
|
||||
import {EnvProperties} from "../../utils/properties/env-properties";
|
||||
import {Stakeholder, StakeholderEntities, Visibility} from "../../monitor/entities/stakeholder";
|
||||
import {Subscriber, zip} from "rxjs";
|
||||
import {StakeholderUtils} from "../utils/indicator-utils";
|
||||
import {UntypedFormBuilder, UntypedFormGroup} from "@angular/forms";
|
||||
import {AlertModal} from "../../utils/modal/alert";
|
||||
import {Option} from "../../sharedComponents/input/input.component";
|
||||
import {Title} from "@angular/platform-browser";
|
||||
import {UserManagementService} from "../../services/user-management.service";
|
||||
import {Session} from "../../login/utils/helper.class";
|
||||
import {EditStakeholderComponent} from "../general/edit-stakeholder/edit-stakeholder.component";
|
||||
import {properties} from "src/environments/environment";
|
||||
import {ActivatedRoute} from "@angular/router";
|
||||
import {CacheIndicatorsService} from "../utils/cache-indicators/cache-indicators.service";
|
||||
import {NotificationHandler} from "../../utils/notification-handler";
|
||||
|
||||
type Tab = 'all' | 'templates'| 'profiles';
|
||||
|
||||
declare var UIkit;
|
||||
|
||||
@Component({
|
||||
selector: 'home',
|
||||
templateUrl: "./manageStakeholders.component.html",
|
||||
styleUrls: ["./manageStakeholders.component.less"]
|
||||
})
|
||||
export class ManageStakeholdersComponent implements OnInit, OnDestroy {
|
||||
|
||||
public properties: EnvProperties;
|
||||
public loading: boolean = true;
|
||||
public deleteLoading: boolean = false;
|
||||
public stakeholderUtils: StakeholderUtils = new StakeholderUtils();
|
||||
public defaultStakeholders: Stakeholder[];
|
||||
public stakeholders: Stakeholder[];
|
||||
public alias: string[];
|
||||
public stakeholder: Stakeholder;
|
||||
public index: number;
|
||||
public user = null;
|
||||
public tab: Tab = 'all';
|
||||
/**
|
||||
* Filtered Stakeholders
|
||||
*/
|
||||
public displayDefaultStakeholders: Stakeholder[];
|
||||
public displayStakeholders: Stakeholder[];
|
||||
/**
|
||||
* Top filters
|
||||
*/
|
||||
public filters: UntypedFormGroup;
|
||||
public all: Option = {
|
||||
value: 'all',
|
||||
label: 'All'
|
||||
};
|
||||
|
||||
public callback: Function;
|
||||
|
||||
/**
|
||||
* Grid or List View
|
||||
*/
|
||||
private subscriptions: any[] = [];
|
||||
@ViewChild('editStakeholderModal', { static: true }) editStakeholderModal: AlertModal;
|
||||
@ViewChild('deleteStakeholderModal', { static: true }) deleteStakeholderModal: AlertModal;
|
||||
@ViewChild('editStakeholderComponent', { static: true }) editStakeholderComponent: EditStakeholderComponent;
|
||||
|
||||
constructor(private stakeholderService: StakeholderService,
|
||||
private cacheIndicatorsService: CacheIndicatorsService,
|
||||
private userManagementService: UserManagementService,
|
||||
private route: ActivatedRoute,
|
||||
private title: Title,
|
||||
private fb: UntypedFormBuilder) {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.buildFilters();
|
||||
this.properties = properties;
|
||||
this.title.setTitle('Manage profiles');
|
||||
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
|
||||
this.user = user;
|
||||
}));
|
||||
let data = zip(
|
||||
this.stakeholderService.getDefaultStakeholders(this.properties.monitorServiceAPIURL),
|
||||
this.stakeholderService.getMyStakeholders(this.properties.monitorServiceAPIURL),
|
||||
this.stakeholderService.getAlias(this.properties.monitorServiceAPIURL)
|
||||
);
|
||||
this.subscriptions.push(data.subscribe(res => {
|
||||
this.defaultStakeholders = res[0];
|
||||
this.stakeholders = res[1];
|
||||
this.displayDefaultStakeholders = res[0];
|
||||
this.displayStakeholders = res[1];
|
||||
this.alias = res[2];
|
||||
this.loading = false;
|
||||
}, error => {
|
||||
this.loading = false;
|
||||
}));
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this.subscriptions.forEach(value => {
|
||||
if (value instanceof Subscriber) {
|
||||
value.unsubscribe();
|
||||
} else if (value instanceof Function) {
|
||||
value();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
hide(element: any) {
|
||||
UIkit.dropdown(element).hide();
|
||||
}
|
||||
|
||||
|
||||
private buildFilters() {
|
||||
this.filters = this.fb.group({
|
||||
status: this.fb.control('all'),
|
||||
keyword: this.fb.control('')
|
||||
});
|
||||
this.subscriptions.push(this.filters.get('status').valueChanges.subscribe(value => {
|
||||
this.onStatusChange(value);
|
||||
}));
|
||||
this.subscriptions.push(this.filters.get('keyword').valueChanges.subscribe(value => {
|
||||
this.onKeywordChange(value);
|
||||
}));
|
||||
}
|
||||
|
||||
onStatusChange(value) {
|
||||
this.displayDefaultStakeholders = this.filterStatus(this.defaultStakeholders, value);
|
||||
this.displayStakeholders = this.filterStatus(this.stakeholders, value);
|
||||
}
|
||||
|
||||
onKeywordChange(value) {
|
||||
this.displayDefaultStakeholders = this.filterByKeyword(this.defaultStakeholders, value);
|
||||
this.displayStakeholders = this.filterByKeyword(this.stakeholders, value);
|
||||
}
|
||||
|
||||
private filterStatus(stakeholders: Stakeholder[], value): Stakeholder[] {
|
||||
if (value === 'all') {
|
||||
return stakeholders;
|
||||
} else {
|
||||
return stakeholders.filter(stakeholder => stakeholder.visibility == value);
|
||||
}
|
||||
}
|
||||
|
||||
private filterByKeyword(stakeholders: Stakeholder[], value): Stakeholder[] {
|
||||
if (!value) {
|
||||
return stakeholders;
|
||||
} else {
|
||||
return stakeholders.filter(stakeholder =>
|
||||
stakeholder.name && stakeholder.name.toLowerCase().includes(value.toLowerCase()) ||
|
||||
stakeholder.type && stakeholder.type.toLowerCase().includes(value.toLowerCase()) ||
|
||||
stakeholder.index_id && stakeholder.index_id.toLowerCase().includes(value.toLowerCase()) ||
|
||||
stakeholder.index_shortName && stakeholder.index_shortName.toLowerCase().includes(value.toLowerCase()) ||
|
||||
stakeholder.index_name && stakeholder.index_name.toLowerCase().includes(value.toLowerCase())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public editStakeholder(stakeholder: Stakeholder = null, isDefault: boolean = false) {
|
||||
if (isDefault) {
|
||||
this.index = (stakeholder) ? this.defaultStakeholders.findIndex(value => value._id === stakeholder._id) : -1;
|
||||
} else {
|
||||
this.index = (stakeholder) ? this.stakeholders.findIndex(value => value._id === stakeholder._id) : -1;
|
||||
}
|
||||
if (!stakeholder) {
|
||||
this.stakeholder = new Stakeholder(null, null, null,
|
||||
null, null, null, null, null);
|
||||
} else {
|
||||
this.stakeholder = stakeholder;
|
||||
}
|
||||
this.editStakeholderComponent.init(this.stakeholder, this.alias, this.defaultStakeholders, isDefault, this.index === -1);
|
||||
if (this.index !== -1) {
|
||||
this.callback = (stakeholder: Stakeholder) => {
|
||||
let index: number;
|
||||
if (stakeholder.defaultId == null) {
|
||||
index = this.alias.findIndex(value => value == this.defaultStakeholders[this.index].alias);
|
||||
this.defaultStakeholders[this.index] = stakeholder;
|
||||
} else {
|
||||
index = this.alias.findIndex(value => value == this.stakeholders[this.index].alias);
|
||||
this.stakeholders[this.index] = stakeholder;
|
||||
}
|
||||
if(index != -1) {
|
||||
this.alias[index] = stakeholder.alias;
|
||||
}
|
||||
this.editStakeholderModal.cancel();
|
||||
};
|
||||
this.editStakeholderModal.alertTitle = 'Edit ' + this.stakeholder.name;
|
||||
this.editStakeholderModal.okButtonText = 'Save Changes';
|
||||
} else {
|
||||
this.callback = (stakeholder: Stakeholder) => {
|
||||
if (stakeholder.defaultId === null) {
|
||||
this.defaultStakeholders.push(stakeholder);
|
||||
} else {
|
||||
this.stakeholders.push(stakeholder);
|
||||
}
|
||||
this.alias.push(stakeholder.alias);
|
||||
this.editStakeholderModal.cancel();
|
||||
};
|
||||
this.editStakeholderModal.alertTitle = 'Create a new ' + (isDefault?'Default ':'') + 'Profile';
|
||||
this.editStakeholderModal.okButtonText = 'Create';
|
||||
}
|
||||
this.editStakeholderModal.cancelButtonText = 'Cancel';
|
||||
this.editStakeholderModal.okButtonLeft = false;
|
||||
this.editStakeholderModal.alertMessage = false;
|
||||
this.editStakeholderModal.stayOpen = true;
|
||||
this.editStakeholderModal.open();
|
||||
}
|
||||
|
||||
public createReport(stakeholder: Stakeholder) {
|
||||
this.cacheIndicatorsService.createReport(stakeholder.alias).subscribe(report => {
|
||||
NotificationHandler.rise('A caching process for ' + stakeholder.name + ' has been started.' )
|
||||
}, error => {
|
||||
console.log(error);
|
||||
NotificationHandler.rise(error.message(), 'danger');
|
||||
});
|
||||
}
|
||||
|
||||
public deleteStakeholderOpen(stakeholder: Stakeholder) {
|
||||
this.stakeholder = stakeholder;
|
||||
this.deleteStakeholderModal.alertTitle = 'Delete ' + this.stakeholder.index_name;
|
||||
this.deleteStakeholderModal.cancelButtonText = 'No';
|
||||
this.deleteStakeholderModal.okButtonText = 'Yes';
|
||||
this.deleteStakeholderModal.alertMessage = false;
|
||||
this.deleteStakeholderModal.stayOpen = true;
|
||||
this.deleteStakeholderModal.open();
|
||||
}
|
||||
|
||||
public deleteStakeholder() {
|
||||
this.deleteLoading = true;
|
||||
if (!this.stakeholder.defaultId) {
|
||||
this.index = (this.stakeholder) ? this.defaultStakeholders.findIndex(value => value._id === this.stakeholder._id) : -1;
|
||||
} else {
|
||||
this.index = (this.stakeholder) ? this.stakeholders.findIndex(value => value._id === this.stakeholder._id) : -1;
|
||||
}
|
||||
this.subscriptions.push(this.stakeholderService.deleteElement(this.properties.monitorServiceAPIURL, [this.stakeholder._id]).subscribe(() => {
|
||||
UIkit.notification(this.stakeholder.name+ ' has been <b>successfully deleted</b>', {
|
||||
status: 'success',
|
||||
timeout: 6000,
|
||||
pos: 'bottom-right'
|
||||
});
|
||||
if (!this.stakeholder.defaultId) {
|
||||
this.defaultStakeholders.splice(this.index, 1);
|
||||
} else {
|
||||
this.stakeholders.splice(this.index, 1);
|
||||
}
|
||||
this.alias = this.alias.filter(item => item !== this.stakeholder.alias);
|
||||
this.deleteLoading = false;
|
||||
this.deleteStakeholderModal.cancel();
|
||||
}, error => {
|
||||
UIkit.notification('An error has occurred. Please try again later', {
|
||||
status: 'danger',
|
||||
timeout: 6000,
|
||||
pos: 'bottom-right'
|
||||
});
|
||||
this.deleteLoading = false;
|
||||
this.deleteStakeholderModal.cancel();
|
||||
}));
|
||||
}
|
||||
|
||||
changeStakeholderStatus(stakeholder: Stakeholder, visibility: Visibility) {
|
||||
let path = [
|
||||
stakeholder._id
|
||||
];
|
||||
this.subscriptions.push(this.stakeholderService.changeVisibility(this.properties.monitorServiceAPIURL, path, visibility).subscribe(returnedElement => {
|
||||
stakeholder.visibility = returnedElement.visibility;
|
||||
UIkit.notification(stakeholder.name+ '\'s status has been <b>successfully changed</b> to ' + stakeholder.visibility.toLowerCase(), {
|
||||
status: 'success',
|
||||
timeout: 6000,
|
||||
pos: 'bottom-right'
|
||||
});
|
||||
}, error => {
|
||||
UIkit.notification('An error has occurred. Please try again later', {
|
||||
status: 'danger',
|
||||
timeout: 6000,
|
||||
pos: 'bottom-right'
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
public isManager(): boolean {
|
||||
return this.isCurator() || (Session.isKindOfMonitorManager(this.user));
|
||||
}
|
||||
|
||||
public isProfileManager(stakeholder: Stakeholder): boolean {
|
||||
return this.isCurator() || (Session.isManager(stakeholder.type, stakeholder.alias, this.user));
|
||||
}
|
||||
|
||||
public isCurator(): boolean {
|
||||
return this.isAdmin() || Session.isMonitorCurator(this.user);
|
||||
}
|
||||
|
||||
public isAdmin(): boolean {
|
||||
return Session.isPortalAdministrator(this.user);
|
||||
}
|
||||
|
||||
get typesAsString() {
|
||||
return this.stakeholderUtils.types.slice(0, this.stakeholderUtils.types.length - 1).map(type => type.label).join(', ') +
|
||||
' or ' + this.stakeholderUtils.types[this.stakeholderUtils.types.length - 1].label
|
||||
}
|
||||
|
||||
private isTab(tab: Tab): boolean {
|
||||
switch (tab) {
|
||||
case "all":
|
||||
return true;
|
||||
case "profiles":
|
||||
return true;
|
||||
case "templates":
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
import {NgModule} from "@angular/core";
|
||||
import {ManageStakeholdersComponent} from "./manageStakeholders.component";
|
||||
import {ManageStakeholdersRoutingModule} from "./manageStakeholders-routing.module";
|
||||
import {PreviousRouteRecorder} from "../../utils/piwik/previousRouteRecorder.guard";
|
||||
import {CommonModule} from "@angular/common";
|
||||
import {RouterModule} from "@angular/router";
|
||||
import {InputModule} from "../../sharedComponents/input/input.module";
|
||||
import {LoadingModule} from "../../utils/loading/loading.module";
|
||||
import {AlertModalModule} from "../../utils/modal/alertModal.module";
|
||||
import {ReactiveFormsModule} from "@angular/forms";
|
||||
import {IconsModule} from "../../utils/icons/icons.module";
|
||||
import {IconsService} from "../../utils/icons/icons.service";
|
||||
import {earth, incognito, restricted} from "../../utils/icons/icons";
|
||||
import {PageContentModule} from "../../dashboard/sharedComponents/page-content/page-content.module";
|
||||
import {LogoUrlPipeModule} from "../../utils/pipes/logoUrlPipe.module";
|
||||
import {SearchInputModule} from "../../sharedComponents/search-input/search-input.module";
|
||||
import {
|
||||
SidebarMobileToggleModule
|
||||
} from "../../dashboard/sharedComponents/sidebar/sidebar-mobile-toggle/sidebar-mobile-toggle.module";
|
||||
import {SliderTabsModule} from "../../sharedComponents/tabs/slider-tabs.module";
|
||||
import {EditStakeholderModule} from "../general/edit-stakeholder/edit-stakeholder.module";
|
||||
|
||||
@NgModule({
|
||||
declarations: [ManageStakeholdersComponent],
|
||||
imports: [
|
||||
ManageStakeholdersRoutingModule,
|
||||
CommonModule,
|
||||
RouterModule,
|
||||
InputModule,
|
||||
LoadingModule,
|
||||
AlertModalModule,
|
||||
ReactiveFormsModule,
|
||||
EditStakeholderModule,
|
||||
IconsModule,
|
||||
PageContentModule,
|
||||
LogoUrlPipeModule,
|
||||
SearchInputModule,
|
||||
SidebarMobileToggleModule,
|
||||
SliderTabsModule
|
||||
],
|
||||
providers: [
|
||||
PreviousRouteRecorder,
|
||||
],
|
||||
exports: [ManageStakeholdersComponent]
|
||||
})
|
||||
export class ManageStakeholdersModule {
|
||||
constructor(private iconsService: IconsService) {
|
||||
this.iconsService.registerIcons([earth, incognito, restricted]);
|
||||
}
|
||||
}
|
|
@ -314,6 +314,6 @@ export enum StakeholderEntities {
|
|||
export let stakeholderTypes: Option[] = [
|
||||
{value: 'funder', label: StakeholderEntities.FUNDER},
|
||||
{value: 'ri', label: StakeholderEntities.RI},
|
||||
{value: 'project', label: StakeholderEntities.PROJECT},
|
||||
{value: 'organization', label: StakeholderEntities.ORGANIZATION}
|
||||
{value: 'organization', label: StakeholderEntities.ORGANIZATION},
|
||||
{value: 'project', label: StakeholderEntities.PROJECT}
|
||||
];
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<div class = "uk-position-relative">
|
||||
<div class = "uk-width-1-1">
|
||||
<result-preview [properties]="properties" [showOrcid]="false" [showOrganizations]="true"
|
||||
[showSubjects]="true" [result]="result" [promoteWebsiteURL]="true"
|
||||
[showSubjects]="true" [result]="result"
|
||||
[isCard]="false">
|
||||
</result-preview>
|
||||
</div>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<ul class="uk-margin-top uk-list uk-margin search-results ">
|
||||
<li *ngFor="let result of results">
|
||||
<result-preview [properties]="properties" [showOrganizations]="true"
|
||||
[showSubjects]="true" [result]="getResultPreview(result)" [promoteWebsiteURL]="true"
|
||||
[showSubjects]="true" [result]="getResultPreview(result)"
|
||||
[isCard]="true">
|
||||
</result-preview>
|
||||
</li>
|
||||
|
|
|
@ -345,7 +345,8 @@
|
|||
[status]="searchUtils.status"
|
||||
[type]="entityType"
|
||||
[zenodoInformation]="zenodoInformation"
|
||||
[properties]=properties>
|
||||
[properties]=properties
|
||||
[isMobile]="mobile">
|
||||
</deposit-result>
|
||||
<orcid-result *ngIf="usedBy == 'orcid'"
|
||||
[results]="results"
|
||||
|
|
|
@ -30,20 +30,28 @@ export interface Context {
|
|||
}
|
||||
|
||||
export interface Measure {
|
||||
/** @deprecated*/
|
||||
downloads?: string;
|
||||
/** @deprecated*/
|
||||
views?: string;
|
||||
/** @deprecated*/
|
||||
influence?: string;
|
||||
/** @deprecated*/
|
||||
popularity?: string;
|
||||
/** @deprecated*/
|
||||
citations?: string;
|
||||
/** @deprecated*/
|
||||
impulse?: string;
|
||||
// /** @deprecated*/
|
||||
// downloads?: string;
|
||||
// /** @deprecated*/
|
||||
// views?: string;
|
||||
// /** @deprecated*/
|
||||
// influence?: string;
|
||||
// /** @deprecated*/
|
||||
// popularity?: string;
|
||||
// /** @deprecated*/
|
||||
// citations?: string;
|
||||
// /** @deprecated*/
|
||||
// impulse?: string;
|
||||
bip?: Metric[]
|
||||
counts?: Metric[]
|
||||
countsPerDatasource?: MetricPerDatasource[];
|
||||
}
|
||||
|
||||
export interface MetricPerDatasource {
|
||||
datasourceId: string,
|
||||
// datasourceName: string,
|
||||
views: number,
|
||||
downloads: number
|
||||
}
|
||||
|
||||
export interface Metric {
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import {watch} from "fs/promises";
|
||||
|
||||
export type Environment = "development" | "test" | "beta" | "production";
|
||||
export type Dashboard = "explore" | "connect" | "monitor" | "aggregator" | "eosc" | "developers" | "faircore4eosc";
|
||||
export type PortalType = "explore" | "connect" | "community" | "monitor" | "funder" | "ri" | "project" | "organization" | "aggregator" | "eosc" | "faircore4eosc";
|
||||
|
@ -16,6 +14,7 @@ export interface EnvProperties {
|
|||
showAddThis?: boolean;
|
||||
showContent?: boolean;
|
||||
enableEoscDataTransfer?:boolean;
|
||||
pdfStatisticsAPIURL?: string;
|
||||
statisticsFrameAPIURL?: string; //delete?
|
||||
statisticsFrameNewAPIURL?: string;
|
||||
bipFrameAPIURL?: string;
|
||||
|
|
|
@ -72,15 +72,27 @@ export let common: EnvProperties = {
|
|||
admins: ['feedback@openaire.eu'],
|
||||
b2noteAPIURL: 'https://b2note.eudat.eu/',
|
||||
myOrcidLinksPage: "/my-orcid-links",
|
||||
footerGrantText: "OpenAIRE has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreements No. 777541 and 101017452"
|
||||
|
||||
footerGrantText: "OpenAIRE has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreements No. 777541 and 101017452",
|
||||
|
||||
//connect
|
||||
enermapsURL:"https://lab.idiap.ch/enermaps",
|
||||
zenodoCommunities: 'https://zenodo.org/api/communities/',
|
||||
shareInZenodoPage: '/participate/deposit/zenodo',
|
||||
afterLoginRedirectLink: '/myCommunities',
|
||||
searchLinkToCommunities: '/search/find/communities',
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
export let commonDev: EnvProperties = {
|
||||
environment: "development",
|
||||
pdfStatisticsAPIURL: "https://beta.services.openaire.eu/pdf-stats",
|
||||
statisticsAPIURL: "http://vatopedi.di.uoa.gr:8080/stats/",
|
||||
statisticsFrameAPIURL: "https://beta.openaire.eu/stats/",
|
||||
statisticsFrameNewAPIURL: "https://stats.madgik.di.uoa.gr/stats-api/",
|
||||
claimsAPIURL: "http://rudie.di.uoa.gr:8980/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/",
|
||||
claimsAPIURL: "http://scoobydoo.di.uoa.gr:8880/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/",
|
||||
searchAPIURLLAst: "http://beta.services.openaire.eu/search/v2/api/",
|
||||
searchResourcesAPIURL: "https://beta.services.openaire.eu/search/v2/api/resources",
|
||||
|
||||
|
@ -108,16 +120,23 @@ export let commonDev: EnvProperties = {
|
|||
indexInfoAPI: "https://beta.services.openaire.eu/openaire/info/",
|
||||
admins: ['kostis30fylloy@gmail.com', 'alexandros.martzios@athenarc.gr', 'kgalouni@di.uoa.gr'],
|
||||
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/',
|
||||
|
||||
|
||||
//admin
|
||||
miningBackendURL: 'https://beta.services.openaire.eu/interactive-mining',
|
||||
feedbackmailForMissingEntities: 'feedback@openaire.eu',
|
||||
connectPortalUrl: 'http://scoobydoo.di.uoa.gr:4200',
|
||||
}
|
||||
|
||||
export let commonTest: EnvProperties = {
|
||||
environment: "test",
|
||||
pdfStatisticsAPIURL: "https://services.openaire.eu/pdf-stats",
|
||||
statisticsAPIURL: "https://beta.services.openaire.eu/stats-api/",
|
||||
statisticsFrameAPIURL: "https://www.openaire.eu/stats/",
|
||||
statisticsFrameNewAPIURL: "https://services.openaire.eu/stats-tool/",
|
||||
claimsAPIURL: "https://services.openaire.eu/claims/rest/claimsService/",
|
||||
claimsAPIURL: "https://services.openaire.eu/claims-new/rest/claimsService/",
|
||||
searchAPIURLLAst: "https://services.openaire.eu/shadowSearch/v2/api/",
|
||||
searchResourcesAPIURL: "https://services.openaire.eu/shadowSearch/v2/api/resources",
|
||||
csvAPIURL: "https://services.openaire.eu/search/v2/api/reports",
|
||||
|
@ -136,13 +155,15 @@ export let commonTest: EnvProperties = {
|
|||
widgetLink: "https://www.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=",
|
||||
claimsInformationLink: "https://www.openaire.eu/linking",
|
||||
indexInfoAPI: "https://services.openaire.eu/openaire/info/",
|
||||
adminPortalURL: "https://admin.connect.openaire.eu",
|
||||
baseOpenaireLink: 'https://explore.openaire.eu',
|
||||
|
||||
adminPortalURL: "https://admin.explore.openaire.eu",
|
||||
|
||||
}
|
||||
|
||||
export let commonBeta: EnvProperties = {
|
||||
environment: "beta",
|
||||
pdfStatisticsAPIURL: "https://beta.services.openaire.eu/pdf-stats",
|
||||
statisticsAPIURL: "https://beta.services.openaire.eu/stats-api/",
|
||||
statisticsFrameAPIURL: "https://beta.openaire.eu/stats/",
|
||||
statisticsFrameNewAPIURL: "https://beta.services.openaire.eu/stats-tool/",
|
||||
|
@ -165,15 +186,29 @@ export let commonBeta: EnvProperties = {
|
|||
widgetLink: "https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=",
|
||||
claimsInformationLink: "https://beta.openaire.eu/linking",
|
||||
indexInfoAPI: "https://beta.services.openaire.eu/openaire/info/",
|
||||
adminPortalURL: "https://beta.admin.connect.openaire.eu"
|
||||
|
||||
adminPortalURL: "https://beta.admin.connect.openaire.eu",
|
||||
baseOpenaireLink: 'https://beta.explore.openaire.eu',
|
||||
|
||||
//connect
|
||||
communitiesAPI: "https://beta.services.openaire.eu/openaire/community/communities",
|
||||
registryUrl: 'https://beta.services.openaire.eu/uoa-user-management/api/registry/',
|
||||
//admin
|
||||
miningBackendURL: 'https://beta.services.openaire.eu/interactive-mining',
|
||||
feedbackmailForMissingEntities: 'feedback@openaire.eu',
|
||||
deleteCacheUrl: 'https://demo.openaire.eu/cache/clear',
|
||||
deleteBrowserCacheUrl: 'https://beta.services.openaire.eu/uoa-admin-tools/cache',
|
||||
connectPortalUrl: 'https://beta.connect.openaire.eu',
|
||||
|
||||
}
|
||||
|
||||
export let commonProd: EnvProperties = {
|
||||
environment: "production",
|
||||
pdfStatisticsAPIURL: "https://services.openaire.eu/pdf-stats",
|
||||
statisticsAPIURL: "https://beta.services.openaire.eu/stats-api/",
|
||||
statisticsFrameAPIURL: "https://www.openaire.eu/stats/",
|
||||
statisticsFrameNewAPIURL: "https://services.openaire.eu/stats-tool/",
|
||||
claimsAPIURL: "https://services.openaire.eu/claims/rest/claimsService/",
|
||||
claimsAPIURL: "https://services.openaire.eu/claims-new/rest/claimsService/",
|
||||
searchAPIURLLAst: "https://services.openaire.eu/search/v2/api/",
|
||||
searchResourcesAPIURL: "https://services.openaire.eu/search/v2/api/resources",
|
||||
csvAPIURL: "https://services.openaire.eu/search/v2/api/reports",
|
||||
|
@ -192,6 +227,54 @@ export let commonProd: EnvProperties = {
|
|||
widgetLink: "https://www.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=",
|
||||
claimsInformationLink: "https://www.openaire.eu/linking",
|
||||
indexInfoAPI: "https://services.openaire.eu/openaire/info/",
|
||||
adminPortalURL: "https://admin.explore.openaire.eu",
|
||||
adminPortalURL: "https://admin.connect.openaire.eu",
|
||||
baseOpenaireLink: 'https://explore.openaire.eu',
|
||||
|
||||
//connect
|
||||
communitiesAPI: "https://services.openaire.eu/openaire/community/communities",
|
||||
|
||||
//admin
|
||||
registryUrl: 'https://services.openaire.eu/uoa-user-management/api/registry/',
|
||||
miningBackendURL: 'https://beta.services.openaire.eu/interactive-mining',
|
||||
feedbackmailForMissingEntities: 'feedback@openaire.eu',
|
||||
deleteCacheUrl: 'https://explore.openaire.eu/cache/clear',
|
||||
deleteBrowserCacheUrl: 'https://services.openaire.eu/uoa-admin-tools/cache',
|
||||
connectPortalUrl: 'https://connect.openaire.eu',
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
|
||||
Properties to check
|
||||
|
||||
* not in explore
|
||||
|
||||
* isDashboard
|
||||
showContent
|
||||
|
||||
enableEoscDataTransfer
|
||||
|
||||
|
||||
developersApiUrl?: string,
|
||||
|
||||
useHelpTexts?:boolean;
|
||||
|
||||
|
||||
searchLinkToStakeholders?: string;
|
||||
|
||||
searchLinkToAdvancedServices?: string;
|
||||
|
||||
|
||||
sushiliteURL?: string;
|
||||
|
||||
notificationsAPIURL?: string;
|
||||
|
||||
|
||||
egiNotebookLink?: string;
|
||||
|
||||
eoscDataTransferAPI?;
|
||||
eoscDataTransferLoginUrl?;
|
||||
eoscDataTransferDestinations?;
|
||||
* */
|
||||
|
||||
|
|
|
@ -20,6 +20,19 @@
|
|||
<div class="uk-margin-small-bottom">
|
||||
<!-- Title -->
|
||||
<div class="uk-grid">
|
||||
<div [ngClass]="result.websiteURL && promoteWebsiteURL && !isMobile ? 'uk-flex uk-flex-between uk-width-1-1' : 'uk-width-expand'">
|
||||
<div *ngIf="result.websiteURL && promoteWebsiteURL" class="uk-flex uk-flex-right"
|
||||
[ngClass]="isMobile ? 'uk-width-1-1 uk-margin-small-bottom' : 'uk-flex-last uk-margin-left uk-width-auto'">
|
||||
<span>
|
||||
<a href="{{result.websiteURL}}" target="_blank" type="submit"
|
||||
class="uk-float-right uk-margin-small-left uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
|
||||
<span class="uk-flex uk-flex-middle">
|
||||
<icon name="file_upload" type="outlined" [flex]="true" class="uk-margin-small-right"></icon>
|
||||
<span>Go to repository</span>
|
||||
</span>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="multi-line-ellipsis lines-3 uk-width-expand">
|
||||
<h2 class="uk-margin-remove uk-text-break uk-inline-block uk-h6">
|
||||
<a *ngIf="!externalUrl && result.id" (click)="onClick()" [queryParams]="addEoscPrevInParams(createParam())"
|
||||
|
@ -66,6 +79,7 @@
|
|||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="result.hostedBy_collectedFrom && result.hostedBy_collectedFrom.length > 0" class="uk-hidden@m uk-width-auto">
|
||||
<div class="uk-margin-small-bottom uk-flex uk-flex-middle"
|
||||
[ngClass]="(result.hostedBy_collectedFrom[0].accessRightIcon == 'open_access' ? 'open-access' : 'closed-access')"
|
||||
|
@ -158,17 +172,17 @@
|
|||
</div>
|
||||
</div>
|
||||
<!-- 5th section(deposit only) -->
|
||||
<div>
|
||||
<span *ngIf="result.websiteURL && promoteWebsiteURL" class="uk-flex uk-flex-right uk-margin-small-top">
|
||||
<a href="{{result.websiteURL}}" target="_blank" type="submit"
|
||||
class="uk-float-right uk-margin-small-left uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
|
||||
<span class="uk-flex uk-flex-middle">
|
||||
<icon name="file_upload" type="outlined" [flex]="true" class="uk-margin-small-right"></icon>
|
||||
<span>Go to repository</span>
|
||||
</span>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<!-- <div>-->
|
||||
<!-- <span *ngIf="result.websiteURL && promoteWebsiteURL" class="uk-flex uk-flex-right uk-margin-small-top">-->
|
||||
<!-- <a href="{{result.websiteURL}}" target="_blank" type="submit"-->
|
||||
<!-- class="uk-float-right uk-margin-small-left uk-display-inline-block uk-text-uppercase uk-button uk-button-text">-->
|
||||
<!-- <span class="uk-flex uk-flex-middle">-->
|
||||
<!-- <icon name="file_upload" type="outlined" [flex]="true" class="uk-margin-small-right"></icon>-->
|
||||
<!-- <span>Go to repository</span>-->
|
||||
<!-- </span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </span>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="(result.hostedBy_collectedFrom || hasActions || result.measure?.bip.length || result.measure?.counts.length) && !isDeletedByInferenceModal"
|
||||
|
|
Loading…
Reference in New Issue