Compare commits

...

12 Commits

Author SHA1 Message Date
Konstantinos Triantafyllou 077b234fe4 Merge from develop 2024-10-30 11:03:15 +02:00
Konstantinos Triantafyllou 3bb603fbe7 [develop]: Update version and changelogs. 2024-10-30 10:58:09 +02:00
Konstantinos Triantafyllou f61308d2d5 [develop]: Change OA Indicator to show percentage of OA for the last full year. 2024-10-29 23:54:10 +02:00
Konstantinos Triantafyllou 3f883248d2 [develop]: Admin component: Add setAdminMenuItems method to replace duplicate code. 2024-09-23 16:54:59 +03:00
Konstantinos Triantafyllou 69c7174808 Merge remote-tracking branch 'origin/develop' 2024-09-18 14:13:10 +03:00
Konstantinos Triantafyllou 45a8cfc76a Fix text in home 2024-09-18 13:54:14 +03:00
Konstantinos Triantafyllou 986a6265ac Merge remote-tracking branch 'origin/develop' 2024-09-18 13:11:01 +03:00
Konstantinos Triantafyllou e26f2865b1 Change version in package.json 2024-09-18 13:10:52 +03:00
Konstantinos Triantafyllou f7cc26519e Merge from develop before release of 1.0.2 2024-09-18 13:08:33 +03:00
Konstantinos Triantafyllou 21adb8493a Change texts in about and home. Add info for publicly-funded filter. Add engagement tag for engagement and training. Update library and Changelog before release. 2024-09-18 13:01:37 +03:00
Alex Martzios 1182a93f27 [develop | DONE | CHANGED] monitorServiceAPIURL property: remove from function parameter 2024-09-13 12:39:30 +03:00
Alex Martzios 86e3450798 [develop | DONE | CHANGED] monitorServiceAPIURL: remove duplicate '/' 2024-09-05 13:32:56 +03:00
14 changed files with 94 additions and 59 deletions

View File

@ -14,6 +14,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- *Fixed (for any bug fixes)* - *Fixed (for any bug fixes)*
- *Security (in case of vulnerabilities)* - *Security (in case of vulnerabilities)*
## v1.0.3 - 30.10.2024
### Changed
Open Access Indicator changed to show open access for the last full year. (e.g. 2023)
## v1.0.2 - 18.09.2024
### Changed
Texts in home and about.
### Added
Add info for publicly-funded filter.
Add engagement tag for engagement-training page.
## v1.0.1 - 25.07.2024 ## v1.0.1 - 25.07.2024
### Fixed ### Fixed
Problem with ORCID KPIs regarding a researcher. Problem with ORCID KPIs regarding a researcher.

View File

