1. "datasourcesAPI" property added (with https).

2. commented code in "home.component" to query search api for datasources (not currently used).


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@51995 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2018-05-10 14:08:45 +00:00
parent 804f0f3712
commit e43109bd39
5 changed files with 78 additions and 4 deletions

View File

@ -44,6 +44,8 @@
"helperPageUrl" :"http://scoobydoo.di.uoa.gr:16000/api/page/route",
"cacheUrl" :"https://demo.openaire.eu/cache/get?url=",
"datasourcesAPI": "https://beta.services.openaire.eu/openaire/ds/search/",
"adminToolsAPIURL" :"https://beta.services.openaire.eu/uoa-admin-tools/",

View File

@ -26,8 +26,7 @@
<span *ngIf="showProjects && fundersSize">{{fundersSize.number}} {{fundersSize.size}} funders</span>
6900 data sources - 15 funders
</h1>
<h2 *ngIf = "showPublications || showDatasets || showProjects || showDataProviders" id="page#8" class="uk-margin-medium uk-width-xlarge uk-margin-auto uk-text-center uk-h2 uk-text-primary uk-scrollspy-inview uk-animation-fade" uk-scrollspy-class="" style="font-weight: normal !important;
color: #4E81A2 !important;">
<h2 *ngIf = "showPublications || showDatasets || showProjects || showDataProviders" id="page#8" class="uk-margin-medium uk-width-xlarge uk-margin-auto uk-text-center uk-h2 uk-text-primary uk-scrollspy-inview uk-animation-fade" uk-scrollspy-class="" style="font-weight: normal !important;color: #4E81A2 !important;">
... linked together
</h2>
@ -125,6 +124,66 @@
<span>New content providers</span>
</h3>
<div class="uk-margin-remove-vertical uk-grid-match uk-child-width-1-1 uk-child-width-1-1@m uk-child-width-1-1@l uk-child-width-1-1@xl uk-grid-small uk-grid-divider uk-grid uk-grid-stack" uk-grid="">
<!-- <errorMessages [status]="[fetchDataproviders.searchUtils.status]" [type]="'content providers'"></errorMessages>
<div *ngIf="fetchDataproviders.searchUtils.totalResults > 0">
<ul [class]="'uk-list uk-list-divider uk-margin '+custom_class">
<li *ngFor="let result of fetchDataproviders.results" class="uk-animation-fade">
<h4 [title] = result.title.accessMode >
<a [queryParams]="routerHelper.createQueryParam(urlParam,result.id)" routerLinkActive="router-link-active" routerLink="/search/{{type}}">
<p *ngIf="result['title'].name || result.acronym"><span *ngIf="result.acronym">{{result.acronym}}</span><span *ngIf="result.acronym && result['title'].name">-</span><span *ngIf="result['title'].name" [innerHTML]="result['title'].name"></span><span *ngIf="result.code">({{result.code}})</span></p>
<p *ngIf="!result['title'].name && !result.acronym">[no title available]<span *ngIf="result.code">({{result.code}})</span></p>
</a>
</h4>
<span *ngIf="result.types && result.types.length > 0" [class]="'uk-label custom-label label-blue label-'+result.entityType" title="Type">{{result.types.join(", ")}}</span>
<span *ngIf="result.languages && result.languages.length > 0" class="uk-label custom-label label-language " title="Language">{{result.languages.join(", ")}}</span>
<span *ngIf="result.title && result.title.accessMode" [class]="'uk-label custom-label label-'+ result.title.accessMode " title="Access Mode">{{result.title.accessMode}}</span>
<span *ngIf="result['funderShortname']" class="uk-label custom-label label-funder " title="Funder">{{result['funderShortname']}}></span>
<span *ngIf="result.openAccessMandate != undefined && result.openAccessMandate " class="uk-label custom-label label-openaccessmandate " title="Open Access mandate">Open Access mandate</span>
<span *ngIf="result['type'] != undefined && result['type'] != ''" class="uk-label custom-label label-blue label-dataprovider" title="Type"> {{result['type']}}</span>
<span *ngIf="result['compatibility'] != undefined && result['compatibility'] != ''" class="uk-label custom-label label-compatibility" title="Compatibility">{{result.compatibility}}</span>
<div *ngIf="showOrganizations && result['organizations'] != undefined && result['organizations'].length > 0">
<span> Organization: </span>
<span *ngFor="let organization of result['organizations'].slice(0,10) let i=index">
<a *ngIf="organization.id" [queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active" routerLink="/search/organization">
{{organization.name}}</a><span
*ngIf="!organization.id">
{{organization.name}}</span><span
*ngIf="(i < result['organizations'].length-1) && (i < 9)">,</span>
</span>
<span *ngIf="result['organizations'].length > 10">...</span>
</div>
<div *ngIf="result['countries'] && result['countries'].length > 0">
Country: <span *ngFor="let country of result['countries'].slice(0,10) let i = index">{{country}}{{(i < ( result['countries'].slice(0,10).length-1))?", ":""}}{{(i == result['countries'].slice(0,10).length-1 && result['countries'].length > 10)?"...":""}}</span>
</div>
<div *ngIf="result['websiteURL'] != undefined && result['websiteURL'] != ''">
<span>Website URL: </span>
<span>
<a href="{{result['websiteURL']}}" target="_blank" class="custom-external custom-icon">
{{result['websiteURL']}}
</a>
</span>
</div>
<div *ngIf="result['OAIPMHURL'] != undefined && result['OAIPMHURL'] != ''">
<span>OAI-PMH URL: </span>
<span>
<a href="{{result['OAIPMHURL']}}" target="_blank" class="custom-external custom-icon">
{{result['OAIPMHURL']}}
</a>
</span>
</div>
</li>
</ul>
</div> -->
<div class="uk-first-column">
<div class="el-item uk-panel">
<h6 class="el-title uk-margin uk-h6 uk-text-primary uk-margin-remove-adjacent uk-margin-remove-bottom">

View File

@ -6,6 +6,7 @@ import "rxjs/add/observable/zip";
import {Title, Meta} from '@angular/platform-browser';
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
import { SearchPublicationsService} from '../openaireLibrary/services/searchPublications.service';
import { FetchDataproviders} from '../openaireLibrary/utils/fetchEntitiesClasses/fetchDataproviders.class';
import { SearchDataprovidersService} from '../openaireLibrary/services/searchDataproviders.service';
import { SearchProjectsService} from '../openaireLibrary/services/searchProjects.service';
import { SearchDatasetsService} from '../openaireLibrary/services/searchDatasets.service';
@ -40,6 +41,9 @@ export class HomeComponent {
public projectsSize:any = null;
public datasourcesSize:any = null;
private numResults: number = 2;
public fetchDataproviders : FetchDataproviders;
showPublications:boolean= false;
showDatasets:boolean= false;
showProjects:boolean= false;
@ -69,6 +73,7 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
this._meta.updateTag({content:description},"property='og:description'");
this._meta.updateTag({content:title},"property='og:title'");
//this.fetchDataproviders = new FetchDataproviders(this._searchDataprovidersService);
}
public ngOnInit() {
@ -93,6 +98,9 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
this.showProjects = showEntity["project"];
this.showDataProviders = showEntity["datasource"];
this.getNumbers();
// if(this.showDataProviders) {
// this.fetchDataproviders.getResultsForHome(this.numResults, this.properties);
// }
});
}
});

View File

@ -20,6 +20,9 @@ import {RefineFieldResultsServiceModule} from '../openaireLibrary/services/refin
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {ErrorMessagesModule} from '../openaireLibrary/utils/errorMessages.module';
@NgModule({
imports: [
CommonModule, FormsModule, RouterModule,
@ -30,8 +33,8 @@ import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRout
SearchFormModule,
PiwikServiceModule,
HomeRoutingModule,
HelperModule
HelperModule,
ErrorMessagesModule
],
declarations: [
HomeComponent

View File

@ -50,6 +50,8 @@
"adminToolsCommunity" :"openaire",
"datasourcesAPI": "https://beta.services.openaire.eu/openaire/ds/search/",
"communityAPI": "https://dev-openaire.d4science.org/openaire/community/",
"csvLimit": 2000,