This commit is contained in:
andreas.mantas 2019-07-08 14:00:33 +00:00
parent 5282d961cd
commit e09818cc9d
34 changed files with 2600 additions and 2209 deletions

3541
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { NavigationEnd, Router, RoutesRecognized } from '@angular/router'; import { NavigationEnd, Router, RoutesRecognized } from '@angular/router';
import { AuthenticationService } from './services/authentication.service'; import { AuthenticationService } from './services/authentication.service';
import { environment } from '../environments/environment'; import { environment } from '../environments/environment';
import { MatomoInjector, MatomoTracker } from 'ngx-matomo'; import { MatomoInjector } from 'ngx-matomo';
@Component({ @Component({
selector: 'oa-repo-manager', selector: 'oa-repo-manager',
@ -12,10 +12,9 @@ import { MatomoInjector, MatomoTracker } from 'ngx-matomo';
export class AppComponent implements OnInit { export class AppComponent implements OnInit {
constructor(private router: Router, constructor(private router: Router,
private authService: AuthenticationService, private authService: AuthenticationService,
private matomoInjector: MatomoInjector, private matomoInjector: MatomoInjector) {
private matomoTracker: MatomoTracker) {
console.log('21-06-2019. Fixed matomo to log userIds?'); console.log('11-02-2019. First deploy of project upgraded to angular 6');
let piwikUrl; let piwikUrl;
if (window.location.origin.includes('beta')) { if (window.location.origin.includes('beta')) {
@ -49,12 +48,25 @@ export class AppComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.router.events.subscribe((evt) => { this.router.events.subscribe((evt) => {
/*if ((evt instanceof RoutesRecognized) && (environment.production === true)) {
let piwikUrl;
if (window.location.origin.includes('beta')) {
// piwikUrl = 'https://analytics.openaire.eu/piwik.php?idsite=92&rec=1';
piwikUrl = '92';
} else if (window.location.origin.includes('localhost:4200') ||
window.location.origin.includes('athenarc')) {
// piwikUrl = 'https://analytics.openaire.eu/piwik.php?idsite=92&rec=1';
piwikUrl = '9222222';
} else {
// piwikUrl = 'https://analytics.openaire.eu/piwik.php?idsite=111&rec=1';
piwikUrl = '111';
}
this.matomoInjector.init('https://analytics.openaire.eu/', piwikUrl);
}*/
if (!(evt instanceof NavigationEnd)) { if (!(evt instanceof NavigationEnd)) {
return; return;
} }
if (this.authService.isLoggedIn) {
this.matomoTracker.setUserId(this.authService.getUserEmail());
}
window.scrollTo(0, 0); window.scrollTo(0, 0);
}); });
} }

View File

@ -17,8 +17,7 @@ export const loadingAggregationHistoryError = 'System error retrieving repositor
export const noAggregationHistory = 'There is no aggregation history for this repository at the moment'; export const noAggregationHistory = 'There is no aggregation history for this repository at the moment';
/* Interfaces Messages */ /* Interfaces Messages */
export const noInterfacesSaved = 'You have to create at least one interface.'; export const noInterfacesSaved = 'You have to create at least one interface';
export const errorsInInterfaces = 'There are still invalid interfaces. Please correct or remove them.';
export const nonRemovableInterface = 'This interface can not be removed!'; export const nonRemovableInterface = 'This interface can not be removed!';
/* Rules Messages */ /* Rules Messages */

View File

@ -1,40 +1,13 @@
export const timezones = [ export const timezones = [
{ offset: -12.0, name: '[GMT - 12:00] United States Minor Outlying Islands' }, { offset: -2.0, name: '[GMT - 2] Fernando de Noronha Time, South Georg...' },
{ offset: -11.0, name: '[GMT - 11:00] United States, New Zealand' }, { offset: -1.0, name: '[GMT - 1] Azores Standard Time, Cape Verde Time...' },
{ offset: -10.0, name: '[GMT - 10:00] Honolulu, Papeete...' }, { offset: 0.0, name: '[GMT] Western European Time, Greenwich Mean Time' },
{ offset: -9.5, name: '[GMT - 09:30] French Polynesia' }, { offset: 1.0, name: '[GMT + 1] Central European Time, West African Time' },
{ offset: -9.0, name: '[GMT - 09:00] Anchorage...' }, { offset: 2.0, name: '[GMT + 2] Eastern European Time, Central Africa...' },
{ offset: -8.0, name: '[GMT - 08:00] Los Angeles, Vancouver, Tijuana...' }, { offset: 3.0, name: '[GMT + 3] Moscow Standard Time, Eastern African...' },
{ offset: -7.0, name: '[GMT - 07:00] Phoenix, Denver, Calgary, Ciudad Juárez...' }, { offset: 3.5, name: '[GMT + 3:30] Iran Standard Time' },
{ offset: -6.0, name: '[GMT - 06:00] Chicago, Mexico City, Guatemala City, Tegucigalpa, Managua, Winnipeg, San José, San Salvador...' }, { offset: 4.0, name: '[GMT + 4] Gulf Standard Time, Samara Standard Time' },
{ offset: -5.0, name: '[GMT - 05:00] New York, Toronto, Havana, Lima, Bogotá, Kingston...' }, { offset: 4.5, name: '[GMT + 4:30] Afghanistan Time' },
{ offset: -4.0, name: '[GMT - 04:00] Santiago, Santo Domingo, Manaus, Caracas, La Paz, Asunción, Halifax...' }, { offset: 5.0, name: '[GMT + 5] Pakistan Standard Time, Yekaterinburg...' },
{ offset: -3.5, name: '[GMT - 03:30] St. Johns...' }, { offset: 8.0, name: '[GMT + 8] Beijing, Hong Kong, Irkutsk, Kuala Lumpur, Manila, Perth' },
{ offset: -3.0, name: '[GMT - 03:00] São Paulo, Buenos Aires, Montevideo...' },
{ offset: -2.0, name: '[GMT - 02:00] Brazil, United Kingdom...' },
{ offset: -1.0, name: '[GMT - 01:00] Praia, Ponta Delgada...' },
{ offset: 0.0, name: '[GMT] London, Dublin, Lisbon, Accra, Dakar...' },
{ offset: 1.0, name: '[GMT + 01:00] Berlin, Rome, Paris, Madrid, Vienna, Warsaw, Lagos, Kinshasa, Luanda, Algiers, Casablanca...' },
{ offset: 2.0, name: '[GMT + 02:00] Cairo, Khartoum, Johannesburg, Athens, Kiev, Bucharest, Lubumbashi, Jerusalem...' },
{ offset: 3.0, name: '[GMT + 03:00] Moscow, Istanbul, Riyadh, Baghdad, Nairobi, Minsk, Doha...' },
{ offset: 3.5, name: '[GMT + 03:30] Tehran...' },
{ offset: 4.0, name: '[GMT + 04:00] Dubai, Baku, Samara...' },
{ offset: 4.5, name: '[GMT + 04:30] Kabul...' },
{ offset: 5.0, name: '[GMT + 05:00] Karachi, Tashkent, Yekaterinburg...' },
{ offset: 5.5, name: '[GMT + 05:30] Mumbai, Delhi, Colombo...' },
{ offset: 5.75, name: '[GMT + 05:45] Kathmandu...' },
{ offset: 6.0, name: '[GMT + 06:00] Dhaka, Almaty, Omsk...' },
{ offset: 6.5, name: '[GMT + 06:30] Yangon...' },
{ offset: 7.0, name: '[GMT + 07:00] Jakarta, Bangkok, Ho Chi Minh City, Krasnoyarsk...' },
{ offset: 8.0, name: '[GMT + 08:00] Shanghai, Beijing, Hong Kong, Kuala Lumpur, Singapore, Taipei, Perth, Manila, Makassar, Irkutsk...' },
{ offset: 8.75, name: '[GMT + 08:45] Australia' },
{ offset: 9.0, name: '[GMT + 09:00] Tokyo, Seoul, Pyongyang, Ambon, Yakutsk...' },
{ offset: 9.5, name: '[GMT + 09:30] Adelaide, Darwin...' },
{ offset: 10.0, name: '[GMT + 10:00] Sydney, Melbourne, Port Moresby, Vladivostok...' },
{ offset: 10.5, name: '[GMT + 10:30] Australia (New South Wales)...' },
{ offset: 11.0, name: '[GMT + 11:00] Nouméa, Magadan...' },
{ offset: 12.0, name: '[GMT + 12:00] Auckland, Suva, Petropavlovsk-Kamchatsky...' },
{ offset: 12.75, name: '[GMT + 12:45] New Zealand (Chatham Islands)...' },
{ offset: 13.0, name: '[GMT + 13:00] Kiribati (Phoenix Islands), New Zealand (Tokelau), Samoa, Tonga' },
{ offset: 14.0, name: '[GMT + 14:00] Kiribati (Line Islands)' },
]; ];

View File

@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router} from '@angular/router'; import { ActivatedRoute, Params, Router} from '@angular/router';
import { CompatibilityValidateStep1Component } from './compatibility-validate-forms/compatibility-validate-step1.component'; import { CompatibilityValidateStep1Component } from './compatibility-validate-forms/compatibility-validate-step1.component';
import { RepositoryService } from '../../services/repository.service'; import { RepositoryService } from '../../services/repository.service';
import { JobForValidation, RuleSet } from '../../domain/typeScriptClasses'; import { JobForValidation, RuleSet } from '../../domain/typeScriptClasses';
@ -69,9 +69,7 @@ export class CompatibilityValidateTypeComponent implements OnInit {
if (this.route.snapshot.paramMap.has('type')) { if (this.route.snapshot.paramMap.has('type')) {
this.type = this.route.snapshot.paramMap.get('type'); this.type = this.route.snapshot.paramMap.get('type');
this.getBaseUrlList(); this.getBaseUrlList();
this.route.queryParams.subscribe( this.getStep();
() => this.getStep()
);
} }
} }
@ -81,13 +79,13 @@ export class CompatibilityValidateTypeComponent implements OnInit {
const stepName = this.route.snapshot.queryParamMap.get('step'); const stepName = this.route.snapshot.queryParamMap.get('step');
if (stepName === 'guidelines') { if (stepName === 'guidelines') {
if (!this.identifiedUrl) { if (!this.identifiedUrl) {
this.router.navigateByUrl(`/compatibility/validate/${this.type}?step=baseUrl`); this.navigateToStep('baseUrl');
} else { } else {
this.currentStep = 1; this.currentStep = 1;
} }
} else if ((stepName === 'parameters') || (stepName === 'crisEntities')) { } else if ((stepName === 'parameters') || (stepName === 'crisEntities')) {
if (!this.chosenUrl) { if (!this.chosenUrl) {
this.router.navigateByUrl(`/compatibility/validate/${this.type}?step=baseUrl`); this.navigateToStep('baseUrl');
} else { } else {
this.currentStep = 2; this.currentStep = 2;
} }
@ -95,10 +93,18 @@ export class CompatibilityValidateTypeComponent implements OnInit {
this.currentStep = 3; this.currentStep = 3;
} }
} }
this.rightHelperContent.ngOnInit(); }
this.topHelperContent.ngOnInit();
this.leftHelperContent.ngOnInit(); navigateToStep(step: string) {
this.bottomHelperContent.ngOnInit(); this.router.navigateByUrl(`/compatibility/validate/${this.type}?step=${step}`)
.then( () => {
this.getStep();
this.rightHelperContent.ngOnInit();
this.topHelperContent.ngOnInit();
this.leftHelperContent.ngOnInit();
this.bottomHelperContent.ngOnInit();
}
);
} }
/* retrieves the baseUrl list for the registered repositories of the user */ /* retrieves the baseUrl list for the registered repositories of the user */
@ -136,10 +142,10 @@ export class CompatibilityValidateTypeComponent implements OnInit {
console.log(this.chosenContentRules); console.log(this.chosenContentRules);
if (this.chosenContentRules.length || this.chosenUsageRules.length) { if (this.chosenContentRules.length || this.chosenUsageRules.length) {
if (this.type === 'cris') { if (this.type === 'cris') {
this.router.navigateByUrl(`/compatibility/validate/${this.type}?step=crisEntities`); this.navigateToStep('crisEntities');
} else { } else {
this.getValidationSets(); this.getValidationSets();
this.router.navigateByUrl(`/compatibility/validate/${this.type}?step=parameters`); this.navigateToStep('parameters');
} }
} else { } else {
this.errorMessage = didntSelectRules; this.errorMessage = didntSelectRules;
@ -164,11 +170,11 @@ export class CompatibilityValidateTypeComponent implements OnInit {
moveBackAStep () { moveBackAStep () {
this.errorMessage = ''; this.errorMessage = '';
if (this.currentStep === 1) { if (this.currentStep === 1) {
this.router.navigateByUrl(`/compatibility/validate/${this.type}?step=baseUrl`); this.navigateToStep('baseUrl');
} else if ((this.currentStep === 2) && (this.type !== 'cris')) { } else if ((this.currentStep === 2) && (this.type !== 'cris')) {
this.router.navigateByUrl(`/compatibility/validate/${this.type}?step=guidelines`); this.navigateToStep('guidelines');
} else if ((this.currentStep === 2) && (this.type === 'cris')) { } else if ((this.currentStep === 2) && (this.type === 'cris')) {
this.router.navigateByUrl(`/compatibility/validate/${this.type}?step=guidelines`); this.navigateToStep('guidelines');
} }
} }
@ -211,7 +217,7 @@ export class CompatibilityValidateTypeComponent implements OnInit {
() => { () => {
this.loadingMessage = ''; this.loadingMessage = '';
if (this.ruleSets && this.ruleSets.length) { if (this.ruleSets && this.ruleSets.length) {
this.router.navigateByUrl(`/compatibility/validate/${this.type}?step=guidelines`); this.navigateToStep('guidelines');
} else { } else {
this.errorMessage = noRuleSets; this.errorMessage = noRuleSets;
window.scroll(1, 1); window.scroll(1, 1);
@ -309,7 +315,7 @@ export class CompatibilityValidateTypeComponent implements OnInit {
window.scroll(1, 1); window.scroll(1, 1);
}, },
() => { () => {
this.router.navigateByUrl(`/compatibility/validate/${this.type}?step=finish`); this.navigateToStep('finish');
} }
); );
} }

View File

@ -37,7 +37,9 @@ export class CompatibilityValidationResultsComponent implements OnInit {
ngOnInit () { ngOnInit () {
if (this.authService.getIsUserLoggedIn()) { if (this.authService.getIsUserLoggedIn()) {
setTimeout(() => {
this.getJobInfo(); this.getJobInfo();
}, 500 );
} else { } else {
const id = this.route.snapshot.paramMap.get('id'); const id = this.route.snapshot.paramMap.get('id');
this.authService.redirectUrl = '/compatibility/browseHistory/' + id; this.authService.redirectUrl = '/compatibility/browseHistory/' + id;

View File

@ -32,7 +32,9 @@ export class ContentEventsOfRepositoryComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.repoName = this.route.snapshot.paramMap.get('name'); this.repoName = this.route.snapshot.paramMap.get('name');
this.getCorrectName(); this.getCorrectName();
this.getTopics(); setTimeout(() => {
this.getTopics();
}, 500);
} }
getRepoTopics(): void { getRepoTopics(): void {

View File

@ -1,84 +1,73 @@
<div *ngIf="getIsUserLoggedIn()" id="contentWrapper" class="tm-main uk-section uk-section-default" uk-height-viewport="expand: true" style="box-sizing: border-box;" > <div *ngIf="getIsUserLoggedIn()" id="contentWrapper" class="tm-main uk-section uk-section-default" uk-height-viewport="expand: true" style="box-sizing: border-box;" >
<div>
<div class="uk-container uk-container-large"> <div class="uk container-fluid">
<div class="uk-grid uk-grid-stack"> <div class="uk-sticky-placeholder" style="height: 84px; margin: 0px;" aria-hidden="aria-hidden"></div>
<div class="uk-grid uk-padding">
<div class="uk-width-1-3@m">
<div class="uk-width-expand@m"> <div class="uk-width-expand@m">
<div> <div>
<div> <div>
<!-- MARGIN-TOP --> <div>
<div class="uk-sticky-placeholder" style="height: 84px; margin: 0px;" aria-hidden="aria-hidden"></div> <div class="el-item uk-card uk-card-hover uk-card-body uk-scrollspy-inview uk-animation-fade" uk-scrollspy-class="" style="">
<div class="uk-width-1-1@m uk-first-column"> <a class="el-link uk-position-cover uk-margin-remove-adjacent" [routerLink]="['/sources','register']" uk-scroll=""></a>
<div class="uk-margin uk-grid-match uk-child-width-1-1 uk-child-width-1-2@m uk-grid-small uk-grid uk-scrollspy-inview uk-animation-fade" uk-scrollspy-class="" uk-grid="" style=""> <div class="uk-child-width-expand uk-flex-middle uk-grid" uk-grid="">
<div class="uk-first-column"> <div>
<div class="el-item uk-card uk-card-hover uk-card-body uk-scrollspy-inview uk-animation-fade" uk-scrollspy-class="" style=""> <img class="el-image uk-border-rounded" src="../../../assets/imgs/iStock-153949408.jpg" >
<a class="el-link uk-position-cover uk-margin-remove-adjacent" [routerLink]="['/sources','register']" uk-scroll=""></a> </div>
<div class="uk-child-width-expand uk-flex-middle uk-grid" uk-grid="">
<div class="uk-width-1-2@m uk-first-column"> <div>
<img class="el-image uk-border-rounded" src="../../../assets/imgs/iStock-153949408.jpg" > <h3 class="el-title uk-margin uk-card-title">Register</h3>
</div> <div class="el-content uk-margin">
<div> Register data sources in the OpenAIRE infrastructure
<div>
<h3 class="el-title uk-margin uk-card-title">Register</h3>
<div class="el-content uk-margin">
Register data sources in the OpenAIRE infrastructure
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
<div> </div>
<div class="el-item uk-card uk-card-hover uk-card-body uk-scrollspy-inview uk-animation-fade" uk-scrollspy-class="" style="">
<a class="el-link uk-position-cover uk-margin-remove-adjacent" [routerLink]="['/compatibility','validate']" uk-scroll=""></a> <div class="el-item uk-card uk-card-hover uk-card-body uk-scrollspy-inview uk-animation-fade" uk-scrollspy-class="" style="">
<div class="uk-child-width-expand uk-flex-middle uk-grid" uk-grid=""> <a class="el-link uk-position-cover uk-margin-remove-adjacent" [routerLink]="['/compatibility','validate']" uk-scroll=""></a>
<div class="uk-width-1-2@m uk-first-column"> <div class="uk-child-width-expand uk-flex-middle uk-grid" uk-grid="">
<img class="el-image uk-border-rounded" src="../../../assets/imgs/iStock-516286898.jpg" > <div>
</div> <img class="el-image uk-border-rounded" src="../../../assets/imgs/iStock-516286898.jpg" >
<div> </div>
<div>
<h3 class="el-title uk-margin uk-card-title">Validate</h3> <div>
<div class="el-content uk-margin"> <h3 class="el-title uk-margin uk-card-title">Validate</h3>
Validate data sources against OpenAIRE guidelines <div class="el-content uk-margin">
</div> Validate data sources against OpenAIRE guidelines
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="uk-grid-margin uk-first-column"> </div>
<div class="el-item uk-card uk-card-hover uk-card-body uk-scrollspy-inview uk-animation-fade" uk-scrollspy-class="" style="">
<a class="el-link uk-position-cover uk-margin-remove-adjacent" [routerLink]="['/content','notifications']" uk-scroll=""></a> <div class="el-item uk-card uk-card-hover uk-card-body uk-scrollspy-inview uk-animation-fade" uk-scrollspy-class="" style="">
<div class="uk-child-width-expand uk-flex-middle uk-grid" uk-grid=""> <a class="el-link uk-position-cover uk-margin-remove-adjacent" [routerLink]="['/content','notifications']" uk-scroll=""></a>
<div class="uk-width-1-2@m uk-first-column"> <div class="uk-child-width-expand uk-flex-middle uk-grid" uk-grid="">
<img class="el-image uk-border-rounded" src="../../../assets/imgs/iStock-466267165.jpg" > <div>
</div> <img class="el-image uk-border-rounded" src="../../../assets/imgs/iStock-466267165.jpg" >
<div> </div>
<div>
<h3 class="el-title uk-margin uk-card-title">Notifications</h3> <div>
<div class="el-content uk-margin"> <h3 class="el-title uk-margin uk-card-title">Notifications</h3>
View notifications to enrich the metadata and the content <div class="el-content uk-margin">
</div> View notifications to enrich the metadata and the content
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="uk-grid-margin"> </div>
<div class="el-item uk-card uk-card-hover uk-card-body uk-scrollspy-inview uk-animation-fade" uk-scrollspy-class="" style="">
<a class="el-link uk-position-cover uk-margin-remove-adjacent" uk-scroll="" [routerLink]="['/getImpact']"></a> <div class="el-item uk-card uk-card-hover uk-card-body uk-scrollspy-inview uk-animation-fade" uk-scrollspy-class="" style="">
<div class="uk-child-width-expand uk-flex-middle uk-grid" uk-grid=""> <a class="el-link uk-position-cover uk-margin-remove-adjacent" uk-scroll="" [routerLink]="['/getImpact']"></a>
<div class="uk-width-1-2@m uk-first-column"> <div class="uk-child-width-expand uk-flex-middle uk-grid" uk-grid="">
<img class="el-image uk-border-rounded" src="../../../assets/imgs/iStock-659630328.jpg" > <div>
</div> <img class="el-image uk-border-rounded" src="../../../assets/imgs/iStock-659630328.jpg" >
<div> </div>
<div>
<h3 class="el-title uk-margin uk-card-title">Metrics</h3> <div>
<div class="el-content uk-margin"> <h3 class="el-title uk-margin uk-card-title">Metrics</h3>
View aggregated, cleaned usage statistics for repository access <div class="el-content uk-margin">
</div> View aggregated, cleaned usage statistics for repository access
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -88,6 +77,43 @@
</div> </div>
</div> </div>
</div> </div>
<div class="uk-width-2-3@m uk-inline uk-padding-remove">
<div class="uk-visible-toggle uk-light" tabindex="-1" uk-slider="center: true">
<ul *ngIf="getIsUserLoggedIn()" class="uk-slider-items uk-child-width-1-1@s">
<!-- <div *ngIf="getRepos()"></div>-->
<div *ngFor="let repository of repositories">
<li class="uk-padding uk-padding-remove-right">
<div class="uk-card uk-card-default uk-card-hover">
<div class="uk-card-header">
<div class="uk-card-title"><h3 class="uk-text-center" style="color:black;">{{repository.officialName}}</h3></div>
<div class="uk-card-title"><h5 class="uk-text-center" style="color:black;">{{repository.organization}}</h5></div>
<div><p class="uk-text-center" style="color:black;">{{repository.countryName}}</p></div>
</div>
<div class="uk-card-body uk-text-center">
<img src="{{repository.logoUrl ? repository.logoUrl : '../../../assets/imgs/yourLogoHere.jpg'}}" alt="">
<div><p class="uk-text-center" style="color:black;">{{repository.typology}}</p></div>
<div><p class="uk-text-center" style="color:black;">{{repository.description}}</p></div>
</div>
</div>
</li>
</div>
</ul>
<a class="uk-position-top-left uk-position-large uk-hidden-hover" href="#" uk-slidenav-previous uk-slider-item="previous"></a>
<a class="uk-position-top-right uk-position-large uk-hidden-hover" href="#" uk-slidenav-next uk-slider-item="next"></a>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,5 +1,7 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { AuthenticationService } from '../../services/authentication.service'; import { AuthenticationService } from '../../services/authentication.service';
import { RepositoryService } from '../../services/repository.service';
import {Repository} from '../../domain/typeScriptClasses';
@Component ({ @Component ({
selector: 'app-dashboard', selector: 'app-dashboard',
@ -8,11 +10,38 @@ import { AuthenticationService } from '../../services/authentication.service';
export class DashboardComponent implements OnInit { export class DashboardComponent implements OnInit {
constructor(private authService: AuthenticationService) { } constructor(private authService: AuthenticationService,
private repositoryService: RepositoryService) { }
ngOnInit() {} repositories: Repository[] = [];
userEmail: string;
ngOnInit() {
// this.getUserEmail();
this.userEmail = sessionStorage.getItem('email');
if (this.userEmail) {
this.getRepositoriesOfUser(this.userEmail);
}
}
getIsUserLoggedIn() { getIsUserLoggedIn() {
return this.authService.getIsUserLoggedIn(); return this.authService.getIsUserLoggedIn();
} }
getUserEmail() {
this.userEmail = this.authService.getUserEmail();
}
getRepos() {
console.log('in getRepos');
this.getRepositoriesOfUser(this.userEmail);
}
getRepositoriesOfUser(userEmail: string) {
this.repositoryService.getRepositoriesOfUser(userEmail).subscribe(
repositories => this.repositories = repositories,
error => console.log('Errrrror'),
() => console.log(this.repositories)
);
}
} }

View File

@ -98,15 +98,10 @@
<div class="questions"> <div class="questions">
<div class="el-item uk-card uk-card-small uk-card-body"> <div class="el-item uk-card uk-card-small uk-card-body">
<ul class="uk-list uk-list-divider"> <ul class="uk-list uk-list-divider">
<!--<li><a href="https://www.openaire.eu/os-primers">Learn about open science policies and how to align</a></li>--> <li><a href="https://www.openaire.eu/os-primers">Learn about open science policies and how to align</a></li>
<!--<li><a href="https://www.openaire.eu/rdm-handbook">Learn more on how to manage your data in the open science era</a></li>--> <li><a href="https://www.openaire.eu/rdm-handbook">Learn more on how to manage your data in the open science era</a></li>
<!--<li><a href="https://www.openaire.eu/guides/">Find out how to use OpenAIRE to best serve your needs</a></li>--> <li><a href="https://www.openaire.eu/guides/">Find out how to use OpenAIRE to best serve your needs</a></li>
<!--<li><a href="https://www.openaire.eu/webinars/">View our training material on a variety of related topics</a></li>--> <li><a href="https://www.openaire.eu/webinars/">View our training material on a variety of related topics</a></li>
<!--<li><a href="https://www.openaire.eu/contact-us/">Contact us</a></li>-->
<li><a href="https://www.openaire.eu/validator-registration-guide">Learn how to validate and register your repository</a></li>
<li><a href="https://www.openaire.eu/guides">Find out how to use OpenAIRE to best serve your needs</a></li>
<li><a href="https://www.openaire.eu/category/content-providers">View our training material for Content Providers</a></li>
<li><a href="https://guidelines.openaire.eu/en/latest/">Follow the OpenAIRE Guidelines</a></li>
<li><a href="https://www.openaire.eu/contact-us/">Contact us</a></li> <li><a href="https://www.openaire.eu/contact-us/">Contact us</a></li>
</ul> </ul>
</div> </div>

View File

@ -35,7 +35,9 @@ export class MetricsShowComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.repoId = this.route.snapshot.paramMap.get('id'); this.repoId = this.route.snapshot.paramMap.get('id');
this.getPiwik(); setTimeout(() => {
this.getPiwik();
}, 1000);
} }

View File

@ -208,20 +208,20 @@ export class DatasourceCreateFormComponent implements OnInit {
createNewRepository(): Repository { createNewRepository(): Repository {
const newRepo: Repository = new Repository(); const newRepo: Repository = new Repository();
newRepo.officialName = this.group.get('officialName').value.toString(); newRepo.officialName = this.group.get('officialName').value;
newRepo.englishName = this.group.get('englishName').value.toString(); newRepo.englishName = this.group.get('englishName').value;
newRepo.websiteUrl = this.group.get('websiteUrl').value; newRepo.websiteUrl = this.group.get('websiteUrl').value;
newRepo.logoUrl = this.group.get('logoUrl').value; newRepo.logoUrl = this.group.get('logoUrl').value;
newRepo.contactEmail = this.group.get('adminEmail').value; newRepo.contactEmail = this.group.get('adminEmail').value;
newRepo.countryName = this.countries.filter(x => x.code === this.group.get('country').value)[0].name; newRepo.countryName = this.countries.filter(x => x.code === this.group.get('country').value)[0].name;
newRepo.countryCode = this.group.get('country').value; newRepo.countryCode = this.group.get('country').value;
newRepo.organization = this.group.get('institutionName').value.toString(); newRepo.organization = this.group.get('institutionName').value;
newRepo.latitude = this.group.get('latitude').value; newRepo.latitude = this.group.get('latitude').value;
newRepo.longitude = this.group.get('longtitude').value; newRepo.longitude = this.group.get('longtitude').value;
newRepo.timezone = this.group.get('timezone').value; newRepo.timezone = this.group.get('timezone').value;
newRepo.datasourceClass = this.group.get('datasourceType').value; newRepo.datasourceClass = this.group.get('datasourceType').value;
newRepo.typology = this.group.get('softwarePlatform').value; newRepo.typology = this.group.get('softwarePlatform').value;
newRepo.description = this.group.get('repoDescription').value.toString(); newRepo.description = this.group.get('repoDescription').value;
newRepo.issn = ''; newRepo.issn = '';
newRepo.eissn = ''; newRepo.eissn = '';
newRepo.lissn = ''; newRepo.lissn = '';

View File

@ -0,0 +1,61 @@
<div>
<div class="interfaceActionsPanel">
<a *ngIf="!inRegister" (click)="saveInterface()" class="uk-margin-small-right"><i class="far fa-save fa-lg"></i></a>
</div>
<!-- <div>
<h5 *ngIf="currentInterface && oldInterface && currentRepository">{{ currentRepository.datasourceType }} Interface</h5>
</div>-->
</div>
<div>
<div *ngIf="loadingMessage" class="loading-big">
<div class="loader-big" style="text-align: center; padding-top: 170px; color: rgb(47, 64, 80); font-weight: bold;">
{{ loadingMessage }}
</div>
<div class="whiteFilm"></div>
</div>
<div *ngIf="group && (!loadingMessage || (loadingMessage===''))" [formGroup]="group">
<div *ngIf="successMessage" class="uk-alert uk-alert-success" style="clear: both">{{ successMessage }}</div>
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger" style="clear: both">{{ errorMessage }}</div>
<div *ngIf="groupErrorMessage" class="uk-alert uk-alert-danger" style="clear: both">{{ groupErrorMessage }}</div>
<div class="form-group has-success">
<label class="control-label" for="baseUrl" title="{{ baseUrlDesc.desc }}">Base OAI-PMH URL (*)</label>
<span *ngIf="identifiedBaseUrl" class="help-block inline" style="margin-top: 0px; margin-bottom: 0px; padding-left: 10px;">
Identified
</span>
<input id="baseUrl" type="text" class="form-control" formControlName="baseUrl" (blur)="getInterfaceInfo(group.get('baseUrl').value)" required (change)="checkIfValid()">
</div>
<div class="form-group">
<!--<label class="control-label">Validation Set (*)</label>-->
<label class="control-label">Validation Set</label>
<div>
<label class="uk-button validationSetRadio" for="selectRadio{{index}}" title="{{ existingValSetDesc.desc }}">
<input id="selectRadio{{index}}" value="select" name="validationSet{{index}}" type="radio" (change)="chooseValSet(true)" checked>
<span>Choose existing</span>
</label>
</div>
<select id="selectValidationSet{{index}}" formControlName="selectValidationSet" class="form-control" (change)="checkIfValid()">
<option value="" selected>-- none selected --</option>
<option *ngFor="let set of valsetList" value="{{set}}">{{set}}</option>
</select>
<div>
<label class="uk-button validationSetRadio" for="customRadio{{index}}" title="{{ customValSetDesc.desc }}">
<input id="customRadio{{index}}" value="custom" name="validationSet{{index}}" type="radio" (change)="chooseValSet(false)">
<span>or a custom one</span>
</label>
</div>
<input id="customValidationSet{{index}}" formControlName="customValidationSet" class="form-control" type="text" (blur)="checkIfValid()">
</div>
<div class="form-group">
<label class="control-label" for="compLvl" title="{{ compatibilityLevelDesc.desc }}">Desired Compatibility Level (*)</label>
<select class="form-control" #compLvl id="compLvl" formControlName="compatibilityLevel" (change)="checkIfValid()">
<option value="">-- none selected --</option>
<option *ngFor="let key of classCodes" value="{{key}}">{{compClasses[key]}}</option>
</select>
</div>
<div>
<label class="uk-form-controls-text control-label">Current Compatibility Level</label>
<div *ngIf="!existingCompLevel">not available</div>
<div *ngIf="existingCompLevel">{{ existingCompLevel }}</div>
</div>
</div>
</div>

View File

@ -0,0 +1,379 @@
import { Component, Injector, OnDestroy, OnInit } from '@angular/core';
import { MyGroup } from '../../../shared/reusablecomponents/forms/my-group.interface';
import { Validators } from '@angular/forms';
import { formErrorRequiredFields, formErrorWasntSaved, formInfoLoading, formSubmitting, formSuccessAddedInterface,
formSuccessUpdatedInterface, invalidCustomBaseUrl, noServiceMessage } from '../../../domain/shared-messages';
import { ValidatorService } from '../../../services/validator.service';
import { RepositoryService } from '../../../services/repository.service';
import { InterfaceInformation, Repository, RepositoryInterface } from '../../../domain/typeScriptClasses';
import { baseUrlDesc, compatibilityLevelDesc, customValSetDesc, Description, existingValSetDesc } from '../../../domain/oa-description';
@Component ({
selector: 'datasource-interface-form',
templateUrl: './datasource-interface-form.component.html'
})
export class DatasourceInterfaceFormComponent extends MyGroup implements OnDestroy, OnInit {
loadingMessage: string;
successMessage: string;
errorMessage: string;
currentRepository: Repository;
oldInterface: boolean;
identifiedBaseUrl: boolean;
existingValSet: boolean;
interfaceInfo: InterfaceInformation;
currentInterface: RepositoryInterface;
valsetList: string[] = [];
existingCompLevel: string;
compClasses: Map<string, string> = new Map<string, string>();
classCodes: string[] = [];
readonly groupDefinition = {
baseUrl: ['', Validators.required],
selectValidationSet: [''],
customValidationSet: [''],
compatibilityLevel: ['']
};
baseUrlDesc: Description = baseUrlDesc;
existingValSetDesc: Description = existingValSetDesc;
customValSetDesc: Description = customValSetDesc;
compatibilityLevelDesc: Description = compatibilityLevelDesc;
constructor(injector: Injector,
private valService: ValidatorService,
private repoService: RepositoryService){
super(injector);
}
ngOnInit() {
this.currentRepository = <Repository>this.otherData;
console.log(`other data is: ${JSON.stringify(this.otherData, null, 2)}`);
if (this.data && this.data.length) {
this.currentInterface = this.data[0];
this.patchData.next({
baseUrl: this.data[0].baseUrl,
selectValidationSet: '',
customValidationSet: '',
compatibilityLevel: this.data[0].desiredCompatibilityLevel
});
this.getInterfaceInfo(this.data[0].baseUrl);
this.data.splice(0, 1);
this.oldInterface = true;
console.log(`received an interface!`);
/*if (this.interfaceInfo && this.interfaceInfo.identified &&
this.currentInterface.desiredCompatibilityLevel) {
this.wasSaved = true;
}*/
}
/* initializes MyGroup parent component and the FormGroup */
super.ngOnInit();
console.log(this.group, this.parentGroup);
this.getCompatibilityClasses();
/* NOT ANYMORE
if (this.currentInterface) {
this.getMyControl('baseUrl').disable();
}
*/
this.existingValSet = true;
this.getMyControl('customValidationSet').disable();
}
chooseValSet(existingValSet: boolean) {
if (existingValSet) {
this.existingValSet = true;
this.getMyControl('selectValidationSet').enable();
this.getMyControl('customValidationSet').disable();
} else {
this.existingValSet = false;
this.getMyControl('selectValidationSet').disable();
this.getMyControl('customValidationSet').enable();
}
this.checkIfValid();
}
getInterfaceInfo(baseUrl: string) {
this.successMessage = '';
this.errorMessage = '';
this.groupErrorMessage = '';
if (baseUrl) {
this.loadingMessage = formInfoLoading;
this.valService.getInterfaceInformation(baseUrl).subscribe(
info => {
this.interfaceInfo = info;
if (this.interfaceInfo.identified) {
this.identifiedBaseUrl = true;
} else {
this.errorMessage = invalidCustomBaseUrl;
}
if (this.interfaceInfo.sets) {
this.valsetList = this.interfaceInfo.sets;
console.log(this.valsetList);
}
},
error => {
console.log(error);
this.loadingMessage = '';
this.identifiedBaseUrl = false;
this.errorMessage = noServiceMessage;
},
() => {
if (this.interfaceInfo && this.interfaceInfo.identified &&
this.currentInterface && this.currentInterface.desiredCompatibilityLevel) {
this.wasSaved = true;
}
if ( this.currentInterface && this.currentInterface.accessParams && this.currentInterface.accessParams['set'] ) {
if ( this.valsetList.some( x => x === this.currentInterface.accessParams['set']) ) {
this.patchData.next({selectValidationSet: this.currentInterface.accessParams['set']});
} else {
this.patchData.next({customValidationSet: this.currentInterface.accessParams['set']});
this.getMyControl('selectValidationSet').enable();
this.getMyControl('customValidationSet').disable();
}
}
this.loadingMessage = '';
}
);
}
}
getCompatibilityClasses() {
this.repoService.getCompatibilityClasses(this.currentRepository.datasourceType).subscribe(
classes => {
this.compClasses = classes;
for (const key in this.compClasses) {
this.classCodes.push(key);
}
},
error => {
this.errorMessage = noServiceMessage;
console.log(error);
},
() => {
if (this.currentInterface) {
console.log(`accessParams is ${JSON.stringify(this.currentInterface.accessParams)}`);
if ( !this.currentInterface.desiredCompatibilityLevel ||
!this.classCodes.some( x => x === this.currentInterface.desiredCompatibilityLevel ) ) {
this.patchData.next({compatibilityLevel: ''});
this.existingCompLevel = this.currentInterface.desiredCompatibilityLevel;
} else {
this.existingCompLevel = this.compClasses[this.currentInterface.desiredCompatibilityLevel];
}
if (this.group.valid ) {
this.exportedData = this.currentInterface;
}
}
}
);
}
saveInterface() {
this.groupErrorMessage = '';
this.errorMessage = '';
this.successMessage = '';
// if decided that valset is required add && this.checkIfValsetWasChosen() to the condition
if (this.group.valid && this.checkIfCompatibilityLevelWasChosen() ) {
if (this.identifiedBaseUrl) {
const baseUrl = this.getMyControl('baseUrl').value;
let valset = '';
if (this.getMyControl('selectValidationSet').enabled) {
valset = this.getMyControl('selectValidationSet').value;
} else {
valset = this.getMyControl('customValidationSet').value;
}
let compLvl = '';
if (this.getMyControl('compatibilityLevel').value) {
compLvl = this.getMyControl('compatibilityLevel').value;
} else {
compLvl = this.existingCompLevel;
}
if (this.currentInterface) {
this.updateCurrent(baseUrl, valset, compLvl);
} else {
this.addCurrent(baseUrl, valset, compLvl);
}
} else {
this.errorMessage = invalidCustomBaseUrl;
}
} else {
this.errorMessage = formErrorRequiredFields;
this.successMessage = '';
}
}
checkIfValsetWasChosen() {
return ( ( this.getMyControl('selectValidationSet').enabled &&
this.getMyControl('selectValidationSet').value !== '' ) ||
( this.getMyControl('customValidationSet').enabled &&
this.getMyControl('customValidationSet').value !== '' ) );
}
checkIfCompatibilityLevelWasChosen() {
return ( (this.getMyControl('compatibilityLevel').value !== '') ||
(this.existingCompLevel && (this.existingCompLevel !== '')) );
}
checkIfValid() {
if (this.inRegister) {
// if decided that valset is required add && this.checkIfValsetWasChosen() to the condition
if ( this.group.valid && this.checkIfCompatibilityLevelWasChosen() ) {
if ( this.identifiedBaseUrl ) {
const baseUrl = this.getMyControl('baseUrl').value;
let valset = '';
if (this.getMyControl('selectValidationSet').enabled) {
valset = this.getMyControl('selectValidationSet').value;
} else {
valset = this.getMyControl('customValidationSet').value;
}
let compLvl = '';
if (this.getMyControl('compatibilityLevel').value) {
this.existingCompLevel = this.compClasses[this.getMyControl('compatibilityLevel').value];
console.log('this.existingCompLevel is', this.existingCompLevel);
compLvl = this.getMyControl('compatibilityLevel').value;
} else {
compLvl = this.existingCompLevel;
}
if (this.currentInterface) {
this.updateCurrent(baseUrl, valset, compLvl);
} else {
this.addCurrent(baseUrl, valset, compLvl);
}
}
} else {
this.exportedData = null;
this.wasSaved = false;
this.successMessage = '';
}
}
}
updateCurrent (baseUrl: string, valset: string, compLvl: string) {
this.successMessage = '';
this.errorMessage = '';
this.currentInterface.baseUrl = baseUrl;
this.currentInterface.accessSet = valset;
this.currentInterface.accessParams['set'] = valset;
this.currentInterface.desiredCompatibilityLevel = compLvl;
this.currentInterface.compliance = compLvl;
this.currentInterface.typology = this.currentRepository.datasourceClass;
this.exportedData = this.currentInterface;
if (!this.inRegister) {
this.loadingMessage = formSubmitting;
this.updateInterface();
} else {
this.loadingMessage = '';
this.wasSaved = true;
this.successMessage = 'The interface will be stored when the registration procedure is completed';
}
}
addCurrent (baseUrl: string, valset: string, compLvl: string) {
this.errorMessage = '';
this.successMessage = '';
this.currentInterface = new RepositoryInterface();
this.currentInterface.baseUrl = baseUrl;
this.currentInterface.accessSet = valset;
this.currentInterface.accessParams = {'set': valset};
this.currentInterface.desiredCompatibilityLevel = compLvl;
this.currentInterface.compliance = compLvl;
this.currentInterface.typology = this.currentRepository.datasourceClass;
this.exportedData = this.currentInterface;
if (!this.inRegister) {
this.loadingMessage = formSubmitting;
this.addInterface();
} else {
this.loadingMessage = '';
this.wasSaved = true;
this.successMessage = 'The interface will be stored when the registration procedure is completed';
}
}
addInterface() {
this.repoService.addInterface(this.currentRepository.datasourceType,
this.currentRepository.id,
this.currentRepository.registeredBy,
this.currentInterface).subscribe(
addedInterface => {
console.log(`addInterface responded ${JSON.stringify(addedInterface)}`);
this.currentInterface = addedInterface;
},
error => {
console.log(error);
this.loadingMessage = '';
this.errorMessage = formErrorWasntSaved;
this.currentInterface = null;
},
() => {
this.loadingMessage = '';
if (this.currentInterface.id) {
this.successMessage = formSuccessAddedInterface;
this.wasSaved = true;
if ( !this.currentInterface.desiredCompatibilityLevel ||
!this.classCodes.some( x => x === this.currentInterface.desiredCompatibilityLevel ) ) {
this.patchData.next({compatibilityLevel: ''});
this.existingCompLevel = this.currentInterface.desiredCompatibilityLevel;
} else {
this.existingCompLevel = this.compClasses[this.currentInterface.desiredCompatibilityLevel];
}
} else {
this.errorMessage = formErrorWasntSaved;
}
}
);
}
updateInterface() {
this.repoService.updateInterface(this.currentRepository.id, this.currentRepository.registeredBy, this.currentInterface).subscribe(
response => {
console.log(`updateRepository responded ${JSON.stringify(response)}`);
if (response) {
this.successMessage = formSuccessUpdatedInterface;
this.wasSaved = true;
} else {
this.errorMessage = formErrorWasntSaved;
}
},
error => {
console.log(error);
this.loadingMessage = '';
this.errorMessage = formErrorWasntSaved;
},
() => {
this.loadingMessage = '';
if ( !this.currentInterface.desiredCompatibilityLevel ||
!this.classCodes.some( x => x === this.currentInterface.desiredCompatibilityLevel ) ) {
this.patchData.next({compatibilityLevel: ''});
this.existingCompLevel = this.currentInterface.desiredCompatibilityLevel;
} else {
this.existingCompLevel = this.compClasses[this.currentInterface.desiredCompatibilityLevel];
}
}
);
}
ngOnDestroy() {
if (this.currentInterface && this.currentInterface.id && this.toBeDeleted) {
this.repoService.deleteInterface(this.currentInterface.id, this.currentRepository.registeredBy).subscribe(
response => console.log(`deleteInterface responded: ${JSON.stringify(response)}`),
error => console.log(error),
() => console.log(`deleted ${this.currentInterface.id}`)
);
} else {
console.log(`deleting empty interface form`);
}
}
}

View File

@ -4,8 +4,12 @@ import { baseUrlDesc, compatibilityLevelDesc, customValSetDesc, Description, exi
import { InterfaceInformation, RepositoryInterface } from '../../../domain/typeScriptClasses'; import { InterfaceInformation, RepositoryInterface } from '../../../domain/typeScriptClasses';
import { ValidatorService } from '../../../services/validator.service'; import { ValidatorService } from '../../../services/validator.service';
import { RepositoryService } from '../../../services/repository.service'; import { RepositoryService } from '../../../services/repository.service';
import { formErrorWasntSaved, formInfoLoading, formSubmitting, formSuccessAddedInterface, formSuccessUpdatedInterface, invalidCustomBaseUrl, import {
nonRemovableInterface, noServiceMessage } from '../../../domain/shared-messages'; formErrorWasntSaved,
formInfoLoading, formSubmitting, formSuccessAddedInterface, formSuccessUpdatedInterface, invalidCustomBaseUrl,
nonRemovableInterface,
noServiceMessage
} from '../../../domain/shared-messages';
export class RepoFields { export class RepoFields {
id: string; id: string;
@ -25,8 +29,8 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
@Input() data: any[] = []; // expects an array containing at least 3 of the 4 below fields in this order @Input() data: any[] = []; // expects an array containing at least 3 of the 4 below fields in this order
inRegister: boolean; inRegister: boolean;
interfaceID: number; // holds the interface index in the interfaces array as displayed interfaceID: number; // holds the interface index in the interfaces array as displayed
currentRepo: RepoFields; // a fraction of the Repository class currentRepo: RepoFields; // a fraction of the Repository class
currentInterface: RepositoryInterface; currentInterface: RepositoryInterface;
@Output() emitDeleteInterface: EventEmitter<number> = new EventEmitter<number>(); @Output() emitDeleteInterface: EventEmitter<number> = new EventEmitter<number>();
@ -171,7 +175,7 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
checkIfValid() { checkIfValid() {
if (this.formIsValid()) { if (this.formIsValid()) {
if (this.inRegister) { if (this.inRegister) {
this.successMessage = 'The interface will be stored when the registration procedure is completed.'; this.successMessage = 'The interface will be stored when the registration procedure is completed';
this.saveInterface(); this.saveInterface();
} }
} else { } else {
@ -208,35 +212,9 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
} }
} else { } else {
this.interfaceToExport = null; this.interfaceToExport = null;
this.errorMessage = 'Please make sure all required fields are filled with acceptable values.';
} }
} }
getCurrentValues() {
let intrf = this.currentInterface;
if (intrf == null) {
intrf = new RepositoryInterface();
}
intrf.baseUrl = this.repoInterfaceForm.get('baseUrl').value;
if (this.existingValSet) {
intrf.accessSet = this.repoInterfaceForm.get('selectValidationSet').value;
intrf.accessParams = {'set': this.repoInterfaceForm.get('selectValidationSet').value};
} else {
intrf.accessSet = this.repoInterfaceForm.get('customValidationSet').value;
intrf.accessParams = {'set': this.repoInterfaceForm.get('customValidationSet').value};
}
if (this.repoInterfaceForm.get('compatibilityLevel').value) {
intrf.desiredCompatibilityLevel = this.repoInterfaceForm.get('compatibilityLevel').value;
intrf.compliance = this.repoInterfaceForm.get('compatibilityLevel').value;
} else {
intrf.desiredCompatibilityLevel = this.existingCompLevel;
intrf.compliance = this.existingCompLevel;
}
intrf.typology = this.currentRepo.datasourceClass;
return intrf;
}
addCurrent (baseUrl: string, valset: string, compLvl: string) { addCurrent (baseUrl: string, valset: string, compLvl: string) {
const currentInterface = new RepositoryInterface(); const currentInterface = new RepositoryInterface();
currentInterface.baseUrl = baseUrl; currentInterface.baseUrl = baseUrl;
@ -331,7 +309,7 @@ export class DatasourceNewInterfaceFormComponent implements OnInit {
this.errorMessage = ''; this.errorMessage = '';
this.successMessage = ''; this.successMessage = '';
if (this.interfaceID > 0) { if (this.interfaceID > 0) {
if (this.currentInterface && (this.currentInterface.id !== null) && !this.inRegister) { if (this.currentInterface && (this.currentInterface.id !== null)) {
this.repoService.deleteInterface(this.currentInterface.id, this.currentRepo.registeredBy).subscribe( this.repoService.deleteInterface(this.currentInterface.id, this.currentRepo.registeredBy).subscribe(
res => console.log(`deleteInterface responded: ${JSON.stringify(res)}`), res => console.log(`deleteInterface responded: ${JSON.stringify(res)}`),
er => console.log(er), er => console.log(er),

View File

@ -280,15 +280,15 @@ export class DatasourceUpdateFormComponent implements OnInit {
} else if (this.updateGroup.get('platformName').value) { } else if (this.updateGroup.get('platformName').value) {
this.selectedRepo.typology = this.updateGroup.get('platformName').value; this.selectedRepo.typology = this.updateGroup.get('platformName').value;
} }
this.selectedRepo.officialName = this.updateGroup.get('officialName').value.toString(); this.selectedRepo.officialName = this.updateGroup.get('officialName').value;
this.selectedRepo.description = this.updateGroup.get('repoDescription').value.toString(); this.selectedRepo.description = this.updateGroup.get('repoDescription').value;
this.selectedRepo.countryCode = this.updateGroup.get('country').value; this.selectedRepo.countryCode = this.updateGroup.get('country').value;
this.selectedRepo.countryName = this.countries.filter(x => x.code === this.updateGroup.get('country').value)[0].name; this.selectedRepo.countryName = this.countries.filter(x => x.code === this.updateGroup.get('country').value)[0].name;
this.selectedRepo.longitude = this.updateGroup.get('longtitude').value; this.selectedRepo.longitude = this.updateGroup.get('longtitude').value;
this.selectedRepo.latitude = this.updateGroup.get('latitude').value; this.selectedRepo.latitude = this.updateGroup.get('latitude').value;
this.selectedRepo.websiteUrl = this.updateGroup.get('websiteUrl').value; this.selectedRepo.websiteUrl = this.updateGroup.get('websiteUrl').value;
this.selectedRepo.organization = this.updateGroup.get('institutionName').value.toString(); this.selectedRepo.organization = this.updateGroup.get('institutionName').value;
this.selectedRepo.englishName = this.updateGroup.get('englishName').value.toString(); this.selectedRepo.englishName = this.updateGroup.get('englishName').value;
this.selectedRepo.logoUrl = this.updateGroup.get('logoUrl').value; this.selectedRepo.logoUrl = this.updateGroup.get('logoUrl').value;
this.selectedRepo.timezone = this.updateGroup.get('timezone').value; this.selectedRepo.timezone = this.updateGroup.get('timezone').value;
this.selectedRepo.datasourceClass = this.updateGroup.get('datasourceType').value; this.selectedRepo.datasourceClass = this.updateGroup.get('datasourceType').value;

View File

@ -35,7 +35,7 @@
<a href="http://v2.sherpa.ac.uk/opendoar/" target="_blank"> <a href="http://v2.sherpa.ac.uk/opendoar/" target="_blank">
List provided by List provided by
<br> <br>
OpenDOAR<i class="fa fa-external-link" style="margin-left: 3px !important;"></i> OpenDOAR<i class="fa fa-external-link-alt" style="margin-left: 3px !important;"></i>
</a> </a>
</div> </div>
</div> </div>
@ -55,7 +55,7 @@
<a href="http://www.re3data.org" target="_blank"> <a href="http://www.re3data.org" target="_blank">
List provided by List provided by
<br> <br>
Re3data<i class="fa fa-external-link" style="margin-left: 3px !important;"></i> Re3data<i class="fa fa-external-link-alt" style="margin-left: 3px !important;"></i>
</a> </a>
</div> </div>
</div> </div>
@ -72,9 +72,9 @@
Make sure that your Open Access Journal is compatible with the OpenAIRE literature Guidelines. Make sure that your Open Access Journal is compatible with the OpenAIRE literature Guidelines.
</h3> </h3>
<div class="el-meta uk-margin uk-text-meta" style="z-index:9999; position:relative;"> <div class="el-meta uk-margin uk-text-meta" style="z-index:9999; position:relative;">
<a href="https://www.openaire.eu/support/helpdesk" target="_blank"> <a href="https://www.openaire.eu/helpdesk/" target="_blank">
For any questions please contact the OpenAIRE helpdesk. For any questions please contact the OpenAIRE helpdesk.
<i class="fa fa-external-link" style="margin-left: 3px !important;"></i> <i class="fa fa-external-link-alt" style="margin-left: 3px !important;"></i>
</a> </a>
</div> </div>
</div> </div>
@ -91,9 +91,9 @@
Make sure that your publications aggregator is compatible with the OpenAIRE literature Guidelines. Make sure that your publications aggregator is compatible with the OpenAIRE literature Guidelines.
</h3> </h3>
<div class="el-meta uk-margin uk-text-meta" style="z-index:9999; position:relative;"> <div class="el-meta uk-margin uk-text-meta" style="z-index:9999; position:relative;">
<a href="https://www.openaire.eu/support/helpdesk" target="_blank"> <a href="http://www.openaire.eu/helpdesk/" target="_blank">
For any questions please contact the OpenAIRE helpdesk. For any questions please contact the OpenAIRE helpdesk.
<i class="fa fa-external-link" style="margin-left: 3px !important;"></i> <i class="fa fa-external-link-alt" style="margin-left: 3px !important;"></i>
</a> </a>
</div> </div>
</div> </div>

View File

@ -87,40 +87,42 @@ export class RegisterDatasourceSelectExistingComponent implements OnInit {
} }
getReposInCountry(i: number) { getReposInCountry(i: number) {
const country = this.countries[i]; setTimeout( () => {
console.log(`I got ${country} and ${this.mode}`); const country = this.countries[i];
this.countryRepos = []; console.log(`I got ${country} and ${this.mode}`);
this.selectedCountry = country; this.countryRepos = [];
this.hasSelectedCountry = false; this.selectedCountry = country;
this.loadingMessage = loadingReposMessage; this.hasSelectedCountry = false;
this.noRepositories = ''; this.loadingMessage = loadingReposMessage;
this.repoService.getRepositoriesOfCountry(country.code, this.mode).subscribe ( this.noRepositories = '';
repos => { this.repoService.getRepositoriesOfCountry(country.code, this.mode).subscribe (
this.countryRepos = repos; repos => {
}, this.countryRepos = repos;
error => { },
console.log(error.statusText); error => {
this.loadingMessage = ''; console.log(error.statusText);
this.alertMessage = noServiceMessage; this.loadingMessage = '';
this.countryRepos = []; this.alertMessage = noServiceMessage;
}, this.countryRepos = [];
() => { },
if (!this.countryRepos || !this.countryRepos.length) { () => {
this.noRepositories = noRepositoriesFound; if (!this.countryRepos || !this.countryRepos.length) {
} else { this.noRepositories = noRepositoriesFound;
this.noRepositories = '';
if (this.selectedCountry.code === country.code) {
/* to make sure that the correct set of repositories is displayed - in case of consequent country selections */
this.hasSelectedCountry = true;
} else { } else {
this.countryRepos = []; this.noRepositories = '';
if (this.selectedCountry.code === country.code) {
/* to make sure that the correct set of repositories is displayed - in case of consequent country selections */
this.hasSelectedCountry = true;
} else {
this.countryRepos = [];
}
} }
this.loadingMessage = '';
this.alertMessage = '';
console.log('this.selectedCountry became', JSON.stringify(this.selectedCountry));
} }
this.loadingMessage = ''; );
this.alertMessage = ''; }, 500);
console.log('this.selectedCountry became', JSON.stringify(this.selectedCountry));
}
);
} }
getLatestUpdate() { getLatestUpdate() {

View File

@ -94,18 +94,15 @@
<div> <div>
<div class="openAIRECompliantLogo"> <div class="openAIRECompliantLogo">
<h2 class="openAIRECompliantLogoMessage"> <h2 class="openAIRECompliantLogoMessage">
We successfully received the request to register your repository to the OpenAIRE compliant list of content providers. Congratulations! Your repository was successfully registered in OpenAIRE. You can download this logo to use in your site.
A validation process against the OpenAIRE guidelines compatibility has been started.
You will be informed via email once the process is finished.
<!--Congratulations! Your repository was successfully registered in OpenAIRE. You can download this logo to use in your site.-->
</h2> </h2>
<!--<img src="../../../../assets/imgs/3_0ValidatedLogo.png" alt="OpenAireCompliant">--> <img src="../../../../assets/imgs/3_0ValidatedLogo.png" alt="OpenAireCompliant">
</div> </div>
</div> </div>
<!--<a (click)="downloadLogo()">--> <a (click)="downloadLogo()">
<!--Download--> Download
<!--<i class="fa fa-download" style=""></i>--> <i class="fa fa-download" style=""></i>
<!--</a>--> </a>
</div> </div>
</div> </div>
</div> </div>

View File

@ -12,7 +12,6 @@ import { DatasourceNewInterfaceFormComponent } from '../sources-forms/datasource
import { from, of } from 'rxjs'; import { from, of } from 'rxjs';
import { concatMap } from 'rxjs/operators'; import { concatMap } from 'rxjs/operators';
import { import {
errorsInInterfaces,
formErrorRegisterRepo, formErrorRegisterRepo,
formInfoLoading, formInterfacesLoading, loadingInterfacesError, loadingRepoError, formInfoLoading, formInterfacesLoading, loadingInterfacesError, loadingRepoError,
noInterfacesSaved noInterfacesSaved
@ -33,7 +32,6 @@ export class RegisterExistingDatasourceComponent implements OnInit {
datasourceId: string; datasourceId: string;
repo: Repository; repo: Repository;
repoInterfaces: RepositoryInterface[] = []; repoInterfaces: RepositoryInterface[] = [];
interfacesToDelete: string[] = [];
/* queryParams are used to follow the steps without refreshing the page /* queryParams are used to follow the steps without refreshing the page
* This was needed for Help Service [which sends back info according to the current router.url]. * This was needed for Help Service [which sends back info according to the current router.url].
@ -66,12 +64,7 @@ export class RegisterExistingDatasourceComponent implements OnInit {
ngOnInit() { ngOnInit() {
if (this.datasourceType && this.currentMode) { if (this.datasourceType && this.currentMode) {
// will execute getStep() every time there is a change in query params this.getStep();
this.route.queryParams.subscribe(
params => {
this.getStep();
}
);
} }
} }
@ -82,13 +75,13 @@ export class RegisterExistingDatasourceComponent implements OnInit {
const stepName = this.route.snapshot.queryParamMap.get('step'); const stepName = this.route.snapshot.queryParamMap.get('step');
if (stepName === 'basicInformation') { if (stepName === 'basicInformation') {
if (!this.datasourceId) { if (!this.datasourceId) {
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=selectDatasource`); this.navigateToStep('selectDatasource');
} else { } else {
this.currentStep = 1; this.currentStep = 1;
} }
} else if (stepName === 'interfaces') { } else if (stepName === 'interfaces') {
if (!this.repo) { if (!this.repo) {
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=selectDatasource`); this.navigateToStep('selectDatasource');
} else { } else {
this.currentStep = 2; this.currentStep = 2;
} }
@ -96,10 +89,18 @@ export class RegisterExistingDatasourceComponent implements OnInit {
this.currentStep = 3; this.currentStep = 3;
} }
} }
this.rightHelperContent.ngOnInit(); }
this.topHelperContent.ngOnInit();
this.leftHelperContent.ngOnInit(); navigateToStep(step: string) {
this.bottomHelperContent.ngOnInit(); this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=${step}`)
.then( () => {
this.getStep();
this.rightHelperContent.ngOnInit();
this.topHelperContent.ngOnInit();
this.leftHelperContent.ngOnInit();
this.bottomHelperContent.ngOnInit();
}
);
} }
moveAStep() { moveAStep() {
@ -107,23 +108,17 @@ export class RegisterExistingDatasourceComponent implements OnInit {
if (this.currentStep === 0) { if (this.currentStep === 0) {
if (this.datasourcesByCountry.goToNextStep()) { if (this.datasourcesByCountry.goToNextStep()) {
console.log(`got datasource with id ${this.datasourceId}`); console.log(`got datasource with id ${this.datasourceId}`);
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=basicInformation`); this.navigateToStep('basicInformation');
} }
} else if (this.currentStep === 1) { } else if (this.currentStep === 1) {
this.registerDatasource.updateRepo(); this.registerDatasource.updateRepo();
} else if (this.currentStep === 2) { } else if (this.currentStep === 2) {
of(this.getInterfaces()).subscribe( of(this.getInterfaces()).subscribe(
errors => { () => {
if (errors > 0) { if (this.repoInterfaces.length > 0) {
this.errorMessage = errorsInInterfaces; this.registerRepository();
window.scrollTo(1, 1);
} else { } else {
if (this.repoInterfaces.length > 0) { this.errorMessage = noInterfacesSaved;
this.registerRepository();
} else {
this.errorMessage = noInterfacesSaved;
window.scrollTo(1, 1);
}
} }
} }
); );
@ -135,10 +130,10 @@ export class RegisterExistingDatasourceComponent implements OnInit {
if (this.currentStep === 1) { if (this.currentStep === 1) {
this.repoInterfaces = []; this.repoInterfaces = [];
this.repo = null; this.repo = null;
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=selectDatasource`); this.navigateToStep('selectDatasource');
} else if (this.currentStep === 2) { } else if (this.currentStep === 2) {
of(this.getInterfaces()).subscribe( of(this.getInterfaces()).subscribe(
() => this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=basicInformation`) () => this.navigateToStep('basicInformation')
); );
} }
} }
@ -157,41 +152,21 @@ export class RegisterExistingDatasourceComponent implements OnInit {
removeInterfaceFromList(i: number) { removeInterfaceFromList(i: number) {
const tempArray = this.dataForInterfaceComp; const tempArray = this.dataForInterfaceComp;
this.dataForInterfaceComp = []; this.dataForInterfaceComp = [];
if (tempArray[i] && tempArray[i][3] && tempArray[i][3].id) {
this.interfacesToDelete.push(tempArray[i][3].id);
}
tempArray.splice(i, 1); tempArray.splice(i, 1);
this.dataForInterfaceComp = tempArray; this.dataForInterfaceComp = tempArray;
console.log(JSON.stringify(this.dataForInterfaceComp)); console.log(JSON.stringify(this.dataForInterfaceComp));
} }
getInterfaces() { getInterfaces() {
// this.repoInterfaces = []; this.repoInterfaces = [];
let invalidFormsCount = 0;
for (const el of this.interfacesArray.toArray()) { for (const el of this.interfacesArray.toArray()) {
const intrf = el.getInterface(); const intrf = el.getInterface();
if (intrf) { if (intrf) {
if (intrf.id && this.repoInterfaces.some(intr => intr.id === intrf.id)) { this.repoInterfaces.push(intrf);
const i = this.repoInterfaces.findIndex( intr => intr.id === intrf.id );
this.repoInterfaces[i] = intrf;
} else {
this.repoInterfaces.push(intrf);
}
console.log(JSON.stringify(intrf)); console.log(JSON.stringify(intrf));
} else {
invalidFormsCount = invalidFormsCount + 1;
const repo_interface = el.getCurrentValues();
if (repo_interface.id && this.repoInterfaces.some(intr => intr.id === repo_interface.id)) {
const i = this.repoInterfaces.findIndex( intr => intr.id === repo_interface.id );
this.repoInterfaces[i] = repo_interface;
} else {
this.repoInterfaces.push(repo_interface);
}
console.log(JSON.stringify(repo_interface));
} }
} }
console.log('new interfaces is ', this.repoInterfaces); console.log('new interfaces is ', this.repoInterfaces);
return invalidFormsCount;
} }
fillInterfacesForms() { fillInterfacesForms() {
@ -256,7 +231,7 @@ export class RegisterExistingDatasourceComponent implements OnInit {
this.getRepoInterfaces(); this.getRepoInterfaces();
} else { } else {
of(this.fillInterfacesForms()).subscribe( of(this.fillInterfacesForms()).subscribe(
() => this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=interfaces`) () => this.navigateToStep('interfaces')
); );
} }
} }
@ -281,12 +256,11 @@ export class RegisterExistingDatasourceComponent implements OnInit {
console.log(error); console.log(error);
this.errorMessage = loadingInterfacesError; this.errorMessage = loadingInterfacesError;
this.loadingMessage = ''; this.loadingMessage = '';
window.scrollTo(1, 1);
}, },
() => { () => {
this.loadingMessage = ''; this.loadingMessage = '';
of(this.fillInterfacesForms()).subscribe( of(this.fillInterfacesForms()).subscribe(
() => this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=interfaces`) () => this.navigateToStep('interfaces')
); );
} }
); );
@ -296,6 +270,27 @@ export class RegisterExistingDatasourceComponent implements OnInit {
window.open('../../../../assets/imgs/3_0ValidatedLogo.png', '_blank', 'enabledstatus=0,toolbar=0,menubar=0,location=0'); window.open('../../../../assets/imgs/3_0ValidatedLogo.png', '_blank', 'enabledstatus=0,toolbar=0,menubar=0,location=0');
} }
// updateRepository() {
// if (this.repo) {
// this.loadingMessage = 'Saving changes';
// this.errorMessage = '';
// this.repoService.updateRepository(this.repo).subscribe(
// response => {
// console.log(`updateRepository responded: ${response.id}, ${response.registeredBy}`);
// this.repo = response;
// },
// error => {
// console.log(error);
// this.loadingMessage = '';
// this.errorMessage = formErrorRegisterRepo;
// },
// () => {
// this.saveNewInterfaces();
// }
// );
// }
// }
registerRepository() { registerRepository() {
if (this.repo) { if (this.repo) {
this.loadingMessage = 'Saving changes'; this.loadingMessage = 'Saving changes';
@ -309,7 +304,6 @@ export class RegisterExistingDatasourceComponent implements OnInit {
console.log(error); console.log(error);
this.loadingMessage = ''; this.loadingMessage = '';
this.errorMessage = formErrorRegisterRepo; this.errorMessage = formErrorRegisterRepo;
window.scrollTo(1, 1);
}, },
() => { () => {
this.saveNewInterfaces(); this.saveNewInterfaces();
@ -323,13 +317,7 @@ export class RegisterExistingDatasourceComponent implements OnInit {
from(this.repoInterfaces).pipe( from(this.repoInterfaces).pipe(
concatMap(intrf => { concatMap(intrf => {
if (intrf.id) { if (intrf.id) {
let req; return this.repoService.updateInterface(this.repo.id, this.repo.registeredBy, intrf);
if (this.interfacesToDelete.some(id => id === intrf.id)) {
req = this.repoService.deleteInterface(intrf.id, this.repo.registeredBy);
} else {
req = this.repoService.updateInterface(this.repo.id, this.repo.registeredBy, intrf);
}
return req;
} else { } else {
return this.repoService.addInterface(this.repo.datasourceType, this.repo.id, this.repo.registeredBy, intrf); return this.repoService.addInterface(this.repo.datasourceType, this.repo.id, this.repo.registeredBy, intrf);
} }
@ -340,14 +328,10 @@ export class RegisterExistingDatasourceComponent implements OnInit {
console.log(er); console.log(er);
this.loadingMessage = ''; this.loadingMessage = '';
this.errorMessage = 'Not all changes were saved. Please try again'; this.errorMessage = 'Not all changes were saved. Please try again';
window.scrollTo(1, 1);
}, },
() => { () => {
this.loadingMessage = ''; this.loadingMessage = '';
this.datasourceId = null; this.navigateToStep('finish');
this.repo = null;
this.repoInterfaces = [];
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=finish`);
} }
); );
} }

View File

@ -83,18 +83,15 @@
<div> <div>
<div class="openAIRECompliantLogo"> <div class="openAIRECompliantLogo">
<h2 class="openAIRECompliantLogoMessage"> <h2 class="openAIRECompliantLogoMessage">
We successfully received the request to register your repository to the OpenAIRE compliant list of content providers. Congratulations! Your repository was successfully registered in OpenAIRE. You can download this logo to use in your site.
A validation process against the OpenAIRE guidelines compatibility has been started.
You will be informed via email once the process is finished.
<!--Congratulations! Your repository was successfully registered in OpenAIRE. You can download this logo to use in your site.-->
</h2> </h2>
<!--<img src="../../../../assets/imgs/3_0ValidatedLogo.png" alt="OpenAireCompliant">--> <img src="../../../../assets/imgs/3_0ValidatedLogo.png" alt="OpenAireCompliant">
</div> </div>
</div> </div>
<!--<a (click)="downloadLogo()">--> <a (click)="downloadLogo()">
<!--Download--> Download
<!--<i class="fa fa-download" style=""></i>--> <i class="fa fa-download" style=""></i>
<!--</a>--> </a>
</div> </div>
</div> </div>
</div> </div>

View File

@ -8,7 +8,7 @@ import { DatasourceCreateFormComponent } from '../sources-forms/datasource-creat
import { DatasourceNewInterfaceFormComponent } from '../sources-forms/datasource-new-interface-form.component'; import { DatasourceNewInterfaceFormComponent } from '../sources-forms/datasource-new-interface-form.component';
import { from, of } from 'rxjs'; import { from, of } from 'rxjs';
import { concatMap } from 'rxjs/operators'; import { concatMap } from 'rxjs/operators';
import { errorsInInterfaces, formErrorRegisterRepo, noInterfacesSaved } from '../../../domain/shared-messages'; import { formErrorRegisterRepo, noInterfacesSaved } from '../../../domain/shared-messages';
@Component({ @Component({
selector: 'app-register-new-datasource', selector: 'app-register-new-datasource',
@ -21,7 +21,6 @@ export class RegisterNewDatasourceComponent implements OnInit {
datasourceType: string; datasourceType: string;
repo: Repository = null; repo: Repository = null;
repoInterfaces: RepositoryInterface[] = []; repoInterfaces: RepositoryInterface[] = [];
interfacesToDelete: string[] = [];
/* queryParams are used to follow the steps without refreshing the page /* queryParams are used to follow the steps without refreshing the page
* This was needed for Help Service [which sends back info according to the current router.url]. * This was needed for Help Service [which sends back info according to the current router.url].
@ -51,13 +50,7 @@ export class RegisterNewDatasourceComponent implements OnInit {
ngOnInit() { ngOnInit() {
if (this.datasourceType) { if (this.datasourceType) {
this.getStep();
// will execute getStep() every time there is a change in query params
this.route.queryParams.subscribe(
params => {
this.getStep();
}
);
} }
} }
@ -70,7 +63,7 @@ export class RegisterNewDatasourceComponent implements OnInit {
this.currentStep = 1; this.currentStep = 1;
} else if (stepName === 'interfaces') { } else if (stepName === 'interfaces') {
if (!this.repo) { if (!this.repo) {
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=basicInformation`); this.navigateToStep('basicInformation');
} else { } else {
this.currentStep = 2; this.currentStep = 2;
} }
@ -78,10 +71,18 @@ export class RegisterNewDatasourceComponent implements OnInit {
this.currentStep = 3; this.currentStep = 3;
} }
} }
this.rightHelperContent.ngOnInit(); }
this.topHelperContent.ngOnInit();
this.leftHelperContent.ngOnInit(); navigateToStep(step: string) {
this.bottomHelperContent.ngOnInit(); this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=${step}`)
.then( () => {
this.getStep();
this.rightHelperContent.ngOnInit();
this.topHelperContent.ngOnInit();
this.leftHelperContent.ngOnInit();
this.bottomHelperContent.ngOnInit();
}
);
} }
moveAStep() { moveAStep() {
@ -90,17 +91,11 @@ export class RegisterNewDatasourceComponent implements OnInit {
this.registerDatasource.registerDatasource(); this.registerDatasource.registerDatasource();
} else if (this.currentStep === 2) { } else if (this.currentStep === 2) {
of(this.getInterfaces()).subscribe( of(this.getInterfaces()).subscribe(
errors => { () => {
if (errors > 0) { if (this.repoInterfaces.length > 0) {
this.errorMessage = errorsInInterfaces; this.addRepository();
window.scrollTo(1, 1);
} else { } else {
if (this.repoInterfaces.length > 0) { this.errorMessage = noInterfacesSaved;
this.addRepository();
} else {
this.errorMessage = noInterfacesSaved;
window.scrollTo(1, 1);
}
} }
} }
); );
@ -111,7 +106,7 @@ export class RegisterNewDatasourceComponent implements OnInit {
this.errorMessage = ''; this.errorMessage = '';
if (this.currentStep === 2) { if (this.currentStep === 2) {
of(this.getInterfaces()).subscribe( of(this.getInterfaces()).subscribe(
() => this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=basicInformation`) () => this.navigateToStep('basicInformation')
); );
} }
} }
@ -137,21 +132,13 @@ export class RegisterNewDatasourceComponent implements OnInit {
getInterfaces() { getInterfaces() {
this.repoInterfaces = []; this.repoInterfaces = [];
let invalidFormsCount = 0;
for (const el of this.interfacesArray.toArray()) { for (const el of this.interfacesArray.toArray()) {
const intrf = el.getInterface(); const intrf = el.getInterface();
if (intrf) { if (intrf) {
this.repoInterfaces.push(intrf); this.repoInterfaces.push(intrf);
console.log(JSON.stringify(intrf)); console.log(JSON.stringify(intrf));
} else {
invalidFormsCount = invalidFormsCount + 1;
const repo_interface = el.getCurrentValues();
this.repoInterfaces.push(repo_interface);
console.log(JSON.stringify(repo_interface));
} }
} }
console.log('new interfaces is ', this.repoInterfaces);
return invalidFormsCount;
} }
fillInterfacesForms() { fillInterfacesForms() {
@ -183,7 +170,7 @@ export class RegisterNewDatasourceComponent implements OnInit {
getCurrentRepo(repo: Repository) { getCurrentRepo(repo: Repository) {
this.repo = repo; this.repo = repo;
of (this.fillInterfacesForms()).subscribe( of (this.fillInterfacesForms()).subscribe(
() => this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=interfaces`) () => this.navigateToStep('interfaces')
); );
} }
@ -231,9 +218,7 @@ export class RegisterNewDatasourceComponent implements OnInit {
}, },
() => { () => {
this.loadingMessage = ''; this.loadingMessage = '';
this.repo = null; this.navigateToStep('finish');
this.repoInterfaces = [];
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=finish`);
} }
); );
} }

View File

@ -1,8 +1,10 @@
import { Component, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core'; import { Component, OnInit, QueryList, Type, ViewChild, ViewChildren } from '@angular/core';
import { FormBuilder, FormGroup } from '@angular/forms'; import { FormBuilder, FormGroup } from '@angular/forms';
import { DatasourceInterfaceFormComponent } from './sources-forms/datasource-interface-form.component';
import { Repository, RepositoryInterface } from '../../domain/typeScriptClasses'; import { Repository, RepositoryInterface } from '../../domain/typeScriptClasses';
import { RepositoryService } from '../../services/repository.service'; import { RepositoryService } from '../../services/repository.service';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { Description, interfaceFormDesc, } from '../../domain/oa-description';
import { formInfoLoading, loadingRepoError } from '../../domain/shared-messages'; import { formInfoLoading, loadingRepoError } from '../../domain/shared-messages';
import { DatasourceUpdateFormComponent } from './sources-forms/datasource-update-form.component'; import { DatasourceUpdateFormComponent } from './sources-forms/datasource-update-form.component';
import { ConfirmationDialogComponent } from '../../shared/reusablecomponents/confirmation-dialog.component'; import { ConfirmationDialogComponent } from '../../shared/reusablecomponents/confirmation-dialog.component';
@ -26,6 +28,8 @@ export class SourcesUpdateRepoComponent implements OnInit {
@ViewChild('datasourceUpdateForm') datasourceUpdateForm: DatasourceUpdateFormComponent; @ViewChild('datasourceUpdateForm') datasourceUpdateForm: DatasourceUpdateFormComponent;
group: FormGroup; group: FormGroup;
interfaceFormDesc: Description = interfaceFormDesc;
updateDatasourceInterfaces: Type<any> = DatasourceInterfaceFormComponent;
@ViewChildren('interfacesArray') interfacesArray: QueryList<DatasourceNewInterfaceFormComponent>; @ViewChildren('interfacesArray') interfacesArray: QueryList<DatasourceNewInterfaceFormComponent>;
dataForInterfaceComp: any[] = []; dataForInterfaceComp: any[] = [];

View File

@ -18,10 +18,8 @@
<!-- MIDDLE --> <!-- MIDDLE -->
<div class=" uk-width-expand@m"> <div class=" uk-width-expand@m">
<repository-tiles #repositoryTiles [parent]="'sourcesUpdate'" <repository-tiles [parent]="'sourcesUpdate'"></repository-tiles>
(emitNoRepos)="setNoRepositories($event)"></repository-tiles> <div class="row openAIRECompliantLogoDownload">
<div *ngIf="!noRepositories" class="row openAIRECompliantLogoDownload">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="col-md-12"> <div class="col-md-12">
<div> <div>

View File

@ -1,5 +1,4 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { RepositoryTilesComponent } from '../../shared/reusablecomponents/repository-tiles.component';
@Component ({ @Component ({
selector: 'app-sources-update', selector: 'app-sources-update',
@ -8,17 +7,10 @@ import { RepositoryTilesComponent } from '../../shared/reusablecomponents/reposi
export class SourcesUpdateComponent implements OnInit { export class SourcesUpdateComponent implements OnInit {
@ViewChild('repositoryTiles') repositoryTiles: RepositoryTilesComponent;
noRepositories: boolean;
constructor() {} constructor() {}
ngOnInit() {} ngOnInit() {}
setNoRepositories(norepos: boolean) {
this.noRepositories = norepos;
}
downloadLogo() { downloadLogo() {
window.open('../../../assets/imgs/OpenAIRE_validated_icon_medium.png', '_blank', 'enabledstatus=0,toolbar=0,menubar=0,location=0'); window.open('../../../assets/imgs/OpenAIRE_validated_icon_medium.png', '_blank', 'enabledstatus=0,toolbar=0,menubar=0,location=0');
} }

View File

@ -14,6 +14,7 @@ import { ReusableComponentsModule } from '../../shared/reusablecomponents/reusab
import { SourcesUpdateRepoComponent } from './sources-update-repo.component'; import { SourcesUpdateRepoComponent } from './sources-update-repo.component';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { RepoFilter } from './sourcesPipes'; import { RepoFilter } from './sourcesPipes';
import { DatasourceInterfaceFormComponent } from './sources-forms/datasource-interface-form.component';
import { DatasourceNewInterfaceFormComponent } from './sources-forms/datasource-new-interface-form.component'; import { DatasourceNewInterfaceFormComponent } from './sources-forms/datasource-new-interface-form.component';
import { SrDataComponent } from './sources-register/sr-data.component'; import { SrDataComponent } from './sources-register/sr-data.component';
import { RegisterDatasourceSelectExistingComponent } from './sources-register/register-datasource-select-existing.component'; import { RegisterDatasourceSelectExistingComponent } from './sources-register/register-datasource-select-existing.component';
@ -33,6 +34,9 @@ import { RegisterExistingDatasourceComponent } from './sources-register/register
SourcesRouting, SourcesRouting,
ReusableComponentsModule ReusableComponentsModule
], ],
entryComponents : [
DatasourceInterfaceFormComponent
],
declarations: [ declarations: [
SourcesComponent, SourcesComponent,
SourcesRegisterComponent, SourcesRegisterComponent,
@ -47,6 +51,7 @@ import { RegisterExistingDatasourceComponent } from './sources-register/register
RegisterDatasourceSelectExistingComponent, RegisterDatasourceSelectExistingComponent,
DatasourceUpdateFormComponent, DatasourceUpdateFormComponent,
DatasourceCreateFormComponent, DatasourceCreateFormComponent,
DatasourceInterfaceFormComponent,
DatasourceNewInterfaceFormComponent, DatasourceNewInterfaceFormComponent,
RepoFilter // a pipe that searches for string in repository name RepoFilter // a pipe that searches for string in repository name
] ]

View File

@ -140,8 +140,10 @@ export class AuthenticationService {
public getUserEmail() { public getUserEmail() {
if (this.isLoggedIn) { if (this.isLoggedIn) {
console.log('bommin');
return sessionStorage.getItem('email'); return sessionStorage.getItem('email');
} else { } else {
console.log('bommout');
return ''; return '';
} }
} }

View File

@ -20,7 +20,8 @@ import { typologies } from '../domain/typologies';
const headerOptions = { const headerOptions = {
headers : new HttpHeaders().set('Content-Type', 'application/json') headers : new HttpHeaders().set('Content-Type', 'application/json')
.set('Accept', 'application/json'), .set('Accept', 'application/json; charset=utf-8')
.set('Accept-Charset', 'charset=utf-8'),
withCredentials: true withCredentials: true
}; };

View File

@ -1,52 +0,0 @@
/*#footer#3 {*/
/*margin-right: 280px;*/
/*}*/
/*#footer#9 a, #footer#11 a, #footer#13 a {*/
/*color: #dedede;*/
/*line-height: 22px;*/
/*padding: 2px 0;*/
/*}*/
#footer\#9 a, #footer\#11 a, #footer\#13 a {
color: #dedede;
line-height: 22px;
padding: 2px 0;
}
#footer\#9 a:hover,#footer\#11 a:hover, #footer\#13 a:hover {
color: rgba(255, 255, 255, 0.5);
}
@media all and (min-width: 640px) {
#footer\#3 {
margin-right: 280px;
}
}
#footer\#7 a {
color: rgba(255, 255, 255, 0.7) !important;
text-align: left;
font-size: 14px;
}
.uk-block-secondary {
background: #003D8C none repeat scroll 0 0;
}
.uk-block-secondary:not(.tm-block-texture) {
border-color: #003D8C;
}
.tm-bottom-d {
color: #ffffff;
font-size: 10px;
letter-spacing: 4px;
text-transform: uppercase;
}
.newsletter .uk-icon {
padding-left: 0px;
padding-bottom: 0px;
}

View File

@ -4,38 +4,30 @@
<div class="uk-grid-collapse uk-grid" uk-grid=""> <div class="uk-grid-collapse uk-grid" uk-grid="">
<div id="footer#3" class="uk-width-expand@s uk-first-column"> <div id="footer#3" class="uk-width-expand@s uk-first-column">
<div class="uk-margin-small uk-margin-remove-top uk-text-left@s uk-text-center"> <div class="uk-margin-small uk-margin-remove-top uk-text-left@s uk-text-center">
<img src="../../../assets/imgs/Logo_Horizontal_white_small-74927fe1.png" data-width="126" data-height="30" class="el-image" alt="OpenAIRE"> <img src="../../../assets/imgs/Logo_Horizontal_white_small-74927fe1.png" data-width="126" data-height="30" class="el-image" alt="OpenAIRE">
</div>
<div id="footer#5" class="uk-margin uk-text-left@s uk-text-center">
<img src="../../../assets/imgs/commission.jpg" sizes="(min-width: 50px) 50px" data-width="427" data-height="285" class="el-image" alt="European Commission">
</div> </div>
<!--div id="footer#5" class="uk-margin uk-text-left@s uk-text-center">
<img src="assets/commission.jpg" sizes="(min-width: 50px) 50px" data-width="427" data-height="285" class="el-image" alt="European Commission">
</div-->
<div class="uk-margin"><img style="margin-right: 8px; float: left;" src="../../../assets/imgs/commission.jpg" alt="flag black white low" width="50" height="33"><span style="font-size: 8pt; line-height: 0.7!important;">OpenAIRE-Advance receives funding from the European Union's Horizon 2020 Research and Innovation programme under Grant Agreement No. 777541.</span></div>
<div id="footer#6" class="newsletter uk-margin uk-margin-remove-bottom uk-text-left@s uk-text-center uk-panel"> <div id="footer#6" class="newsletter uk-margin uk-margin-remove-bottom uk-text-left@s uk-text-center uk-panel">
<h5 class="el-title uk-margin uk-h5">
Newsletter
<div class="uk-child-width-expand uk-grid-small uk-grid" uk-grid=""> </h5>
<div class="uk-width-auto@m uk-first-column"><a class="el-link" href="/newsletter/listing"> <a target="_blank" href="https://www.openaire.eu/newsletter/view" class="el-link">
<span class="el-image uk-icon" uk-icon="icon: rss; ratio: 1;"> <span class="el-image uk-icon">
<!--<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <circle cx="3.12" cy="16.8" r="1.85"></circle> <path fill="none" stroke="#000" stroke-width="1.1" d="M1.5,8.2 C1.78,8.18 2.06,8.16 2.35,8.16 C7.57,8.16 11.81,12.37 11.81,17.57 C11.81,17.89 11.79,18.19 11.76,18.5"></path> <path fill="none" stroke="#000" stroke-width="1.1" d="M1.5,2.52 C1.78,2.51 2.06,2.5 2.35,2.5 C10.72,2.5 17.5,9.24 17.5,17.57 C17.5,17.89 17.49,18.19 17.47,18.5"></path></svg>--> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
</span></a></div> <div> <circle cx="3.12" cy="16.8" r="1.85"></circle>
<path fill="none" stroke="#000" stroke-width="1.1" d="M1.5,8.2 C1.78,8.18 2.06,8.16 2.35,8.16 C7.57,8.16 11.81,12.37 11.81,17.57 C11.81,17.89 11.79,18.19 11.76,18.5"></path>
<path fill="none" stroke="#000" stroke-width="1.1" d="M1.5,2.52 C1.78,2.51 2.06,2.5 2.35,2.5 C10.72,2.5 17.5,9.24 17.5,17.57 C17.5,17.89 17.49,18.19 17.47,18.5"></path>
</svg>
<h5 class="el-title uk-margin uk-h5"> Newsletter </h5> </span>
</a>
</div>
</div>
</div> </div>
<div id="footer#7" class="newsletter uk-margin-small uk-margin-remove-top uk-text-left@s uk-text-center uk-panel"> <div id="footer#7" class="newsletter uk-margin-small uk-margin-remove-top uk-text-left@s uk-text-center uk-panel">
<div class="acymailing_module" id="acymailing_module_formAcymailing60611"> <div class="acymailing_module" id="acymailing_module_formAcymailing60611">
<div class="acymailing_mootoolsbutton" id="acymailing_toggle_formAcymailing60611"> <div class="acymailing_mootoolsbutton" id="acymailing_toggle_formAcymailing60611">
<p><a class="acymailing_togglemodule" id="acymailing_togglemodule_formAcymailing60611" target="_blank" href="https://www.openaire.eu/past-newsletters/listing">Subscribe</a></p> <p><a class="acymailing_togglemodule" id="acymailing_togglemodule_formAcymailing60611" target="_blank" href="https://www.openaire.eu/#subscribe">Subscribe</a></p>
</div> </div>
</div> </div>
@ -43,29 +35,29 @@
<div class="uk-margin-small uk-margin-remove-top uk-text-left@s uk-text-center"> <div class="uk-margin-small uk-margin-remove-top uk-text-left@s uk-text-center">
<div class="uk-child-width-auto uk-grid-small uk-flex-left@s uk-flex-center uk-grid" uk-grid=""> <div class="uk-child-width-auto uk-grid-small uk-flex-left@s uk-flex-center uk-grid" uk-grid="">
<div class="uk-first-column"> <div class="uk-first-column">
<a href="http://www.facebook.com/groups/openaire/" target="_blank" class="el-link uk-icon-button uk-icon"> <a href="http://www.facebook.com/groups/openaire/" target="_blank" class="el-link uk-icon-button uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path d="M11,10h2.6l0.4-3H11V5.3c0-0.9,0.2-1.5,1.5-1.5H14V1.1c-0.3,0-1-0.1-2.1-0.1C9.6,1,8,2.4,8,5v2H5.5v3H8v8h3V10z"></path> <path d="M11,10h2.6l0.4-3H11V5.3c0-0.9,0.2-1.5,1.5-1.5H14V1.1c-0.3,0-1-0.1-2.1-0.1C9.6,1,8,2.4,8,5v2H5.5v3H8v8h3V10z"></path>
</svg> </svg>
</a> </a>
</div> </div>
<div> <div>
<a href="http://www.twitter.com/OpenAIRE_eu" target="_blank" class="el-link uk-icon-button uk-icon"> <a href="http://www.twitter.com/OpenAIRE_eu" target="_blank" class="el-link uk-icon-button uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path d="M19,4.74 C18.339,5.029 17.626,5.229 16.881,5.32 C17.644,4.86 18.227,4.139 18.503,3.28 C17.79,3.7 17.001,4.009 16.159,4.17 C15.485,3.45 14.526,3 13.464,3 C11.423,3 9.771,4.66 9.771,6.7 C9.771,6.99 9.804,7.269 9.868,7.539 C6.795,7.38 4.076,5.919 2.254,3.679 C1.936,4.219 1.754,4.86 1.754,5.539 C1.754,6.82 2.405,7.95 3.397,8.61 C2.79,8.589 2.22,8.429 1.723,8.149 L1.723,8.189 C1.723,9.978 2.997,11.478 4.686,11.82 C4.376,11.899 4.049,11.939 3.713,11.939 C3.475,11.939 3.245,11.919 3.018,11.88 C3.49,13.349 4.852,14.419 6.469,14.449 C5.205,15.429 3.612,16.019 1.882,16.019 C1.583,16.019 1.29,16.009 1,15.969 C2.635,17.019 4.576,17.629 6.662,17.629 C13.454,17.629 17.17,12 17.17,7.129 C17.17,6.969 17.166,6.809 17.157,6.649 C17.879,6.129 18.504,5.478 19,4.74"></path> <path d="M19,4.74 C18.339,5.029 17.626,5.229 16.881,5.32 C17.644,4.86 18.227,4.139 18.503,3.28 C17.79,3.7 17.001,4.009 16.159,4.17 C15.485,3.45 14.526,3 13.464,3 C11.423,3 9.771,4.66 9.771,6.7 C9.771,6.99 9.804,7.269 9.868,7.539 C6.795,7.38 4.076,5.919 2.254,3.679 C1.936,4.219 1.754,4.86 1.754,5.539 C1.754,6.82 2.405,7.95 3.397,8.61 C2.79,8.589 2.22,8.429 1.723,8.149 L1.723,8.189 C1.723,9.978 2.997,11.478 4.686,11.82 C4.376,11.899 4.049,11.939 3.713,11.939 C3.475,11.939 3.245,11.919 3.018,11.88 C3.49,13.349 4.852,14.419 6.469,14.449 C5.205,15.429 3.612,16.019 1.882,16.019 C1.583,16.019 1.29,16.009 1,15.969 C2.635,17.019 4.576,17.629 6.662,17.629 C13.454,17.629 17.17,12 17.17,7.129 C17.17,6.969 17.166,6.809 17.157,6.649 C17.879,6.129 18.504,5.478 19,4.74"></path>
</svg> </svg>
</a> </a>
</div> </div>
<div class=""> <div>
<a href="http://www.linkedin.com/groups/OpenAIRE-3893548" target="_blank" class="el-link uk-icon-button uk-icon"> <a href="http://www.linkedin.com/groups/OpenAIRE-3893548" target="_blank" class="el-link uk-icon-button uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path d="M5.77,17.89 L5.77,7.17 L2.21,7.17 L2.21,17.89 L5.77,17.89 L5.77,17.89 Z M3.99,5.71 C5.23,5.71 6.01,4.89 6.01,3.86 C5.99,2.8 5.24,2 4.02,2 C2.8,2 2,2.8 2,3.85 C2,4.88 2.77,5.7 3.97,5.7 L3.99,5.7 L3.99,5.71 L3.99,5.71 Z"></path> <path d="M5.77,17.89 L5.77,7.17 L2.21,7.17 L2.21,17.89 L5.77,17.89 L5.77,17.89 Z M3.99,5.71 C5.23,5.71 6.01,4.89 6.01,3.86 C5.99,2.8 5.24,2 4.02,2 C2.8,2 2,2.8 2,3.85 C2,4.88 2.77,5.7 3.97,5.7 L3.99,5.7 L3.99,5.71 L3.99,5.71 Z"></path>
<path d="M7.75,17.89 L11.31,17.89 L11.31,11.9 C11.31,11.58 11.33,11.26 11.43,11.03 C11.69,10.39 12.27,9.73 13.26,9.73 C14.55,9.73 15.06,10.71 15.06,12.15 L15.06,17.89 L18.62,17.89 L18.62,11.74 C18.62,8.45 16.86,6.92 14.52,6.92 C12.6,6.92 11.75,7.99 11.28,8.73 L11.3,8.73 L11.3,7.17 L7.75,7.17 C7.79,8.17 7.75,17.89 7.75,17.89 L7.75,17.89 L7.75,17.89 Z"></path> <path d="M7.75,17.89 L11.31,17.89 L11.31,11.9 C11.31,11.58 11.33,11.26 11.43,11.03 C11.69,10.39 12.27,9.73 13.26,9.73 C14.55,9.73 15.06,10.71 15.06,12.15 L15.06,17.89 L18.62,17.89 L18.62,11.74 C18.62,8.45 16.86,6.92 14.52,6.92 C12.6,6.92 11.75,7.99 11.28,8.73 L11.3,8.73 L11.3,7.17 L7.75,7.17 C7.79,8.17 7.75,17.89 7.75,17.89 L7.75,17.89 L7.75,17.89 Z"></path>
</svg> </svg>
</a> </a>
</div> </div>
<div class=""> <div>
<a href="http://www.slideshare.net/OpenAIRE_eu" target="_blank" class="el-link uk-icon-button uk-icon"> <a href="http://www.slideshare.net/OpenAIRE_eu" target="_blank" class="el-link uk-icon-button uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<line fill="none" stroke="#000" stroke-width="1.1" x1="13.4" y1="14" x2="6.3" y2="10.7"></line> <line fill="none" stroke="#000" stroke-width="1.1" x1="13.4" y1="14" x2="6.3" y2="10.7"></line>
<line fill="none" stroke="#000" stroke-width="1.1" x1="13.5" y1="5.5" x2="6.5" y2="8.8"></line> <line fill="none" stroke="#000" stroke-width="1.1" x1="13.5" y1="5.5" x2="6.5" y2="8.8"></line>
@ -75,7 +67,7 @@
</svg> </svg>
</a> </a>
</div> </div>
<div class=""> <div>
<a href="https://www.youtube.com/channel/UChFYqizc-S6asNjQSoWuwjw" target="_blank" class="el-link uk-icon-button uk-icon"> <a href="https://www.youtube.com/channel/UChFYqizc-S6asNjQSoWuwjw" target="_blank" class="el-link uk-icon-button uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path d="M15,4.1c1,0.1,2.3,0,3,0.8c0.8,0.8,0.9,2.1,0.9,3.1C19,9.2,19,10.9,19,12c-0.1,1.1,0,2.4-0.5,3.4c-0.5,1.1-1.4,1.5-2.5,1.6 c-1.2,0.1-8.6,0.1-11,0c-1.1-0.1-2.4-0.1-3.2-1c-0.7-0.8-0.7-2-0.8-3C1,11.8,1,10.1,1,8.9c0-1.1,0-2.4,0.5-3.4C2,4.5,3,4.3,4.1,4.2 C5.3,4.1,12.6,4,15,4.1z M8,7.5v6l5.5-3L8,7.5z"></path> <path d="M15,4.1c1,0.1,2.3,0,3,0.8c0.8,0.8,0.9,2.1,0.9,3.1C19,9.2,19,10.9,19,12c-0.1,1.1,0,2.4-0.5,3.4c-0.5,1.1-1.4,1.5-2.5,1.6 c-1.2,0.1-8.6,0.1-11,0c-1.1-0.1-2.4-0.1-3.2-1c-0.7-0.8-0.7-2-0.8-3C1,11.8,1,10.1,1,8.9c0-1.1,0-2.4,0.5-3.4C2,4.5,3,4.3,4.1,4.2 C5.3,4.1,12.6,4,15,4.1z M8,7.5v6l5.5-3L8,7.5z"></path>
@ -101,7 +93,6 @@
<div id="footer#12" class="uk-width-medium uk-text-left@s uk-text-center uk-panel"> <div id="footer#12" class="uk-width-medium uk-text-left@s uk-text-center uk-panel">
<h3 class="el-title uk-h6">Support</h3> <h3 class="el-title uk-h6">Support</h3>
<ul class="uk-nav uk-nav-default uk-nav-parent-icon uk-nav-accordion" uk-nav=""> <ul class="uk-nav uk-nav-default uk-nav-parent-icon uk-nav-accordion" uk-nav="">
<li><a href="https://www.openaire.eu/contact-noads">NOADs</a></li>
<li><a target="_blank" href="https://www.openaire.eu/guides">Guides</a></li> <li><a target="_blank" href="https://www.openaire.eu/guides">Guides</a></li>
<li><a target="_blank" href="https://www.openaire.eu/faqs">FAQs</a></li> <li><a target="_blank" href="https://www.openaire.eu/faqs">FAQs</a></li>
<li><a target="_blank" href="https://www.openaire.eu/frontpage/webinars">Webinars</a></li> <li><a target="_blank" href="https://www.openaire.eu/frontpage/webinars">Webinars</a></li>
@ -116,7 +107,6 @@
<li><a target="_blank" href="https://www.openaire.eu/news/">News</a></li> <li><a target="_blank" href="https://www.openaire.eu/news/">News</a></li>
<li><a target="_blank" href="https://www.openaire.eu/events">Events</a></li> <li><a target="_blank" href="https://www.openaire.eu/events">Events</a></li>
<li><a target="_blank" href="https://www.openaire.eu/blogs/magazine">Blogs</a></li> <li><a target="_blank" href="https://www.openaire.eu/blogs/magazine">Blogs</a></li>
<li><a href="https://www.openaire.eu/newsletter/listing">Newsletters</a></li>
<li><a target="_blank" href="https://www.openaire.eu/documents">Documents</a></li> <li><a target="_blank" href="https://www.openaire.eu/documents">Documents</a></li>
</ul> </ul>
</div> </div>
@ -141,7 +131,7 @@
<div class="uk-width-expand@m"> <div class="uk-width-expand@m">
<div id="footer#22" class=" uk-text-small uk-margin uk-margin-remove-bottom uk-text-center@m uk-text-center uk-text-lead"> <div id="footer#22" class=" uk-text-small uk-margin uk-margin-remove-bottom uk-text-center@m uk-text-center uk-text-lead">
<a href="http://creativecommons.org/licenses/by/4.0/" rel="license"> <a href="http://creativecommons.org/licenses/by/4.0/" rel="license">
<img src="/images/Icons/cc.svg" uk-svg="" hidden="true"> <!--<img src="/images/Icons/cc.svg" uk-svg="" hidden="true">-->
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24" class=" uk-svg"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24" class=" uk-svg">
<title></title> <title></title>
<g data-name="Creative Commons" id="Creative_Commons"> <g data-name="Creative Commons" id="Creative_Commons">
@ -150,7 +140,7 @@
<path d="M18.87,10a3.5,3.5,0,1,0,0,4" style="fill:none;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round"></path> <path d="M18.87,10a3.5,3.5,0,1,0,0,4" style="fill:none;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round"></path>
</g> </g>
</svg> </svg>
&nbsp;<img src="/images/Icons/cc-by.svg" uk-svg="" hidden="true"> <!--<img src="/images/Icons/cc-by.svg" uk-svg="" hidden="true">-->
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24" class=" uk-svg"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24" class=" uk-svg">
<title></title> <title></title>
<g id="Attribution"> <g id="Attribution">
@ -168,7 +158,7 @@
<div class="uk-width-small@m"> <div class="uk-width-small@m">
<div class="uk-margin uk-margin-remove-top uk-margin-remove-bottom uk-text-right@m uk-text-center"> <div class="uk-margin uk-margin-remove-top uk-margin-remove-bottom uk-text-right@m uk-text-center">
<a href="#" uk-totop="" uk-scroll="" class="uk-totop uk-icon"> <a href="#" uk-totop="" uk-scroll="" class="uk-totop uk-icon">
<!--<svg width="18" height="10" viewBox="0 0 18 10" xmlns="http://www.w3.org/2000/svg" icon="totop" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.2" points="1 9 9 1 17 9 "></polyline></svg>-->
</a> </a>
</div> </div>
</div> </div>

View File

@ -6,7 +6,6 @@ import { Component, OnInit } from '@angular/core';
@Component({ @Component({
selector: 'footer', selector: 'footer',
templateUrl: './footer.component.html', templateUrl: './footer.component.html',
styleUrls: ["./footer.component.css"]
}) })
export class FooterComponent implements OnInit { export class FooterComponent implements OnInit {

View File

@ -1,4 +1,4 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { Repository } from '../../domain/typeScriptClasses'; import { Repository } from '../../domain/typeScriptClasses';
import { RepositoryService } from '../../services/repository.service'; import { RepositoryService } from '../../services/repository.service';
import { AuthenticationService } from '../../services/authentication.service'; import { AuthenticationService } from '../../services/authentication.service';
@ -17,7 +17,6 @@ export class RepositoryTilesComponent implements OnInit {
loadingMessage: string; loadingMessage: string;
@Input() parent: string = ''; @Input() parent: string = '';
@Output() emitNoRepos: EventEmitter<boolean> = new EventEmitter<boolean>();
constructor(private authService: AuthenticationService, constructor(private authService: AuthenticationService,
private repoService: RepositoryService) {} private repoService: RepositoryService) {}
@ -49,7 +48,6 @@ export class RepositoryTilesComponent implements OnInit {
this.loadingMessage = ''; this.loadingMessage = '';
if (!this.reposOfUser || !this.reposOfUser.length) { if (!this.reposOfUser || !this.reposOfUser.length) {
this.warningMessage = loadingUserRepoInfoEmpty; this.warningMessage = loadingUserRepoInfoEmpty;
this.emitNoRepos.emit(true);
} }
} }
); );

View File

@ -421,7 +421,7 @@ body {
font-weight: normal; font-weight: normal;
line-height: 30px; line-height: 30px;
padding-bottom: 10px; padding-bottom: 10px;
padding-left: 20px; padding-left: 5px;
padding-top: 3px; padding-top: 3px;
text-transform: none; text-transform: none;
/*color: #829333; /*color: #829333;

View File

@ -1,6 +1,6 @@
export const environment = { export const environment = {
production: true, production: true,
API_ENDPOINT: '/api', API_ENDPOINT: '/uoa-repository-manager-service',
FAQ_ENDPOINT: '/uoa-admin-tools/api', FAQ_ENDPOINT: '/uoa-admin-tools/api',
FAQ_HOMEPAGE: '/uoa-admin-tools/dashboard' FAQ_HOMEPAGE: '/uoa-admin-tools/dashboard'
}; };