@ -1,6 +1,6 @@
{ {
"name": "irish-monitor", "name": "irish-monitor",
"version": "1.0.1", "version": "1.0.3",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve --port 5500 --disable-host-check --host 0.0.0.0", "start": "ng serve --port 5500 --disable-host-check --host 0.0.0.0",

View File

@ -111,7 +111,7 @@ export function app(): express.Express {
})); }));
if (userinfoRes.status === 200) { if (userinfoRes.status === 200) {
let user = new User(userinfoRes.data); let user = new User(userinfoRes.data);
let stakeholderRes = (await axios.get<Stakeholder>(properties.monitorServiceAPIURL + '/stakeholder/' + encodeURIComponent(req.params.alias), { let stakeholderRes = (await axios.get<Stakeholder>(properties.monitorServiceAPIURL + 'stakeholder/' + encodeURIComponent(req.params.alias), {
withCredentials: true, withCredentials: true,
headers: headers headers: headers
}).catch(error => { }).catch(error => {

View File

@ -20,9 +20,11 @@ import {Irish} from "../shared/irish";
[class.sidebar_main_active]="open && (hasSidebar || hasInternalSidebar || hasAdminMenu)" [class.sidebar_main_active]="open && (hasSidebar || hasInternalSidebar || hasAdminMenu)"
[class.sidebar_mini]="!open && (hasSidebar || hasInternalSidebar || hasAdminMenu)" [class.sidebar_mini]="!open && (hasSidebar || hasInternalSidebar || hasAdminMenu)"
[class.sidebar_hover]="hover"> [class.sidebar_hover]="hover">
<dashboard-sidebar *ngIf="hasSidebar && !hasInternalSidebar && sideBarItems.length > 0" [logoURL]="stakeholder | logoUrl" <dashboard-sidebar *ngIf="hasSidebar && !hasInternalSidebar && sideBarItems.length > 0"
[logoURL]="stakeholder | logoUrl"
[items]="sideBarItems" [backItem]="backItem"></dashboard-sidebar> [items]="sideBarItems" [backItem]="backItem"></dashboard-sidebar>
<dashboard-sidebar *ngIf="hasAdminMenu && !hasInternalSidebar" [items]="adminMenuItems" [backItem]="backItem"></dashboard-sidebar> <dashboard-sidebar *ngIf="hasAdminMenu && !hasInternalSidebar" [items]="adminMenuItems"
[backItem]="backItem"></dashboard-sidebar>
<div class="uk-width-1-1"> <div class="uk-width-1-1">
<router-outlet></router-outlet> <router-outlet></router-outlet>
</div> </div>
@ -69,19 +71,10 @@ export class AdminComponent extends SidebarBaseComponent implements OnInit {
if (this.isAdmin && this.stakeholder.defaultId) { if (this.isAdmin && this.stakeholder.defaultId) {
this.sideBarItems.push(new MenuItem("admin-tools", "Pages & Entities", "", "/admin/" + this.stakeholder.alias + "/admin-tools/pages", false, [], [], {}, {name: 'description'}, null, "uk-visible@m", "/admin/" + this.stakeholder.alias + "/admin-tools")); this.sideBarItems.push(new MenuItem("admin-tools", "Pages & Entities", "", "/admin/" + this.stakeholder.alias + "/admin-tools/pages", false, [], [], {}, {name: 'description'}, null, "uk-visible@m", "/admin/" + this.stakeholder.alias + "/admin-tools"));
} }
this.backItem = null;
if (this.hasAdminMenu) { if (this.hasAdminMenu) {
this.adminMenuItems = []; this.setAdminMenuItems();
this.backItem = null;
this.adminMenuItems.push(new MenuItem("stakeholders", "Manage profiles", "", "/admin", false, [], [], {}, {name: 'settings'}));
if (Session.isPortalAdministrator(this.user)) {
this.adminMenuItems.push(new MenuItem("adminOptions", "Super Admin options", "", "/admin/admin-tools/portals", false, [], [], {}, {name: 'settings'}, null, "uk-visible@m", '/admin/admin-tools'));
}
if (Session.isPortalAdministrator(this.user) || Session.isMonitorCurator(this.user)) {
this.adminMenuItems.push(new MenuItem("irishOptions", "Irish options", "", "/admin/irish/admin-tools/pages", false, [], [], {}, {name: 'settings'}, null, "uk-visible@m", '/admin/irish/admin-tools'));
}
this.hasAdminMenu = this.hasAdminMenu && this.adminMenuItems.length > 1;
} }
this.backItem = new MenuItem("back", "Manage profiles", "", "/admin", false, [], null, {}, {name: 'west'}); this.backItem = new MenuItem("back", "Manage profiles", "", "/admin", false, [], null, {}, {name: 'west'});
this.loading = false; this.loading = false;
})); }));
@ -92,16 +85,7 @@ export class AdminComponent extends SidebarBaseComponent implements OnInit {
this.hasSidebar = false; this.hasSidebar = false;
this.loading = false; this.loading = false;
if (this.hasAdminMenu) { if (this.hasAdminMenu) {
this.adminMenuItems = []; this.setAdminMenuItems();
this.backItem = null;
this.adminMenuItems.push(new MenuItem("stakeholders", "Manage profiles", "", "/admin", false, [], [], {}, {name: 'settings'}));
if (Session.isPortalAdministrator(this.user)) {
this.adminMenuItems.push(new MenuItem("adminOptions", "Super Admin options", "", "/admin/admin-tools/portals", false, [], [], {}, {name: 'settings'}, null, "uk-visible@m", '/admin/admin-tools'));
}
if (Session.isPortalAdministrator(this.user) || Session.isMonitorCurator(this.user)) {
this.adminMenuItems.push(new MenuItem("irishOptions", "Irish options", "", "/admin/irish/admin-tools/pages", false, [], [], {}, {name: 'settings'}, null, "uk-visible@m", '/admin/irish/admin-tools'));
}
this.hasAdminMenu = this.hasAdminMenu && this.adminMenuItems.length > 1;
} }
} }
})); }));
@ -125,6 +109,18 @@ export class AdminComponent extends SidebarBaseComponent implements OnInit {
this.configurationService.initPortal(this.properties, this.properties.adminToolsCommunity); this.configurationService.initPortal(this.properties, this.properties.adminToolsCommunity);
} }
private setAdminMenuItems() {
this.adminMenuItems = [];
this.adminMenuItems.push(new MenuItem("stakeholders", "Manage profiles", "", "/admin", false, [], [], {}, {name: 'settings'}));
if (Session.isPortalAdministrator(this.user)) {
this.adminMenuItems.push(new MenuItem("adminOptions", "Super Admin options", "", "/admin/admin-tools/portals", false, [], [], {}, {name: 'settings'}, null, "uk-visible@m", '/admin/admin-tools'));
}
if (Session.isPortalAdministrator(this.user) || Session.isMonitorCurator(this.user)) {
this.adminMenuItems.push(new MenuItem("irishOptions", "Irish options", "", "/admin/irish/admin-tools/pages", false, [], [], {}, {name: 'settings'}, null, "uk-visible@m", '/admin/irish/admin-tools'));
}
this.hasAdminMenu = this.hasAdminMenu && this.adminMenuItems.length > 1;
}
public get isAdmin() { public get isAdmin() {
return Session.isPortalAdministrator(this.user) || Session.isCurator(this.stakeholder.type, this.user); return Session.isPortalAdministrator(this.user) || Session.isCurator(this.stakeholder.type, this.user);
} }

