no message

This commit is contained in:
Ioannis Kalyvas 2018-07-24 12:04:12 +03:00
parent 518a2ffd3c
commit 14f9be46f0
17 changed files with 266 additions and 498 deletions

4
.gitignore vendored
View File

@ -27,3 +27,7 @@ dmp-backend/data/target/
dmp-backend/queryable/target/
dmp-backend/elastic/target/
dmp-backend/queryengine/target/
*.tar
*.gz
final/
temp/

View File

@ -1,11 +0,0 @@
C:\Users\ikalyvas\Documents\OpenAIRE-EUDAT-DMP-service-pilot\dmp-backend\logging\src\main\java\eu\eudat\core\models\exception\ApiExceptionLoggingModel.java
C:\Users\ikalyvas\Documents\OpenAIRE-EUDAT-DMP-service-pilot\dmp-backend\logging\src\main\java\types\LoggingOutputType.java
C:\Users\ikalyvas\Documents\OpenAIRE-EUDAT-DMP-service-pilot\dmp-backend\logging\src\main\java\eu\eudat\core\models\AuditModel.java
C:\Users\ikalyvas\Documents\OpenAIRE-EUDAT-DMP-service-pilot\dmp-backend\logging\src\main\java\eu\eudat\core\models\LoggingModel.java
C:\Users\ikalyvas\Documents\OpenAIRE-EUDAT-DMP-service-pilot\dmp-backend\logging\src\main\java\eu\eudat\core\models\simple\SimpleAuditModel.java
C:\Users\ikalyvas\Documents\OpenAIRE-EUDAT-DMP-service-pilot\dmp-backend\logging\src\main\java\eu\eudat\core\logger\common\AbstractBatchLogger.java
C:\Users\ikalyvas\Documents\OpenAIRE-EUDAT-DMP-service-pilot\dmp-backend\logging\src\main\java\eu\eudat\core\models\simple\SimpleLoggingModel.java
C:\Users\ikalyvas\Documents\OpenAIRE-EUDAT-DMP-service-pilot\dmp-backend\logging\src\main\java\eu\eudat\core\logger\remote\http\HttpRemoteLogger.java
C:\Users\ikalyvas\Documents\OpenAIRE-EUDAT-DMP-service-pilot\dmp-backend\logging\src\main\java\eu\eudat\core\logger\Logger.java
C:\Users\ikalyvas\Documents\OpenAIRE-EUDAT-DMP-service-pilot\dmp-backend\logging\src\main\java\eu\eudat\core\models\exception\ExceptionLoggingModel.java
C:\Users\ikalyvas\Documents\OpenAIRE-EUDAT-DMP-service-pilot\dmp-backend\logging\src\main\java\types\LoggingType.java

View File

@ -30,7 +30,7 @@ spring.mail.test-connection=false
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
mail.subject=Invitation to DMP Plan {dmpname}
mail.content=You have been invited to {dmpname} data management plan.Follow the link http://dl043.madgik.di.uoa.gr:8080/invitation/{invitationID} to submit it
mail.content=You have been invited to {dmpname} data management plan.Follow the link http://dl043.madgik.di.uoa.gr/invitation/{invitationID} to submit it
mail.from=citesagrdev@gmail.com
########################FACEBOOK LOGIN Properties#############################
facebook.login.clientId=110586756143149
@ -45,7 +45,7 @@ linkedin.login.redirect_uri=http://localhost:4200/login/linkedin
########################LINKEDIN LOGIN Properties#############################
twitter.login.clientId=HiR4hQH9HNubKC5iKQy0l4mAZ
twitter.login.clientSecret=9KZHgkqUO2QFnELSL14jeUvfUacWX23rqD8OW8X0xoRDXOSfKH
twitter.login.redirect_uri=http://localhost:4200/login/twitter
twitter.login.redirect_uri=http://dl043.madgik.di.uoa.gr/login/twitter
########################Persistence/Hibernate/Batch##############################
spring.profiles.active=devel
########################Persistence/Hibernate/Connection pool####################
@ -55,7 +55,7 @@ autouser.root.username=root
#################################################################################
b2access.externallogin.user_info_url=https://b2access-integration.fz-juelich.de:443/oauth2/userinfo
b2access.externallogin.access_token_url=https://b2access-integration.fz-juelich.de:443/oauth2/token
b2access.externallogin.redirect_uri=http://dmp.eudat.org:4200/api/oauth/authorized/b2access
b2access.externallogin.redirect_uri=http://dl043.madgik.di.uoa.gr/api/oauth/authorized/b2access
b2access.externallogin.clientid=eudatdmptool
b2access.externallogin.clientSecret=A3b*1*92
#################################################################################

