Merge remote-tracking branch 'eclipse/master' into feature_MECS-86_tenant_specific_polling_configuration
# Conflicts: # hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/tenantconfiguration/Tena ntConfigurationDashboardView.java
This commit is contained in:
@@ -1,74 +1,95 @@
|
|||||||
aopalliance:aopalliance:jar:1.0:compile
|
aopalliance:aopalliance:jar:1.0:compile
|
||||||
com.fasterxml.jackson.core:jackson-annotations:jar:2.5.0:compile
|
ch.qos.logback:logback-classic:jar:1.1.3:compile
|
||||||
com.fasterxml.jackson.core:jackson-core:jar:2.5.0:compile
|
ch.qos.logback:logback-core:jar:1.1.3:compile
|
||||||
com.fasterxml.jackson.core:jackson-databind:jar:2.5.0:compile
|
com.fasterxml.jackson.core:jackson-annotations:jar:2.5.5:compile
|
||||||
com.fasterxml:classmate:jar:1.3.0:compile
|
com.fasterxml.jackson.core:jackson-core:jar:2.5.5:compile
|
||||||
com.google.guava:guava:jar:18.0:compile
|
com.fasterxml.jackson.core:jackson-databind:jar:2.5.5:compile
|
||||||
com.h2database:h2:jar:1.4.186:compile
|
com.fasterxml:classmate:jar:1.1.0:compile
|
||||||
|
com.fasterxml:classmate:jar:1.2.0:compile
|
||||||
|
com.google.collections:google-collections:jar:1.0-rc2:compile
|
||||||
|
com.google.guava:guava:jar:19.0:compile
|
||||||
|
com.h2database:h2:jar:1.4.190:compile
|
||||||
|
com.jayway.jsonpath:json-path:jar:0.9.1:compile
|
||||||
|
com.netflix.feign:feign-core:jar:8.12.1:compile
|
||||||
|
com.netflix.feign:feign-core:jar:8.14.2:compile
|
||||||
|
com.netflix.feign:feign-jackson:jar:8.14.1:compile
|
||||||
|
com.netflix.feign:feign-ribbon:jar:8.1.1:compile
|
||||||
|
com.netflix.feign:feign-slf4j:jar:8.1.1:compile
|
||||||
|
com.netflix.ribbon:ribbon-core:jar:2.0.0:compile
|
||||||
|
com.netflix.ribbon:ribbon-httpclient:jar:2.0.0:compile
|
||||||
|
com.netflix.ribbon:ribbon-loadbalancer:jar:2.0.0:compile
|
||||||
|
com.netflix.ribbon:ribbon:jar:2.0.0:compile
|
||||||
com.rabbitmq:amqp-client:jar:3.5.5:compile
|
com.rabbitmq:amqp-client:jar:3.5.5:compile
|
||||||
com.vaadin.external.atmosphere:atmosphere-runtime:jar:2.2.7.vaadin1:compile
|
com.vaadin.external.atmosphere:atmosphere-runtime:jar:2.2.7.vaadin1:compile
|
||||||
com.vaadin.external.flute:flute:jar:1.3.0.gg2:compile
|
com.vaadin.external.flute:flute:jar:1.3.0.gg2:compile
|
||||||
com.vaadin.external.google:guava:jar:16.0.1.vaadin1:compile
|
com.vaadin.external.google:guava:jar:16.0.1.vaadin1:compile
|
||||||
com.vaadin.external.slf4j:vaadin-slf4j-jdk14:jar:1.6.1:compile
|
com.vaadin.external.slf4j:vaadin-slf4j-jdk14:jar:1.6.1:compile
|
||||||
com.vaadin.external.streamhtmlparser:streamhtmlparser-jsilver:jar:0.0.10.vaadin1:compile
|
com.vaadin.external.streamhtmlparser:streamhtmlparser-jsilver:jar:0.0.10.vaadin1:compile
|
||||||
com.vaadin:vaadin-push:jar:7.5.7:compile
|
com.vaadin:vaadin-client-compiled:jar:7.6.3:compile
|
||||||
com.vaadin:vaadin-sass-compiler:jar:0.9.12:compile
|
com.vaadin:vaadin-push:jar:7.6.3:compile
|
||||||
com.vaadin:vaadin-server:jar:7.5.7:compile
|
com.vaadin:vaadin-sass-compiler:jar:0.9.13:compile
|
||||||
com.vaadin:vaadin-shared:jar:7.5.7:compile
|
com.vaadin:vaadin-server:jar:7.6.3:compile
|
||||||
|
com.vaadin:vaadin-shared:jar:7.6.3:compile
|
||||||
|
com.vaadin:vaadin-spring-boot-starter:jar:1.0.0:compile
|
||||||
com.vaadin:vaadin-spring-boot:jar:1.0.0:compile
|
com.vaadin:vaadin-spring-boot:jar:1.0.0:compile
|
||||||
com.vaadin:vaadin-spring:jar:1.0.0:compile
|
com.vaadin:vaadin-spring:jar:1.0.0:compile
|
||||||
com.vaadin:vaadin-themes:jar:7.5.7:compile
|
com.vaadin:vaadin-themes:jar:7.6.3:compile
|
||||||
|
com.yahoo.platform.yui:yuicompressor:jar:2.4.8:compile
|
||||||
commons-io:commons-io:jar:2.4:compile
|
commons-io:commons-io:jar:2.4:compile
|
||||||
cz.jirutka.rsql:rsql-parser:jar:2.0.0:compile
|
cz.jirutka.rsql:rsql-parser:jar:2.0.0:compile
|
||||||
|
io.reactivex:rxjava:jar:1.0.11:compile
|
||||||
io.springfox:springfox-core:jar:2.0.3:compile
|
io.springfox:springfox-core:jar:2.0.3:compile
|
||||||
io.springfox:springfox-schema:jar:2.0.3:compile
|
|
||||||
io.springfox:springfox-spi:jar:2.0.3:compile
|
|
||||||
io.springfox:springfox-spring-web:jar:2.0.3:compile
|
|
||||||
io.springfox:springfox-swagger-common:jar:2.0.3:compile
|
|
||||||
io.springfox:springfox-swagger2:jar:2.0.3:compile
|
|
||||||
io.swagger:swagger-annotations:jar:1.5.0:compile
|
|
||||||
io.swagger:swagger-models:jar:1.5.0:compile
|
|
||||||
javax.servlet:javax.servlet-api:jar:3.1.0:compile
|
javax.servlet:javax.servlet-api:jar:3.1.0:compile
|
||||||
javax.transaction:javax.transaction-api:jar:1.2:compile
|
javax.transaction:javax.transaction-api:jar:1.2:compile
|
||||||
javax.validation:validation-api:jar:1.1.0.Final:compile
|
javax.validation:validation-api:jar:1.1.0.Final:compile
|
||||||
joda-time:joda-time:jar:2.5:compile
|
joda-time:joda-time:jar:2.5:compile
|
||||||
net._01001111:jlorem:jar:1.1:compile
|
net._01001111:jlorem:jar:1.1:compile
|
||||||
|
net.minidev:json-smart:jar:1.2:compile
|
||||||
org.apache.commons:commons-lang3:jar:3.4:compile
|
org.apache.commons:commons-lang3:jar:3.4:compile
|
||||||
org.apache.commons:commons-pool2:jar:2.2:compile
|
org.apache.commons:commons-pool2:jar:2.2:compile
|
||||||
org.apache.logging.log4j:log4j-api:jar:2.1:compile
|
org.apache.logging.log4j:log4j-api:jar:2.1:compile
|
||||||
org.apache.logging.log4j:log4j-core:jar:2.1:compile
|
org.apache.logging.log4j:log4j-core:jar:2.1:compile
|
||||||
org.apache.logging.log4j:log4j-slf4j-impl:jar:2.1:compile
|
org.apache.logging.log4j:log4j-slf4j-impl:jar:2.1:compile
|
||||||
org.apache.tomcat:tomcat-jdbc:jar:8.0.28:compile
|
org.apache.tomcat:tomcat-jdbc:jar:8.0.30:compile
|
||||||
org.apache.tomcat:tomcat-juli:jar:8.0.28:compile
|
org.apache.tomcat:tomcat-juli:jar:8.0.30:compile
|
||||||
org.aspectj:aspectjrt:jar:1.8.5:compile
|
org.aspectj:aspectjrt:jar:1.8.5:compile
|
||||||
org.aspectj:aspectjweaver:jar:1.8.5:compile
|
org.aspectj:aspectjweaver:jar:1.8.5:compile
|
||||||
org.eclipse.persistence:javax.persistence:jar:2.1.0:compile
|
org.eclipse.persistence:javax.persistence:jar:2.1.1:compile
|
||||||
org.eclipse.persistence:org.eclipse.persistence.antlr:jar:2.6.0:compile
|
org.eclipse.persistence:org.eclipse.persistence.antlr:jar:2.6.2:compile
|
||||||
org.eclipse.persistence:org.eclipse.persistence.asm:jar:2.6.0:compile
|
org.eclipse.persistence:org.eclipse.persistence.asm:jar:2.6.2:compile
|
||||||
org.eclipse.persistence:org.eclipse.persistence.core:jar:2.6.0:compile
|
org.eclipse.persistence:org.eclipse.persistence.core:jar:2.6.2:compile
|
||||||
org.eclipse.persistence:org.eclipse.persistence.jpa.jpql:jar:2.6.0:compile
|
org.eclipse.persistence:org.eclipse.persistence.jpa.jpql:jar:2.6.2:compile
|
||||||
org.eclipse.persistence:org.eclipse.persistence.jpa:jar:2.6.0:compile
|
org.eclipse.persistence:org.eclipse.persistence.jpa:jar:2.6.2:compile
|
||||||
org.flywaydb:flyway-core:jar:3.1:compile
|
org.flywaydb:flyway-core:jar:3.1:compile
|
||||||
org.glassfish:javax.json:jar:1.0.4:compile
|
org.glassfish:javax.json:jar:1.0.4:compile
|
||||||
org.hibernate:hibernate-validator:jar:5.2.2.Final:compile
|
org.hibernate:hibernate-validator:jar:5.2.4.Final:compile
|
||||||
org.jboss.logging:jboss-logging:jar:3.2.1.Final:compile
|
org.jboss.logging:jboss-logging:jar:3.2.1.Final:compile
|
||||||
org.jsoup:jsoup:jar:1.8.1:compile
|
org.json:json:jar:20141113:compile
|
||||||
org.mapstruct:mapstruct:jar:1.0.0.Beta4:compile
|
org.jsoup:jsoup:jar:1.8.3:compile
|
||||||
org.mongodb:mongo-java-driver:jar:3.0.2:compile
|
org.mongodb:mongo-java-driver:jar:3.2.2:compile
|
||||||
org.objenesis:objenesis:jar:2.1:compile
|
org.objenesis:objenesis:jar:2.1:compile
|
||||||
org.slf4j:jcl-over-slf4j:jar:1.7.12:compile
|
org.slf4j:jcl-over-slf4j:jar:1.7.13:compile
|
||||||
org.slf4j:jul-to-slf4j:jar:1.7.12:compile
|
org.slf4j:jul-to-slf4j:jar:1.7.13:compile
|
||||||
org.slf4j:slf4j-api:jar:1.7.7:compile
|
org.slf4j:log4j-over-slf4j:jar:1.7.13:compile
|
||||||
|
org.slf4j:slf4j-api:jar:1.7.13:compile
|
||||||
org.springframework.amqp:spring-amqp:jar:1.4.6.RELEASE:compile
|
org.springframework.amqp:spring-amqp:jar:1.4.6.RELEASE:compile
|
||||||
org.springframework.amqp:spring-rabbit:jar:1.4.6.RELEASE:compile
|
org.springframework.amqp:spring-rabbit:jar:1.4.6.RELEASE:compile
|
||||||
org.springframework.boot:spring-boot-autoconfigure:jar:1.2.7.RELEASE:compile
|
org.springframework.boot:spring-boot-autoconfigure:jar:1.2.8.RELEASE:compile
|
||||||
org.springframework.boot:spring-boot-starter-aop:jar:1.2.7.RELEASE:compile
|
org.springframework.boot:spring-boot-configuration-processor:jar:1.2.8.RELEASE:compile
|
||||||
org.springframework.boot:spring-boot-starter-data-jpa:jar:1.2.7.RELEASE:compile
|
org.springframework.boot:spring-boot-starter-aop:jar:1.2.8.RELEASE:compile
|
||||||
org.springframework.boot:spring-boot-starter-jdbc:jar:1.2.7.RELEASE:compile
|
org.springframework.boot:spring-boot-starter-data-jpa:jar:1.2.8.RELEASE:compile
|
||||||
org.springframework.boot:spring-boot-starter-log4j2:jar:1.2.7.RELEASE:compile
|
org.springframework.boot:spring-boot-starter-jdbc:jar:1.2.8.RELEASE:compile
|
||||||
org.springframework.boot:spring-boot-starter-web:jar:1.2.7.RELEASE:compile
|
org.springframework.boot:spring-boot-starter-log4j2:jar:1.2.8.RELEASE:compile
|
||||||
org.springframework.boot:spring-boot-starter:jar:1.2.7.RELEASE:compile
|
org.springframework.boot:spring-boot-starter-logging:jar:1.2.8.RELEASE:compile
|
||||||
org.springframework.boot:spring-boot:jar:1.2.7.RELEASE:compile
|
org.springframework.boot:spring-boot-starter-web:jar:1.2.8.RELEASE:compile
|
||||||
|
org.springframework.boot:spring-boot-starter:jar:1.2.8.RELEASE:compile
|
||||||
|
org.springframework.boot:spring-boot:jar:1.2.8.RELEASE:compile
|
||||||
|
org.springframework.cloud:spring-cloud-commons:jar:1.0.5.RELEASE:compile
|
||||||
|
org.springframework.cloud:spring-cloud-context:jar:1.0.5.RELEASE:compile
|
||||||
|
org.springframework.cloud:spring-cloud-netflix-core:jar:1.0.7.RELEASE:compile
|
||||||
|
org.springframework.cloud:spring-cloud-starter-feign:jar:1.0.6.RELEASE:compile
|
||||||
|
org.springframework.cloud:spring-cloud-starter-ribbon:jar:1.0.6.RELEASE:compile
|
||||||
|
org.springframework.cloud:spring-cloud-starter:jar:1.0.5.RELEASE:compile
|
||||||
org.springframework.data:spring-data-commons:jar:1.10.1.RELEASE:compile
|
org.springframework.data:spring-data-commons:jar:1.10.1.RELEASE:compile
|
||||||
org.springframework.data:spring-data-jpa:jar:1.8.1.RELEASE:compile
|
org.springframework.data:spring-data-jpa:jar:1.8.1.RELEASE:compile
|
||||||
org.springframework.data:spring-data-mongodb:jar:1.7.1.RELEASE:compile
|
org.springframework.data:spring-data-mongodb:jar:1.7.1.RELEASE:compile
|
||||||
@@ -77,29 +98,33 @@
|
|||||||
org.springframework.plugin:spring-plugin-core:jar:1.1.0.RELEASE:compile
|
org.springframework.plugin:spring-plugin-core:jar:1.1.0.RELEASE:compile
|
||||||
org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
|
org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
|
||||||
org.springframework.retry:spring-retry:jar:1.1.2.RELEASE:compile
|
org.springframework.retry:spring-retry:jar:1.1.2.RELEASE:compile
|
||||||
org.springframework.security:spring-security-aspects:jar:3.2.8.RELEASE:compile
|
org.springframework.security:spring-security-aspects:jar:3.2.9.RELEASE:compile
|
||||||
org.springframework.security:spring-security-config:jar:3.2.8.RELEASE:compile
|
org.springframework.security:spring-security-config:jar:3.2.9.RELEASE:compile
|
||||||
org.springframework.security:spring-security-core:jar:3.2.8.RELEASE:compile
|
org.springframework.security:spring-security-core:jar:3.2.9.RELEASE:compile
|
||||||
org.springframework.security:spring-security-web:jar:3.2.8.RELEASE:compile
|
org.springframework.security:spring-security-crypto:jar:3.2.9.RELEASE:compile
|
||||||
org.springframework:spring-aop:jar:4.1.8.RELEASE:compile
|
org.springframework.security:spring-security-web:jar:3.2.9.RELEASE:compile
|
||||||
org.springframework:spring-aspects:jar:4.1.8.RELEASE:compile
|
org.springframework:spring-aop:jar:4.1.9.RELEASE:compile
|
||||||
org.springframework:spring-beans:jar:4.1.8.RELEASE:compile
|
org.springframework:spring-aspects:jar:4.1.9.RELEASE:compile
|
||||||
org.springframework:spring-context-support:jar:4.1.8.RELEASE:compile
|
org.springframework:spring-beans:jar:4.1.9.RELEASE:compile
|
||||||
org.springframework:spring-context:jar:4.1.8.RELEASE:compile
|
org.springframework:spring-context-support:jar:4.1.9.RELEASE:compile
|
||||||
org.springframework:spring-core:jar:4.1.8.RELEASE:compile
|
org.springframework:spring-context:jar:4.1.9.RELEASE:compile
|
||||||
org.springframework:spring-expression:jar:4.1.8.RELEASE:compile
|
org.springframework:spring-core:jar:4.1.9.RELEASE:compile
|
||||||
org.springframework:spring-jdbc:jar:4.1.8.RELEASE:compile
|
org.springframework:spring-expression:jar:4.1.9.RELEASE:compile
|
||||||
org.springframework:spring-messaging:jar:4.1.8.RELEASE:compile
|
org.springframework:spring-jdbc:jar:4.1.9.RELEASE:compile
|
||||||
org.springframework:spring-orm:jar:4.1.8.RELEASE:compile
|
org.springframework:spring-messaging:jar:4.1.9.RELEASE:compile
|
||||||
org.springframework:spring-tx:jar:4.1.8.RELEASE:compile
|
org.springframework:spring-orm:jar:4.1.9.RELEASE:compile
|
||||||
org.springframework:spring-web:jar:4.1.8.RELEASE:compile
|
org.springframework:spring-tx:jar:4.1.9.RELEASE:compile
|
||||||
org.springframework:spring-webmvc:jar:4.1.8.RELEASE:compile
|
org.springframework:spring-web:jar:4.1.9.RELEASE:compile
|
||||||
|
org.springframework:spring-webmvc:jar:4.1.9.RELEASE:compile
|
||||||
org.vaadin.addons.lazyquerycontainer:vaadin-lazyquerycontainer:jar:7.4.0.1:compile
|
org.vaadin.addons.lazyquerycontainer:vaadin-lazyquerycontainer:jar:7.4.0.1:compile
|
||||||
|
org.vaadin.addons:contextmenu:jar:4.5:compile
|
||||||
org.vaadin.addons:flexibleoptiongroup:jar:2.2.0:compile
|
org.vaadin.addons:flexibleoptiongroup:jar:2.2.0:compile
|
||||||
org.vaadin.addons:tokenfield:jar:7.0.1:compile
|
org.vaadin.addons:tokenfield:jar:7.0.1:compile
|
||||||
|
org.vaadin.alump.distributionbar:dbar-addon:jar:1.2.0:compile
|
||||||
org.vaadin.spring.addons:vaadin-spring-addon-eventbus:jar:0.0.6.RELEASE:compile
|
org.vaadin.spring.addons:vaadin-spring-addon-eventbus:jar:0.0.6.RELEASE:compile
|
||||||
org.vaadin.spring.extensions:vaadin-spring-ext-core:jar:0.0.6.RELEASE:compile
|
org.vaadin.spring.extensions:vaadin-spring-ext-core:jar:0.0.6.RELEASE:compile
|
||||||
org.vaadin.spring.extensions:vaadin-spring-ext-security:jar:0.0.6.RELEASE:compile
|
org.vaadin.spring.extensions:vaadin-spring-ext-security:jar:0.0.6.RELEASE:compile
|
||||||
org.w3c.css:sac:jar:1.3:compile
|
org.w3c.css:sac:jar:1.3:compile
|
||||||
org.yaml:snakeyaml:jar:1.14:compile
|
org.yaml:snakeyaml:jar:1.14:compile
|
||||||
redis.clients:jedis:jar:2.5.2:compile
|
redis.clients:jedis:jar:2.5.2:compile
|
||||||
|
rhino:js:jar:1.7R2:compile
|
||||||
|
|||||||
@@ -6,3 +6,6 @@ find . -name dependencies.txt|while read i; do cat $i;done|grep '.*:.*:test'|sor
|
|||||||
find . -name dependencies.txt|while read i; do cat $i;done|grep '.*:.*:provided'|sort|uniq > 3rd-dependencies/provided.txt
|
find . -name dependencies.txt|while read i; do cat $i;done|grep '.*:.*:provided'|sort|uniq > 3rd-dependencies/provided.txt
|
||||||
find . -name dependencies.txt|while read i; do rm $i;done
|
find . -name dependencies.txt|while read i; do rm $i;done
|
||||||
cd 3rd-dependencies/
|
cd 3rd-dependencies/
|
||||||
|
cat compile.txt provided.txt|cut -d':' -f1-4|while read i; do grep -h $i test.txt;done|sort|uniq|while read x; do sed -i.bak -e s/$x// test.txt ;done
|
||||||
|
sed -i.bak '/^[[:space:]]*$/d' test.txt
|
||||||
|
rm *.bak
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
javax.servlet:javax.servlet-api:jar:3.1.0:provided
|
javax.servlet:javax.servlet-api:jar:3.1.0:provided
|
||||||
org.apache.tomcat.embed:tomcat-embed-core:jar:8.0.28:provided
|
org.apache.tomcat.embed:tomcat-embed-core:jar:8.0.30:provided
|
||||||
org.apache.tomcat.embed:tomcat-embed-el:jar:8.0.28:provided
|
org.apache.tomcat.embed:tomcat-embed-el:jar:8.0.30:provided
|
||||||
org.apache.tomcat.embed:tomcat-embed-logging-juli:jar:8.0.28:provided
|
org.apache.tomcat.embed:tomcat-embed-logging-juli:jar:8.0.30:provided
|
||||||
org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.0.28:provided
|
org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.0.30:provided
|
||||||
org.springframework.boot:spring-boot-starter-tomcat:jar:1.2.7.RELEASE:provided
|
org.springframework.boot:spring-boot-starter-tomcat:jar:1.2.8.RELEASE:provided
|
||||||
|
|||||||
@@ -1,55 +1,36 @@
|
|||||||
com.fasterxml.jackson.core:jackson-core:jar:2.5.0:test
|
|
||||||
com.fasterxml.jackson.core:jackson-databind:jar:2.5.0:test
|
|
||||||
com.github.fge:btf:jar:1.2:test
|
com.github.fge:btf:jar:1.2:test
|
||||||
com.github.fge:jackson-coreutils:jar:1.6:test
|
com.github.fge:jackson-coreutils:jar:1.6:test
|
||||||
com.github.fge:json-patch:jar:1.7:test
|
com.github.fge:json-patch:jar:1.7:test
|
||||||
com.github.fge:msg-simple:jar:1.1:test
|
com.github.fge:msg-simple:jar:1.1:test
|
||||||
com.google.code.findbugs:jsr305:jar:2.0.1:test
|
com.google.code.findbugs:jsr305:jar:2.0.1:test
|
||||||
com.h2database:h2:jar:1.4.186:test
|
com.sun.jersey:jersey-client:jar:1.18.1:test
|
||||||
com.jayway.jsonpath:json-path:jar:0.9.1:test
|
com.sun.jersey:jersey-core:jar:1.13:test
|
||||||
commons-beanutils:commons-beanutils-core:jar:1.8.3:test
|
commons-beanutils:commons-beanutils-core:jar:1.8.3:test
|
||||||
commons-io:commons-io:jar:2.4:test
|
|
||||||
commons-logging:commons-logging:jar:1.1.1:test
|
commons-logging:commons-logging:jar:1.1.1:test
|
||||||
de.flapdoodle.embed:de.flapdoodle.embed.mongo:jar:1.50.0:test
|
de.flapdoodle.embed:de.flapdoodle.embed.mongo:jar:1.50.2:test
|
||||||
de.flapdoodle.embed:de.flapdoodle.embed.process:jar:1.50.0:test
|
de.flapdoodle.embed:de.flapdoodle.embed.process:jar:1.50.1:test
|
||||||
io.swagger:swagger-annotations:jar:1.5.0:test
|
|
||||||
javax.el:javax.el-api:jar:2.2.4:test
|
javax.el:javax.el-api:jar:2.2.4:test
|
||||||
junit:junit:jar:4.12:test
|
junit:junit:jar:4.12:test
|
||||||
net.java.dev.jna:jna-platform:jar:4.0.0:test
|
net.java.dev.jna:jna-platform:jar:4.0.0:test
|
||||||
net.java.dev.jna:jna:jar:3.3.0:test
|
|
||||||
net.java.dev.jna:jna:jar:4.0.0:test
|
net.java.dev.jna:jna:jar:4.0.0:test
|
||||||
net.java.dev.jna:jna:jar:platform:3.3.0:test
|
|
||||||
net.minidev:json-smart:jar:1.2:test
|
|
||||||
org.apache.commons:commons-compress:jar:1.3:test
|
org.apache.commons:commons-compress:jar:1.3:test
|
||||||
org.apache.commons:commons-lang3:jar:3.1:test
|
|
||||||
org.apache.tika:tika-core:jar:1.7:test
|
org.apache.tika:tika-core:jar:1.7:test
|
||||||
org.aspectj:aspectjrt:jar:1.8.5:test
|
|
||||||
org.atteo:evo-inflector:jar:1.2.1:test
|
org.atteo:evo-inflector:jar:1.2.1:test
|
||||||
org.easytesting:fest-assert-core:jar:2.0M10:test
|
org.easytesting:fest-assert-core:jar:2.0M10:test
|
||||||
org.easytesting:fest-assert:jar:1.4:test
|
org.easytesting:fest-assert:jar:1.4:test
|
||||||
org.easytesting:fest-util:jar:1.2.5:test
|
org.easytesting:fest-util:jar:1.2.5:test
|
||||||
org.hamcrest:hamcrest-core:jar:1.3:test
|
org.hamcrest:hamcrest-core:jar:1.3:test
|
||||||
org.hamcrest:hamcrest-library:jar:1.3:test
|
org.hamcrest:hamcrest-library:jar:1.3:test
|
||||||
org.json:json:jar:20141113:test
|
|
||||||
org.jvnet.jaxb2_commons:jaxb2-basics-runtime:jar:0.9.3:test
|
org.jvnet.jaxb2_commons:jaxb2-basics-runtime:jar:0.9.3:test
|
||||||
org.mariadb.jdbc:mariadb-java-client:jar:1.2.3:test
|
org.mariadb.jdbc:mariadb-java-client:jar:1.3.5:test
|
||||||
org.mockito:mockito-core:jar:1.10.19:test
|
org.mockito:mockito-core:jar:1.10.19:test
|
||||||
org.objenesis:objenesis:jar:2.1:test
|
org.springframework.boot:spring-boot-starter-test:jar:1.2.8.RELEASE:test
|
||||||
org.springframework.boot:spring-boot-starter-test:jar:1.2.7.RELEASE:test
|
|
||||||
org.springframework.data:spring-data-rest-core:jar:2.3.1.RELEASE:test
|
org.springframework.data:spring-data-rest-core:jar:2.3.1.RELEASE:test
|
||||||
org.springframework.data:spring-data-rest-webmvc:jar:2.3.1.RELEASE:test
|
org.springframework.data:spring-data-rest-webmvc:jar:2.3.1.RELEASE:test
|
||||||
org.springframework.hateoas:spring-hateoas:jar:0.16.0.RELEASE:test
|
org.springframework:spring-test:jar:4.1.9.RELEASE:test
|
||||||
org.springframework.plugin:spring-plugin-core:jar:1.1.0.RELEASE:test
|
ru.yandex.qatools.allure:allure-java-adaptor-api:jar:1.4.22:test
|
||||||
org.springframework.security:spring-security-aspects:jar:3.2.8.RELEASE:test
|
ru.yandex.qatools.allure:allure-java-annotations:jar:1.4.22:test
|
||||||
org.springframework.security:spring-security-config:jar:3.2.8.RELEASE:test
|
ru.yandex.qatools.allure:allure-java-aspects:jar:1.4.22:test
|
||||||
org.springframework.security:spring-security-web:jar:3.2.8.RELEASE:test
|
ru.yandex.qatools.allure:allure-junit-adaptor:jar:1.4.22:test
|
||||||
org.springframework:spring-context-support:jar:4.1.8.RELEASE:test
|
ru.yandex.qatools.allure:allure-model:jar:1.4.22:test
|
||||||
org.springframework:spring-test:jar:4.1.8.RELEASE:test
|
|
||||||
org.springframework:spring-web:jar:4.1.8.RELEASE:test
|
|
||||||
org.springframework:spring-webmvc:jar:4.1.8.RELEASE:test
|
|
||||||
ru.yandex.qatools.allure:allure-java-adaptor-api:jar:1.4.15:test
|
|
||||||
ru.yandex.qatools.allure:allure-java-annotations:jar:1.4.15:test
|
|
||||||
ru.yandex.qatools.allure:allure-java-aspects:jar:1.4.15:test
|
|
||||||
ru.yandex.qatools.allure:allure-junit-adaptor:jar:1.4.15:test
|
|
||||||
ru.yandex.qatools.allure:allure-model:jar:1.4.15:test
|
|
||||||
ru.yandex.qatools.properties:properties-loader:jar:1.5:test
|
ru.yandex.qatools.properties:properties-loader:jar:1.5:test
|
||||||
|
|||||||
@@ -62,8 +62,9 @@ public class DeviceSimulatorUpdater {
|
|||||||
device.setProgress(0.0);
|
device.setProgress(0.0);
|
||||||
device.setSwversion(swVersion);
|
device.setSwversion(swVersion);
|
||||||
eventbus.post(new InitUpdate(device));
|
eventbus.post(new InitUpdate(device));
|
||||||
|
|
||||||
threadPool.schedule(new DeviceSimulatorUpdateThread(device, spSenderService, actionId, eventbus, callback),
|
threadPool.schedule(new DeviceSimulatorUpdateThread(device, spSenderService, actionId, eventbus, callback),
|
||||||
2000, TimeUnit.MILLISECONDS);
|
2_000, TimeUnit.MILLISECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final class DeviceSimulatorUpdateThread implements Runnable {
|
private static final class DeviceSimulatorUpdateThread implements Runnable {
|
||||||
@@ -91,7 +92,7 @@ public class DeviceSimulatorUpdater {
|
|||||||
if (newProgress < 1.0) {
|
if (newProgress < 1.0) {
|
||||||
threadPool.schedule(
|
threadPool.schedule(
|
||||||
new DeviceSimulatorUpdateThread(device, spSenderService, actionId, eventbus, callback),
|
new DeviceSimulatorUpdateThread(device, spSenderService, actionId, eventbus, callback),
|
||||||
rndSleep.nextInt(3000), TimeUnit.MILLISECONDS);
|
rndSleep.nextInt(5_000), TimeUnit.MILLISECONDS);
|
||||||
} else {
|
} else {
|
||||||
callback.updateFinished(device, actionId);
|
callback.updateFinished(device, actionId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,11 +13,8 @@ import java.util.Map;
|
|||||||
import org.eclipse.hawkbit.dmf.amqp.api.EventTopic;
|
import org.eclipse.hawkbit.dmf.amqp.api.EventTopic;
|
||||||
import org.eclipse.hawkbit.dmf.amqp.api.MessageHeaderKey;
|
import org.eclipse.hawkbit.dmf.amqp.api.MessageHeaderKey;
|
||||||
import org.eclipse.hawkbit.dmf.amqp.api.MessageType;
|
import org.eclipse.hawkbit.dmf.amqp.api.MessageType;
|
||||||
import org.eclipse.hawkbit.dmf.json.model.ActionStatus;
|
|
||||||
import org.eclipse.hawkbit.dmf.json.model.DownloadAndUpdateRequest;
|
import org.eclipse.hawkbit.dmf.json.model.DownloadAndUpdateRequest;
|
||||||
import org.eclipse.hawkbit.simulator.AbstractSimulatedDevice;
|
|
||||||
import org.eclipse.hawkbit.simulator.DeviceSimulatorUpdater;
|
import org.eclipse.hawkbit.simulator.DeviceSimulatorUpdater;
|
||||||
import org.eclipse.hawkbit.simulator.DeviceSimulatorUpdater.UpdaterCallback;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.amqp.core.Message;
|
import org.springframework.amqp.core.Message;
|
||||||
@@ -139,31 +136,22 @@ public class SpReceiverService extends ReceiverService {
|
|||||||
DownloadAndUpdateRequest.class);
|
DownloadAndUpdateRequest.class);
|
||||||
final Long actionId = downloadAndUpdateRequest.getActionId();
|
final Long actionId = downloadAndUpdateRequest.getActionId();
|
||||||
|
|
||||||
try {
|
deviceUpdater.startUpdate(tenant, thingId, actionId,
|
||||||
Thread.sleep(1_000);
|
downloadAndUpdateRequest.getSoftwareModules().get(0).getModuleVersion(), (device, actionId1) -> {
|
||||||
} catch (final InterruptedException e) {
|
switch (device.getResponseStatus()) {
|
||||||
LOGGER.error("Sleep interrupted", e);
|
case SUCCESSFUL:
|
||||||
}
|
spSenderService.finishUpdateProcess(
|
||||||
|
new SimulatedUpdate(device.getTenant(), device.getId(), actionId1),
|
||||||
spSenderService.sendActionStatusMessage(tenant, ActionStatus.RUNNING,
|
"Simulation complete!");
|
||||||
"device Simulator retrieved update request. proceeding with simulation.", actionId);
|
break;
|
||||||
deviceUpdater.startUpdate(tenant, thingId, actionId, downloadAndUpdateRequest.getSoftwareModules().get(0)
|
case ERROR:
|
||||||
.getModuleVersion(), new UpdaterCallback() {
|
spSenderService.finishUpdateProcessWithError(
|
||||||
@Override
|
new SimulatedUpdate(device.getTenant(), device.getId(), actionId1),
|
||||||
public void updateFinished(final AbstractSimulatedDevice device, final Long actionId) {
|
"Simulation complete with error!");
|
||||||
switch (device.getResponseStatus()) {
|
break;
|
||||||
case SUCCESSFUL:
|
default:
|
||||||
spSenderService.finishUpdateProcess(new SimulatedUpdate(device.getTenant(), device.getId(),
|
break;
|
||||||
actionId), "Simulation complete!");
|
}
|
||||||
break;
|
});
|
||||||
case ERROR:
|
|
||||||
spSenderService.finishUpdateProcessWithError(new SimulatedUpdate(device.getTenant(),
|
|
||||||
device.getId(), actionId), "Simulation complete with error!");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,3 +24,18 @@ spring.rabbitmq.port=5672
|
|||||||
hawkbit.dmf.rabbitmq.deadLetterQueue=dmf_connector_deadletter
|
hawkbit.dmf.rabbitmq.deadLetterQueue=dmf_connector_deadletter
|
||||||
hawkbit.dmf.rabbitmq.deadLetterExchange=dmf.connector.deadletter
|
hawkbit.dmf.rabbitmq.deadLetterExchange=dmf.connector.deadletter
|
||||||
hawkbit.dmf.rabbitmq.receiverQueue=dmf_receiver
|
hawkbit.dmf.rabbitmq.receiverQueue=dmf_receiver
|
||||||
|
|
||||||
|
# UI demo account
|
||||||
|
hawkbit.server.ui.demo.password=admin
|
||||||
|
hawkbit.server.ui.demo.user=admin
|
||||||
|
hawkbit.server.ui.demo.tenant=DEFAULT
|
||||||
|
|
||||||
|
# UI help links
|
||||||
|
hawkbit.server.ui.links.documentation.root=https://github.com/eclipse/hawkbit
|
||||||
|
hawkbit.server.ui.links.documentation.deployment-view=https://github.com/eclipse/hawkbit
|
||||||
|
hawkbit.server.ui.links.documentation.distribution-view=https://github.com/eclipse/hawkbit
|
||||||
|
hawkbit.server.ui.links.documentation.rollout-view=https://github.com/eclipse/hawkbit
|
||||||
|
hawkbit.server.ui.links.documentation.security=https://github.com/eclipse/hawkbit
|
||||||
|
hawkbit.server.ui.links.documentation.system-configuration-view=https://github.com/eclipse/hawkbit
|
||||||
|
hawkbit.server.ui.links.documentation.targetfilter-view=https://github.com/eclipse/hawkbit
|
||||||
|
hawkbit.server.ui.links.documentation.upload-view=https://github.com/eclipse/hawkbit
|
||||||
|
|||||||
1
examples/hawkbit-mgmt-api-client/.gitignore
vendored
1
examples/hawkbit-mgmt-api-client/.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
/target/
|
/target/
|
||||||
/bin/
|
/bin/
|
||||||
|
/.apt_generated/
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ hawkbit.controller.minPollingTime=00:00:30
|
|||||||
# Attention: if you want to use a maximumPollingTime greater 23:59:59 you have to update the DurationField in the configuration window
|
# Attention: if you want to use a maximumPollingTime greater 23:59:59 you have to update the DurationField in the configuration window
|
||||||
|
|
||||||
|
|
||||||
## Configuration for RabbitMQ integration
|
# Configuration for RabbitMQ integration
|
||||||
hawkbit.dmf.rabbitmq.deadLetterQueue=dmf_connector_deadletter
|
hawkbit.dmf.rabbitmq.deadLetterQueue=dmf_connector_deadletter
|
||||||
hawkbit.dmf.rabbitmq.deadLetterExchange=dmf.connector.deadletter
|
hawkbit.dmf.rabbitmq.deadLetterExchange=dmf.connector.deadletter
|
||||||
hawkbit.dmf.rabbitmq.receiverQueue=dmf_receiver
|
hawkbit.dmf.rabbitmq.receiverQueue=dmf_receiver
|
||||||
1
hawkbit-core/.gitignore
vendored
Normal file
1
hawkbit-core/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/.apt_generated/
|
||||||
@@ -20,7 +20,7 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
public interface FieldNameProvider {
|
public interface FieldNameProvider {
|
||||||
/**
|
/**
|
||||||
* Seperator for the sub attributes
|
* Separator for the sub attributes
|
||||||
*/
|
*/
|
||||||
public static final String SUB_ATTRIBUTE_SEPERATOR = ".";
|
public static final String SUB_ATTRIBUTE_SEPERATOR = ".";
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public enum SoftwareModuleTypeFields implements FieldNameProvider {
|
|||||||
/**
|
/**
|
||||||
* The max ds assignments field.
|
* The max ds assignments field.
|
||||||
*/
|
*/
|
||||||
MAX("maxAssignments");
|
MAXASSIGNMENTS("maxAssignments");
|
||||||
|
|
||||||
private final String fieldName;
|
private final String fieldName;
|
||||||
|
|
||||||
|
|||||||
@@ -572,7 +572,7 @@ public class DeploymentManagement {
|
|||||||
@Modifying
|
@Modifying
|
||||||
@Transactional
|
@Transactional
|
||||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_UPDATE_TARGET)
|
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_UPDATE_TARGET)
|
||||||
public Action forceQuitAction(@NotNull final Action action, @NotNull final Target target) {
|
public Action forceQuitAction(@NotNull final Action action) {
|
||||||
final Action mergedAction = entityManager.merge(action);
|
final Action mergedAction = entityManager.merge(action);
|
||||||
|
|
||||||
if (!mergedAction.isCancelingOrCanceled()) {
|
if (!mergedAction.isCancelingOrCanceled()) {
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ import org.springframework.data.domain.Persistable;
|
|||||||
@Index(name = "sp_idx_target_03", columnList = "tenant,controller_id,assigned_distribution_set"),
|
@Index(name = "sp_idx_target_03", columnList = "tenant,controller_id,assigned_distribution_set"),
|
||||||
@Index(name = "sp_idx_target_04", columnList = "tenant,created_at"),
|
@Index(name = "sp_idx_target_04", columnList = "tenant,created_at"),
|
||||||
@Index(name = "sp_idx_target_prim", columnList = "tenant,id") }, uniqueConstraints = @UniqueConstraint(columnNames = {
|
@Index(name = "sp_idx_target_prim", columnList = "tenant,id") }, uniqueConstraints = @UniqueConstraint(columnNames = {
|
||||||
"controller_id", "tenant" }, name = "uk_tenant_controller_id") )
|
"controller_id", "tenant" }, name = "uk_tenant_controller_id"))
|
||||||
@NamedEntityGraph(name = "Target.detail", attributeNodes = { @NamedAttributeNode("tags"),
|
@NamedEntityGraph(name = "Target.detail", attributeNodes = { @NamedAttributeNode("tags"),
|
||||||
@NamedAttributeNode(value = "assignedDistributionSet"), @NamedAttributeNode(value = "targetInfo") })
|
@NamedAttributeNode(value = "assignedDistributionSet"), @NamedAttributeNode(value = "targetInfo") })
|
||||||
public class Target extends NamedEntity implements Persistable<Long> {
|
public class Target extends NamedEntity implements Persistable<Long> {
|
||||||
@@ -81,21 +81,21 @@ public class Target extends NamedEntity implements Persistable<Long> {
|
|||||||
private String controllerId;
|
private String controllerId;
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
private boolean isNew = false;
|
private boolean entityNew = false;
|
||||||
|
|
||||||
@ManyToMany(targetEntity = TargetTag.class)
|
@ManyToMany(targetEntity = TargetTag.class)
|
||||||
@JoinTable(name = "sp_target_target_tag", joinColumns = {
|
@JoinTable(name = "sp_target_target_tag", joinColumns = {
|
||||||
@JoinColumn(name = "target", foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_targtag_target") ) }, inverseJoinColumns = {
|
@JoinColumn(name = "target", foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_targtag_target")) }, inverseJoinColumns = {
|
||||||
@JoinColumn(name = "tag", foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_targtag_tag") ) })
|
@JoinColumn(name = "tag", foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_targtag_tag")) })
|
||||||
private Set<TargetTag> tags = new HashSet<>();
|
private Set<TargetTag> tags = new HashSet<>();
|
||||||
|
|
||||||
@CascadeOnDelete
|
@CascadeOnDelete
|
||||||
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true, cascade = { CascadeType.REMOVE })
|
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true, cascade = { CascadeType.REMOVE })
|
||||||
@JoinColumn(name = "target", insertable = false, updatable = false, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_act_hist_targ") )
|
@JoinColumn(name = "target", insertable = false, updatable = false, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_act_hist_targ"))
|
||||||
private final List<Action> actions = new ArrayList<>();
|
private final List<Action> actions = new ArrayList<>();
|
||||||
|
|
||||||
@ManyToOne(optional = true, fetch = FetchType.LAZY, targetEntity = DistributionSet.class)
|
@ManyToOne(optional = true, fetch = FetchType.LAZY, targetEntity = DistributionSet.class)
|
||||||
@JoinColumn(name = "assigned_distribution_set", nullable = true, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_target_assign_ds") )
|
@JoinColumn(name = "assigned_distribution_set", nullable = true, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_target_assign_ds"))
|
||||||
private DistributionSet assignedDistributionSet;
|
private DistributionSet assignedDistributionSet;
|
||||||
|
|
||||||
@CascadeOnDelete
|
@CascadeOnDelete
|
||||||
@@ -217,15 +217,15 @@ public class Target extends NamedEntity implements Persistable<Long> {
|
|||||||
@Override
|
@Override
|
||||||
@Transient
|
@Transient
|
||||||
public boolean isNew() {
|
public boolean isNew() {
|
||||||
return isNew;
|
return entityNew;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param isNew
|
* @param isNew
|
||||||
* the isNew to set
|
* the isNew to set
|
||||||
*/
|
*/
|
||||||
public void setNew(final boolean isNew) {
|
public void setNew(final boolean entityNew) {
|
||||||
this.isNew = isNew;
|
this.entityNew = entityNew;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -75,11 +75,11 @@ public class TargetInfo implements Persistable<Long>, Serializable {
|
|||||||
private Long targetId;
|
private Long targetId;
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
private boolean isNew = false;
|
private boolean entityNew = false;
|
||||||
|
|
||||||
@CascadeOnDelete
|
@CascadeOnDelete
|
||||||
@OneToOne(cascade = { CascadeType.MERGE, CascadeType.REMOVE }, fetch = FetchType.LAZY, targetEntity = Target.class)
|
@OneToOne(cascade = { CascadeType.MERGE, CascadeType.REMOVE }, fetch = FetchType.LAZY, targetEntity = Target.class)
|
||||||
@JoinColumn(name = "target_id", nullable = false, updatable = false, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_stat_targ") )
|
@JoinColumn(name = "target_id", nullable = false, updatable = false, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_stat_targ"))
|
||||||
@MapsId
|
@MapsId
|
||||||
// use deprecated annotation until HHH-8862 is fixed
|
// use deprecated annotation until HHH-8862 is fixed
|
||||||
// @SuppressWarnings( "deprecation" )
|
// @SuppressWarnings( "deprecation" )
|
||||||
@@ -100,7 +100,7 @@ public class TargetInfo implements Persistable<Long>, Serializable {
|
|||||||
private TargetUpdateStatus updateStatus = TargetUpdateStatus.UNKNOWN;
|
private TargetUpdateStatus updateStatus = TargetUpdateStatus.UNKNOWN;
|
||||||
|
|
||||||
@ManyToOne(optional = true, fetch = FetchType.LAZY)
|
@ManyToOne(optional = true, fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "installed_distribution_set", nullable = true, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_target_inst_ds") )
|
@JoinColumn(name = "installed_distribution_set", nullable = true, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_target_inst_ds"))
|
||||||
private DistributionSet installedDistributionSet;
|
private DistributionSet installedDistributionSet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -110,7 +110,7 @@ public class TargetInfo implements Persistable<Long>, Serializable {
|
|||||||
@Column(name = "attribute_value", length = 128)
|
@Column(name = "attribute_value", length = 128)
|
||||||
@MapKeyColumn(name = "attribute_key", nullable = false, length = 32)
|
@MapKeyColumn(name = "attribute_key", nullable = false, length = 32)
|
||||||
@CollectionTable(name = "sp_target_attributes", joinColumns = {
|
@CollectionTable(name = "sp_target_attributes", joinColumns = {
|
||||||
@JoinColumn(name = "target_id") }, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_attrib_target") )
|
@JoinColumn(name = "target_id") }, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_attrib_target"))
|
||||||
// use deprecated annotation until HHH-8862 is fixed
|
// use deprecated annotation until HHH-8862 is fixed
|
||||||
|
|
||||||
// @org.hibernate.annotations.ForeignKey( name = "fk_targ_attrib_target" )
|
// @org.hibernate.annotations.ForeignKey( name = "fk_targ_attrib_target" )
|
||||||
@@ -159,15 +159,15 @@ public class TargetInfo implements Persistable<Long>, Serializable {
|
|||||||
@Override
|
@Override
|
||||||
@Transient
|
@Transient
|
||||||
public boolean isNew() {
|
public boolean isNew() {
|
||||||
return isNew;
|
return entityNew;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param isNew
|
* @param isNew
|
||||||
* the isNew to set
|
* the isNew to set
|
||||||
*/
|
*/
|
||||||
public void setNew(final boolean isNew) {
|
public void setNew(final boolean entityNew) {
|
||||||
this.isNew = isNew;
|
this.entityNew = entityNew;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package org.eclipse.hawkbit;
|
|||||||
import static org.fest.assertions.api.Assertions.assertThat;
|
import static org.fest.assertions.api.Assertions.assertThat;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Properties;
|
|
||||||
|
|
||||||
import javax.persistence.EntityManager;
|
import javax.persistence.EntityManager;
|
||||||
import javax.persistence.PersistenceContext;
|
import javax.persistence.PersistenceContext;
|
||||||
@@ -31,6 +30,7 @@ import org.eclipse.hawkbit.repository.LocalArtifactRepository;
|
|||||||
import org.eclipse.hawkbit.repository.RolloutGroupManagement;
|
import org.eclipse.hawkbit.repository.RolloutGroupManagement;
|
||||||
import org.eclipse.hawkbit.repository.RolloutGroupRepository;
|
import org.eclipse.hawkbit.repository.RolloutGroupRepository;
|
||||||
import org.eclipse.hawkbit.repository.RolloutManagement;
|
import org.eclipse.hawkbit.repository.RolloutManagement;
|
||||||
|
import org.eclipse.hawkbit.repository.RolloutRepository;
|
||||||
import org.eclipse.hawkbit.repository.SoftwareManagement;
|
import org.eclipse.hawkbit.repository.SoftwareManagement;
|
||||||
import org.eclipse.hawkbit.repository.SoftwareModuleMetadataRepository;
|
import org.eclipse.hawkbit.repository.SoftwareModuleMetadataRepository;
|
||||||
import org.eclipse.hawkbit.repository.SoftwareModuleRepository;
|
import org.eclipse.hawkbit.repository.SoftwareModuleRepository;
|
||||||
@@ -195,6 +195,9 @@ public abstract class AbstractIntegrationTest implements EnvironmentAware {
|
|||||||
@Autowired
|
@Autowired
|
||||||
protected RolloutGroupRepository rolloutGroupRepository;
|
protected RolloutGroupRepository rolloutGroupRepository;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
protected RolloutRepository rolloutRepository;
|
||||||
|
|
||||||
protected MockMvc mvc;
|
protected MockMvc mvc;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@@ -213,23 +216,6 @@ public abstract class AbstractIntegrationTest implements EnvironmentAware {
|
|||||||
|
|
||||||
private static CIMySqlTestDatabase tesdatabase;
|
private static CIMySqlTestDatabase tesdatabase;
|
||||||
|
|
||||||
static {
|
|
||||||
final Properties props = System.getProperties();
|
|
||||||
|
|
||||||
// if( props.getProperty( SuiteEmbeddedConfiguration.IM_HOME ) == null )
|
|
||||||
// {
|
|
||||||
// props.setProperty( SuiteEmbeddedConfiguration.IM_HOME,
|
|
||||||
// "./src/test/resources/im" );
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.springframework.context.EnvironmentAware#setEnvironment(org.
|
|
||||||
* springframework.core.env. Environment)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setEnvironment(final Environment environment) {
|
public void setEnvironment(final Environment environment) {
|
||||||
this.environment = environment;
|
this.environment = environment;
|
||||||
@@ -292,6 +278,8 @@ public abstract class AbstractIntegrationTest implements EnvironmentAware {
|
|||||||
assertThat(softwareModuleTypeRepository.findAll()).isEmpty();
|
assertThat(softwareModuleTypeRepository.findAll()).isEmpty();
|
||||||
assertThat(distributionSetTypeRepository.findAll()).isEmpty();
|
assertThat(distributionSetTypeRepository.findAll()).isEmpty();
|
||||||
assertThat(tenantMetaDataRepository.findAll()).isEmpty();
|
assertThat(tenantMetaDataRepository.findAll()).isEmpty();
|
||||||
|
assertThat(rolloutGroupRepository.findAll()).isEmpty();
|
||||||
|
assertThat(rolloutRepository.findAll()).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ package org.eclipse.hawkbit.repository;
|
|||||||
|
|
||||||
import static org.fest.assertions.api.Assertions.assertThat;
|
import static org.fest.assertions.api.Assertions.assertThat;
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.junit.Assert.assertNull;
|
|
||||||
import static org.junit.Assert.fail;
|
import static org.junit.Assert.fail;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -312,7 +311,7 @@ public class DeploymentManagementTest extends AbstractIntegrationTest {
|
|||||||
deploymentManagement.cancelAction(assigningAction, target);
|
deploymentManagement.cancelAction(assigningAction, target);
|
||||||
assigningAction = deploymentManagement.findActionWithDetails(assigningAction.getId());
|
assigningAction = deploymentManagement.findActionWithDetails(assigningAction.getId());
|
||||||
|
|
||||||
deploymentManagement.forceQuitAction(assigningAction, target);
|
deploymentManagement.forceQuitAction(assigningAction);
|
||||||
|
|
||||||
assigningAction = deploymentManagement.findActionWithDetails(assigningAction.getId());
|
assigningAction = deploymentManagement.findActionWithDetails(assigningAction.getId());
|
||||||
|
|
||||||
@@ -350,8 +349,7 @@ public class DeploymentManagementTest extends AbstractIntegrationTest {
|
|||||||
|
|
||||||
// force quit assignment
|
// force quit assignment
|
||||||
try {
|
try {
|
||||||
deploymentManagement.forceQuitAction(assigningAction,
|
deploymentManagement.forceQuitAction(assigningAction);
|
||||||
targetManagement.findTargetByControllerID(target.getControllerId()));
|
|
||||||
fail("expected ForceQuitActionNotAllowedException");
|
fail("expected ForceQuitActionNotAllowedException");
|
||||||
} catch (final ForceQuitActionNotAllowedException ex) {
|
} catch (final ForceQuitActionNotAllowedException ex) {
|
||||||
}
|
}
|
||||||
@@ -764,13 +762,16 @@ public class DeploymentManagementTest extends AbstractIntegrationTest {
|
|||||||
distributionSetManagement.findDistributionSetByIdWithDetails(dsA.getId()).getOptLockRevision());
|
distributionSetManagement.findDistributionSetByIdWithDetails(dsA.getId()).getOptLockRevision());
|
||||||
|
|
||||||
// verifying that the assignment is correct
|
// verifying that the assignment is correct
|
||||||
assertEquals("Active target actions are wrong", 1, deploymentManagement.findActiveActionsByTarget(targ).size());
|
assertThat(deploymentManagement.findActiveActionsByTarget(targ).size()).as("Active target actions are wrong")
|
||||||
assertEquals("Target actions are wrong", 1, deploymentManagement.findActionsByTarget(targ).size());
|
.isEqualTo(1);
|
||||||
assertEquals("Target status is wrong", TargetUpdateStatus.PENDING, targ.getTargetInfo().getUpdateStatus());
|
assertThat(deploymentManagement.findActionsByTarget(targ).size()).as("Target actions are wrong").isEqualTo(1);
|
||||||
assertEquals("Assigned ds is wrong", dsA, targ.getAssignedDistributionSet());
|
assertThat(targ.getTargetInfo().getUpdateStatus()).as("UpdateStatus of target is wrong")
|
||||||
assertEquals("Active ds is wrong", dsA,
|
.isEqualTo(TargetUpdateStatus.PENDING);
|
||||||
deploymentManagement.findActiveActionsByTarget(targ).get(0).getDistributionSet());
|
assertThat(targ.getAssignedDistributionSet()).as("Assigned distribution set of target is wrong").isEqualTo(dsA);
|
||||||
assertNull("Installed ds should be null", targ.getTargetInfo().getInstalledDistributionSet());
|
assertThat(deploymentManagement.findActiveActionsByTarget(targ).get(0).getDistributionSet())
|
||||||
|
.as("Distribution set of actionn is wrong").isEqualTo(dsA);
|
||||||
|
assertThat(deploymentManagement.findActiveActionsByTarget(targ).get(0).getDistributionSet())
|
||||||
|
.as("Installed distribution set of action should be null").isNotNull();
|
||||||
|
|
||||||
final Page<Action> updAct = actionRepository.findByDistributionSet(pageReq, dsA);
|
final Page<Action> updAct = actionRepository.findByDistributionSet(pageReq, dsA);
|
||||||
final Action action = updAct.getContent().get(0);
|
final Action action = updAct.getContent().get(0);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.Callable;
|
||||||
|
|
||||||
import org.eclipse.hawkbit.AbstractIntegrationTest;
|
import org.eclipse.hawkbit.AbstractIntegrationTest;
|
||||||
import org.eclipse.hawkbit.TestDataUtil;
|
import org.eclipse.hawkbit.TestDataUtil;
|
||||||
@@ -34,6 +35,8 @@ import org.eclipse.hawkbit.repository.model.Target;
|
|||||||
import org.eclipse.hawkbit.repository.model.TargetUpdateStatus;
|
import org.eclipse.hawkbit.repository.model.TargetUpdateStatus;
|
||||||
import org.eclipse.hawkbit.repository.model.TotalTargetCountStatus;
|
import org.eclipse.hawkbit.repository.model.TotalTargetCountStatus;
|
||||||
import org.eclipse.hawkbit.repository.rsql.RSQLUtility;
|
import org.eclipse.hawkbit.repository.rsql.RSQLUtility;
|
||||||
|
import org.eclipse.hawkbit.repository.utils.MultipleInvokeHelper;
|
||||||
|
import org.eclipse.hawkbit.repository.utils.SuccessCondition;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Description;
|
import org.springframework.context.annotation.Description;
|
||||||
@@ -859,7 +862,7 @@ public class RolloutManagementTest extends AbstractIntegrationTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Description("Verify the creation and the start of a rollout in asynchronous mode.")
|
@Description("Verify the creation and the start of a rollout in asynchronous mode.")
|
||||||
public void createAndStartRolloutInAsync() {
|
public void createAndStartRolloutInAsync() throws Exception {
|
||||||
|
|
||||||
final int amountTargetsForRollout = 500;
|
final int amountTargetsForRollout = 500;
|
||||||
final int amountGroups = 5;
|
final int amountGroups = 5;
|
||||||
@@ -883,31 +886,18 @@ public class RolloutManagementTest extends AbstractIntegrationTest {
|
|||||||
|
|
||||||
myRollout = rolloutManagement.createRolloutAsync(myRollout, amountGroups, conditions);
|
myRollout = rolloutManagement.createRolloutAsync(myRollout, amountGroups, conditions);
|
||||||
|
|
||||||
int counter = 1;
|
SuccessConditionRolloutStatus conditionRolloutTargetCount = new SuccessConditionRolloutStatus(
|
||||||
int counterMax = 10;
|
RolloutStatus.READY);
|
||||||
while (!isRolloutInGivenStatus(myRollout.getId(), RolloutStatus.READY) && (counter <= counterMax)) {
|
assertThat(MultipleInvokeHelper.doWithTimeout(new RolloutStatusCallable(myRollout.getId()),
|
||||||
try {
|
conditionRolloutTargetCount, 15000, 500)).as("Rollout status").isNotNull();
|
||||||
Thread.sleep(500);
|
|
||||||
} catch (final InterruptedException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
counter++;
|
|
||||||
}
|
|
||||||
|
|
||||||
myRollout = rolloutManagement.findRolloutById(myRollout.getId());
|
myRollout = rolloutManagement.findRolloutById(myRollout.getId());
|
||||||
assertThat(myRollout.getStatus()).isEqualTo(RolloutStatus.READY);
|
assertThat(myRollout.getStatus()).isEqualTo(RolloutStatus.READY);
|
||||||
rolloutManagement.startRolloutAsync(myRollout);
|
rolloutManagement.startRolloutAsync(myRollout);
|
||||||
|
|
||||||
counter = 1;
|
conditionRolloutTargetCount = new SuccessConditionRolloutStatus(RolloutStatus.RUNNING);
|
||||||
counterMax = 10;
|
assertThat(MultipleInvokeHelper.doWithTimeout(new RolloutStatusCallable(myRollout.getId()),
|
||||||
while (!isRolloutInGivenStatus(myRollout.getId(), RolloutStatus.RUNNING) && counter <= counterMax) {
|
conditionRolloutTargetCount, 15000, 500)).as("Rollout status").isNotNull();
|
||||||
try {
|
|
||||||
Thread.sleep(500);
|
|
||||||
} catch (final InterruptedException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
counter++;
|
|
||||||
}
|
|
||||||
|
|
||||||
myRollout = rolloutManagement.findRolloutById(myRollout.getId());
|
myRollout = rolloutManagement.findRolloutById(myRollout.getId());
|
||||||
assertThat(myRollout.getStatus()).isEqualTo(RolloutStatus.RUNNING);
|
assertThat(myRollout.getStatus()).isEqualTo(RolloutStatus.RUNNING);
|
||||||
@@ -917,14 +907,6 @@ public class RolloutManagementTest extends AbstractIntegrationTest {
|
|||||||
validateRolloutActionStatus(myRollout.getId(), expectedTargetCountStatus);
|
validateRolloutActionStatus(myRollout.getId(), expectedTargetCountStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isRolloutInGivenStatus(final Long rolloutID, final RolloutStatus status) {
|
|
||||||
final Rollout myRollout = rolloutManagement.findRolloutById(rolloutID);
|
|
||||||
if (myRollout.getStatus() == status) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void validateRolloutGroupActionStatus(final RolloutGroup rolloutGroup,
|
private void validateRolloutGroupActionStatus(final RolloutGroup rolloutGroup,
|
||||||
final Map<TotalTargetCountStatus.Status, Long> expectedTargetCountStatus) {
|
final Map<TotalTargetCountStatus.Status, Long> expectedTargetCountStatus) {
|
||||||
final RolloutGroup rolloutGroupWithDetail = rolloutGroupManagement
|
final RolloutGroup rolloutGroupWithDetail = rolloutGroupManagement
|
||||||
@@ -1021,4 +1003,35 @@ public class RolloutManagementTest extends AbstractIntegrationTest {
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static class SuccessConditionRolloutStatus implements SuccessCondition<RolloutStatus> {
|
||||||
|
|
||||||
|
private final RolloutStatus rolloutStatus;
|
||||||
|
|
||||||
|
public SuccessConditionRolloutStatus(final RolloutStatus rolloutStatus) {
|
||||||
|
this.rolloutStatus = rolloutStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean success(final RolloutStatus result) {
|
||||||
|
return result.equals(rolloutStatus);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class RolloutStatusCallable implements Callable<RolloutStatus> {
|
||||||
|
|
||||||
|
final Long rolloutId;
|
||||||
|
|
||||||
|
RolloutStatusCallable(final Long rolloutId) {
|
||||||
|
this.rolloutId = rolloutId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RolloutStatus call() throws Exception {
|
||||||
|
|
||||||
|
final Rollout myRollout = rolloutManagement.findRolloutById(rolloutId);
|
||||||
|
return myRollout.getStatus();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class RSQLSoftwareModuleTypeFieldsTest extends AbstractIntegrationTest {
|
|||||||
@Test
|
@Test
|
||||||
@Description("Test filter software module test type by max")
|
@Description("Test filter software module test type by max")
|
||||||
public void testFilterByMaxAssignment() {
|
public void testFilterByMaxAssignment() {
|
||||||
assertRSQLQuery(SoftwareModuleTypeFields.MAX.name() + "==1", 3);
|
assertRSQLQuery(SoftwareModuleTypeFields.MAXASSIGNMENTS.name() + "==1", 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void assertRSQLQuery(final String rsqlParam, final long excpectedEntity) {
|
private void assertRSQLQuery(final String rsqlParam, final long excpectedEntity) {
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
||||||
|
*
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*/
|
||||||
|
package org.eclipse.hawkbit.repository.utils;
|
||||||
|
|
||||||
|
import java.util.concurrent.Callable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper to call a request multiple times regarding a given condition until
|
||||||
|
* timeout is reached.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public final class MultipleInvokeHelper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call with timeout until result is not null.
|
||||||
|
*
|
||||||
|
* @param callable
|
||||||
|
* class
|
||||||
|
* @param timeout
|
||||||
|
* value
|
||||||
|
* @param pollInterval
|
||||||
|
* value
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public static <T> T doWithTimeoutUntilResultIsNotNull(final Callable<T> callable, final long timeout,
|
||||||
|
final long pollInterval) throws Exception // NOPMD
|
||||||
|
{
|
||||||
|
return doWithTimeout(callable, new SuccessCondition<T>() {
|
||||||
|
@Override
|
||||||
|
public boolean success(final T result) {
|
||||||
|
return result != null;
|
||||||
|
};
|
||||||
|
}, timeout, pollInterval);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call with timeout.
|
||||||
|
*
|
||||||
|
* @param callable
|
||||||
|
* class
|
||||||
|
* @param successCondition
|
||||||
|
* class
|
||||||
|
* @param timeout
|
||||||
|
* value
|
||||||
|
* @param pollInterval
|
||||||
|
* value
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public static <T> T doWithTimeout(final Callable<T> callable, final SuccessCondition<T> successCondition,
|
||||||
|
final long timeout, final long pollInterval) throws Exception // NOPMD
|
||||||
|
{
|
||||||
|
|
||||||
|
if (pollInterval < 0) {
|
||||||
|
throw new IllegalArgumentException("pollInterval must non negative");
|
||||||
|
}
|
||||||
|
|
||||||
|
long duration = 0;
|
||||||
|
Exception exception = null;
|
||||||
|
T returnValue = null;
|
||||||
|
while (untilTimeoutReached(timeout, duration)) {
|
||||||
|
try {
|
||||||
|
returnValue = callable.call();
|
||||||
|
// clear exception
|
||||||
|
exception = null;
|
||||||
|
} catch (final Exception ex) {
|
||||||
|
exception = ex;
|
||||||
|
}
|
||||||
|
Thread.sleep(pollInterval);
|
||||||
|
duration += pollInterval > 0 ? pollInterval : 1;
|
||||||
|
if (exception == null && successCondition.success(returnValue)) {
|
||||||
|
return returnValue;
|
||||||
|
} else {
|
||||||
|
returnValue = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (exception != null) {
|
||||||
|
throw exception;
|
||||||
|
}
|
||||||
|
return returnValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean untilTimeoutReached(final long timeout, final long duration) {
|
||||||
|
return duration <= timeout || timeout < 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
||||||
|
*
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*/
|
||||||
|
package org.eclipse.hawkbit.repository.utils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SuccessCondition Interface.
|
||||||
|
*
|
||||||
|
* @param <T>
|
||||||
|
* type of the value to get verified
|
||||||
|
*/
|
||||||
|
public interface SuccessCondition<T> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The implementation of the success condition.
|
||||||
|
*
|
||||||
|
* @param result
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
boolean success(final T result);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -64,7 +64,7 @@ public class DistributionSetTypeResource implements DistributionSetTypeRestApi {
|
|||||||
|
|
||||||
final int sanitizedOffsetParam = PagingUtility.sanitizeOffsetParam(pagingOffsetParam);
|
final int sanitizedOffsetParam = PagingUtility.sanitizeOffsetParam(pagingOffsetParam);
|
||||||
final int sanitizedLimitParam = PagingUtility.sanitizePageLimitParam(pagingLimitParam);
|
final int sanitizedLimitParam = PagingUtility.sanitizePageLimitParam(pagingLimitParam);
|
||||||
final Sort sorting = PagingUtility.sanitizeSoftwareModuleSortParam(sortParam);
|
final Sort sorting = PagingUtility.sanitizeDistributionSetTypeSortParam(sortParam);
|
||||||
|
|
||||||
final Pageable pageable = new OffsetBasedPageRequest(sanitizedOffsetParam, sanitizedLimitParam, sorting);
|
final Pageable pageable = new OffsetBasedPageRequest(sanitizedOffsetParam, sanitizedLimitParam, sorting);
|
||||||
|
|
||||||
|
|||||||
@@ -12,10 +12,12 @@ import org.eclipse.hawkbit.repository.ActionFields;
|
|||||||
import org.eclipse.hawkbit.repository.ActionStatusFields;
|
import org.eclipse.hawkbit.repository.ActionStatusFields;
|
||||||
import org.eclipse.hawkbit.repository.DistributionSetFields;
|
import org.eclipse.hawkbit.repository.DistributionSetFields;
|
||||||
import org.eclipse.hawkbit.repository.DistributionSetMetadataFields;
|
import org.eclipse.hawkbit.repository.DistributionSetMetadataFields;
|
||||||
|
import org.eclipse.hawkbit.repository.DistributionSetTypeFields;
|
||||||
import org.eclipse.hawkbit.repository.RolloutFields;
|
import org.eclipse.hawkbit.repository.RolloutFields;
|
||||||
import org.eclipse.hawkbit.repository.RolloutGroupFields;
|
import org.eclipse.hawkbit.repository.RolloutGroupFields;
|
||||||
import org.eclipse.hawkbit.repository.SoftwareModuleFields;
|
import org.eclipse.hawkbit.repository.SoftwareModuleFields;
|
||||||
import org.eclipse.hawkbit.repository.SoftwareModuleMetadataFields;
|
import org.eclipse.hawkbit.repository.SoftwareModuleMetadataFields;
|
||||||
|
import org.eclipse.hawkbit.repository.SoftwareModuleTypeFields;
|
||||||
import org.eclipse.hawkbit.repository.TargetFields;
|
import org.eclipse.hawkbit.repository.TargetFields;
|
||||||
import org.springframework.data.domain.Sort;
|
import org.springframework.data.domain.Sort;
|
||||||
import org.springframework.data.domain.Sort.Direction;
|
import org.springframework.data.domain.Sort.Direction;
|
||||||
@@ -48,103 +50,92 @@ public final class PagingUtility {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Sort sanitizeTargetSortParam(final String sortParam) {
|
static Sort sanitizeTargetSortParam(final String sortParam) {
|
||||||
final Sort sorting;
|
if (sortParam == null) {
|
||||||
if (sortParam != null) {
|
// default
|
||||||
sorting = new Sort(SortUtility.parse(TargetFields.class, sortParam));
|
return new Sort(Direction.ASC, TargetFields.NAME.getFieldName());
|
||||||
} else {
|
|
||||||
// default sort
|
|
||||||
sorting = new Sort(Direction.ASC, TargetFields.NAME.getFieldName());
|
|
||||||
}
|
}
|
||||||
return sorting;
|
return new Sort(SortUtility.parse(TargetFields.class, sortParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
static Sort sanitizeSoftwareModuleSortParam(final String sortParam) {
|
static Sort sanitizeSoftwareModuleSortParam(final String sortParam) {
|
||||||
final Sort sorting;
|
if (sortParam == null) {
|
||||||
if (sortParam != null) {
|
// default
|
||||||
sorting = new Sort(SortUtility.parse(SoftwareModuleFields.class, sortParam));
|
return new Sort(Direction.ASC, SoftwareModuleFields.NAME.getFieldName());
|
||||||
} else {
|
|
||||||
// default sort
|
|
||||||
sorting = new Sort(Direction.ASC, SoftwareModuleFields.NAME.getFieldName());
|
|
||||||
}
|
}
|
||||||
return sorting;
|
return new Sort(SortUtility.parse(SoftwareModuleFields.class, sortParam));
|
||||||
|
}
|
||||||
|
|
||||||
|
static Sort sanitizeSoftwareModuleTypeSortParam(final String sortParam) {
|
||||||
|
if (sortParam == null) {
|
||||||
|
// default
|
||||||
|
return new Sort(Direction.ASC, SoftwareModuleTypeFields.NAME.getFieldName());
|
||||||
|
}
|
||||||
|
return new Sort(SortUtility.parse(SoftwareModuleTypeFields.class, sortParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
static Sort sanitizeDistributionSetSortParam(final String sortParam) {
|
static Sort sanitizeDistributionSetSortParam(final String sortParam) {
|
||||||
final Sort sorting;
|
if (sortParam == null) {
|
||||||
if (sortParam != null) {
|
// default
|
||||||
sorting = new Sort(SortUtility.parse(DistributionSetFields.class, sortParam));
|
return new Sort(Direction.ASC, DistributionSetFields.NAME.getFieldName());
|
||||||
} else {
|
|
||||||
// default sort
|
|
||||||
sorting = new Sort(Direction.ASC, DistributionSetFields.NAME.getFieldName());
|
|
||||||
}
|
}
|
||||||
return sorting;
|
return new Sort(SortUtility.parse(DistributionSetFields.class, sortParam));
|
||||||
|
}
|
||||||
|
|
||||||
|
static Sort sanitizeDistributionSetTypeSortParam(final String sortParam) {
|
||||||
|
if (sortParam == null) {
|
||||||
|
// default
|
||||||
|
return new Sort(Direction.ASC, DistributionSetTypeFields.NAME.getFieldName());
|
||||||
|
}
|
||||||
|
return new Sort(SortUtility.parse(DistributionSetTypeFields.class, sortParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
static Sort sanitizeActionSortParam(final String sortParam) {
|
static Sort sanitizeActionSortParam(final String sortParam) {
|
||||||
final Sort sorting;
|
if (sortParam == null) {
|
||||||
if (sortParam != null) {
|
|
||||||
sorting = new Sort(SortUtility.parse(ActionFields.class, sortParam));
|
|
||||||
} else {
|
|
||||||
// default sort is DESC in case of action to match behavior
|
// default sort is DESC in case of action to match behavior
|
||||||
// of management UI (last entry on top)
|
// of management UI (last entry on top)
|
||||||
sorting = new Sort(Direction.DESC, ActionFields.ID.getFieldName());
|
return new Sort(Direction.DESC, ActionFields.ID.getFieldName());
|
||||||
}
|
}
|
||||||
return sorting;
|
return new Sort(SortUtility.parse(ActionFields.class, sortParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
static Sort sanitizeActionStatusSortParam(final String sortParam) {
|
static Sort sanitizeActionStatusSortParam(final String sortParam) {
|
||||||
final Sort sorting;
|
if (sortParam == null) {
|
||||||
if (sortParam != null) {
|
|
||||||
sorting = new Sort(SortUtility.parse(ActionStatusFields.class, sortParam));
|
|
||||||
} else {
|
|
||||||
// default sort is DESC in case of action status to match behavior
|
// default sort is DESC in case of action status to match behavior
|
||||||
// of management UI (last entry on top)
|
// of management UI (last entry on top)
|
||||||
sorting = new Sort(Direction.DESC, ActionStatusFields.ID.getFieldName());
|
return new Sort(Direction.DESC, ActionStatusFields.ID.getFieldName());
|
||||||
}
|
}
|
||||||
return sorting;
|
return new Sort(SortUtility.parse(ActionStatusFields.class, sortParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
static Sort sanitizeDistributionSetMetadataSortParam(final String sortParam) {
|
static Sort sanitizeDistributionSetMetadataSortParam(final String sortParam) {
|
||||||
final Sort sorting;
|
if (sortParam == null) {
|
||||||
if (sortParam != null) {
|
// default
|
||||||
sorting = new Sort(SortUtility.parse(DistributionSetMetadataFields.class, sortParam));
|
return new Sort(Direction.ASC, DistributionSetMetadataFields.KEY.getFieldName());
|
||||||
} else {
|
|
||||||
// default sort
|
|
||||||
sorting = new Sort(Direction.ASC, DistributionSetMetadataFields.KEY.getFieldName());
|
|
||||||
}
|
}
|
||||||
return sorting;
|
return new Sort(SortUtility.parse(DistributionSetMetadataFields.class, sortParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
static Sort sanitizeSoftwareModuleMetadataSortParam(final String sortParam) {
|
static Sort sanitizeSoftwareModuleMetadataSortParam(final String sortParam) {
|
||||||
final Sort sorting;
|
if (sortParam == null) {
|
||||||
if (sortParam != null) {
|
// default
|
||||||
sorting = new Sort(SortUtility.parse(SoftwareModuleMetadataFields.class, sortParam));
|
return new Sort(Direction.ASC, SoftwareModuleMetadataFields.KEY.getFieldName());
|
||||||
} else {
|
|
||||||
// default sort
|
|
||||||
sorting = new Sort(Direction.ASC, SoftwareModuleMetadataFields.KEY.getFieldName());
|
|
||||||
}
|
}
|
||||||
return sorting;
|
return new Sort(SortUtility.parse(SoftwareModuleMetadataFields.class, sortParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
static Sort sanitizeRolloutSortParam(final String sortParam) {
|
static Sort sanitizeRolloutSortParam(final String sortParam) {
|
||||||
final Sort sorting;
|
if (sortParam == null) {
|
||||||
if (sortParam != null) {
|
// default
|
||||||
sorting = new Sort(SortUtility.parse(RolloutFields.class, sortParam));
|
return new Sort(Direction.ASC, RolloutFields.NAME.getFieldName());
|
||||||
} else {
|
|
||||||
// default sort
|
|
||||||
sorting = new Sort(Direction.ASC, RolloutFields.NAME.getFieldName());
|
|
||||||
}
|
}
|
||||||
return sorting;
|
return new Sort(SortUtility.parse(RolloutFields.class, sortParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
static Sort sanitizeRolloutGroupSortParam(final String sortParam) {
|
static Sort sanitizeRolloutGroupSortParam(final String sortParam) {
|
||||||
final Sort sorting;
|
if (sortParam == null) {
|
||||||
if (sortParam != null) {
|
// default
|
||||||
sorting = new Sort(SortUtility.parse(RolloutGroupFields.class, sortParam));
|
return new Sort(Direction.ASC, RolloutGroupFields.NAME.getFieldName());
|
||||||
} else {
|
|
||||||
// default sort
|
|
||||||
sorting = new Sort(Direction.ASC, RolloutGroupFields.NAME.getFieldName());
|
|
||||||
}
|
}
|
||||||
return sorting;
|
return new Sort(SortUtility.parse(RolloutGroupFields.class, sortParam));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public class SoftwareModuleTypeResource implements SoftwareModuleTypeRestApi {
|
|||||||
|
|
||||||
final int sanitizedOffsetParam = PagingUtility.sanitizeOffsetParam(pagingOffsetParam);
|
final int sanitizedOffsetParam = PagingUtility.sanitizeOffsetParam(pagingOffsetParam);
|
||||||
final int sanitizedLimitParam = PagingUtility.sanitizePageLimitParam(pagingLimitParam);
|
final int sanitizedLimitParam = PagingUtility.sanitizePageLimitParam(pagingLimitParam);
|
||||||
final Sort sorting = PagingUtility.sanitizeSoftwareModuleSortParam(sortParam);
|
final Sort sorting = PagingUtility.sanitizeSoftwareModuleTypeSortParam(sortParam);
|
||||||
|
|
||||||
final Pageable pageable = new OffsetBasedPageRequest(sanitizedOffsetParam, sanitizedLimitParam, sorting);
|
final Pageable pageable = new OffsetBasedPageRequest(sanitizedOffsetParam, sanitizedLimitParam, sorting);
|
||||||
|
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ public class TargetResource implements TargetRestApi {
|
|||||||
final Action action = findActionWithExceptionIfNotFound(actionId);
|
final Action action = findActionWithExceptionIfNotFound(actionId);
|
||||||
|
|
||||||
if (force) {
|
if (force) {
|
||||||
this.deploymentManagement.forceQuitAction(action, target);
|
this.deploymentManagement.forceQuitAction(action);
|
||||||
} else {
|
} else {
|
||||||
this.deploymentManagement.cancelAction(action, target);
|
this.deploymentManagement.cancelAction(action, target);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,6 +89,43 @@ public class DistributionSetTypeResourceTest extends AbstractIntegrationTest {
|
|||||||
.andExpect(jsonPath("$total", equalTo(4)));
|
.andExpect(jsonPath("$total", equalTo(4)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@WithUser(principal = "uploadTester", allSpPermissions = true)
|
||||||
|
@Description("Checks the correct behaviour of /rest/v1/distributionsettypes GET requests with sorting by KEY.")
|
||||||
|
public void getDistributionSetTypesSortedByKey() throws Exception {
|
||||||
|
|
||||||
|
DistributionSetType testType = distributionSetManagement
|
||||||
|
.createDistributionSetType(new DistributionSetType("zzzzz", "TestName123", "Desc123"));
|
||||||
|
testType.setDescription("Desc1234");
|
||||||
|
testType = distributionSetManagement.updateDistributionSetType(testType);
|
||||||
|
|
||||||
|
// descending
|
||||||
|
mvc.perform(get("/rest/v1/distributionsettypes").accept(MediaType.APPLICATION_JSON)
|
||||||
|
.param(RestConstants.REQUEST_PARAMETER_SORTING, "KEY:DESC")).andDo(MockMvcResultPrinter.print())
|
||||||
|
.andExpect(status().isOk()).andExpect(content().contentType(MediaType.APPLICATION_JSON))
|
||||||
|
.andExpect(jsonPath("$content.[0].id", equalTo(testType.getId().intValue())))
|
||||||
|
.andExpect(jsonPath("$content.[0].name", equalTo("TestName123")))
|
||||||
|
.andExpect(jsonPath("$content.[0].description", equalTo("Desc1234")))
|
||||||
|
.andExpect(jsonPath("$content.[0].createdBy", equalTo("uploadTester")))
|
||||||
|
.andExpect(jsonPath("$content.[0].createdAt", equalTo(testType.getCreatedAt())))
|
||||||
|
.andExpect(jsonPath("$content.[0].lastModifiedBy", equalTo("uploadTester")))
|
||||||
|
.andExpect(jsonPath("$content.[0].lastModifiedAt", equalTo(testType.getLastModifiedAt())))
|
||||||
|
.andExpect(jsonPath("$content.[0].key", equalTo("zzzzz"))).andExpect(jsonPath("$total", equalTo(4)));
|
||||||
|
|
||||||
|
// ascending
|
||||||
|
mvc.perform(get("/rest/v1/distributionsettypes").accept(MediaType.APPLICATION_JSON)
|
||||||
|
.param(RestConstants.REQUEST_PARAMETER_SORTING, "KEY:ASC")).andDo(MockMvcResultPrinter.print())
|
||||||
|
.andExpect(status().isOk()).andExpect(content().contentType(MediaType.APPLICATION_JSON))
|
||||||
|
.andExpect(jsonPath("$content.[3].id", equalTo(testType.getId().intValue())))
|
||||||
|
.andExpect(jsonPath("$content.[3].name", equalTo("TestName123")))
|
||||||
|
.andExpect(jsonPath("$content.[3].description", equalTo("Desc1234")))
|
||||||
|
.andExpect(jsonPath("$content.[3].createdBy", equalTo("uploadTester")))
|
||||||
|
.andExpect(jsonPath("$content.[3].createdAt", equalTo(testType.getCreatedAt())))
|
||||||
|
.andExpect(jsonPath("$content.[3].lastModifiedBy", equalTo("uploadTester")))
|
||||||
|
.andExpect(jsonPath("$content.[3].lastModifiedAt", equalTo(testType.getLastModifiedAt())))
|
||||||
|
.andExpect(jsonPath("$content.[3].key", equalTo("zzzzz"))).andExpect(jsonPath("$total", equalTo(4)));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@WithUser(principal = "uploadTester", allSpPermissions = true)
|
@WithUser(principal = "uploadTester", allSpPermissions = true)
|
||||||
@Description("Checks the correct behaviour of /rest/v1/distributionsettypes POST requests.")
|
@Description("Checks the correct behaviour of /rest/v1/distributionsettypes POST requests.")
|
||||||
|
|||||||
@@ -453,8 +453,8 @@ public class RolloutResourceTest extends AbstractIntegrationTest {
|
|||||||
.andExpect(status().isOk());
|
.andExpect(status().isOk());
|
||||||
|
|
||||||
// check if running
|
// check if running
|
||||||
assertThat(doWithTimeout(() -> getRollout(rollout.getId()), result -> success(result), 5000, 100)).isNotNull();
|
assertThat(doWithTimeout(() -> getRollout(rollout.getId()), result -> success(result), 60_000, 100))
|
||||||
|
.isNotNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -90,6 +90,46 @@ public class SoftwareModuleTypeResourceTest extends AbstractIntegrationTest {
|
|||||||
.andExpect(jsonPath("$total", equalTo(4)));
|
.andExpect(jsonPath("$total", equalTo(4)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@WithUser(principal = "uploadTester", allSpPermissions = true)
|
||||||
|
@Description("Checks the correct behaviour of /rest/v1/softwaremoduletypes GET requests with sorting by MAXASSIGNMENTS field.")
|
||||||
|
public void getSoftwareModuleTypesSortedByMaxAssignments() throws Exception {
|
||||||
|
SoftwareModuleType testType = softwareManagement
|
||||||
|
.createSoftwareModuleType(new SoftwareModuleType("test123", "TestName123", "Desc123", 5));
|
||||||
|
testType.setDescription("Desc1234");
|
||||||
|
testType = softwareManagement.updateSoftwareModuleType(testType);
|
||||||
|
|
||||||
|
// descending
|
||||||
|
mvc.perform(get("/rest/v1/softwaremoduletypes").accept(MediaType.APPLICATION_JSON)
|
||||||
|
.param(RestConstants.REQUEST_PARAMETER_SORTING, "MAXASSIGNMENTS:DESC"))
|
||||||
|
.andDo(MockMvcResultPrinter.print()).andExpect(status().isOk())
|
||||||
|
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
|
||||||
|
.andExpect(jsonPath("$content.[0].id", equalTo(testType.getId().intValue())))
|
||||||
|
.andExpect(jsonPath("$content.[0].name", equalTo("TestName123")))
|
||||||
|
.andExpect(jsonPath("$content.[0].description", equalTo("Desc1234")))
|
||||||
|
.andExpect(jsonPath("$content.[0].createdBy", equalTo("uploadTester")))
|
||||||
|
.andExpect(jsonPath("$content.[0].createdAt", equalTo(testType.getCreatedAt())))
|
||||||
|
.andExpect(jsonPath("$content.[0].lastModifiedBy", equalTo("uploadTester")))
|
||||||
|
.andExpect(jsonPath("$content.[0].lastModifiedAt", equalTo(testType.getLastModifiedAt())))
|
||||||
|
.andExpect(jsonPath("$content.[0].maxAssignments", equalTo(5)))
|
||||||
|
.andExpect(jsonPath("$content.[0].key", equalTo("test123"))).andExpect(jsonPath("$total", equalTo(4)));
|
||||||
|
|
||||||
|
// ascending
|
||||||
|
mvc.perform(get("/rest/v1/softwaremoduletypes").accept(MediaType.APPLICATION_JSON)
|
||||||
|
.param(RestConstants.REQUEST_PARAMETER_SORTING, "MAXASSIGNMENTS:ASC"))
|
||||||
|
.andDo(MockMvcResultPrinter.print()).andExpect(status().isOk())
|
||||||
|
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
|
||||||
|
.andExpect(jsonPath("$content.[3].id", equalTo(testType.getId().intValue())))
|
||||||
|
.andExpect(jsonPath("$content.[3].name", equalTo("TestName123")))
|
||||||
|
.andExpect(jsonPath("$content.[3].description", equalTo("Desc1234")))
|
||||||
|
.andExpect(jsonPath("$content.[3].createdBy", equalTo("uploadTester")))
|
||||||
|
.andExpect(jsonPath("$content.[3].createdAt", equalTo(testType.getCreatedAt())))
|
||||||
|
.andExpect(jsonPath("$content.[3].lastModifiedBy", equalTo("uploadTester")))
|
||||||
|
.andExpect(jsonPath("$content.[3].lastModifiedAt", equalTo(testType.getLastModifiedAt())))
|
||||||
|
.andExpect(jsonPath("$content.[3].maxAssignments", equalTo(5)))
|
||||||
|
.andExpect(jsonPath("$content.[3].key", equalTo("test123"))).andExpect(jsonPath("$total", equalTo(4)));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@WithUser(principal = "uploadTester", allSpPermissions = true)
|
@WithUser(principal = "uploadTester", allSpPermissions = true)
|
||||||
@Description("Checks the correct behaviour of /rest/v1/softwaremoduletypes POST requests.")
|
@Description("Checks the correct behaviour of /rest/v1/softwaremoduletypes POST requests.")
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public class HawkbitUI extends DefaultHawkbitUI implements DetachListener {
|
|||||||
|
|
||||||
private static final String EMPTY_VIEW = "";
|
private static final String EMPTY_VIEW = "";
|
||||||
|
|
||||||
private EventPushStrategy pushStrategy;
|
private transient EventPushStrategy pushStrategy;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SpringViewProvider viewProvider;
|
private SpringViewProvider viewProvider;
|
||||||
|
|||||||
@@ -44,16 +44,16 @@ public class UiProperties {
|
|||||||
/**
|
/**
|
||||||
* Demo tenant.
|
* Demo tenant.
|
||||||
*/
|
*/
|
||||||
private String tenant = "DEFAULT";
|
private String tenant = "";
|
||||||
/**
|
/**
|
||||||
* Demo user name.
|
* Demo user name.
|
||||||
*/
|
*/
|
||||||
private String user = "admin";
|
private String user = "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Demo user password.
|
* Demo user password.
|
||||||
*/
|
*/
|
||||||
private String password = "admin";
|
private String password = "";
|
||||||
|
|
||||||
public String getTenant() {
|
public String getTenant() {
|
||||||
return tenant;
|
return tenant;
|
||||||
@@ -82,10 +82,13 @@ public class UiProperties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Links to potentially other systems (e.g. support, user management etc.).
|
* Links to potentially other systems (e.g. support, user management,
|
||||||
|
* documentation etc.).
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static class Links {
|
public static class Links {
|
||||||
|
private final Documentation documentation = new Documentation();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Link to product support.
|
* Link to product support.
|
||||||
*/
|
*/
|
||||||
@@ -96,6 +99,121 @@ public class UiProperties {
|
|||||||
*/
|
*/
|
||||||
private String requestAccount = "";
|
private String requestAccount = "";
|
||||||
|
|
||||||
|
public Documentation getDocumentation() {
|
||||||
|
return documentation;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configuration of UI documentation links.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static class Documentation {
|
||||||
|
/**
|
||||||
|
* Link to root of documentation and user guides.
|
||||||
|
*/
|
||||||
|
private String root = "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Link to documentation of deployment view.
|
||||||
|
*/
|
||||||
|
private String deploymentView = "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Link to documentation of distribution view.
|
||||||
|
*/
|
||||||
|
private String distributionView = "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Link to documentation of upload view.
|
||||||
|
*/
|
||||||
|
private String uploadView = "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Link to documentation of system configuration view.
|
||||||
|
*/
|
||||||
|
private String systemConfigurationView = "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Link to security related documentation.
|
||||||
|
*/
|
||||||
|
private String security = "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Link to target filter view.
|
||||||
|
*/
|
||||||
|
private String targetfilterView = "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Link to documentation of rollout view.
|
||||||
|
*/
|
||||||
|
private String rolloutView = "";
|
||||||
|
|
||||||
|
public String getDeploymentView() {
|
||||||
|
return deploymentView;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeploymentView(final String deploymentView) {
|
||||||
|
this.deploymentView = deploymentView;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDistributionView() {
|
||||||
|
return distributionView;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistributionView(final String distributionView) {
|
||||||
|
this.distributionView = distributionView;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUploadView() {
|
||||||
|
return uploadView;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUploadView(final String uploadView) {
|
||||||
|
this.uploadView = uploadView;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSystemConfigurationView() {
|
||||||
|
return systemConfigurationView;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSystemConfigurationView(final String systemConfigurationView) {
|
||||||
|
this.systemConfigurationView = systemConfigurationView;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSecurity() {
|
||||||
|
return security;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSecurity(final String security) {
|
||||||
|
this.security = security;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTargetfilterView() {
|
||||||
|
return targetfilterView;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTargetfilterView(final String targetfilterView) {
|
||||||
|
this.targetfilterView = targetfilterView;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRolloutView() {
|
||||||
|
return rolloutView;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRolloutView(final String rolloutView) {
|
||||||
|
this.rolloutView = rolloutView;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRoot() {
|
||||||
|
return root;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoot(final String root) {
|
||||||
|
this.root = root;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Link to user management.
|
* Link to user management.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -47,10 +47,6 @@ import com.vaadin.ui.themes.ValoTheme;
|
|||||||
* Approach to create necessary UI component which are decorated Aspect of fine
|
* Approach to create necessary UI component which are decorated Aspect of fine
|
||||||
* tuning the component or extending the component is separated.
|
* tuning the component or extending the component is separated.
|
||||||
*
|
*
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public final class SPUIComponentProvider {
|
public final class SPUIComponentProvider {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(SPUIComponentProvider.class);
|
private static final Logger LOG = LoggerFactory.getLogger(SPUIComponentProvider.class);
|
||||||
@@ -411,4 +407,22 @@ public final class SPUIComponentProvider {
|
|||||||
return link;
|
return link;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates help/documentation links from within management UI.
|
||||||
|
*
|
||||||
|
* @param uri
|
||||||
|
* to documentation site
|
||||||
|
*
|
||||||
|
* @return generated link
|
||||||
|
*/
|
||||||
|
public static Link getHelpLink(final String uri) {
|
||||||
|
|
||||||
|
final Link link = new Link("", new ExternalResource(uri));
|
||||||
|
link.setTargetName("_blank");
|
||||||
|
link.setIcon(FontAwesome.QUESTION_CIRCLE);
|
||||||
|
link.setDescription("Documentation");
|
||||||
|
return link;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,79 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
|
||||||
*
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
|
||||||
*/
|
|
||||||
package org.eclipse.hawkbit.ui.documentation;
|
|
||||||
|
|
||||||
import com.vaadin.server.ExternalResource;
|
|
||||||
import com.vaadin.server.FontAwesome;
|
|
||||||
import com.vaadin.ui.Link;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* enum declaration which contains all documentation links to the documenation
|
|
||||||
* which can be used to create the links to a specific documentation from a UI
|
|
||||||
* view.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public enum DocumentationPageLink {
|
|
||||||
|
|
||||||
// Root URL to index.html
|
|
||||||
ROOT_VIEW(""),
|
|
||||||
|
|
||||||
// userguide/deployment
|
|
||||||
DEPLOYMENT_VIEW("deployment.html", DocumentationUtil.USERGUIDE),
|
|
||||||
|
|
||||||
// userguide/distribution
|
|
||||||
DISTRIBUTION_VIEW("distribution.html", DocumentationUtil.USERGUIDE),
|
|
||||||
|
|
||||||
// userguide/upload
|
|
||||||
UPLOAD_VIEW("upload.html", DocumentationUtil.USERGUIDE),
|
|
||||||
|
|
||||||
// userguide/statistics
|
|
||||||
STATISTICS_VIEW("statistics.html", DocumentationUtil.USERGUIDE),
|
|
||||||
|
|
||||||
// userguide
|
|
||||||
SYSTEM_CONFIGURATION_VIEW("systemconfiguration.html", DocumentationUtil.USERGUIDE),
|
|
||||||
|
|
||||||
// authentication/security
|
|
||||||
TARGET_SECURITY_TOKEN("security.html", DocumentationUtil.DEVELOPERGUIDE, "concepts"),
|
|
||||||
|
|
||||||
// userguide/targetfilter
|
|
||||||
TARGET_FILTER_VIEW("targetfilter.html", DocumentationUtil.USERGUIDE),
|
|
||||||
|
|
||||||
// userguide/ROLLOUT
|
|
||||||
ROLLOUT_VIEW("rollout.html", DocumentationUtil.USERGUIDE);
|
|
||||||
|
|
||||||
private static final String ROOT_PATH = "../documentation";
|
|
||||||
|
|
||||||
private final String[] path;
|
|
||||||
private final String page;
|
|
||||||
|
|
||||||
private DocumentationPageLink(final String page, final String... path) {
|
|
||||||
this.path = path;
|
|
||||||
this.page = page;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPath() {
|
|
||||||
final StringBuilder builder = new StringBuilder(ROOT_PATH);
|
|
||||||
for (final String string : path) {
|
|
||||||
builder.append('/').append(string);
|
|
||||||
}
|
|
||||||
return builder.append('/').append(page).toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Link getLink() {
|
|
||||||
final Link link = new Link("", new ExternalResource(getPath()));
|
|
||||||
link.setTargetName("_blank");
|
|
||||||
link.setIcon(FontAwesome.QUESTION_CIRCLE);
|
|
||||||
link.setDescription("Documentation");
|
|
||||||
return link;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
|
||||||
*
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
|
||||||
*/
|
|
||||||
package org.eclipse.hawkbit.ui.documentation;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constants for documentation navigation.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public final class DocumentationUtil {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Navigation string to introduction folder.
|
|
||||||
*/
|
|
||||||
public static final String INTRODUCTION = "introduction";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Navigation string to userguide folder.
|
|
||||||
*/
|
|
||||||
public static final String USERGUIDE = "userguide";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Navigation string to developerguide folder.
|
|
||||||
*/
|
|
||||||
public static final String DEVELOPERGUIDE = "developerguide";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Navigation string to releasenotes folder.
|
|
||||||
*/
|
|
||||||
public static final String RELEASENOTES = "releasenotes";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Navigation string to glossary folder.
|
|
||||||
*/
|
|
||||||
public static final String GLOSSARY = "glossary";
|
|
||||||
|
|
||||||
private DocumentationUtil() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -16,10 +16,10 @@ import javax.annotation.PreDestroy;
|
|||||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||||
import org.eclipse.hawkbit.repository.TargetFilterQueryManagement;
|
import org.eclipse.hawkbit.repository.TargetFilterQueryManagement;
|
||||||
import org.eclipse.hawkbit.repository.model.TargetFilterQuery;
|
import org.eclipse.hawkbit.repository.model.TargetFilterQuery;
|
||||||
|
import org.eclipse.hawkbit.ui.UiProperties;
|
||||||
import org.eclipse.hawkbit.ui.components.SPUIButton;
|
import org.eclipse.hawkbit.ui.components.SPUIButton;
|
||||||
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||||
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorder;
|
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorder;
|
||||||
import org.eclipse.hawkbit.ui.documentation.DocumentationPageLink;
|
|
||||||
import org.eclipse.hawkbit.ui.filtermanagement.event.CustomFilterUIEvent;
|
import org.eclipse.hawkbit.ui.filtermanagement.event.CustomFilterUIEvent;
|
||||||
import org.eclipse.hawkbit.ui.filtermanagement.state.FilterManagementUIState;
|
import org.eclipse.hawkbit.ui.filtermanagement.state.FilterManagementUIState;
|
||||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||||
@@ -86,6 +86,9 @@ public class CreateOrUpdateFilterHeader extends VerticalLayout implements Button
|
|||||||
@Autowired
|
@Autowired
|
||||||
private UINotification notification;
|
private UINotification notification;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private transient UiProperties uiProperties;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@Qualifier("uiExecutor")
|
@Qualifier("uiExecutor")
|
||||||
private transient Executor executor;
|
private transient Executor executor;
|
||||||
@@ -212,7 +215,7 @@ public class CreateOrUpdateFilterHeader extends VerticalLayout implements Button
|
|||||||
validationIcon = createStatusIcon();
|
validationIcon = createStatusIcon();
|
||||||
saveButton = createSaveButton();
|
saveButton = createSaveButton();
|
||||||
|
|
||||||
helpLink = DocumentationPageLink.TARGET_FILTER_VIEW.getLink();
|
helpLink = SPUIComponentProvider.getHelpLink(uiProperties.getLinks().getDocumentation().getTargetfilterView());
|
||||||
|
|
||||||
closeIcon = createSearchResetIcon();
|
closeIcon = createSearchResetIcon();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import org.eclipse.hawkbit.im.authentication.MultitenancyIndicator;
|
|||||||
import org.eclipse.hawkbit.im.authentication.TenantUserPasswordAuthenticationToken;
|
import org.eclipse.hawkbit.im.authentication.TenantUserPasswordAuthenticationToken;
|
||||||
import org.eclipse.hawkbit.ui.UiProperties;
|
import org.eclipse.hawkbit.ui.UiProperties;
|
||||||
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||||
import org.eclipse.hawkbit.ui.documentation.DocumentationPageLink;
|
|
||||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@@ -53,9 +52,6 @@ import com.vaadin.ui.themes.ValoTheme;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Login view for login credentials.
|
* Login view for login credentials.
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@SpringView(name = "")
|
@SpringView(name = "")
|
||||||
@UIScope
|
@UIScope
|
||||||
@@ -228,16 +224,20 @@ public class LoginView extends VerticalLayout implements View {
|
|||||||
links.addStyleName("links");
|
links.addStyleName("links");
|
||||||
final String linkStyle = "v-link";
|
final String linkStyle = "v-link";
|
||||||
|
|
||||||
final Link docuLink = SPUIComponentProvider.getLink(SPUIComponetIdProvider.LINK_DOCUMENATION,
|
if (!uiProperties.getLinks().getDocumentation().getRoot().isEmpty()) {
|
||||||
i18n.get("link.documentation.name"), "../" + DocumentationPageLink.ROOT_VIEW.getPath(),
|
final Link docuLink = SPUIComponentProvider.getLink(SPUIComponetIdProvider.LINK_DOCUMENATION,
|
||||||
FontAwesome.QUESTION_CIRCLE, "_blank", linkStyle, true);
|
i18n.get("link.documentation.name"), uiProperties.getLinks().getDocumentation().getRoot(),
|
||||||
links.addComponent(docuLink);
|
FontAwesome.QUESTION_CIRCLE, "_blank", linkStyle, true);
|
||||||
docuLink.addStyleName(ValoTheme.LINK_SMALL);
|
links.addComponent(docuLink);
|
||||||
|
docuLink.addStyleName(ValoTheme.LINK_SMALL);
|
||||||
|
}
|
||||||
|
|
||||||
final Link demoLink = SPUIComponentProvider.getLink(SPUIComponetIdProvider.LINK_DEMO,
|
if (!uiProperties.getDemo().getUser().isEmpty()) {
|
||||||
i18n.get("link.demo.name"), "?demo", FontAwesome.DESKTOP, "_top", linkStyle, true);
|
final Link demoLink = SPUIComponentProvider.getLink(SPUIComponetIdProvider.LINK_DEMO,
|
||||||
links.addComponent(demoLink);
|
i18n.get("link.demo.name"), "?demo", FontAwesome.DESKTOP, "_top", linkStyle, true);
|
||||||
demoLink.addStyleName(ValoTheme.LINK_SMALL);
|
links.addComponent(demoLink);
|
||||||
|
demoLink.addStyleName(ValoTheme.LINK_SMALL);
|
||||||
|
}
|
||||||
|
|
||||||
if (!uiProperties.getLinks().getRequestAccount().isEmpty()) {
|
if (!uiProperties.getLinks().getRequestAccount().isEmpty()) {
|
||||||
final Link requestAccountLink = SPUIComponentProvider.getLink(SPUIComponetIdProvider.LINK_REQUESTACCOUNT,
|
final Link requestAccountLink = SPUIComponentProvider.getLink(SPUIComponetIdProvider.LINK_REQUESTACCOUNT,
|
||||||
|
|||||||
@@ -844,7 +844,7 @@ public class ActionHistoryTable extends TreeTable implements Handler {
|
|||||||
if (actionId != null) {
|
if (actionId != null) {
|
||||||
final Action activeAction = deploymentManagement.findAction(actionId);
|
final Action activeAction = deploymentManagement.findAction(actionId);
|
||||||
try {
|
try {
|
||||||
deploymentManagement.forceQuitAction(activeAction, target);
|
deploymentManagement.forceQuitAction(activeAction);
|
||||||
return true;
|
return true;
|
||||||
} catch (final CancelActionNotAllowedException e) {
|
} catch (final CancelActionNotAllowedException e) {
|
||||||
LOG.info("Force Cancel action not allowed exception :{}", e);
|
LOG.info("Force Cancel action not allowed exception :{}", e);
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ import javax.annotation.PreDestroy;
|
|||||||
import org.eclipse.hawkbit.repository.DeploymentManagement;
|
import org.eclipse.hawkbit.repository.DeploymentManagement;
|
||||||
import org.eclipse.hawkbit.repository.TargetManagement;
|
import org.eclipse.hawkbit.repository.TargetManagement;
|
||||||
import org.eclipse.hawkbit.repository.model.DistributionSetIdName;
|
import org.eclipse.hawkbit.repository.model.DistributionSetIdName;
|
||||||
|
import org.eclipse.hawkbit.ui.UiProperties;
|
||||||
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||||
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorder;
|
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorder;
|
||||||
import org.eclipse.hawkbit.ui.documentation.DocumentationPageLink;
|
|
||||||
import org.eclipse.hawkbit.ui.management.dstable.DistributionBeanQuery;
|
import org.eclipse.hawkbit.ui.management.dstable.DistributionBeanQuery;
|
||||||
import org.eclipse.hawkbit.ui.management.event.BulkUploadPopupEvent;
|
import org.eclipse.hawkbit.ui.management.event.BulkUploadPopupEvent;
|
||||||
import org.eclipse.hawkbit.ui.management.state.ManagementUIState;
|
import org.eclipse.hawkbit.ui.management.state.ManagementUIState;
|
||||||
@@ -88,6 +88,9 @@ public class TargetBulkUpdateWindowLayout extends CustomComponent {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private transient DeploymentManagement deploymentManagement;
|
private transient DeploymentManagement deploymentManagement;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private transient UiProperties uiproperties;
|
||||||
|
|
||||||
private static final long serialVersionUID = -6659290471705262389L;
|
private static final long serialVersionUID = -6659290471705262389L;
|
||||||
private VerticalLayout tokenVerticalLayout;
|
private VerticalLayout tokenVerticalLayout;
|
||||||
private TextArea descTextArea;
|
private TextArea descTextArea;
|
||||||
@@ -141,7 +144,8 @@ public class TargetBulkUpdateWindowLayout extends CustomComponent {
|
|||||||
progressBar = creatreProgressBar();
|
progressBar = creatreProgressBar();
|
||||||
targetsCountLabel = getStatusCountLabel();
|
targetsCountLabel = getStatusCountLabel();
|
||||||
bulkUploader = getBulkUploadHandler();
|
bulkUploader = getBulkUploadHandler();
|
||||||
linkToSystemConfigHelp = DocumentationPageLink.DEPLOYMENT_VIEW.getLink();
|
linkToSystemConfigHelp = SPUIComponentProvider
|
||||||
|
.getHelpLink(uiproperties.getLinks().getDocumentation().getDeploymentView());
|
||||||
windowCaption = new Label(i18n.get("caption.bulk.upload.targets"));
|
windowCaption = new Label(i18n.get("caption.bulk.upload.targets"));
|
||||||
minimizeButton = getMinimizeButton();
|
minimizeButton = getMinimizeButton();
|
||||||
closeButton = getCloseButton();
|
closeButton = getCloseButton();
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import org.eclipse.hawkbit.im.authentication.PermissionService;
|
|||||||
import org.eclipse.hawkbit.im.authentication.UserPrincipal;
|
import org.eclipse.hawkbit.im.authentication.UserPrincipal;
|
||||||
import org.eclipse.hawkbit.ui.UiProperties;
|
import org.eclipse.hawkbit.ui.UiProperties;
|
||||||
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||||
import org.eclipse.hawkbit.ui.documentation.DocumentationPageLink;
|
|
||||||
import org.eclipse.hawkbit.ui.menu.DashboardEvent.PostViewChangeEvent;
|
import org.eclipse.hawkbit.ui.menu.DashboardEvent.PostViewChangeEvent;
|
||||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||||
@@ -151,13 +150,15 @@ public final class DashboardMenu extends CustomComponent {
|
|||||||
links.addStyleName("links");
|
links.addStyleName("links");
|
||||||
final String linkStyle = "v-link";
|
final String linkStyle = "v-link";
|
||||||
|
|
||||||
final Link docuLink = SPUIComponentProvider.getLink(SPUIComponetIdProvider.LINK_DOCUMENATION,
|
if (!uiProperties.getLinks().getDocumentation().getRoot().isEmpty()) {
|
||||||
i18n.get("link.documentation.name"), "../" + DocumentationPageLink.ROOT_VIEW.getPath(),
|
final Link docuLink = SPUIComponentProvider.getLink(SPUIComponetIdProvider.LINK_DOCUMENATION,
|
||||||
FontAwesome.QUESTION_CIRCLE, "_blank", linkStyle, true);
|
i18n.get("link.documentation.name"), uiProperties.getLinks().getDocumentation().getRoot(),
|
||||||
docuLink.setDescription(i18n.get("link.documentation.name"));
|
FontAwesome.QUESTION_CIRCLE, "_blank", linkStyle, true);
|
||||||
docuLink.setSizeFull();
|
docuLink.setDescription(i18n.get("link.documentation.name"));
|
||||||
links.addComponent(docuLink);
|
docuLink.setSizeFull();
|
||||||
links.setComponentAlignment(docuLink, Alignment.BOTTOM_CENTER);
|
links.addComponent(docuLink);
|
||||||
|
links.setComponentAlignment(docuLink, Alignment.BOTTOM_CENTER);
|
||||||
|
}
|
||||||
|
|
||||||
if (!uiProperties.getLinks().getUserManagement().isEmpty()) {
|
if (!uiProperties.getLinks().getUserManagement().isEmpty()) {
|
||||||
final Link userManagementLink = SPUIComponentProvider.getLink(SPUIComponetIdProvider.LINK_USERMANAGEMENT,
|
final Link userManagementLink = SPUIComponentProvider.getLink(SPUIComponetIdProvider.LINK_USERMANAGEMENT,
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupErrorAction
|
|||||||
import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupErrorCondition;
|
import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupErrorCondition;
|
||||||
import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupSuccessAction;
|
import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupSuccessAction;
|
||||||
import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupSuccessCondition;
|
import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupSuccessCondition;
|
||||||
|
import org.eclipse.hawkbit.ui.UiProperties;
|
||||||
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||||
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorder;
|
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorder;
|
||||||
import org.eclipse.hawkbit.ui.documentation.DocumentationPageLink;
|
|
||||||
import org.eclipse.hawkbit.ui.filtermanagement.TargetFilterBeanQuery;
|
import org.eclipse.hawkbit.ui.filtermanagement.TargetFilterBeanQuery;
|
||||||
import org.eclipse.hawkbit.ui.management.footer.ActionTypeOptionGroupLayout;
|
import org.eclipse.hawkbit.ui.management.footer.ActionTypeOptionGroupLayout;
|
||||||
import org.eclipse.hawkbit.ui.management.footer.ActionTypeOptionGroupLayout.ActionTypeOption;
|
import org.eclipse.hawkbit.ui.management.footer.ActionTypeOptionGroupLayout.ActionTypeOption;
|
||||||
@@ -104,6 +104,9 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private UINotification uiNotification;
|
private UINotification uiNotification;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private transient UiProperties uiProperties;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private I18N i18n;
|
private I18N i18n;
|
||||||
|
|
||||||
@@ -284,7 +287,7 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
|
|||||||
totalTargetsLabel = createTotalTargetsLabel();
|
totalTargetsLabel = createTotalTargetsLabel();
|
||||||
targetFilterQuery = createTargetFilterQuery();
|
targetFilterQuery = createTargetFilterQuery();
|
||||||
|
|
||||||
linkToHelp = DocumentationPageLink.ROLLOUT_VIEW.getLink();
|
linkToHelp = SPUIComponentProvider.getHelpLink(uiProperties.getLinks().getDocumentation().getRolloutView());
|
||||||
actionTypeOptionGroupLayout.addStyleName(SPUIStyleDefinitions.ROLLOUT_ACTION_TYPE_LAYOUT);
|
actionTypeOptionGroupLayout.addStyleName(SPUIStyleDefinitions.ROLLOUT_ACTION_TYPE_LAYOUT);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ import java.util.List;
|
|||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
|
|
||||||
import org.eclipse.hawkbit.ui.HawkbitUI;
|
import org.eclipse.hawkbit.ui.HawkbitUI;
|
||||||
|
import org.eclipse.hawkbit.ui.UiProperties;
|
||||||
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||||
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorder;
|
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorder;
|
||||||
import org.eclipse.hawkbit.ui.documentation.DocumentationPageLink;
|
|
||||||
import org.eclipse.hawkbit.ui.tenantconfiguration.ConfigurationItem.ConfigurationItemChangeListener;
|
import org.eclipse.hawkbit.ui.tenantconfiguration.ConfigurationItem.ConfigurationItemChangeListener;
|
||||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||||
@@ -38,7 +38,7 @@ import com.vaadin.ui.VerticalLayout;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Main UI for the system configuration view.
|
* Main UI for the system configuration view.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -61,13 +61,16 @@ public class TenantConfigurationDashboardView extends CustomComponent implements
|
|||||||
@Autowired
|
@Autowired
|
||||||
private I18N i18n;
|
private I18N i18n;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private transient UiProperties uiProperties;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private transient UINotification uINotification;
|
private transient UINotification uINotification;
|
||||||
|
|
||||||
private Button saveConfigurationBtn;
|
private Button saveConfigurationBtn;
|
||||||
private Button undoConfigurationBtn;
|
private Button undoConfigurationBtn;
|
||||||
|
|
||||||
private final List<ConfigurationGroup> configurationViews = new ArrayList<ConfigurationGroup>();
|
private final List<ConfigurationGroup> configurationViews = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* init method adds all Configuration Views to the list of Views.
|
* init method adds all Configuration Views to the list of Views.
|
||||||
@@ -119,7 +122,9 @@ public class TenantConfigurationDashboardView extends CustomComponent implements
|
|||||||
undoConfigurationBtn.addClickListener(event -> undoConfiguration());
|
undoConfigurationBtn.addClickListener(event -> undoConfiguration());
|
||||||
hlayout.addComponent(undoConfigurationBtn);
|
hlayout.addComponent(undoConfigurationBtn);
|
||||||
|
|
||||||
final Link linkToSystemConfigHelp = DocumentationPageLink.SYSTEM_CONFIGURATION_VIEW.getLink();
|
final Link linkToSystemConfigHelp = SPUIComponentProvider
|
||||||
|
.getHelpLink(uiProperties.getLinks().getDocumentation().getSystemConfigurationView());
|
||||||
|
;
|
||||||
hlayout.addComponent(linkToSystemConfigHelp);
|
hlayout.addComponent(linkToSystemConfigHelp);
|
||||||
|
|
||||||
return hlayout;
|
return hlayout;
|
||||||
@@ -152,7 +157,7 @@ public class TenantConfigurationDashboardView extends CustomComponent implements
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
* @see
|
* @see
|
||||||
* org.eclipse.hawkbit.server.ui.tenantconfiguration.ConfigurationGroup.
|
* org.eclipse.hawkbit.server.ui.tenantconfiguration.ConfigurationGroup.
|
||||||
* ConfigurationGroupChangeListener #configurationChanged()
|
* ConfigurationGroupChangeListener #configurationChanged()
|
||||||
|
|||||||
Reference in New Issue
Block a user