View File

@ -7,8 +7,9 @@
<div class="uk-text-large uk-width-1-1 uk-width-medium@m uk-flex-last@m"> <div class="uk-text-large uk-width-1-1 uk-width-medium@m uk-flex-last@m">
<div> <div>
Enhance your approach to Open Science. Explore insights thoughtfully designed to support your Enhance your approach to Open Science. Explore insights thoughtfully designed to support your
strategy and contribute to the future of Irish Open Science. Our current pilot phase, aimed at strategy and contribute to the future of Irish Open Science. In our current pilot phase we are
enhancing data integrity and broadening functionality, continues until June 2024. aiming at enhancing data integrity, broadening functionality and embedding the Monitor into the
Irish scholarly ecosystem.
</div> </div>
<a routerLink="/national" class="uk-button uk-button-secondary uk-margin-top">Take a look</a> <a routerLink="/national" class="uk-button uk-button-secondary uk-margin-top">Take a look</a>
</div> </div>
@ -54,17 +55,22 @@
<div class="uk-section uk-background-secondary dark"> <div class="uk-section uk-background-secondary dark">
<div class="uk-container"> <div class="uk-container">
<h2 class="uk-text-center uk-light">All in one platform</h2> <h2 class="uk-text-center uk-light">All in one platform</h2>
<div class="uk-margin-large-top uk-grid uk-grid-small uk-child-width-1-1 uk-child-width-1-2@m" uk-height-match=".column" uk-grid> <div class="uk-margin-large-top uk-grid uk-grid-small uk-child-width-1-1 uk-child-width-1-2@m"
uk-height-match=".column" uk-grid>
<div> <div>
<div class="uk-card uk-card-default uk-card-body column uk-flex uk-flex-column"> <div class="uk-card uk-card-default uk-card-body column uk-flex uk-flex-column">
<div class="uk-text-primary uk-text-large">National Monitor</div> <div class="uk-text-primary uk-text-large">National Monitor</div>
<h3 class="uk-margin-remove-top uk-width-large">Explore Irelands Research Overview</h3> <h3 class="uk-margin-remove-top uk-width-large">Explore Irelands Research Overview</h3>
<div class="uk-width-large uk-width-expand uk-margin-medium-bottom uk-text-large"> <div class="uk-width-large uk-width-expand uk-margin-medium-bottom uk-text-large">
Dive into the National Dashboard for a comprehensive view of Irelands Open Access landscape or explore our other four types of tailor-made dashboards. </div> Dive into the National Dashboard for a comprehensive view of Irelands Open Access landscape or
explore our other four types of tailor-made dashboards.
</div>
<div class="uk-flex uk-flex-right"> <div class="uk-flex uk-flex-right">
<a routerLink="/national" class="uk-link-reset uk-text-large uk-text-bolder uk-flex uk-flex-middle"> <a routerLink="/national"
class="uk-link-reset uk-text-large uk-text-bolder uk-flex uk-flex-middle">
<span>National Monitor</span> <span>National Monitor</span>
<button class="uk-icon-button uk-button-primary uk-margin-left" [class.uk-icon-button-small]="isMobile"> <button class="uk-icon-button uk-button-primary uk-margin-left"
[class.uk-icon-button-small]="isMobile">
<icon name="north_east" [flex]="true" [ratio]="isMobile?1:1.5"></icon> <icon name="north_east" [flex]="true" [ratio]="isMobile?1:1.5"></icon>
</button> </button>
</a> </a>
@ -75,7 +81,8 @@
<div class="uk-grid column uk-grid-small uk-child-width-1-1 uk-child-width-1-2@s" uk-grid> <div class="uk-grid column uk-grid-small uk-child-width-1-1 uk-child-width-1-2@s" uk-grid>
<div> <div>
<div class="uk-card uk-card-default uk-flex uk-flex-column uk-padding-small uk-height-1-1"> <div class="uk-card uk-card-default uk-flex uk-flex-column uk-padding-small uk-height-1-1">
<h6 class="uk-margin-remove-top uk-width-expand">Research Performing Organisations Monitors</h6> <h6 class="uk-margin-remove-top uk-width-expand">Research Performing Organisations
Monitors</h6>
<div class="uk-flex uk-flex-right uk-margin-top organization"> <div class="uk-flex uk-flex-right uk-margin-top organization">
<a routerLink="/rpo"> <a routerLink="/rpo">
<button class="uk-icon-button uk-icon-button-small uk-button-primary uk-margin-left"> <button class="uk-icon-button uk-icon-button-small uk-button-primary uk-margin-left">
@ -99,7 +106,8 @@
</div> </div>
<div> <div>
<div class="uk-card uk-card-default uk-flex uk-flex-column uk-padding-small uk-height-1-1"> <div class="uk-card uk-card-default uk-flex uk-flex-column uk-padding-small uk-height-1-1">
<h6 class="uk-margin-remove-top uk-width-expand">Research Funding Organisations Monitors</h6> <h6 class="uk-margin-remove-top uk-width-expand">Research Funding Organisations
Monitors</h6>
<div class="uk-flex uk-flex-right funder"> <div class="uk-flex uk-flex-right funder">
<a routerLink="/rfo"> <a routerLink="/rfo">
<button class="uk-icon-button uk-icon-button-small uk-button-primary uk-margin-left"> <button class="uk-icon-button uk-icon-button-small uk-button-primary uk-margin-left">
@ -131,11 +139,14 @@
Enhancing data quality through user engagement Enhancing data quality through user engagement
</h3> </h3>
<div class="uk-light uk-margin-medium-bottom"> <div class="uk-light uk-margin-medium-bottom">
We encourage active participation from our users to refine and improve the data quality on our platform. Collaborate with us, utilize the tools provided, and contribute to shaping a robust Open Access environment. We encourage active participation from our users to refine and improve the data quality on our
platform. Collaborate with us, utilize the tools provided, and contribute to shaping a robust Open
Access environment.
</div> </div>
<a class="uk-button uk-button-secondary" routerLink="/how-it-works/user-actions">Learn More</a> <a class="uk-button uk-button-secondary" routerLink="/how-it-works/user-actions">Learn More</a>
</div> </div>
<div class="uk-grid uk-grid-small uk-child-width-1-1 uk-child-width-1-2@s" uk-height-match="target: .uk-card; row: false" uk-grid> <div class="uk-grid uk-grid-small uk-child-width-1-1 uk-child-width-1-2@s"
uk-height-match="target: .uk-card; row: false" uk-grid>
<div> <div>
<div class="uk-card uk-card-default uk-flex uk-flex-column uk-padding-small"> <div class="uk-card uk-card-default uk-flex uk-flex-column uk-padding-small">
<h6>Add to ORCID</h6> <h6>Add to ORCID</h6>
@ -159,7 +170,8 @@
Connect research results with projects, research communities, or other research outcomes. Connect research results with projects, research communities, or other research outcomes.
</div> </div>
<div class="uk-flex uk-flex-right"> <div class="uk-flex uk-flex-right">
<a routerLink="/participate/claim" class="uk-link-reset uk-text-bolder uk-flex uk-flex-middle"> <a routerLink="/participate/claim"
class="uk-link-reset uk-text-bolder uk-flex uk-flex-middle">
<span>Link</span> <span>Link</span>
<button class="uk-icon-button uk-icon-button-small uk-button-secondary uk-margin-left"> <button class="uk-icon-button uk-icon-button-small uk-button-secondary uk-margin-left">
<icon name="north_east" [flex]="true"></icon> <icon name="north_east" [flex]="true"></icon>
@ -197,7 +209,9 @@
</div> </div>
<div class="uk-width-1-1 uk-width-2-3@s"> <div class="uk-width-1-1 uk-width-2-3@s">
<h3>We Value Your Feedback.</h3> <h3>We Value Your Feedback.</h3>
<div class="uk-width-large">Your insights and feedback are crucial. Reach out with questions, comments, or to collaborate on data quality.</div> <div class="uk-width-large">Your insights and feedback are crucial. Reach out with questions, comments, or
to collaborate on data quality.
</div>
</div> </div>
<div class="uk-width-1-1 uk-width-expand@s uk-flex uk-flex-center"> <div class="uk-width-1-1 uk-width-expand@s uk-flex uk-flex-center">
<a routerLink="/contact-us" class="uk-button uk-button-secondary">Contact us</a> <a routerLink="/contact-us" class="uk-button uk-button-secondary">Contact us</a>