View File

@ -1,3 +1,15 @@
.example-container {
background: rgb(250, 248, 248);
}
.fixed {
position: fixed;
top: 0; /* Sets the sticky toolbar to be on top */
z-index: 1000;
width: 100%;
}
.main-container{
margin-top: 64px;
padding-top: 10px;
}

View File

@ -24,7 +24,6 @@ import { AddResearchersComponent } from "../../shared/components/add-researchers
import { ViewContainerRef } from '@angular/core';
import { TdDialogService } from '@covalent/core';
import { AvailableProfilesComponent } from "../../shared/components/available-profiles/available-profiles.component";
import { AutoCompleteChipConfiguration } from "../../shared/components/autocompleteChips/AutoCompleteChipConfiguration";
import { BaseCriteria } from "../../models/criteria/BaseCriteria";
import { DataManagementPlanProfileService } from "../../services/data-management-plan-profile/datamanagement-profile.service";
import { DataManagementPlanProfileListingModel } from "../../models/data-management-plan-profile/DataManagementPlanProfileListingModel";
@ -57,7 +56,6 @@ export class DataManagementPlanEditorComponent implements AfterViewInit, IBreadC
filteredProfiles: DatasetProfileModel[];
projectAutoCompleteConfiguration: AutoCompleteConfiguration;
organisationsAutoCompleteConfiguration: AutoCompleteChipConfiguration;
createNewVersion;
associatedUsers: Array<DmpUsersModel>
filteredOptions: Observable<DataManagementPlanProfileListingModel>
@ -89,7 +87,6 @@ export class DataManagementPlanEditorComponent implements AfterViewInit, IBreadC
let organisationRequestItem: RequestItem<BaseCriteria> = new RequestItem();
organisationRequestItem.criteria = new BaseCriteria();
this.projectAutoCompleteConfiguration = new AutoCompleteConfiguration(this.projectService.getWithExternal.bind(this.projectService), projectRequestItem);
this.organisationsAutoCompleteConfiguration = new AutoCompleteChipConfiguration(this.externalSourcesService.searchDMPOrganizations.bind(this.externalSourcesService), organisationRequestItem);
if (itemId != null) {
this.isNew = false;
@ -247,12 +244,9 @@ export class DataManagementPlanEditorComponent implements AfterViewInit, IBreadC
height: '355px',
width: '700px',
data: {
profiles: this.formGroup.get("profiles")
}
});
dialogRef.afterClosed().subscribe(result => {
this.formGroup.get("profiles").setValue(result);
});
return false;
}

View File

