Merge branch 'dmp-refactoring' of https://code-repo.d4science.org/MaDgiK-CITE/argos into dmp-refactoring
This commit is contained in:
commit
2673857d74
|
@ -65,7 +65,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>gr.cite</groupId>
|
<groupId>gr.cite</groupId>
|
||||||
<artifactId>cache</artifactId>
|
<artifactId>cache</artifactId>
|
||||||
<version>2.1.0</version>
|
<version>2.2.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>gr.cite</groupId>
|
<groupId>gr.cite</groupId>
|
||||||
|
|
|
@ -31,11 +31,8 @@ public class UserInterceptor implements WebRequestInterceptor {
|
||||||
private final UserScope userScope;
|
private final UserScope userScope;
|
||||||
private final ClaimExtractor claimExtractor;
|
private final ClaimExtractor claimExtractor;
|
||||||
private final CurrentPrincipalResolver currentPrincipalResolver;
|
private final CurrentPrincipalResolver currentPrincipalResolver;
|
||||||
private final PlatformTransactionManager transactionManager;
|
|
||||||
private final UserInterceptorCacheService userInterceptorCacheService;
|
private final UserInterceptorCacheService userInterceptorCacheService;
|
||||||
private final JsonHandlingService jsonHandlingService;
|
|
||||||
private final QueryFactory queryFactory;
|
private final QueryFactory queryFactory;
|
||||||
private final LockByKeyManager lockByKeyManager;
|
|
||||||
@PersistenceContext
|
@PersistenceContext
|
||||||
public EntityManager entityManager;
|
public EntityManager entityManager;
|
||||||
|
|
||||||
|
@ -44,19 +41,13 @@ public class UserInterceptor implements WebRequestInterceptor {
|
||||||
UserScope userScope,
|
UserScope userScope,
|
||||||
ClaimExtractor claimExtractor,
|
ClaimExtractor claimExtractor,
|
||||||
CurrentPrincipalResolver currentPrincipalResolver,
|
CurrentPrincipalResolver currentPrincipalResolver,
|
||||||
PlatformTransactionManager transactionManager,
|
|
||||||
UserInterceptorCacheService userInterceptorCacheService,
|
UserInterceptorCacheService userInterceptorCacheService,
|
||||||
JsonHandlingService jsonHandlingService,
|
QueryFactory queryFactory) {
|
||||||
QueryFactory queryFactory,
|
|
||||||
LockByKeyManager lockByKeyManager) {
|
|
||||||
this.userScope = userScope;
|
this.userScope = userScope;
|
||||||
this.currentPrincipalResolver = currentPrincipalResolver;
|
this.currentPrincipalResolver = currentPrincipalResolver;
|
||||||
this.claimExtractor = claimExtractor;
|
this.claimExtractor = claimExtractor;
|
||||||
this.transactionManager = transactionManager;
|
|
||||||
this.userInterceptorCacheService = userInterceptorCacheService;
|
this.userInterceptorCacheService = userInterceptorCacheService;
|
||||||
this.jsonHandlingService = jsonHandlingService;
|
|
||||||
this.queryFactory = queryFactory;
|
this.queryFactory = queryFactory;
|
||||||
this.lockByKeyManager = lockByKeyManager;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -14,7 +14,5 @@ spring:
|
||||||
optional:classpath:config/tenant.yml[.yml], optional:classpath:config/tenant-${spring.profiles.active}.yml[.yml], optional:file:../config/tenant-${spring.profiles.active}.yml[.yml],
|
optional:classpath:config/tenant.yml[.yml], optional:classpath:config/tenant-${spring.profiles.active}.yml[.yml], optional:file:../config/tenant-${spring.profiles.active}.yml[.yml],
|
||||||
optional:classpath:config/locale.yml[.yml], optional:classpath:config/locale-${spring.profiles.active}.yml[.yml], optional:file:../config/locale-${spring.profiles.active}.yml[.yml],
|
optional:classpath:config/locale.yml[.yml], optional:classpath:config/locale-${spring.profiles.active}.yml[.yml], optional:file:../config/locale-${spring.profiles.active}.yml[.yml],
|
||||||
optional:classpath:config/cors.yml[.yml], optional:classpath:config/cors-${spring.profiles.active}.yml[.yml], optional:file:../config/cors-${spring.profiles.active}.yml[.yml],
|
optional:classpath:config/cors.yml[.yml], optional:classpath:config/cors-${spring.profiles.active}.yml[.yml], optional:file:../config/cors-${spring.profiles.active}.yml[.yml],
|
||||||
optional:classpath:config/email.yml[.yml], optional:classpath:config/email-${spring.profiles.active}.yml[.yml], optional:file:../config/email-${spring.profiles.active}.yml[.yml],
|
|
||||||
optional:classpath:config/queue.yml[.yml], optional:classpath:config/queue-${spring.profiles.active}.yml[.yml], optional:file:../config/queue-${spring.profiles.active}.yml[.yml],
|
optional:classpath:config/queue.yml[.yml], optional:classpath:config/queue-${spring.profiles.active}.yml[.yml], optional:file:../config/queue-${spring.profiles.active}.yml[.yml],
|
||||||
optional:classpath:config/cipher.yml[.yml], optional:classpath:config/cipher-${spring.profiles.active}.yml[.yml], optional:file:../config/cipher-${spring.profiles.active}.yml[.yml],
|
optional:classpath:config/cipher.yml[.yml], optional:classpath:config/cipher-${spring.profiles.active}.yml[.yml], optional:file:../config/cipher-${spring.profiles.active}.yml[.yml]
|
||||||
optional:classpath:config/formatting.yml[.yml], optional:classpath:config/formatting-${spring.profiles.active}.yml[.yml], optional:file:../config/formatting-${spring.profiles.active}.yml[.yml]
|
|
||||||
|
|
|
@ -7,53 +7,32 @@ cache:
|
||||||
initialCapacity: 100
|
initialCapacity: 100
|
||||||
maximumSize: 500
|
maximumSize: 500
|
||||||
enableRecordStats: false
|
enableRecordStats: false
|
||||||
expireAfterWriteMinutes: 10
|
expireAfterWriteSeconds: 600
|
||||||
expireAfterAccessMinutes: 10
|
|
||||||
refreshAfterWriteMinutes: 10
|
|
||||||
- names: [ tenantByCode ]
|
- names: [ tenantByCode ]
|
||||||
allowNullValues: true
|
allowNullValues: true
|
||||||
initialCapacity: 100
|
initialCapacity: 100
|
||||||
maximumSize: 500
|
maximumSize: 500
|
||||||
enableRecordStats: false
|
enableRecordStats: false
|
||||||
expireAfterWriteMinutes: 10
|
expireAfterWriteSeconds: 600
|
||||||
expireAfterAccessMinutes: 10
|
|
||||||
refreshAfterWriteMinutes: 10
|
|
||||||
- names: [ tenantById ]
|
- names: [ tenantById ]
|
||||||
allowNullValues: true
|
allowNullValues: true
|
||||||
initialCapacity: 100
|
initialCapacity: 100
|
||||||
maximumSize: 500
|
maximumSize: 500
|
||||||
enableRecordStats: false
|
enableRecordStats: false
|
||||||
expireAfterWriteMinutes: 10
|
expireAfterWriteSeconds: 600
|
||||||
expireAfterAccessMinutes: 10
|
|
||||||
refreshAfterWriteMinutes: 10
|
|
||||||
- names: [ userBySubjectId ]
|
- names: [ userBySubjectId ]
|
||||||
allowNullValues: true
|
allowNullValues: true
|
||||||
initialCapacity: 100
|
initialCapacity: 100
|
||||||
maximumSize: 500
|
maximumSize: 500
|
||||||
enableRecordStats: false
|
enableRecordStats: false
|
||||||
expireAfterWriteMinutes: 5
|
expireAfterWriteSeconds: 320
|
||||||
expireAfterAccessMinutes: 5
|
|
||||||
refreshAfterWriteMinutes: 5
|
|
||||||
- names: [ userAccessTenant ]
|
- names: [ userAccessTenant ]
|
||||||
allowNullValues: true
|
allowNullValues: true
|
||||||
initialCapacity: 100
|
initialCapacity: 100
|
||||||
maximumSize: 500
|
maximumSize: 500
|
||||||
enableRecordStats: false
|
enableRecordStats: false
|
||||||
expireAfterWriteMinutes: 5
|
expireAfterWriteSeconds: 320
|
||||||
expireAfterAccessMinutes: 5
|
|
||||||
refreshAfterWriteMinutes: 5
|
|
||||||
- names: [ formattingUserProfile ]
|
|
||||||
allowNullValues: true
|
|
||||||
initialCapacity: 100
|
|
||||||
maximumSize: 500
|
|
||||||
enableRecordStats: false
|
|
||||||
expireAfterWriteMinutes: 1
|
|
||||||
expireAfterAccessMinutes: 1
|
|
||||||
refreshAfterWriteMinutes: 1
|
|
||||||
mapCaches:
|
mapCaches:
|
||||||
- names: [ cacheB ]
|
|
||||||
allowNullValues: true
|
|
||||||
storeByValue: true
|
|
||||||
apiKey:
|
apiKey:
|
||||||
name: apikey
|
name: apikey
|
||||||
keyPattern: resolve_$keyhash$:v0
|
keyPattern: resolve_$keyhash$:v0
|
||||||
|
@ -69,9 +48,3 @@ cache:
|
||||||
userAllowedTenant:
|
userAllowedTenant:
|
||||||
name: userAccessTenant
|
name: userAccessTenant
|
||||||
keyPattern: user_access_tenant_$user_id$_$tenant_id$:v0
|
keyPattern: user_access_tenant_$user_id$_$tenant_id$:v0
|
||||||
formattingUserProfileCache:
|
|
||||||
name: formattingUserProfile
|
|
||||||
keyPattern: formatting_user_profile$user_id$:v0
|
|
||||||
template:
|
|
||||||
name: template
|
|
||||||
key-pattern: ------
|
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
spring:
|
spring:
|
||||||
|
datasource:
|
||||||
|
maxIdle: 10
|
||||||
|
minIdle: 5
|
||||||
|
maxActive: 10
|
||||||
jpa:
|
jpa:
|
||||||
show-sql: true
|
show-sql: true
|
||||||
properties:
|
properties:
|
||||||
hibernate:
|
hibernate:
|
||||||
show_sql: true
|
format_sql: false
|
||||||
format_sql: false
|
|
|
@ -1,7 +1,11 @@
|
||||||
spring:
|
spring:
|
||||||
jpa:
|
jpa:
|
||||||
properties:
|
properties:
|
||||||
|
org:
|
||||||
|
hibernate:
|
||||||
|
flushMode: MANUAL
|
||||||
hibernate:
|
hibernate:
|
||||||
|
globally_quoted_identifiers: true
|
||||||
ddl-auto: validate
|
ddl-auto: validate
|
||||||
dialect: org.hibernate.dialect.PostgreSQLDialect
|
dialect: org.hibernate.dialect.PostgreSQLDialect
|
||||||
hibernate:
|
hibernate:
|
||||||
|
@ -16,7 +20,7 @@ spring:
|
||||||
hikari:
|
hikari:
|
||||||
connection-timeout: 30000
|
connection-timeout: 30000
|
||||||
minimum-idle: 3
|
minimum-idle: 3
|
||||||
maximum-pool-size: 5
|
maximum-pool-size: 10
|
||||||
idle-timeout: 600000
|
idle-timeout: 600000
|
||||||
max-lifetime: 1800000
|
max-lifetime: 1800000
|
||||||
|
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
spring:
|
|
||||||
mail:
|
|
||||||
host: ${MAIL_HOST:}
|
|
||||||
port: ${MAIL_PORT:}
|
|
||||||
username: ${MAIL_USERNAME:}
|
|
||||||
password: ${MAIL_PASSWORD:}
|
|
||||||
properties:
|
|
||||||
mail:
|
|
||||||
smtp:
|
|
||||||
auth: ${MAIL_AUTH:}
|
|
||||||
starttls:
|
|
||||||
enable: ${MAIL_TLS:}
|
|
||||||
email:
|
|
||||||
address: ${MAIL_ADDRESS:}
|
|
|
@ -1,6 +0,0 @@
|
||||||
formatting:
|
|
||||||
options:
|
|
||||||
integer-format: "%,d"
|
|
||||||
decimal-digits-round: 2
|
|
||||||
decimal-format: "#0.00"
|
|
||||||
date-time-format: "YYYY-MM-dd'T'HH:mm:ss"
|
|
|
@ -37,3 +37,5 @@ idpclient:
|
||||||
- type: azp
|
- type: azp
|
||||||
Authorities:
|
Authorities:
|
||||||
- type: authorities
|
- type: authorities
|
||||||
|
ExternalProviderName:
|
||||||
|
- type: identity_provider
|
|
@ -5,26 +5,26 @@ permissions:
|
||||||
# Tenants
|
# Tenants
|
||||||
BrowseTenant:
|
BrowseTenant:
|
||||||
roles:
|
roles:
|
||||||
- ic-sti-superuser
|
- Admin
|
||||||
clients: [ ]
|
clients: [ ]
|
||||||
allowAnonymous: false
|
allowAnonymous: false
|
||||||
allowAuthenticated: false
|
allowAuthenticated: false
|
||||||
EditTenant:
|
EditTenant:
|
||||||
roles:
|
roles:
|
||||||
- ic-sti-superuser
|
- Admin
|
||||||
clients: [ ]
|
clients: [ ]
|
||||||
allowAnonymous: false
|
allowAnonymous: false
|
||||||
allowAuthenticated: false
|
allowAuthenticated: false
|
||||||
DeleteTenant:
|
DeleteTenant:
|
||||||
roles:
|
roles:
|
||||||
- ic-sti-superuser
|
- Admin
|
||||||
claims: [ ]
|
claims: [ ]
|
||||||
clients: [ ]
|
clients: [ ]
|
||||||
allowAnonymous: false
|
allowAnonymous: false
|
||||||
allowAuthenticated: false
|
allowAuthenticated: false
|
||||||
AllowNoTenant:
|
AllowNoTenant:
|
||||||
roles:
|
roles:
|
||||||
- ic-sti-superuser
|
- Admin
|
||||||
claims: [ ]
|
claims: [ ]
|
||||||
clients: [ ]
|
clients: [ ]
|
||||||
allowAnonymous: false
|
allowAnonymous: false
|
||||||
|
@ -32,21 +32,19 @@ permissions:
|
||||||
# Users
|
# Users
|
||||||
BrowseUser:
|
BrowseUser:
|
||||||
roles:
|
roles:
|
||||||
- ic-sti-superuser
|
- Admin
|
||||||
- tenantadmin
|
|
||||||
clients: [ ]
|
clients: [ ]
|
||||||
allowAnonymous: true
|
allowAnonymous: true
|
||||||
allowAuthenticated: false
|
allowAuthenticated: false
|
||||||
EditUser:
|
EditUser:
|
||||||
roles:
|
roles:
|
||||||
- admin
|
- Admin
|
||||||
- ic-sti-superuser
|
|
||||||
clients: [ ]
|
clients: [ ]
|
||||||
allowAnonymous: false
|
allowAnonymous: false
|
||||||
allowAuthenticated: false
|
allowAuthenticated: false
|
||||||
DeleteUser:
|
DeleteUser:
|
||||||
roles:
|
roles:
|
||||||
- ic-sti-superuser
|
- Admin
|
||||||
claims: [ ]
|
claims: [ ]
|
||||||
clients: [ ]
|
clients: [ ]
|
||||||
allowAnonymous: false
|
allowAnonymous: false
|
||||||
|
@ -54,20 +52,19 @@ permissions:
|
||||||
# UserContactInfo
|
# UserContactInfo
|
||||||
BrowseUserContactInfo:
|
BrowseUserContactInfo:
|
||||||
roles:
|
roles:
|
||||||
- ic-sti-superuser
|
- Admin
|
||||||
clients: [ ]
|
clients: [ ]
|
||||||
allowAnonymous: true
|
allowAnonymous: true
|
||||||
allowAuthenticated: false
|
allowAuthenticated: false
|
||||||
EditUserContactInfo:
|
EditUserContactInfo:
|
||||||
roles:
|
roles:
|
||||||
- ic-sti-superuser
|
- Admin
|
||||||
- user
|
|
||||||
clients: [ ]
|
clients: [ ]
|
||||||
allowAnonymous: false
|
allowAnonymous: false
|
||||||
allowAuthenticated: false
|
allowAuthenticated: false
|
||||||
DeleteUserContactInfo:
|
DeleteUserContactInfo:
|
||||||
roles:
|
roles:
|
||||||
- ic-sti-superuser
|
- Admin
|
||||||
claims: [ ]
|
claims: [ ]
|
||||||
clients: [ ]
|
clients: [ ]
|
||||||
allowAnonymous: false
|
allowAnonymous: false
|
||||||
|
@ -94,13 +91,13 @@ permissions:
|
||||||
#Tenant Configuration
|
#Tenant Configuration
|
||||||
BrowseTenantConfiguration:
|
BrowseTenantConfiguration:
|
||||||
roles:
|
roles:
|
||||||
- ic-sti-superuser
|
- Admin
|
||||||
clients: [ ]
|
clients: [ ]
|
||||||
allowAnonymous: false
|
allowAnonymous: false
|
||||||
allowAuthenticated: false
|
allowAuthenticated: false
|
||||||
EditTenantConfiguration:
|
EditTenantConfiguration:
|
||||||
roles:
|
roles:
|
||||||
- ic-sti-superuser
|
- Admin
|
||||||
clients: [ ]
|
clients: [ ]
|
||||||
allowAnonymous: false
|
allowAnonymous: false
|
||||||
allowAuthenticated: false
|
allowAuthenticated: false
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
web:
|
||||||
|
security:
|
||||||
|
idp:
|
||||||
|
resource:
|
||||||
|
jwt:
|
||||||
|
audiences: [ "dmp_annotation" ]
|
|
@ -2,19 +2,13 @@ web:
|
||||||
security:
|
security:
|
||||||
enabled: true
|
enabled: true
|
||||||
authorized-endpoints: [ api ]
|
authorized-endpoints: [ api ]
|
||||||
allowed-endpoints: [ public, dataset, master-item, test ]
|
allowed-endpoints: [ public ]
|
||||||
idp:
|
idp:
|
||||||
api-key:
|
api-key:
|
||||||
enabled: true
|
enabled: false
|
||||||
authorization-header: Authorization
|
|
||||||
client-id: ${IDP_APIKEY_CLIENT_ID}
|
|
||||||
client-secret: ${IDP_APIKEY_CLIENT_SECRET}
|
|
||||||
scope: ${IDP_APIKEY_SCOPE}
|
|
||||||
resource:
|
resource:
|
||||||
token-type: JWT
|
token-type: JWT #| opaque
|
||||||
opaque:
|
|
||||||
client-id: ${IDP_OPAQUE_CLIENT_ID}
|
|
||||||
client-secret: ${IDP_OPAQUE_CLIENT_SECRET}
|
|
||||||
jwt:
|
jwt:
|
||||||
claims: [ role, x-role ]
|
claims: [ role, x-role ]
|
||||||
issuer-uri: ${IDP_ISSUER_URI:}
|
issuer-uri: ${IDP_ISSUER_URI}
|
||||||
|
validIssuer: ${IDP_ISSUER_URI}
|
|
@ -1,3 +1,13 @@
|
||||||
server:
|
server:
|
||||||
port: ${WEB_PORT}
|
port: ${WEB_PORT}
|
||||||
forward-headers-strategy: NONE
|
forward-headers-strategy: NONE
|
||||||
|
tomcat:
|
||||||
|
threads:
|
||||||
|
max: 20
|
||||||
|
max-connections: 10000
|
||||||
|
|
||||||
|
spring:
|
||||||
|
servlet:
|
||||||
|
multipart:
|
||||||
|
max-file-size: 10MB
|
||||||
|
max-request-size: 10MB
|
|
@ -1,93 +0,0 @@
|
||||||
package gr.cite.annotation.cache;
|
|
||||||
|
|
||||||
import gr.cite.annotation.config.formatting.FormattingUserprofileCacheOptions;
|
|
||||||
import gr.cite.annotation.event.UserTouchedEvent;
|
|
||||||
import gr.cite.tools.cache.CacheService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.context.event.EventListener;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class FormattingUserprofileCacheCacheService extends CacheService<FormattingUserprofileCacheCacheService.UserFormattingProfileCacheValue> {
|
|
||||||
|
|
||||||
public static class UserFormattingProfileCacheValue {
|
|
||||||
|
|
||||||
public UserFormattingProfileCacheValue() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public UserFormattingProfileCacheValue(UUID userId, String zone, String culture, String language) {
|
|
||||||
this.userId = userId;
|
|
||||||
this.zone = zone;
|
|
||||||
this.culture = culture;
|
|
||||||
this.language = language;
|
|
||||||
}
|
|
||||||
|
|
||||||
private UUID userId;
|
|
||||||
private String zone;
|
|
||||||
private String culture;
|
|
||||||
private String language;
|
|
||||||
|
|
||||||
public String getZone() {
|
|
||||||
return zone;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setZone(String zone) {
|
|
||||||
this.zone = zone;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCulture() {
|
|
||||||
return culture;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCulture(String culture) {
|
|
||||||
this.culture = culture;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLanguage() {
|
|
||||||
return language;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLanguage(String language) {
|
|
||||||
this.language = language;
|
|
||||||
}
|
|
||||||
|
|
||||||
public UUID getUserId() {
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserId(UUID userId) {
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public FormattingUserprofileCacheCacheService(FormattingUserprofileCacheOptions options) {
|
|
||||||
super(options);
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventListener
|
|
||||||
public void handleUserTouchedEvent(UserTouchedEvent event) {
|
|
||||||
if (event.getUserId() != null) this.evict(this.buildKey(event.getUserId()));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Class<UserFormattingProfileCacheValue> valueClass() {
|
|
||||||
return UserFormattingProfileCacheValue.class;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String keyOf(UserFormattingProfileCacheValue value) {
|
|
||||||
return this.buildKey(value.getUserId());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public String buildKey(UUID userId) {
|
|
||||||
return this.generateKey(new HashMap<>() {{
|
|
||||||
put("$user_id$", userId.toString().toLowerCase(Locale.ROOT));
|
|
||||||
}});
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
package gr.cite.annotation.config.email;
|
|
||||||
|
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
|
|
||||||
@Configuration
|
|
||||||
@EnableConfigurationProperties(EmailProperties.class)
|
|
||||||
public class EmailConfig {
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
package gr.cite.annotation.config.email;
|
|
||||||
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
||||||
|
|
||||||
@ConfigurationProperties(prefix = "email")
|
|
||||||
public class EmailProperties {
|
|
||||||
|
|
||||||
private final String address;
|
|
||||||
|
|
||||||
public EmailProperties(String address) {
|
|
||||||
this.address = address;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAddress() {
|
|
||||||
return address;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
package gr.cite.annotation.config.formatting;
|
|
||||||
|
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
|
|
||||||
@Configuration
|
|
||||||
@EnableConfigurationProperties(FormattingServiceProperties.class)
|
|
||||||
public class FormattingServiceConfiguration {
|
|
||||||
}
|
|
|
@ -1,38 +0,0 @@
|
||||||
package gr.cite.annotation.config.formatting;
|
|
||||||
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
||||||
|
|
||||||
@ConfigurationProperties(prefix = "formatting.options")
|
|
||||||
public class FormattingServiceProperties {
|
|
||||||
|
|
||||||
private final String integerFormat;
|
|
||||||
|
|
||||||
private final String decimalFormat;
|
|
||||||
|
|
||||||
private final String dateTimeFormat;
|
|
||||||
|
|
||||||
private final Integer decimalDigitsRound;
|
|
||||||
|
|
||||||
public FormattingServiceProperties(String integerFormat, String decimalFormat, String dateTimeFormat, Integer decimalDigitsRound) {
|
|
||||||
this.integerFormat = integerFormat;
|
|
||||||
this.decimalFormat = decimalFormat;
|
|
||||||
this.dateTimeFormat = dateTimeFormat;
|
|
||||||
this.decimalDigitsRound = decimalDigitsRound;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIntegerFormat() {
|
|
||||||
return integerFormat;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDecimalFormat() {
|
|
||||||
return decimalFormat;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDateTimeFormat() {
|
|
||||||
return dateTimeFormat;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getDecimalDigitsRound() {
|
|
||||||
return decimalDigitsRound;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
package gr.cite.annotation.config.formatting;
|
|
||||||
|
|
||||||
import gr.cite.tools.cache.CacheOptions;
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
|
|
||||||
@Configuration
|
|
||||||
@ConfigurationProperties(prefix = "cache.formatting-user-profile-cache")
|
|
||||||
public class FormattingUserprofileCacheOptions extends CacheOptions {
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
package gr.cite.annotation.service.formatting;
|
|
||||||
|
|
||||||
import java.time.Instant;
|
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.TimeZone;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
public interface FormattingService {
|
|
||||||
|
|
||||||
String format(int value, UUID userId, String format, Locale locale);
|
|
||||||
|
|
||||||
String format(int value, String format, Locale locale);
|
|
||||||
|
|
||||||
String format(long value, UUID userId, String format, Locale locale);
|
|
||||||
|
|
||||||
String format(long value, String format, Locale locale);
|
|
||||||
|
|
||||||
String format(double value, UUID userId, Integer decimals, String format, Locale locale);
|
|
||||||
|
|
||||||
String format(double value, Integer decimals, String format, Locale locale);
|
|
||||||
|
|
||||||
String format(Instant value, UUID userId, TimeZone timezone, String format, Locale locale);
|
|
||||||
|
|
||||||
String format(Instant value, TimeZone timeZone, String format, Locale locale);
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,171 +0,0 @@
|
||||||
package gr.cite.annotation.service.formatting;
|
|
||||||
|
|
||||||
import gr.cite.annotation.cache.FormattingUserprofileCacheCacheService;
|
|
||||||
import gr.cite.annotation.config.formatting.FormattingServiceProperties;
|
|
||||||
import gr.cite.annotation.convention.ConventionService;
|
|
||||||
import gr.cite.annotation.locale.LocaleService;
|
|
||||||
import gr.cite.tools.data.query.QueryFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
import org.springframework.web.context.annotation.RequestScope;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.math.RoundingMode;
|
|
||||||
import java.text.DecimalFormat;
|
|
||||||
import java.text.DecimalFormatSymbols;
|
|
||||||
import java.text.NumberFormat;
|
|
||||||
import java.time.Instant;
|
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.time.ZoneOffset;
|
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
import java.time.format.FormatStyle;
|
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.TimeZone;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
@RequestScope
|
|
||||||
public class FormattingServiceImpl implements FormattingService {
|
|
||||||
|
|
||||||
private final QueryFactory queryFactory;
|
|
||||||
private final ConventionService conventionService;
|
|
||||||
private final LocaleService localeService;
|
|
||||||
private final FormattingServiceProperties properties;
|
|
||||||
private final FormattingUserprofileCacheCacheService formattingUserprofileCacheCacheService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public FormattingServiceImpl(QueryFactory queryFactory,
|
|
||||||
ConventionService conventionService,
|
|
||||||
LocaleService localeService,
|
|
||||||
FormattingServiceProperties properties,
|
|
||||||
FormattingUserprofileCacheCacheService formattingUserprofileCacheCacheService
|
|
||||||
) {
|
|
||||||
this.queryFactory = queryFactory;
|
|
||||||
this.conventionService = conventionService;
|
|
||||||
this.localeService = localeService;
|
|
||||||
this.properties = properties;
|
|
||||||
this.formattingUserprofileCacheCacheService = formattingUserprofileCacheCacheService;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String format(int value, UUID userId, String format, Locale locale) {
|
|
||||||
return this.formatNonDecimal(value, userId, format, locale);
|
|
||||||
}
|
|
||||||
|
|
||||||
private String formatNonDecimal(Number value,UUID userId, String format, Locale locale) {
|
|
||||||
Locale localeToUse = this.localeService.culture();
|
|
||||||
if (locale != null) {
|
|
||||||
localeToUse = locale;
|
|
||||||
} else if (userId != null) {
|
|
||||||
FormattingUserprofileCacheCacheService.UserFormattingProfileCacheValue profile = this.getUserProfile(userId);
|
|
||||||
if (profile != null) {
|
|
||||||
localeToUse = this.localeService.cultureSafe(profile.getCulture());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
String formatToUse = !this.conventionService.isNullOrEmpty(format) ? format : this.properties.getIntegerFormat();
|
|
||||||
return this.formatNonDecimal(value, formatToUse, localeToUse);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String format(int value, String format, Locale locale) {
|
|
||||||
return this.formatNonDecimal(value, format, locale);
|
|
||||||
}
|
|
||||||
|
|
||||||
private String formatNonDecimal(Number value, String format, Locale locale) {
|
|
||||||
if (this.conventionService.isNullOrEmpty(format) && locale != null) return NumberFormat.getInstance(locale).format(value);
|
|
||||||
else if (!this.conventionService.isNullOrEmpty(format) && locale == null) return String.format(format, value);
|
|
||||||
else if (!this.conventionService.isNullOrEmpty(format) && locale != null) return String.format(locale, format, value);
|
|
||||||
|
|
||||||
return NumberFormat.getInstance(Locale.ROOT).format(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String format(long value, UUID userId, String format, Locale locale) {
|
|
||||||
return this.formatNonDecimal(value, userId, format, locale);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String format(long value, String format, Locale locale) {
|
|
||||||
return this.formatNonDecimal(value, format, locale);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String format(double value, UUID userId, Integer decimals, String format, Locale locale) {
|
|
||||||
Locale localeToUse = this.localeService.culture();
|
|
||||||
if (locale != null) {
|
|
||||||
localeToUse = locale;
|
|
||||||
} else if (userId != null) {
|
|
||||||
FormattingUserprofileCacheCacheService.UserFormattingProfileCacheValue profile = this.getUserProfile(userId);
|
|
||||||
if (profile != null) {
|
|
||||||
localeToUse = this.localeService.cultureSafe(profile.getCulture());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
String formatToUse = !this.conventionService.isNullOrEmpty(format) ? format : this.properties.getDecimalFormat();
|
|
||||||
int decimalsToUse = decimals != null ? decimals : this.properties.getDecimalDigitsRound();
|
|
||||||
return this.format(value, decimalsToUse, formatToUse, localeToUse);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String format(double value, Integer decimals, String format, Locale locale) {
|
|
||||||
double val = value;
|
|
||||||
if (decimals != null) {
|
|
||||||
BigDecimal bd = new BigDecimal(Double.toString(value));
|
|
||||||
bd = bd.setScale(decimals, RoundingMode.HALF_UP);
|
|
||||||
val = bd.doubleValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.conventionService.isNullOrEmpty(format) && locale != null) return NumberFormat.getInstance(locale).format(val);
|
|
||||||
else if (!this.conventionService.isNullOrEmpty(format) && locale == null) return new DecimalFormat(format).format(val);
|
|
||||||
else if (!this.conventionService.isNullOrEmpty(format) && locale != null) return new DecimalFormat(format, new DecimalFormatSymbols(locale)).format(val);
|
|
||||||
|
|
||||||
return NumberFormat.getInstance(Locale.ROOT).format(val);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String format(Instant value, UUID userId, TimeZone timezone, String format, Locale locale) {
|
|
||||||
FormattingUserprofileCacheCacheService.UserFormattingProfileCacheValue profile = null;
|
|
||||||
if (userId != null && (locale == null || timezone == null)) {
|
|
||||||
profile = this.getUserProfile(userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
Locale localeToUse = this.localeService.culture();
|
|
||||||
if (locale != null) {
|
|
||||||
localeToUse = locale;
|
|
||||||
} else if (userId != null) {
|
|
||||||
localeToUse = this.localeService.cultureSafe(profile.getCulture());
|
|
||||||
}
|
|
||||||
|
|
||||||
TimeZone timezoneToUse = this.localeService.timezone();
|
|
||||||
if (timezone != null) {
|
|
||||||
timezoneToUse = timezone;
|
|
||||||
} else if (userId != null) {
|
|
||||||
timezoneToUse = this.localeService.timezoneSafe(profile.getZone());
|
|
||||||
}
|
|
||||||
|
|
||||||
String formatToUse = !this.conventionService.isNullOrEmpty(format) ? format : this.properties.getDateTimeFormat();
|
|
||||||
return this.format(value, timezoneToUse, formatToUse, localeToUse);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String format(Instant value, TimeZone timeZone, String format, Locale locale) {
|
|
||||||
ZoneId zoneId = ZoneId.from(ZoneOffset.UTC);
|
|
||||||
|
|
||||||
if (timeZone != null) {
|
|
||||||
zoneId = timeZone.toZoneId();
|
|
||||||
}
|
|
||||||
if (this.conventionService.isNullOrEmpty(format) && locale != null) DateTimeFormatter.ofLocalizedDateTime(FormatStyle.FULL, FormatStyle.MEDIUM).withLocale(locale).withZone(zoneId).format(value);
|
|
||||||
else if (!this.conventionService.isNullOrEmpty(format) && locale == null) return DateTimeFormatter.ofPattern(format).withZone(zoneId).format(value);
|
|
||||||
else if (!this.conventionService.isNullOrEmpty(format) && locale != null) return DateTimeFormatter.ofPattern(format, locale).withZone(zoneId).format(value);
|
|
||||||
|
|
||||||
return DateTimeFormatter.ofLocalizedDateTime(FormatStyle.FULL, FormatStyle.MEDIUM).withZone(zoneId).format(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
private FormattingUserprofileCacheCacheService.UserFormattingProfileCacheValue getUserProfile(UUID userId) {
|
|
||||||
FormattingUserprofileCacheCacheService.UserFormattingProfileCacheValue cacheValue = this.formattingUserprofileCacheCacheService.lookup(this.formattingUserprofileCacheCacheService.buildKey(userId));
|
|
||||||
if (cacheValue != null) {
|
|
||||||
return cacheValue;
|
|
||||||
} else {
|
|
||||||
// UserEntity user = this.queryFactory.query(UserQuery.class).ids(userId).firstAs(new BaseFieldSet().ensure(User._culture).ensure(User._language).ensure(User._timezone).ensure(User._id));
|
|
||||||
// if (user == null) return null;
|
|
||||||
// cacheValue = new FormattingUserprofileCacheCacheService.UserFormattingProfileCacheValue(userId, user.getTimezone(), user.getCulture(), user.getLanguage());
|
|
||||||
// this.formattingUserprofileCacheCacheService.put(cacheValue);
|
|
||||||
|
|
||||||
return cacheValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -333,7 +333,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>gr.cite</groupId>
|
<groupId>gr.cite</groupId>
|
||||||
<artifactId>cache</artifactId>
|
<artifactId>cache</artifactId>
|
||||||
<version>2.1.0</version>
|
<version>2.2.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -5,67 +5,51 @@ cache:
|
||||||
- names: [ "userBySubjectId" ]
|
- names: [ "userBySubjectId" ]
|
||||||
allowNullValues: true
|
allowNullValues: true
|
||||||
initialCapacity: 100
|
initialCapacity: 100
|
||||||
maximumSize: 500
|
maximumSize: 5000
|
||||||
enableRecordStats: false
|
enableRecordStats: false
|
||||||
expireAfterWriteMinutes: 1
|
expireAfterWriteSeconds: 20
|
||||||
expireAfterAccessMinutes: 1
|
|
||||||
refreshAfterWriteMinutes: 1
|
|
||||||
- names: [ "supportiveMaterial" ]
|
- names: [ "supportiveMaterial" ]
|
||||||
allowNullValues: true
|
allowNullValues: true
|
||||||
initialCapacity: 100
|
initialCapacity: 100
|
||||||
maximumSize: 500
|
maximumSize: 500
|
||||||
enableRecordStats: false
|
enableRecordStats: false
|
||||||
expireAfterWriteMinutes: 10
|
expireAfterWriteSeconds: 600
|
||||||
expireAfterAccessMinutes: 10
|
|
||||||
refreshAfterWriteMinutes: 10
|
|
||||||
- names: [ "Reference" ]
|
- names: [ "Reference" ]
|
||||||
allowNullValues: true
|
allowNullValues: true
|
||||||
initialCapacity: 100
|
initialCapacity: 100
|
||||||
maximumSize: 500
|
maximumSize: 500
|
||||||
enableRecordStats: false
|
enableRecordStats: false
|
||||||
expireAfterWriteMinutes: 10
|
expireAfterWriteSeconds: 600
|
||||||
expireAfterAccessMinutes: 10
|
|
||||||
refreshAfterWriteMinutes: 10
|
|
||||||
- names: [ "depositConfigById" ]
|
- names: [ "depositConfigById" ]
|
||||||
allowNullValues: true
|
allowNullValues: true
|
||||||
initialCapacity: 100
|
initialCapacity: 100
|
||||||
maximumSize: 500
|
maximumSize: 500
|
||||||
enableRecordStats: false
|
enableRecordStats: false
|
||||||
expireAfterWriteMinutes: 10
|
expireAfterWriteSeconds: 600
|
||||||
expireAfterAccessMinutes: 10
|
|
||||||
refreshAfterWriteMinutes: 10
|
|
||||||
- names: [ "affiliation" ]
|
- names: [ "affiliation" ]
|
||||||
allowNullValues: true
|
allowNullValues: true
|
||||||
initialCapacity: 100
|
initialCapacity: 100
|
||||||
maximumSize: 500
|
maximumSize: 5000
|
||||||
enableRecordStats: false
|
enableRecordStats: false
|
||||||
expireAfterWriteMinutes: 1
|
expireAfterWriteSeconds: 20
|
||||||
expireAfterAccessMinutes: 1
|
|
||||||
refreshAfterWriteMinutes: 1
|
|
||||||
- names: [ "dashboardStatisticsByUserId" ]
|
- names: [ "dashboardStatisticsByUserId" ]
|
||||||
allowNullValues: true
|
allowNullValues: true
|
||||||
initialCapacity: 100
|
initialCapacity: 100
|
||||||
maximumSize: 500
|
maximumSize: 500
|
||||||
enableRecordStats: false
|
enableRecordStats: false
|
||||||
expireAfterWriteMinutes: 1
|
expireAfterWriteSeconds: 30
|
||||||
expireAfterAccessMinutes: 1
|
|
||||||
refreshAfterWriteMinutes: 1
|
|
||||||
- names: [ "transformer" ]
|
- names: [ "transformer" ]
|
||||||
allowNullValues: true
|
allowNullValues: true
|
||||||
initialCapacity: 100
|
initialCapacity: 100
|
||||||
maximumSize: 500
|
maximumSize: 500
|
||||||
enableRecordStats: false
|
enableRecordStats: false
|
||||||
expireAfterWriteMinutes: 10
|
expireAfterWriteSeconds: 600
|
||||||
expireAfterAccessMinutes: 10
|
|
||||||
refreshAfterWriteMinutes: 10
|
|
||||||
- names: [ "tokenExchangeKey" ]
|
- names: [ "tokenExchangeKey" ]
|
||||||
allowNullValues: true
|
allowNullValues: true
|
||||||
initialCapacity: 100
|
initialCapacity: 100
|
||||||
maximumSize: 500
|
maximumSize: 500
|
||||||
enableRecordStats: false
|
enableRecordStats: false
|
||||||
expireAfterWriteMinutes: 10
|
expireAfterWriteSeconds: 60
|
||||||
expireAfterAccessMinutes: 10
|
|
||||||
refreshAfterWriteMinutes: 10
|
|
||||||
mapCaches:
|
mapCaches:
|
||||||
userBySubjectId:
|
userBySubjectId:
|
||||||
name: userBySubjectId
|
name: userBySubjectId
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
<button type="button" class="btn-load-more" (click)="loadLess()">{{'GENERAL.ACTIONS.LOAD-LESS' | translate}}</button>
|
<button type="button" class="btn-load-more" (click)="loadLess()">{{'GENERAL.ACTIONS.LOAD-LESS' | translate}}</button>
|
||||||
</div>
|
</div>
|
||||||
<div *ngFor="let item of listingItems; let i = index">
|
<div *ngFor="let item of listingItems; let i = index">
|
||||||
<app-dmp-listing-item-component *ngIf="item.dmp" [showDivider]="i != (listingItems.length - 1)" [dmp]="item.dmp" [isPublic]="isPublic"></app-dmp-listing-item-component>
|
<app-dmp-listing-item-component *ngIf="item.dmp" [showDivider]="i != (listingItems.length - 1)" [dmp]="item.dmp" [isPublic]="false"></app-dmp-listing-item-component>
|
||||||
<app-description-listing-item-component *ngIf="item.description" [showDivider]="i != (listingItems.length - 1)" [description]="item.description" [isPublic]="isPublic" ></app-description-listing-item-component>
|
<app-description-listing-item-component *ngIf="item.description" [showDivider]="i != (listingItems.length - 1)" [description]="item.description" [isPublic]="false" ></app-description-listing-item-component>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-muted d-flex justify-content-center mt-5" *ngIf="listingItems && listingItems.length > 0 && listingItems.length < pageSize">
|
<div class="text-muted d-flex justify-content-center mt-5" *ngIf="listingItems && listingItems.length > 0 && listingItems.length < pageSize">
|
||||||
{{'GENERAL.ACTIONS.NO-MORE-AVAILABLE' | translate}}
|
{{'GENERAL.ACTIONS.NO-MORE-AVAILABLE' | translate}}
|
||||||
|
|
|
@ -22,6 +22,8 @@ import { ReferenceType } from '@app/core/model/reference-type/reference-type';
|
||||||
import { DmpStatus } from '@app/core/common/enum/dmp-status';
|
import { DmpStatus } from '@app/core/common/enum/dmp-status';
|
||||||
import { DescriptionStatus } from '@app/core/common/enum/description-status';
|
import { DescriptionStatus } from '@app/core/common/enum/description-status';
|
||||||
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
||||||
|
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
||||||
|
import { DmpBlueprint, DmpBlueprintDefinition, DmpBlueprintDefinitionSection } from '@app/core/model/dmp-blueprint/dmp-blueprint';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-drafts',
|
selector: 'app-drafts',
|
||||||
|
@ -135,10 +137,22 @@ export class DraftsComponent extends BaseComponent implements OnInit {
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.groupId)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.groupId)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.updatedAt)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.updatedAt)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.isActive)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.isActive)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.CreateNewVersionDmp].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.DeleteDmp].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.CloneDmp].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.FinalizeDmp].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.ExportDmp].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.InviteDmpUsers].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.AssignDmpUsers].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.EditDmp].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.id)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.id)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.label)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.label)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.status)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.status)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.isActive)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.isActive)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.id)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.label)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.id)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.label)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.id)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.id)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.id)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.id)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.role)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.role)].join('.'),
|
||||||
|
@ -154,12 +168,19 @@ export class DraftsComponent extends BaseComponent implements OnInit {
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.status)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.status)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.updatedAt)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.updatedAt)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.isActive)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.isActive)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.authorizationFlags), AppPermission.EditDescription].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.authorizationFlags), AppPermission.DeleteDescription].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.authorizationFlags), AppPermission.InviteDmpUsers].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.descriptionTemplate), nameof<DescriptionTemplate>(x => x.id)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.descriptionTemplate), nameof<DescriptionTemplate>(x => x.id)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.descriptionTemplate), nameof<DescriptionTemplate>(x => x.label)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.descriptionTemplate), nameof<DescriptionTemplate>(x => x.label)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.descriptionTemplate), nameof<DescriptionTemplate>(x => x.groupId)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.descriptionTemplate), nameof<DescriptionTemplate>(x => x.groupId)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.id)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.id)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.label)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.label)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.accessType)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.accessType)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.id)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.label)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.id)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.label)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.id)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.id)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.id)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.id)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.role)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.role)].join('.'),
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
<button type="button" class="btn-load-more" (click)="loadLess()">{{'GENERAL.ACTIONS.LOAD-LESS' | translate}}</button>
|
<button type="button" class="btn-load-more" (click)="loadLess()">{{'GENERAL.ACTIONS.LOAD-LESS' | translate}}</button>
|
||||||
</div>
|
</div>
|
||||||
<div *ngFor="let item of listingItems; let i = index">
|
<div *ngFor="let item of listingItems; let i = index">
|
||||||
<app-dmp-listing-item-component *ngIf="item.dmp" [showDivider]="i != (listingItems.length - 1)" [dmp]="item.dmp" [isPublic]="isPublic"></app-dmp-listing-item-component>
|
<app-dmp-listing-item-component *ngIf="item.dmp" [showDivider]="i != (listingItems.length - 1)" [dmp]="item.dmp" [isPublic]="false"></app-dmp-listing-item-component>
|
||||||
<app-description-listing-item-component *ngIf="item.description" [showDivider]="i != (listingItems.length - 1)" [description]="item.description" [isPublic]="isPublic" ></app-description-listing-item-component>
|
<app-description-listing-item-component *ngIf="item.description" [showDivider]="i != (listingItems.length - 1)" [description]="item.description" [isPublic]="false" ></app-description-listing-item-component>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-muted d-flex justify-content-center mt-5" *ngIf="listingItems && listingItems.length > 0 && listingItems.length < pageSize">
|
<div class="text-muted d-flex justify-content-center mt-5" *ngIf="listingItems && listingItems.length > 0 && listingItems.length < pageSize">
|
||||||
{{'GENERAL.ACTIONS.NO-MORE-AVAILABLE' | translate}}
|
{{'GENERAL.ACTIONS.NO-MORE-AVAILABLE' | translate}}
|
||||||
|
|
|
@ -5,10 +5,12 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { DescriptionStatus } from '@app/core/common/enum/description-status';
|
import { DescriptionStatus } from '@app/core/common/enum/description-status';
|
||||||
import { DmpStatus } from '@app/core/common/enum/dmp-status';
|
import { DmpStatus } from '@app/core/common/enum/dmp-status';
|
||||||
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
||||||
|
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
||||||
import { RecentActivityOrder } from '@app/core/common/enum/recent-activity-order';
|
import { RecentActivityOrder } from '@app/core/common/enum/recent-activity-order';
|
||||||
import { RecentActivityItem } from '@app/core/model/dashboard/recent-activity-item';
|
import { RecentActivityItem } from '@app/core/model/dashboard/recent-activity-item';
|
||||||
import { DescriptionTemplate } from '@app/core/model/description-template/description-template';
|
import { DescriptionTemplate } from '@app/core/model/description-template/description-template';
|
||||||
import { Description } from '@app/core/model/description/description';
|
import { Description } from '@app/core/model/description/description';
|
||||||
|
import { DmpBlueprint, DmpBlueprintDefinition, DmpBlueprintDefinitionSection } from '@app/core/model/dmp-blueprint/dmp-blueprint';
|
||||||
import { Dmp, DmpUser } from '@app/core/model/dmp/dmp';
|
import { Dmp, DmpUser } from '@app/core/model/dmp/dmp';
|
||||||
import { DmpReference } from '@app/core/model/dmp/dmp-reference';
|
import { DmpReference } from '@app/core/model/dmp/dmp-reference';
|
||||||
import { ReferenceType } from '@app/core/model/reference-type/reference-type';
|
import { ReferenceType } from '@app/core/model/reference-type/reference-type';
|
||||||
|
@ -134,10 +136,22 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.groupId)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.groupId)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.updatedAt)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.updatedAt)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.isActive)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.isActive)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.CreateNewVersionDmp].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.DeleteDmp].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.CloneDmp].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.FinalizeDmp].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.ExportDmp].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.InviteDmpUsers].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.AssignDmpUsers].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.EditDmp].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.id)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.id)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.label)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.label)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.status)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.status)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.isActive)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.isActive)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.id)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.label)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.id)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.label)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.id)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.id)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.id)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.id)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.role)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.role)].join('.'),
|
||||||
|
@ -153,12 +167,19 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.status)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.status)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.updatedAt)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.updatedAt)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.isActive)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.isActive)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.authorizationFlags), AppPermission.EditDescription].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.authorizationFlags), AppPermission.DeleteDescription].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.authorizationFlags), AppPermission.InviteDmpUsers].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.descriptionTemplate), nameof<DescriptionTemplate>(x => x.id)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.descriptionTemplate), nameof<DescriptionTemplate>(x => x.id)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.descriptionTemplate), nameof<DescriptionTemplate>(x => x.label)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.descriptionTemplate), nameof<DescriptionTemplate>(x => x.label)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.descriptionTemplate), nameof<DescriptionTemplate>(x => x.groupId)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.descriptionTemplate), nameof<DescriptionTemplate>(x => x.groupId)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.id)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.id)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.label)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.label)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.accessType)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.accessType)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.id)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.label)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.id)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.label)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.id)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.id)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.id)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.id)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.role)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.role)].join('.'),
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<button type="button" class="btn-load-more" (click)="loadLess()">{{'GENERAL.ACTIONS.LOAD-LESS' | translate}}</button>
|
<button type="button" class="btn-load-more" (click)="loadLess()">{{'GENERAL.ACTIONS.LOAD-LESS' | translate}}</button>
|
||||||
</div>
|
</div>
|
||||||
<div *ngFor="let item of listingItems; let i = index">
|
<div *ngFor="let item of listingItems; let i = index">
|
||||||
<app-description-listing-item-component *ngIf="item" [showDivider]="i != (listingItems.length - 1)" [description]="item" [isPublic]="isPublic" ></app-description-listing-item-component>
|
<app-description-listing-item-component *ngIf="item" [showDivider]="i != (listingItems.length - 1)" [description]="item" [isPublic]="false" ></app-description-listing-item-component>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-muted d-flex justify-content-center mt-5" *ngIf="listingItems && listingItems.length > 0 && listingItems.length < pageSize">
|
<div class="text-muted d-flex justify-content-center mt-5" *ngIf="listingItems && listingItems.length > 0 && listingItems.length < pageSize">
|
||||||
{{'GENERAL.ACTIONS.NO-MORE-AVAILABLE' | translate}}
|
{{'GENERAL.ACTIONS.NO-MORE-AVAILABLE' | translate}}
|
||||||
|
|
|
@ -19,6 +19,8 @@ import { BaseComponent } from '@common/base/base.component';
|
||||||
import { debounceTime, takeUntil } from 'rxjs/operators';
|
import { debounceTime, takeUntil } from 'rxjs/operators';
|
||||||
import { nameof } from 'ts-simple-nameof';
|
import { nameof } from 'ts-simple-nameof';
|
||||||
import { DescriptionStatus } from '@app/core/common/enum/description-status';
|
import { DescriptionStatus } from '@app/core/common/enum/description-status';
|
||||||
|
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
||||||
|
import { DmpBlueprint, DmpBlueprintDefinition, DmpBlueprintDefinitionSection } from '@app/core/model/dmp-blueprint/dmp-blueprint';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-recent-edited-description-activity',
|
selector: 'app-recent-edited-description-activity',
|
||||||
|
@ -129,12 +131,19 @@ export class RecentEditedDescriptionActivityComponent extends BaseComponent impl
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.label)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.label)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.status)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.status)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.updatedAt)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.updatedAt)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.authorizationFlags), AppPermission.EditDescription].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.authorizationFlags), AppPermission.DeleteDescription].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.authorizationFlags), AppPermission.InviteDmpUsers].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.descriptionTemplate), nameof<DescriptionTemplate>(x => x.id)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.descriptionTemplate), nameof<DescriptionTemplate>(x => x.id)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.descriptionTemplate), nameof<DescriptionTemplate>(x => x.label)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.descriptionTemplate), nameof<DescriptionTemplate>(x => x.label)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.descriptionTemplate), nameof<DescriptionTemplate>(x => x.groupId)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.descriptionTemplate), nameof<DescriptionTemplate>(x => x.groupId)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.id)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.id)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.label)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.label)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.accessType)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.accessType)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.id)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.label)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.id)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.label)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.id)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.id)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.id)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.id)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.role)].join('.'),
|
[nameof<RecentActivityItem>(x => x.description), nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.role)].join('.'),
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<button type="button" class="btn-load-more" (click)="loadLess()">{{'GENERAL.ACTIONS.LOAD-LESS' | translate}}</button> <button type="button" class="btn-load-more" (click)="loadNextOrPrevious(false)">{{'GENERAL.ACTIONS.LOAD-LESS' | translate}}</button>
|
<button type="button" class="btn-load-more" (click)="loadLess()">{{'GENERAL.ACTIONS.LOAD-LESS' | translate}}</button> <button type="button" class="btn-load-more" (click)="loadNextOrPrevious(false)">{{'GENERAL.ACTIONS.LOAD-LESS' | translate}}</button>
|
||||||
</div>
|
</div>
|
||||||
<div *ngFor="let item of listingItems; let i = index">
|
<div *ngFor="let item of listingItems; let i = index">
|
||||||
<app-dmp-listing-item-component *ngIf="item" [showDivider]="i != (listingItems.length - 1)" [dmp]="item" [isPublic]="isPublic"></app-dmp-listing-item-component>
|
<app-dmp-listing-item-component *ngIf="item" [showDivider]="i != (listingItems.length - 1)" [dmp]="item" [isPublic]="false"></app-dmp-listing-item-component>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div *ngFor="let activity of listingItems">
|
<!-- <div *ngFor="let activity of listingItems">
|
||||||
<div class="dmp-card">
|
<div class="dmp-card">
|
||||||
|
|
|
@ -5,9 +5,11 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { DescriptionStatus } from '@app/core/common/enum/description-status';
|
import { DescriptionStatus } from '@app/core/common/enum/description-status';
|
||||||
import { DmpStatus } from '@app/core/common/enum/dmp-status';
|
import { DmpStatus } from '@app/core/common/enum/dmp-status';
|
||||||
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
||||||
|
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
||||||
import { RecentActivityOrder } from '@app/core/common/enum/recent-activity-order';
|
import { RecentActivityOrder } from '@app/core/common/enum/recent-activity-order';
|
||||||
import { RecentActivityItem } from '@app/core/model/dashboard/recent-activity-item';
|
import { RecentActivityItem } from '@app/core/model/dashboard/recent-activity-item';
|
||||||
import { Description } from '@app/core/model/description/description';
|
import { Description } from '@app/core/model/description/description';
|
||||||
|
import { DmpBlueprint, DmpBlueprintDefinition, DmpBlueprintDefinitionSection } from '@app/core/model/dmp-blueprint/dmp-blueprint';
|
||||||
import { Dmp, DmpUser } from '@app/core/model/dmp/dmp';
|
import { Dmp, DmpUser } from '@app/core/model/dmp/dmp';
|
||||||
import { DmpReference } from '@app/core/model/dmp/dmp-reference';
|
import { DmpReference } from '@app/core/model/dmp/dmp-reference';
|
||||||
import { ReferenceType } from '@app/core/model/reference-type/reference-type';
|
import { ReferenceType } from '@app/core/model/reference-type/reference-type';
|
||||||
|
@ -138,10 +140,22 @@ export class RecentEditedDmpActivityComponent extends BaseComponent implements O
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.version)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.version)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.groupId)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.groupId)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.updatedAt)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.updatedAt)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.CreateNewVersionDmp].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.DeleteDmp].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.CloneDmp].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.FinalizeDmp].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.ExportDmp].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.InviteDmpUsers].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.AssignDmpUsers].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.authorizationFlags), AppPermission.EditDmp].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.id)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.id)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.label)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.label)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.status)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.status)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.isActive)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.isActive)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.id)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.label)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.id)].join('.'),
|
||||||
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.label)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.id)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.id)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.id)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.id)].join('.'),
|
||||||
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.role)].join('.'),
|
[nameof<RecentActivityItem>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.role)].join('.'),
|
||||||
|
|
|
@ -110,11 +110,13 @@
|
||||||
<div class="row ml-0 mr-0 mb-3">
|
<div class="row ml-0 mr-0 mb-3">
|
||||||
<span class="col-auto pl-0">{{'DMP-OVERVIEW.DOI-PROVIDED' | translate}}: </span>
|
<span class="col-auto pl-0">{{'DMP-OVERVIEW.DOI-PROVIDED' | translate}}: </span>
|
||||||
<ng-container *ngIf="selectedModel">
|
<ng-container *ngIf="selectedModel">
|
||||||
<mat-select class="select-repo col" [placeholder]="selectedModel.repositoryId">
|
<div class="col">
|
||||||
<mat-option *ngFor="let entityDoi of dmp.entityDois" (click)="selectDoi(entityDoi)">
|
<mat-select class="select-repo" [placeholder]="selectedModel.repositoryId">
|
||||||
{{entityDoi.repositoryId}}
|
<mat-option *ngFor="let entityDoi of dmp.entityDois" (click)="selectDoi(entityDoi)">
|
||||||
</mat-option>
|
{{entityDoi.repositoryId}}
|
||||||
</mat-select>
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
<div class="row d-flex flex-column ml-0 mr-0 mb-3">
|
<div class="row d-flex flex-column ml-0 mr-0 mb-3">
|
||||||
|
@ -205,4 +207,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -62,11 +62,7 @@
|
||||||
<artifactId>oidc-authz</artifactId>
|
<artifactId>oidc-authz</artifactId>
|
||||||
<version>2.1.0</version>
|
<version>2.1.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>gr.cite</groupId>
|
|
||||||
<artifactId>cache</artifactId>
|
|
||||||
<version>2.1.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>gr.cite</groupId>
|
<groupId>gr.cite</groupId>
|
||||||
<artifactId>exceptions-web</artifactId>
|
<artifactId>exceptions-web</artifactId>
|
||||||
|
|
|
@ -7,49 +7,37 @@ cache:
|
||||||
initialCapacity: 100
|
initialCapacity: 100
|
||||||
maximumSize: 500
|
maximumSize: 500
|
||||||
enableRecordStats: false
|
enableRecordStats: false
|
||||||
expireAfterWriteMinutes: 10
|
expireAfterWriteSeconds: 600
|
||||||
expireAfterAccessMinutes: 10
|
|
||||||
refreshAfterWriteMinutes: 10
|
|
||||||
- names: [ tenantByCode ]
|
- names: [ tenantByCode ]
|
||||||
allowNullValues: true
|
allowNullValues: true
|
||||||
initialCapacity: 100
|
initialCapacity: 100
|
||||||
maximumSize: 500
|
maximumSize: 500
|
||||||
enableRecordStats: false
|
enableRecordStats: false
|
||||||
expireAfterWriteMinutes: 10
|
expireAfterWriteSeconds: 600
|
||||||
expireAfterAccessMinutes: 10
|
|
||||||
refreshAfterWriteMinutes: 10
|
|
||||||
- names: [ tenantById ]
|
- names: [ tenantById ]
|
||||||
allowNullValues: true
|
allowNullValues: true
|
||||||
initialCapacity: 100
|
initialCapacity: 100
|
||||||
maximumSize: 500
|
maximumSize: 500
|
||||||
enableRecordStats: false
|
enableRecordStats: false
|
||||||
expireAfterWriteMinutes: 10
|
expireAfterWriteSeconds: 600
|
||||||
expireAfterAccessMinutes: 10
|
|
||||||
refreshAfterWriteMinutes: 10
|
|
||||||
- names: [ userBySubjectId ]
|
- names: [ userBySubjectId ]
|
||||||
allowNullValues: true
|
allowNullValues: true
|
||||||
initialCapacity: 100
|
initialCapacity: 100
|
||||||
maximumSize: 500
|
maximumSize: 5000
|
||||||
enableRecordStats: false
|
enableRecordStats: false
|
||||||
expireAfterWriteMinutes: 5
|
expireAfterWriteSeconds: 20
|
||||||
expireAfterAccessMinutes: 5
|
|
||||||
refreshAfterWriteMinutes: 5
|
|
||||||
- names: [ userAccessTenant ]
|
- names: [ userAccessTenant ]
|
||||||
allowNullValues: true
|
allowNullValues: true
|
||||||
initialCapacity: 100
|
initialCapacity: 100
|
||||||
maximumSize: 500
|
maximumSize: 500
|
||||||
enableRecordStats: false
|
enableRecordStats: false
|
||||||
expireAfterWriteMinutes: 5
|
expireAfterWriteSeconds: 300
|
||||||
expireAfterAccessMinutes: 5
|
|
||||||
refreshAfterWriteMinutes: 5
|
|
||||||
- names: [ formattingUserProfile ]
|
- names: [ formattingUserProfile ]
|
||||||
allowNullValues: true
|
allowNullValues: true
|
||||||
initialCapacity: 100
|
initialCapacity: 100
|
||||||
maximumSize: 500
|
maximumSize: 500
|
||||||
enableRecordStats: false
|
enableRecordStats: false
|
||||||
expireAfterWriteMinutes: 1
|
expireAfterWriteSeconds: 60
|
||||||
expireAfterAccessMinutes: 1
|
|
||||||
refreshAfterWriteMinutes: 1
|
|
||||||
mapCaches:
|
mapCaches:
|
||||||
- names: [ cacheB ]
|
- names: [ cacheB ]
|
||||||
allowNullValues: true
|
allowNullValues: true
|
||||||
|
|
|
@ -149,6 +149,13 @@
|
||||||
<artifactId>queue-outbox</artifactId>
|
<artifactId>queue-outbox</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>gr.cite</groupId>
|
||||||
|
<artifactId>cache</artifactId>
|
||||||
|
<version>2.2.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
|
|
Loading…
Reference in New Issue