@ -1 +1 @@
Subproject commit 78bcd9c80a93073a3d5a6f157514589ab6547ff2 Subproject commit bb9f4dfc9afa90438256d105a6da206d3ddb3dd9

View File

@ -15,7 +15,6 @@
<ng-template #pilot> <ng-template #pilot>
This platform is currently in its <span class="uk-text-bold">pilot</span> phase. This platform is currently in its <span class="uk-text-bold">pilot</span> phase.
Over the next few months, we are dedicatedly working on enhancing data quality and expanding functionalities. Over the next few months, we are dedicatedly working on enhancing data quality and expanding functionalities.
Our goal is to deliver the final product by June 2024.
This period is crucial for refining our services and ensuring that the platform meets the highest standards of excellence This period is crucial for refining our services and ensuring that the platform meets the highest standards of excellence
and user satisfaction, please <a routerLink="/contact-us">contact us</a> with any questions or comments. and user satisfaction, please <a routerLink="/contact-us">contact us</a> with any questions or comments.
</ng-template> </ng-template>

View File

@ -63,7 +63,7 @@
<div class="uk-grid" class="uk-child-width-1-4@l uk-child-width-1-3@m uk-child-width-1-1" <div class="uk-grid" class="uk-child-width-1-4@l uk-child-width-1-3@m uk-child-width-1-1"
uk-grid uk-height-match="target: .top-info;"> uk-grid uk-height-match="target: .top-info;">
<div *ngFor="let item of filteredStakeholders.slice((currentPage-1)*pageSize, currentPage*pageSize)"> <div *ngFor="let item of filteredStakeholders.slice((currentPage-1)*pageSize, currentPage*pageSize)">
<a routerLink="./{{item.alias}}" class="uk-link-reset"> <a [routerLink]="['./', item.alias]" class="uk-link-reset">
<div class="uk-card uk-card-default uk-card-hover"> <div class="uk-card uk-card-default uk-card-hover">
<div class="uk-padding-small top-info"> <div class="uk-padding-small top-info">
<!-- logo --> <!-- logo -->
@ -91,7 +91,7 @@
<!-- when OA badges are re-introduced, the below if-statement will have to be moved on its correct div --> <!-- when OA badges are re-introduced, the below if-statement will have to be moved on its correct div -->
<div *ngIf="item.funderType || item.openAccess" <div *ngIf="item.funderType || item.openAccess"
class="uk-card-footer uk-padding-small uk-background-muted"> class="uk-card-footer uk-padding-small uk-background-muted">
<div class="uk-grid uk-grid-divider uk-flex-center uk-flex-middle uk-child-width-1-2@m" <div class="uk-grid uk-grid-small uk-grid-divider uk-flex-center uk-flex-middle uk-child-width-1-2@m"
uk-grid> uk-grid>
<div *ngIf="item.funderType"> <div *ngIf="item.funderType">
<div class="uk-text-xsmall"> <div class="uk-text-xsmall">
@ -109,10 +109,10 @@
<progress <progress
class="uk-progress open-access uk-margin-xsmall-top uk-margin-xsmall-bottom" class="uk-progress open-access uk-margin-xsmall-top uk-margin-xsmall-bottom"
[value]="item.openAccess" max="100"></progress> [value]="item.openAccess" max="100"></progress>
<div class="uk-flex uk-flex-middle" uk-tooltip="Open Access with Licence"> <div class="uk-flex uk-text-center uk-flex-middle" [attr.uk-tooltip]="'Open Access with Licence (' + year + ')'">
<icon [name]="'open_access'" [flex]="true" [ratio]="0.8" <icon [name]="'open_access'" [flex]="true" [ratio]="0.8"
class="open-access"></icon> class="open-access"></icon>
<span class="uk-text-xsmall uk-margin-xsmall-left">Open Access</span> <span class="uk-text-xsmall uk-margin-xsmall-left">Open Access ({{year}})</span>
</div> </div>
</div> </div>
</div> </div>
@ -134,13 +134,13 @@
<th *ngIf="hasPublications"># of Publications</th> <th *ngIf="hasPublications"># of Publications</th>
<th *ngIf="hasOpenAccess" class="uk-flex uk-flex-middle"> <th *ngIf="hasOpenAccess" class="uk-flex uk-flex-middle">
<icon [name]="'open_access'" [flex]="true" [ratio]="0.8" class="open-access"></icon> <icon [name]="'open_access'" [flex]="true" [ratio]="0.8" class="open-access"></icon>
<span class="uk-margin-xsmall-left">Open Access with Licence</span> <span class="uk-margin-xsmall-left">Open Access with Licence ({{year}})</span>
</th> </th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let item of filteredStakeholders.slice((currentPage-1)*pageSize, currentPage*pageSize)" <tr *ngFor="let item of filteredStakeholders.slice((currentPage-1)*pageSize, currentPage*pageSize)"
class="clickable" routerLink="./{{item.alias}}"> class="clickable" [routerLink]="['./', item.alias]">
<td> <td>
<div class="uk-flex uk-flex-middle uk-height-xsmall uk-margin-left"> <div class="uk-flex uk-flex-middle uk-height-xsmall uk-margin-left">
<img *ngIf="item.logoUrl; else elseBlock" [src]="item | logoUrl" <img *ngIf="item.logoUrl; else elseBlock" [src]="item | logoUrl"

