Dashboard changed and minor fixes

This commit is contained in:
andreas.mantas 2019-04-02 08:31:55 +00:00
parent ded6ae3e8f
commit 1a9427ccb2
9 changed files with 142 additions and 84 deletions

View File

@ -56,7 +56,7 @@
"options": {
"browserTarget": "uoa-repository-manager-ui:build",
"port": 4200,
"host": "aleka.athenarc.gr"
"host": "localhost"
},
"configurations": {
"production": {

View File

@ -30,7 +30,7 @@
</div>
<div class="step {{ (currentStep > 0) ? 'active' : '' }}">
<div>
Select guidlines
Select guidelines
<span></span>
</div>
</div>

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>
<div class="uk-container uk-container-large">
<div class="uk-grid uk-grid-stack">
<div class="uk container-fluid">
<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>
<div>
<!-- MARGIN-TOP -->
<div class="uk-sticky-placeholder" style="height: 84px; margin: 0px;" aria-hidden="aria-hidden"></div>
<div class="uk-width-1-1@m uk-first-column">
<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-first-column">
<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]="['/sources','register']" uk-scroll=""></a>
<div class="uk-child-width-expand uk-flex-middle uk-grid" uk-grid="">
<div class="uk-width-1-2@m uk-first-column">
<img class="el-image uk-border-rounded" src="../../../assets/imgs/iStock-153949408.jpg" >
</div>
<div>
<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 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]="['/sources','register']" uk-scroll=""></a>
<div class="uk-child-width-expand uk-flex-middle uk-grid" uk-grid="">
<div>
<img class="el-image uk-border-rounded" src="../../../assets/imgs/iStock-153949408.jpg" >
</div>
<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 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="uk-child-width-expand uk-flex-middle uk-grid" uk-grid="">
<div class="uk-width-1-2@m uk-first-column">
<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 class="el-content uk-margin">
Validate data sources against OpenAIRE guidelines
</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="uk-child-width-expand uk-flex-middle uk-grid" uk-grid="">
<div>
<img class="el-image uk-border-rounded" src="../../../assets/imgs/iStock-516286898.jpg" >
</div>
<div>
<h3 class="el-title uk-margin uk-card-title">Validate</h3>
<div class="el-content uk-margin">
Validate data sources against OpenAIRE guidelines
</div>
</div>
</div>
<div class="uk-grid-margin uk-first-column">
<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="uk-child-width-expand uk-flex-middle uk-grid" uk-grid="">
<div class="uk-width-1-2@m uk-first-column">
<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 class="el-content uk-margin">
View notifications to enrich the metadata and the content
</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]="['/content','notifications']" uk-scroll=""></a>
<div class="uk-child-width-expand uk-flex-middle uk-grid" uk-grid="">
<div>
<img class="el-image uk-border-rounded" src="../../../assets/imgs/iStock-466267165.jpg" >
</div>
<div>
<h3 class="el-title uk-margin uk-card-title">Notifications</h3>
<div class="el-content uk-margin">
View notifications to enrich the metadata and the content
</div>
</div>
</div>
<div class="uk-grid-margin">
<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="uk-child-width-expand uk-flex-middle uk-grid" uk-grid="">
<div class="uk-width-1-2@m uk-first-column">
<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 class="el-content uk-margin">
View aggregated, cleaned usage statistics for repository access
</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" uk-scroll="" [routerLink]="['/getImpact']"></a>
<div class="uk-child-width-expand uk-flex-middle uk-grid" uk-grid="">
<div>
<img class="el-image uk-border-rounded" src="../../../assets/imgs/iStock-659630328.jpg" >
</div>
<div>
<h3 class="el-title uk-margin uk-card-title">Metrics</h3>
<div class="el-content uk-margin">
View aggregated, cleaned usage statistics for repository access
</div>
</div>
</div>
@ -88,6 +77,43 @@
</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>

View File

@ -1,5 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { AuthenticationService } from '../../services/authentication.service';
import { RepositoryService } from '../../services/repository.service';
import {Repository} from '../../domain/typeScriptClasses';
@Component ({
selector: 'app-dashboard',
@ -8,11 +10,38 @@ import { AuthenticationService } from '../../services/authentication.service';
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() {
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

@ -208,20 +208,20 @@ export class DatasourceCreateFormComponent implements OnInit {
createNewRepository(): Repository {
const newRepo: Repository = new Repository();
newRepo.officialName = this.group.get('officialName').value.toString();
newRepo.englishName = this.group.get('englishName').value.toString();
newRepo.officialName = this.group.get('officialName').value;
newRepo.englishName = this.group.get('englishName').value;
newRepo.websiteUrl = this.group.get('websiteUrl').value;
newRepo.logoUrl = this.group.get('logoUrl').value;
newRepo.contactEmail = this.group.get('adminEmail').value;
newRepo.countryName = this.countries.filter(x => x.code === this.group.get('country').value)[0].name;
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.longitude = this.group.get('longtitude').value;
newRepo.timezone = this.group.get('timezone').value;
newRepo.datasourceClass = this.group.get('datasourceType').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.eissn = '';
newRepo.lissn = '';

View File

@ -280,15 +280,15 @@ export class DatasourceUpdateFormComponent implements OnInit {
} else if (this.updateGroup.get('platformName').value) {
this.selectedRepo.typology = this.updateGroup.get('platformName').value;
}
this.selectedRepo.officialName = this.updateGroup.get('officialName').value.toString();
this.selectedRepo.description = this.updateGroup.get('repoDescription').value.toString();
this.selectedRepo.officialName = this.updateGroup.get('officialName').value;
this.selectedRepo.description = this.updateGroup.get('repoDescription').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.longitude = this.updateGroup.get('longtitude').value;
this.selectedRepo.latitude = this.updateGroup.get('latitude').value;
this.selectedRepo.websiteUrl = this.updateGroup.get('websiteUrl').value;
this.selectedRepo.organization = this.updateGroup.get('institutionName').value.toString();
this.selectedRepo.englishName = this.updateGroup.get('englishName').value.toString();
this.selectedRepo.organization = this.updateGroup.get('institutionName').value;
this.selectedRepo.englishName = this.updateGroup.get('englishName').value;
this.selectedRepo.logoUrl = this.updateGroup.get('logoUrl').value;
this.selectedRepo.timezone = this.updateGroup.get('timezone').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">
List provided by
<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>
</div>
</div>
@ -55,7 +55,7 @@
<a href="http://www.re3data.org" target="_blank">
List provided by
<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>
</div>
</div>
@ -74,7 +74,7 @@
<div class="el-meta uk-margin uk-text-meta" style="z-index:9999; position:relative;">
<a href="https://www.openaire.eu/helpdesk/" target="_blank">
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>
</div>
</div>
@ -93,7 +93,7 @@
<div class="el-meta uk-margin uk-text-meta" style="z-index:9999; position:relative;">
<a href="http://www.openaire.eu/helpdesk/" target="_blank">
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>
</div>
</div>

View File

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

View File

@ -20,7 +20,8 @@ import { typologies } from '../domain/typologies';
const headerOptions = {
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
};