[Library|Trunk]

-Sidebar: preserve parameters for specialMenuItem
-Datasource landing: add target blank for external link
-Indicators:
	-Rename IndicatorWidth to IndicatorSize
	-Add height
	- default value is medium
-Search:
	- remove baselink for filter links -> page not found

- Index Info service: method to get last date for statistics




git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59979 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-11-27 10:42:30 +00:00
parent f02f2a582a
commit a106ba9b82
5 changed files with 13 additions and 6 deletions

View File

@ -50,7 +50,8 @@
<div class="special_section uk-margin-large-top">
<ul class="uk-list">
<li [class.uk-active]="isTheActiveUrl(specialMenuItem.route)">
<a [routerLink]="specialMenuItem.route" [queryParams]="specialMenuItem.params" class="uk-text-center">
<a [routerLink]="specialMenuItem.route" [queryParams]="specialMenuItem.params"
[queryParamsHandling]="queryParamsHandling" class="uk-text-center">
<span [class.uk-display-block]="!open" [innerHTML]="satinizeHTML(specialMenuItem.icon)"></span>
<span [ngClass]="specialMenuItem.customClass"
[class.uk-margin-small-left]="open"

View File

@ -29,7 +29,7 @@
<div class="uk-margin-top uk-margin-bottom">
<div *ngIf="dataProviderInfo.title && dataProviderInfo.title.url">
<span class="uk-text-muted">Web page: </span>
<a [href]="dataProviderInfo.title.url">
<a [href]="dataProviderInfo.title.url" target="_blank">
<span>{{dataProviderInfo.title.url}}</span>
<span class="custom-external custom-icon space"></span>
</a>

View File

@ -7,7 +7,7 @@ export const ChartHelper = {
export type StakeholderType = 'funder' | 'ri' | 'project' | 'organization';
export type IndicatorType = 'number' | 'chart';
export type IndicatorWidth = 'small' | 'medium' | 'large';
export type IndicatorSize = 'small' | 'medium' | 'large';
export type IndicatorPathType = 'table' | 'bar' | 'column' | 'pie' | 'line' | 'other';
export type SourceType = 'statistics' | 'search' | 'metrics' | 'stats-tool' | 'old' | 'image';
export type Visibility = 'PUBLIC' | 'PRIVATE' | 'RESTRICTED';
@ -157,20 +157,22 @@ export class Indicator {
creationDate: Date = null;
updateDate: Date;
type: IndicatorType;
width: IndicatorWidth;
width: IndicatorSize;
height: IndicatorSize;
tags: string[];
visibility: Visibility;
defaultId: string;
indicatorPaths: IndicatorPath[];
recommendedFor: string[];
constructor(name: string, description: string, additionalDescription:string, type: IndicatorType, width: IndicatorWidth, visibility: Visibility, indicatorPaths: IndicatorPath[], defaultId: string = null) {
constructor(name: string, description: string, additionalDescription:string, type: IndicatorType, width: IndicatorSize,height: IndicatorSize, visibility: Visibility, indicatorPaths: IndicatorPath[], defaultId: string = null) {
this._id = null;
this.name = name;
this.description = description;
this.additionalDescription = additionalDescription;
this.type = type;
this.width = width;
this.height = height;
this.visibility = visibility;
this.defaultId = defaultId;
this.indicatorPaths = indicatorPaths;

View File

@ -240,7 +240,7 @@ export class SearchFilterComponent implements OnInit, OnChanges{
return name;
}
getRoute(){
return properties.baseLink + this._router.url.split("?")[0];
return this._router.url.split("?")[0];
}
getParams(filter:Filter, value:Value){
let params = Object.assign({}, this.queryParams);

View File

@ -17,6 +17,10 @@ export class IndexInfoService {
let url = properties.indexInfoAPI;
return this.http.get((properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)): url).pipe(map(res => res['claim_load_date'])).pipe(catchError(err => {return of(null)}));
}
getStatsLastDate(properties: EnvProperties): Observable<any> {
let url = properties.indexInfoAPI;
return this.http.get((properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)): url).pipe(map(res => res['stats_update_date'])).pipe(catchError(err => {return of(null)}));
}
}