View File

@ -66,4 +66,8 @@ export class BrowseStakeholdersComponent extends BrowseStakeholderBaseComponent<
break; break;
} }
} }
get year() {
return (new Date().getFullYear() - 1).toString();
}
} }

View File

@ -20,14 +20,14 @@ export class IrishMonitorService {
} }
public getStakeholder(id: string): Observable<StakeholderExtended> { public getStakeholder(id: string): Observable<StakeholderExtended> {
return this.http.get<StakeholderExtended>(properties.monitorServiceAPIURL + '/extended/' + id, CustomOptions.registryOptions()).pipe(map(stakeholder => { return this.http.get<StakeholderExtended>(properties.monitorServiceAPIURL + 'extended/' + id, CustomOptions.registryOptions()).pipe(map(stakeholder => {
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder)); return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
})); }));
} }
public getStakeholders(type: StakeholderType): Observable<StakeholderExtended[]> { public getStakeholders(type: StakeholderType): Observable<StakeholderExtended[]> {
return this.http.get<StakeholderExtended[]>(properties.monitorServiceAPIURL + '/extended?type=' + type, CustomOptions.registryOptions()).pipe(catchError(err => { return this.http.get<StakeholderExtended[]>(properties.monitorServiceAPIURL + 'extended?type=' + type, CustomOptions.registryOptions()).pipe(catchError(err => {
return this.stakeholderService.getStakeholders(properties.monitorServiceAPIURL, type, null); return this.stakeholderService.getStakeholders(type, null);
}), map(stakeholders => { }), map(stakeholders => {
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholders)); return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholders));
})); }));