@ -19,7 +19,6 @@ import { TranslateService } from "@ngx-translate/core";
import { DataSource } from "@angular/cdk/table";
import { Observable } from "rxjs/Observable";
import { FormGroup } from '@angular/forms';
import { AutoCompleteChipConfiguration } from "../../../shared/components/autocompleteChips/AutoCompleteChipConfiguration";
import { BaseCriteria } from '../../../models/criteria/BaseCriteria';
@ -43,7 +42,6 @@ export class DataManagementPlanWizardEditorComponent implements AfterViewInit {
filteredProfiles: DatasetProfileModel[];
projectAutoCompleteConfiguration: AutoCompleteConfiguration;
organisationsAutoCompleteConfiguration: AutoCompleteChipConfiguration;
createNewVersion;
associatedUsers: Array<DmpUsersModel>
labelDisabled: boolean = false;
@ -69,7 +67,6 @@ export class DataManagementPlanWizardEditorComponent implements AfterViewInit {
let organisationRequestItem: RequestItem<BaseCriteria> = new RequestItem();
organisationRequestItem.criteria = new BaseCriteria();
this.organisationsAutoCompleteConfiguration = new AutoCompleteChipConfiguration(this.externalSourcesService.searchDMPOrganizations.bind(this.externalSourcesService), organisationRequestItem);
this.route.data.subscribe(value => {
if (value.clone == false && this.formGroup.get("label").value) {

View File

@ -8,25 +8,22 @@
</div>
<div class="row" style="margin-top: 30px">
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12 col-md-offset-1">
<app-figurecard title={{dashboardStatisticsData.totalProjectCount}} headerIcon="list" [category]="this.isAuthenticated() ? 'My Projects' : 'Projects'"
[hasFootContent]="this.isAuthenticated()" [footContent]="this.isAuthenticated() ? 'Open My Projects' : 'Open Projects'"
<app-figurecard title={{dashboardStatisticsData.totalDataManagementPlanCount}} headerIcon="mode_edit" [category]="this.isAuthenticated() ? 'DASHBOARD.MY-DMPS' : 'DASHBOARD.DMPS' "
routelLink='/dmps' footerIcon="open_in_new" linearColor="linear-gradient(60deg, #ef5350, #e53935)" boxShadow="0 4px 20px 0px rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(244, 67, 54, 0.4)">
</app-figurecard>
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12 ">
<app-figurecard title={{dashboardStatisticsData.totalProjectCount}} headerIcon="list" [category]="this.isAuthenticated() ? 'DASHBOARD.MY-PROJECTS' : 'DASHBOARD.PROJECTS' "
routelLink='/projects' footerIcon="open_in_new" linearColor="linear-gradient(60deg, #ffa726, #fb8c00)" boxShadow="0 4px 20px 0 rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(255, 152, 0, 0.4)">
</app-figurecard>
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<app-figurecard title={{dashboardStatisticsData.totalDataManagementPlanCount}} headerIcon="mode_edit" [category]="this.isAuthenticated() ? 'My DMPs' : 'DMPs'"
[hasFootContent]="this.isAuthenticated()" [footContent]="this.isAuthenticated() ? 'Open My DMPs' : 'Open DMPs'" routelLink='/dmps'
footerIcon="open_in_new" linearColor="linear-gradient(60deg, #ef5350, #e53935)" boxShadow="0 4px 20px 0px rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(244, 67, 54, 0.4)">
</app-figurecard>
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<app-figurecard title={{dashboardStatisticsData.totalDataSetCount}} headerIcon="subject" [category]="this.isAuthenticated() ? 'My Datasets' : 'Datasets'"
[hasFootContent]="this.isAuthenticated()" [footContent]="this.isAuthenticated() ? 'Open My Datasets' : 'Open Datasets'"
<app-figurecard title={{dashboardStatisticsData.totalDataSetCount}} headerIcon="subject" [category]="this.isAuthenticated() ? 'DASHBOARD.MY-DATASETS' : 'DASHBOARD.DATASETS'"
routelLink='/datasets' footerIcon="open_in_new" linearColor="linear-gradient(60deg, #26c6da, #00acc1)" boxShadow="0 4px 20px 0px rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(0, 188, 212, 0.4)">
</app-figurecard>
</div>
</div>
<div *ngIf="this.isAuthenticated()" class="row" style="margin-top: 30px">
<div *ngIf="this.isAuthenticated()" class="row">
<div class="col-lg-9 col-md-12 col-sm-12 col-xs-12 col-md-offset-1">
<app-recent-activity></app-recent-activity>
</div>

View File

@ -1,11 +0,0 @@
import { BaseCriteria } from "../../../models/criteria/BaseCriteria";
import { RequestItem } from "../../../models/criteria/RequestItem";
export class AutoCompleteChipConfiguration {
public callback: Function;
public requestItem: RequestItem<any>;
constructor(callback: Function, requestItem: RequestItem<any>) {
this.callback = callback;
this.requestItem = requestItem;
}
}

View File

@ -1,21 +0,0 @@
<mat-form-field>
<mat-chip-list #chipList [required]="required">
<mat-chip *ngFor="let item of selectedItems" (remove)="remove(item)">
{{item.name}}
<mat-icon matChipRemove>cancel</mat-icon>
</mat-chip>
<input matInput [matChipInputFor]="chipList" [matAutocomplete]="auto" [formControl]="control" placeholder="{{placeholder}}"
[required]="required" #chipInput>
</mat-chip-list>
<mat-error *ngIf="control['errors']['required']">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
<mat-progress-spinner matSuffix mode="indeterminate" *ngIf="loading" [diameter]="22"></mat-progress-spinner>
<mat-autocomplete #auto="matAutocomplete" [displayWith]="displayWith.bind(this)" (optionSelected)="this.optionSelected($event)">
<mat-option *ngFor="let item of filteredItems " [value]="item">
<span *ngIf="titleKey">{{item[titleKey]}}</span>
<span *ngIf="subtitleKey">{{item[subtitleKey]}}</span>
</mat-option>
<!-- <mat-option *ngIf="filteredItems.length == 0" value="das">
<span>{{'GENERAL.AUTOCOMPLETE.NO-ITEMS' | translate}}</span>
</mat-option> -->
</mat-autocomplete>
</mat-form-field>

View File

@ -1,30 +0,0 @@
.autocomplete-input {
width: 100%;
}
.autocomplete-progress {
overflow: initial !important;
}
.autocomplete {
mat-form-field {
width: 100%;
padding: 3px;
}
.mat-card {
margin: 16px 0;
}
.left-button {
float: left;
}
}
.input-table {
table-layout: fixed;
}
.full-width {
width: 100%;
}

View File

@ -1,167 +0,0 @@
import { any } from 'codelyzer/util/function';
import { FormControl, FormGroupDirective, NgForm, FormGroup, FormBuilder } from '@angular/forms';
import { Observable } from 'rxjs/Rx';
import { setTimeout } from 'timers';
import { Component, EventEmitter, Input, OnInit, Output, ViewChild, ElementRef } from '@angular/core';
import 'rxjs/add/operator/debounceTime';
import 'rxjs/add/operator/map';
import { AutoCompleteChipConfiguration } from './AutoCompleteChipConfiguration';
import { ErrorStateMatcher, MatInput } from '@angular/material';
@Component({
selector: 'auto-complete-chip',
templateUrl: './autocompleteChips.component.html',
styleUrls: ['./autocompleteChips.component.scss']
})
export class AutocompleteChipComponent implements OnInit {
@Input()
configuration: AutoCompleteChipConfiguration;
@Input()
titleKey: String;
@Input()
subtitleKey: String;
@Input()
delay: number = 700;
@Input()
placeholder: String;
filteredItems: any[];
@Input()
required: boolean;
@Input()
disabled: boolean = false;
@Input()
multiChips: boolean = false;
// @Input() selectedDropdownItem: AutoCompleteItem;
// @Output() selectedDropdownItemChange = new EventEmitter<AutoCompleteItem>();
// @Output()
// output: EventEmitter<AutoCompleteItem> = new EventEmitter<AutoCompleteItem>();
@Input() control: FormControl;
// @Input() createNew = false;
term = new FormControl();
// @Input()
// ClickFunctionCall: Function;
@ViewChild('chipInput') chipInput: MatInput;
loading = false;
hasSelectedItem = false;
selectedItems: any[] = [];
constructor() {
}
ngOnInit() {
const valueChanges = this.term.valueChanges.share();
valueChanges.subscribe(searchTerm => {
if (this.hasSelectedItem) {
this.resetFormControlValue();
} else {
this.loading = true;
}
});
valueChanges
.debounceTime(this.delay)
.distinctUntilChanged()
.switchMap(val => {
if (this.hasSelectedItem || typeof(val) !== "string") {
this.loading = false;
return this.filteredItems = [];
} else if (typeof(val)== "string") {
this.configuration.requestItem.criteria.like = val;
return this.configuration.callback(this.configuration.requestItem).map(result => {
this.filteredItems = (<any[]>result)
this.loading = false;
})
}
}).subscribe()
}
resetFormControlValue() {
this.hasSelectedItem = false;
this.term.setValue(null);
}
// // listingItemToDropDown(item: DropdownListingItem): AutoCompleteItem {
// // return (item as DropdownListingItem).toDropdownList();
// // }
optionSelected(event: any) {
this.hasSelectedItem = true;
this.selectedItems.push(event.option.value)
this.chipInput['nativeElement'].value = '';
this.control.setValue(this.selectedItems, { emitEvent: false });
//this.filteredItems = this.selectedItems;
//this.selectedDropdownItemChange.emit(event.option.value);
//this.form.updateValueAndValidity();
//this.options = [event.option.value];
//this.loading = false;
}
remove(item: any) {
// this.selectedItems.filter(function(selitem){
// return selitem.id != item.id;
// });
const index: number = this.selectedItems.indexOf(item);
if (index !== -1) {
this.selectedItems.splice(index, 1);
}
this.control.setValue(this.selectedItems);
if (this.selectedItems.length == 0) this.hasSelectedItem = false;
}
// inputOnChange(term: string) {
// //this.form.patchValue({ value: null, description: '', text: '' });
// //this.form.updateValueAndValidity();
// this.configuration.criteria.like = term;
// this.configuration.callback(this.configuration.criteria)
// .map((res: any) => this.mapper(res))
// .subscribe(
// (res: AutoCompleteItem[]) => {
// this.options = res;
// },
// null,
// () => { this.loading = false });
// }
displayWith(value: any): String {
if (!value) return '';
if (value.lenght) {
value.forEach(element => {
element['' + this.titleKey];
});
return value;
}
else return value['' + this.titleKey];
}
// displayFn(item: AutoCompleteItem): string {
// return item.text ? item.text : '';
// }
//fieldHasErrors(control: FormControl, form: FormGroupDirective | NgForm): boolean {
// return this.errorStateMatcher(control, form);
// }
}
export class AutoCompleteErrorStateMatcher implements ErrorStateMatcher {
isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean {
const isFormSubmitted = form && form.submitted;
const isControlInvalid = control && control.invalid && (control.dirty || control.touched || isFormSubmitted);
const isFormInvalid = form && form.enabled && form.invalid && (form.dirty || form.touched || isFormSubmitted)
return !!(isControlInvalid || isFormInvalid);
}
}

View File

@ -29,6 +29,7 @@ export class AvailableProfilesComponent implements OnInit {
ngOnInit(): void {
this.formGroup = this.data["profiles"];
this.datasetService.getDatasetProfiles().subscribe(data => {
this.profiles = JsonSerializer.fromJSONArray(data, DatasetProfileModel)
}
@ -46,7 +47,7 @@ export class AvailableProfilesComponent implements OnInit {
selectedElement.label = element.value.label;
this.selectedProfiles.push(selectedElement)
})
this.dialogRef.close(this.selectedProfiles);
this.formGroup.setValue(this.selectedProfiles)
this.dialogRef.close();
}
}

View File

@ -3,7 +3,7 @@
<i class="material-icons">{{ headerIcon }}</i>
</div>
<div class="card-content">
<p class="category">{{ category }}</p>
<p class="category">{{ category | translate }}</p>
<h3 class="title">{{ title }}</h3>
</div>
<div *ngIf="hasFootContent" class="card-footer">

View File

@ -14,7 +14,6 @@ import { ProjectCriteriaComponent } from './components/criteria/projects/project
import { DatasetCriteriaComponent } from './components/criteria/datasets/datasets-criteria.component';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { DataManagementPlanCriteriaComponent } from './components/criteria/data-management-plan/dmp-criteria.component';
import { AutocompleteChipComponent } from '../shared/components/autocompleteChips/autocompleteChips.component';
import { FileUploaderComponent } from '../shared/components/file-uploader/file-uploader.component';
import { UrlListingComponent } from '../shared/components/url-listing/url-listing.component';
import { NgForLimitPipe } from './pipes/ngforlimit/ngforlimit.pipe';
@ -46,7 +45,6 @@ import { BreadcrumbComponent } from './components/breadcrumb/breadcrumb.componen
FigurecardComponent,
BaseCriteriaComponent,
FileUploaderComponent,
AutocompleteChipComponent,
UrlListingComponent,
NgForLimitPipe,
AutoCompleteComponent,
@ -70,7 +68,6 @@ import { BreadcrumbComponent } from './components/breadcrumb/breadcrumb.componen
FigurecardComponent,
BaseCriteriaComponent,
FileUploaderComponent,
AutocompleteChipComponent,
UrlListingComponent,
NgForLimitPipe,
AutoCompleteComponent,

View File

@ -24,7 +24,7 @@
"NAV-BAR": {
"TITLE": "OpenDMPS",
"PROJECTS": "Projects",
"DMPS": "Plans",
"DMPS": "DMPs",
"DATASETS": "Datasets",
"USERS": "Users",
"DATASETS-ADMIN": "Dataset Profiles",
@ -175,7 +175,6 @@
},
"CRITERIA": {
"FILTERS": "Filters",
"PROJECTS": {
"LIKE": "Search",
"PERIOD-FROM": "Project Start",
@ -259,7 +258,6 @@
"SOURCE": "Source",
"OUTPUT": "Output"
}
},
"ADDRESEARCHERS-EDITOR": {
"TITLE": "Add a Researcher",
@ -296,15 +294,23 @@
},
"HOMEPAGE": {
"OPEN-DMPS": {
"STATS": "OpenDMPS Statistics"
"STATS": "OpenDMPS DashBoard"
},
"MY-DMPS": {
"STATS": "My Statistics"
"STATS": "My DashBoard"
}
},
"ABOUT": {
"TITLE": "-Our Mission-",
"MAIN-CONTENT": "Our goal is to make your research data FAIR, that is findable, accessible,interoperable and re-usable. These principles precede implementation choices and do not necessarily suggest any specific technology, standard, or implementationsolution.",
"CONTRIBUTORS": "Contributors"
},
"DASHBOARD": {
"MY-PROJECTS": "My Projects",
"PROJECTS": "Projects",
"MY-DMPS": "My DMPs",
"DMPS": "DMPs",
"MY-DATASETS": "My Datasets",
"DATASETS": "Datasets"
}
}

View File

@ -1,6 +1,6 @@
export const environment = {
production: true,
Server: 'http://localhost:8080/api/',
Server: 'http://dl043.madgik.di.uoa.gr:8080/api/',
App: 'http://dl043.madgik.di.uoa.gr/',
HelpServiceUrl: 'http://dl043.madgik.di.uoa.gr:5555/'
};