no message
This commit is contained in:
parent
d28d2fd3c2
commit
f8c3ce4362
|
@ -62,17 +62,21 @@ public class DashBoardManager {
|
||||||
RecentActivity activity = new RecentActivity();
|
RecentActivity activity = new RecentActivity();
|
||||||
UserInfo user = new UserInfo();
|
UserInfo user = new UserInfo();
|
||||||
user.setId(principal.getId());
|
user.setId(principal.getId());
|
||||||
|
DatasetCriteria datasetCriteria = new DatasetCriteria();
|
||||||
|
datasetCriteria.setAllVersions(false);
|
||||||
|
DataManagementPlanCriteria dataManagementPlanCriteria = new DataManagementPlanCriteria();
|
||||||
|
dataManagementPlanCriteria.setAllVersions(false);
|
||||||
|
|
||||||
RecentActivityDataBuilder recentActivityDataBuilder = apiContext.getOperationsContext().getBuilderFactory().getBuilder(RecentActivityDataBuilder.class);
|
RecentActivityDataBuilder recentActivityDataBuilder = apiContext.getOperationsContext().getBuilderFactory().getBuilder(RecentActivityDataBuilder.class);
|
||||||
|
|
||||||
CompletableFuture<List<RecentActivityData>> dmps = dataManagementPlanRepository.getAuthenticated(dataManagementPlanRepository.asQueryable(), user)
|
CompletableFuture<List<RecentActivityData>> dmps = dataManagementPlanRepository.getAuthenticated(dataManagementPlanRepository.getWithCriteria(dataManagementPlanCriteria), user)
|
||||||
.withHint("dmpRecentActivity")
|
.withHint("dmpRecentActivity")
|
||||||
.orderBy((builder, root) -> builder.desc(root.get("modified")))
|
.orderBy((builder, root) -> builder.desc(root.get("modified")))
|
||||||
.take(numberofactivities)
|
.take(numberofactivities)
|
||||||
.selectAsync(item -> recentActivityDataBuilder.label(item.getLabel()).timestamp(item.getModified()).id(item.getId().toString()).build())
|
.selectAsync(item -> recentActivityDataBuilder.label(item.getLabel()).timestamp(item.getModified()).id(item.getId().toString()).build())
|
||||||
.whenComplete((dmpActivities, throwable) -> activity.setRecentDmpActivities(dmpActivities));
|
.whenComplete((dmpActivities, throwable) -> activity.setRecentDmpActivities(dmpActivities));
|
||||||
|
|
||||||
CompletableFuture<List<RecentActivityData>> datasets = datasetRepository.getAuthenticated(datasetRepository.asQueryable(), user)
|
CompletableFuture<List<RecentActivityData>> datasets = datasetRepository.getAuthenticated(datasetRepository.getWithCriteria(datasetCriteria), user)
|
||||||
.withHint("datasetRecentActivity")
|
.withHint("datasetRecentActivity")
|
||||||
.orderBy((builder, root) -> builder.desc(root.get("modified")))
|
.orderBy((builder, root) -> builder.desc(root.get("modified")))
|
||||||
.take(numberofactivities)
|
.take(numberofactivities)
|
||||||
|
|
|
@ -71,5 +71,5 @@ http-logger.initial-delay = 0
|
||||||
http-logger.delay = 10
|
http-logger.delay = 10
|
||||||
http-logger.server-address = http://logstash:31311
|
http-logger.server-address = http://logstash:31311
|
||||||
#############################Elastic Search######################################
|
#############################Elastic Search######################################
|
||||||
elasticsearch.host = elasticsearch-dmp
|
elasticsearch.host = localhost
|
||||||
elasticsearch.port = 9200
|
elasticsearch.port = 9201
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 939 B After Width: | Height: | Size: 11 KiB |
|
@ -4065,7 +4065,8 @@
|
||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"aproba": {
|
"aproba": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
|
@ -4086,12 +4087,14 @@
|
||||||
"balanced-match": {
|
"balanced-match": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"balanced-match": "^1.0.0",
|
"balanced-match": "^1.0.0",
|
||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
|
@ -4106,17 +4109,20 @@
|
||||||
"code-point-at": {
|
"code-point-at": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"concat-map": {
|
"concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"console-control-strings": {
|
"console-control-strings": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"core-util-is": {
|
"core-util-is": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
|
@ -4233,7 +4239,8 @@
|
||||||
"inherits": {
|
"inherits": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"ini": {
|
"ini": {
|
||||||
"version": "1.3.5",
|
"version": "1.3.5",
|
||||||
|
@ -4245,6 +4252,7 @@
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"number-is-nan": "^1.0.0"
|
"number-is-nan": "^1.0.0"
|
||||||
}
|
}
|
||||||
|
@ -4259,6 +4267,7 @@
|
||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"brace-expansion": "^1.1.7"
|
"brace-expansion": "^1.1.7"
|
||||||
}
|
}
|
||||||
|
@ -4266,12 +4275,14 @@
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.8",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"minipass": {
|
"minipass": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"safe-buffer": "^5.1.1",
|
"safe-buffer": "^5.1.1",
|
||||||
"yallist": "^3.0.0"
|
"yallist": "^3.0.0"
|
||||||
|
@ -4290,6 +4301,7 @@
|
||||||
"version": "0.5.1",
|
"version": "0.5.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "0.0.8"
|
"minimist": "0.0.8"
|
||||||
}
|
}
|
||||||
|
@ -4370,7 +4382,8 @@
|
||||||
"number-is-nan": {
|
"number-is-nan": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"object-assign": {
|
"object-assign": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
|
@ -4382,6 +4395,7 @@
|
||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
}
|
}
|
||||||
|
@ -4467,7 +4481,8 @@
|
||||||
"safe-buffer": {
|
"safe-buffer": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"safer-buffer": {
|
"safer-buffer": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
|
@ -4503,6 +4518,7 @@
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"code-point-at": "^1.0.0",
|
"code-point-at": "^1.0.0",
|
||||||
"is-fullwidth-code-point": "^1.0.0",
|
"is-fullwidth-code-point": "^1.0.0",
|
||||||
|
@ -4522,6 +4538,7 @@
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "^2.0.0"
|
"ansi-regex": "^2.0.0"
|
||||||
}
|
}
|
||||||
|
@ -4565,12 +4582,14 @@
|
||||||
"wrappy": {
|
"wrappy": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"yallist": {
|
"yallist": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -52,11 +52,13 @@ export class HomepageComponent implements OnInit {
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
this.userReferenceService.getRecentActivity().subscribe(response => {
|
if (this.isAuthenticated()) {
|
||||||
this.datasetActivities = response["recentDatasetActivities"];
|
this.userReferenceService.getRecentActivity().subscribe(response => {
|
||||||
this.dmpActivities = response["recentDmpActivities"];
|
this.datasetActivities = response["recentDatasetActivities"];
|
||||||
this.projectActivities = response["recentProjectActivities"];
|
this.dmpActivities = response["recentDmpActivities"];
|
||||||
})
|
this.projectActivities = response["recentProjectActivities"];
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
this.projectAutoCompleteConfiguration = {
|
this.projectAutoCompleteConfiguration = {
|
||||||
filterFn: this.searchProject.bind(this),
|
filterFn: this.searchProject.bind(this),
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<p class="category">{{ category | translate }}</p>
|
<p class="category">{{ category | translate }}</p>
|
||||||
<h3 class="title">{{ title }}</h3>
|
<h3 class="title">{{ title }}</h3>
|
||||||
<button mat-raised-button color="primary" (click)="createNew()" >{{buttonTitle}}</button>
|
<button *ngIf="isAuthenticated()" mat-raised-button color="primary" (click)="createNew()" >{{buttonTitle}}</button>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="hasFootContent" class="card-footer">
|
<div *ngIf="hasFootContent" class="card-footer">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { Component, OnInit, Input } from '@angular/core';
|
import { Component, OnInit, Input } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
|
import { AuthService } from '../../../services/auth/auth.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-figurecard',
|
selector: 'app-figurecard',
|
||||||
|
@ -19,7 +20,7 @@ export class FigurecardComponent implements OnInit {
|
||||||
@Input() buttonTitle: string;
|
@Input() buttonTitle: string;
|
||||||
@Input() buttonRedirectLink: string;
|
@Input() buttonRedirectLink: string;
|
||||||
|
|
||||||
constructor(private router: Router) { }
|
constructor(private router: Router,private authService: AuthService) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
}
|
}
|
||||||
|
@ -32,4 +33,8 @@ export class FigurecardComponent implements OnInit {
|
||||||
this.router.navigate([this.buttonRedirectLink]);
|
this.router.navigate([this.buttonRedirectLink]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isAuthenticated(){
|
||||||
|
return this.authService.current() != null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<!--<button mat-button class="navbar-button" routerLink="/about">{{'NAV-BAR.ABOUT' | translate}}</button>-->
|
<!--<button mat-button class="navbar-button" routerLink="/about">{{'NAV-BAR.ABOUT' | translate}}</button>-->
|
||||||
|
|
||||||
<span class="navbar-spacer"></span>
|
<span class="navbar-spacer"></span>
|
||||||
<div fxFlex *ngIf="search">
|
<div fxFlex *ngIf="search && this.isAuthenticated()">
|
||||||
<mat-form-field class="full-width">
|
<mat-form-field class="full-width">
|
||||||
<input type="text" placeholder="{{'DASHBOARD.SEARCH' | translate}}" matInput [formControl]="searchControl" [matAutocomplete]="auto">
|
<input type="text" placeholder="{{'DASHBOARD.SEARCH' | translate}}" matInput [formControl]="searchControl" [matAutocomplete]="auto">
|
||||||
<mat-autocomplete autoActiveFirstOption #auto="matAutocomplete" (optionSelected)="onOptionSelected($event)">
|
<mat-autocomplete autoActiveFirstOption #auto="matAutocomplete" (optionSelected)="onOptionSelected($event)">
|
||||||
|
@ -24,13 +24,13 @@
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="row">
|
<div fxLayout="row">
|
||||||
<div fxFlex *ngIf="!search">
|
<div fxFlex *ngIf="!search && this.isAuthenticated()">
|
||||||
<button mat-button (click)="this.search = true">
|
<button mat-button (click)="this.search = true">
|
||||||
<mat-icon>search</mat-icon>
|
<mat-icon>search</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div fxFlex *ngIf="search">
|
<div fxFlex *ngIf="search && this.isAuthenticated()">
|
||||||
<button mat-button (click)="this.search = false">
|
<button mat-button (click)="this.search = false">
|
||||||
<mat-icon>close</mat-icon>
|
<mat-icon>close</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -56,31 +56,31 @@ services:
|
||||||
|
|
||||||
##########################ELK-STACK######################################################################
|
##########################ELK-STACK######################################################################
|
||||||
|
|
||||||
# elasticsearch:
|
elasticsearch:
|
||||||
# image: docker.elastic.co/elasticsearch/elasticsearch:${TAG}
|
image: docker.elastic.co/elasticsearch/elasticsearch:${TAG}
|
||||||
# container_name: elasticsearch
|
container_name: elasticsearch
|
||||||
# environment: ['http.host=0.0.0.0', 'transport.host=127.0.0.1', 'ELASTIC_PASSWORD=${ELASTIC_PASSWORD}']
|
environment: ['http.host=0.0.0.0', 'transport.host=127.0.0.1', 'ELASTIC_PASSWORD=${ELASTIC_PASSWORD}','discovery.type=single-node']
|
||||||
# ports: ['0.0.0.0:9200:9200']
|
ports: ['0.0.0.0:9200:9200']
|
||||||
# networks: ['stack']
|
networks: ['stack']
|
||||||
# volumes:
|
volumes:
|
||||||
# - esdata:/usr/share/elasticsearch/data
|
- esdata:/usr/share/elasticsearch/data
|
||||||
|
|
||||||
# kibana:
|
kibana:
|
||||||
# image: docker.elastic.co/kibana/kibana:${TAG}
|
image: docker.elastic.co/kibana/kibana:${TAG}
|
||||||
# container_name: kibana
|
container_name: kibana
|
||||||
# ports: ['0.0.0.0:5601:5601']
|
ports: ['0.0.0.0:5601:5601']
|
||||||
# networks: ['stack']
|
networks: ['stack']
|
||||||
# depends_on: ['elasticsearch']
|
depends_on: ['elasticsearch']
|
||||||
|
|
||||||
# logstash:
|
logstash:
|
||||||
# image: docker.elastic.co/logstash/logstash:${TAG}
|
image: docker.elastic.co/logstash/logstash:${TAG}
|
||||||
# container_name: logstash
|
container_name: logstash
|
||||||
# volumes:
|
volumes:
|
||||||
# - ./ELK.Docker/config/logstash.conf:/usr/share/logstash/pipeline/logstash.conf
|
- ./ELK.Docker/config/logstash.conf:/usr/share/logstash/pipeline/logstash.conf
|
||||||
# ports: ['0.0.0.0:31311:31311']
|
ports: ['0.0.0.0:31311:31311']
|
||||||
|
|
||||||
# networks: ['stack']
|
networks: ['stack']
|
||||||
# depends_on: ['elasticsearch', 'setup_logstash']
|
depends_on: ['elasticsearch', 'setup_logstash']
|
||||||
|
|
||||||
#filebeat:
|
#filebeat:
|
||||||
# image: docker.elastic.co/beats/filebeat:${TAG}
|
# image: docker.elastic.co/beats/filebeat:${TAG}
|
||||||
|
@ -97,23 +97,23 @@ services:
|
||||||
# depends_on: ['elasticsearch', 'setup_heartbeat']
|
# depends_on: ['elasticsearch', 'setup_heartbeat']
|
||||||
|
|
||||||
# Run a short-lived container to set up Logstash.
|
# Run a short-lived container to set up Logstash.
|
||||||
# setup_logstash:
|
setup_logstash:
|
||||||
# image: centos:7
|
image: centos:7
|
||||||
# container_name: setup_logstash
|
container_name: setup_logstash
|
||||||
# volumes: ['./ELK.Docker/scripts/setup-logstash.sh:/usr/local/bin/setup-logstash.sh:ro']
|
volumes: ['./ELK.Docker/scripts/setup-logstash.sh:/usr/local/bin/setup-logstash.sh:ro']
|
||||||
# command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-logstash.sh | tr -d "\r" | bash']
|
command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-logstash.sh | tr -d "\r" | bash']
|
||||||
# environment: ['ELASTIC_PASSWORD=${ELASTIC_PASSWORD}']
|
environment: ['ELASTIC_PASSWORD=${ELASTIC_PASSWORD}']
|
||||||
# networks: ['stack']
|
networks: ['stack']
|
||||||
# depends_on: ['elasticsearch']
|
depends_on: ['elasticsearch']
|
||||||
|
|
||||||
# setup_kibana:
|
setup_kibana:
|
||||||
# image: centos:7
|
image: centos:7
|
||||||
# container_name: setup_kibana
|
container_name: setup_kibana
|
||||||
# volumes: ['./ELK.Docker/scripts/setup-kibana.sh:/usr/local/bin/setup-kibana.sh:ro']
|
volumes: ['./ELK.Docker/scripts/setup-kibana.sh:/usr/local/bin/setup-kibana.sh:ro']
|
||||||
# command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-kibana.sh | tr -d "\r" | bash']
|
command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-kibana.sh | tr -d "\r" | bash']
|
||||||
# environment: ['ELASTIC_PASSWORD=${ELASTIC_PASSWORD}']
|
environment: ['ELASTIC_PASSWORD=${ELASTIC_PASSWORD}']
|
||||||
# networks: ['stack']
|
networks: ['stack']
|
||||||
# depends_on: ['elasticsearch']
|
depends_on: ['elasticsearch']
|
||||||
|
|
||||||
#setup_filebeat:
|
#setup_filebeat:
|
||||||
# image: docker.elastic.co/beats/filebeat:${TAG}
|
# image: docker.elastic.co/beats/filebeat:${TAG}
|
||||||
|
|
Loading…
Reference in New Issue