View File

@ -273,8 +273,8 @@
</li> </li>
</ng-container> </ng-container>
</ul> </ul>
<i *ngIf="user || countSelectedFilters() > 0 " <i class="uk-margin-medium-top uk-text-small uk-display-block"><sup>*</sup> Publicly-funded information has been curated for IE only.</i>
class="uk-margin-medium-top uk-text-small uk-display-block"> <i class="uk-margin-top uk-text-small uk-display-block">
<sup>*</sup> If your filter selection cannot be applied to a chart, that chart will appear <sup>*</sup> If your filter selection cannot be applied to a chart, that chart will appear
grayed-out. grayed-out.
</i> </i>

View File

@ -1,14 +1,10 @@
import {Component, Input, OnInit} from "@angular/core"; import {Component, Input, OnInit} from "@angular/core";
import {Stakeholder} from "../../openaireLibrary/monitor/entities/stakeholder"; import {Stakeholder} from "../../openaireLibrary/monitor/entities/stakeholder";
import {StatisticsService} from "../../openaireLibrary/monitor-admin/utils/services/statistics.service"; import {StatisticsService} from "../../openaireLibrary/monitor-admin/utils/services/statistics.service";
import { import {IndicatorStakeholderBaseComponent} from "../../openaireLibrary/monitor-admin/utils/stakeholder-base.component";
IndicatorStakeholderBaseComponent,
StakeholderBaseComponent
} from "../../openaireLibrary/monitor-admin/utils/stakeholder-base.component";
import {zip} from "rxjs"; import {zip} from "rxjs";
import {OAIndicator} from "../../openaireLibrary/monitor-admin/utils/indicator-utils"; import {OAIndicator} from "../../openaireLibrary/monitor-admin/utils/indicator-utils";
import {IrishMonitorService} from "../irish-monitor.service"; import {IrishMonitorService} from "../irish-monitor.service";
import {BaseComponent} from "../../openaireLibrary/sharedComponents/base/base.component";
@Component({ @Component({
selector: "oa-indicator", selector: "oa-indicator",
@ -19,7 +15,7 @@ import {BaseComponent} from "../../openaireLibrary/sharedComponents/base/base.co
[style]="'--percentage:' + percentage.toFixed(1)"></div> [style]="'--percentage:' + percentage.toFixed(1)"></div>
<div class="uk-flex uk-flex-middle uk-margin-small-top"> <div class="uk-flex uk-flex-middle uk-margin-small-top">
<icon class="open-access" [name]="'open_access'" [flex]="true"></icon> <icon class="open-access" [name]="'open_access'" [flex]="true"></icon>
<span class="uk-margin-xsmall-left uk-text-small">Open Access with Licence</span> <span class="uk-margin-xsmall-left uk-text-small">Open Access with Licence ({{year}})</span>
</div> </div>
</div> </div>
@ -51,8 +47,8 @@ export class OaIndicatorComponent extends IndicatorStakeholderBaseComponent impl
let OAIndicator: OAIndicator = this.stakeholderUtils.openAccess.get(this.stakeholder.type); let OAIndicator: OAIndicator = this.stakeholderUtils.openAccess.get(this.stakeholder.type);
if(OAIndicator) { if(OAIndicator) {
this.subscriptions.push(zip( this.subscriptions.push(zip(
this.statisticsService.getNumbers(this.indicatorUtils.getSourceType(OAIndicator.numerator.source), this.indicatorUtils.getFullUrl(this.stakeholder, OAIndicator.numerator)), this.statisticsService.getNumbers(this.indicatorUtils.getSourceType(OAIndicator.numerator.source), this.indicatorUtils.getFullUrlWithFilters(this.stakeholder, OAIndicator.numerator, null, this.year, this.year)),
this.statisticsService.getNumbers(this.indicatorUtils.getSourceType(OAIndicator.denominator.source), this.indicatorUtils.getFullUrl(this.stakeholder, OAIndicator.denominator))).subscribe(res => { this.statisticsService.getNumbers(this.indicatorUtils.getSourceType(OAIndicator.denominator.source), this.indicatorUtils.getFullUrlWithFilters(this.stakeholder, OAIndicator.denominator, null, this.year, this.year))).subscribe(res => {
let numerator = this.calculate(res[0], OAIndicator.numerator.jsonPath); let numerator = this.calculate(res[0], OAIndicator.numerator.jsonPath);
let denominator = this.calculate(res[1], OAIndicator.denominator.jsonPath); let denominator = this.calculate(res[1], OAIndicator.denominator.jsonPath);
if (denominator > 0) { if (denominator > 0) {
@ -62,6 +58,10 @@ export class OaIndicatorComponent extends IndicatorStakeholderBaseComponent impl
} }
} }
get year() {
return (new Date().getFullYear() - 1).toString();
}
public calculate(response: any, jsonPath: string[]) { public calculate(response: any, jsonPath: string[]) {
let result = JSON.parse(JSON.stringify(response)); let result = JSON.parse(JSON.stringify(response));
jsonPath.forEach(path => { jsonPath.forEach(path => {

@ -1 +1 @@
Subproject commit 014adfe4588975e499c72b284ce7368fc2cb5d14 Subproject commit a4d8923b82a59ac1cc41e9c0574f1d64a61c0c1b

View File

@ -39,6 +39,7 @@ svg .a {
@training-color: #A8B9FF; @training-color: #A8B9FF;
@webinar-color: #E0C44F; @webinar-color: #E0C44F;
@engagement-color: #dab6ff;
.card { .card {
height: 325px; height: 325px;
@ -53,6 +54,10 @@ svg .a {
background-image: url("~/src/assets/irish-assets/resources/resources-pink-blue.png"); background-image: url("~/src/assets/irish-assets/resources/resources-pink-blue.png");
} }
&.engagement {
background-image: url("~/src/assets/irish-assets/resources/resources-dark-blue.jpg");
}
.info { .info {
height: 50%; height: 50%;
.set-blur-background(@dark-color, 50%, brightness(0.5) blur(20px)); .set-blur-background(@dark-color, 50%, brightness(0.5) blur(20px));
@ -97,6 +102,11 @@ svg .a {
border-color: @webinar-color; border-color: @webinar-color;
} }
.uk-label.engagement {
background-color: @engagement-color;
border-color: @engagement-color;
}
.uk-label.funder { .uk-label.funder {
background-color: @funder-color; background-color: @funder-color;
border-color: @funder-color; border-color: @funder-color;