From 2c49fc8f77a21dee74e36c4d1b75da21606c4164 Mon Sep 17 00:00:00 2001 From: Kai Zimmermann Date: Thu, 12 May 2016 11:55:25 +0200 Subject: [PATCH 1/3] Fix action message. --- .../eclipse/hawkbit/simulator/DeviceSimulatorUpdater.java | 3 --- .../src/main/java/org/eclipse/hawkbit/app/MyLoginUI.java | 6 +++--- .../src/main/java/org/eclipse/hawkbit/app/MyUI.java | 3 +++ .../org/eclipse/hawkbit/controller/RootController.java | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/DeviceSimulatorUpdater.java b/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/DeviceSimulatorUpdater.java index 3704b9854..e7b81b017 100644 --- a/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/DeviceSimulatorUpdater.java +++ b/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/DeviceSimulatorUpdater.java @@ -118,9 +118,6 @@ public class DeviceSimulatorUpdater { } private static final class DeviceSimulatorUpdateThread implements Runnable { - /** - * - */ private static final int MINIMUM_TOKENLENGTH_FOR_HINT = 6; private static final Random rndSleep = new SecureRandom(); diff --git a/examples/hawkbit-example-app/src/main/java/org/eclipse/hawkbit/app/MyLoginUI.java b/examples/hawkbit-example-app/src/main/java/org/eclipse/hawkbit/app/MyLoginUI.java index 763e8447e..d8c5c8493 100644 --- a/examples/hawkbit-example-app/src/main/java/org/eclipse/hawkbit/app/MyLoginUI.java +++ b/examples/hawkbit-example-app/src/main/java/org/eclipse/hawkbit/app/MyLoginUI.java @@ -20,11 +20,11 @@ import com.vaadin.spring.annotation.SpringUI; * login path. The easiest way to get an hawkBit login UI running is to extend * the {@link HawkbitLoginUI} and to annotated it with {@link SpringUI} as in * this example to the defined {@link HawkbitTheme#LOGIN_UI_PATH}. - * - * - * */ @SpringUI(path = HawkbitTheme.LOGIN_UI_PATH) +// Exception squid:MaximumInheritanceDepth - Most of the inheritance comes from +// Vaadin. +@SuppressWarnings({ "squid:MaximumInheritanceDepth" }) public class MyLoginUI extends HawkbitLoginUI { private static final long serialVersionUID = 1L; diff --git a/examples/hawkbit-example-app/src/main/java/org/eclipse/hawkbit/app/MyUI.java b/examples/hawkbit-example-app/src/main/java/org/eclipse/hawkbit/app/MyUI.java index 68d3b2fd9..e5bc7535d 100644 --- a/examples/hawkbit-example-app/src/main/java/org/eclipse/hawkbit/app/MyUI.java +++ b/examples/hawkbit-example-app/src/main/java/org/eclipse/hawkbit/app/MyUI.java @@ -29,6 +29,9 @@ import com.vaadin.spring.annotation.SpringUI; */ @SpringUI @Push(value = PushMode.AUTOMATIC, transport = Transport.WEBSOCKET) +// Exception squid:MaximumInheritanceDepth - Most of the inheritance comes from +// Vaadin. +@SuppressWarnings({ "squid:MaximumInheritanceDepth" }) public class MyUI extends HawkbitUI { private static final long serialVersionUID = 1L; diff --git a/hawkbit-rest-resource/src/main/java/org/eclipse/hawkbit/controller/RootController.java b/hawkbit-rest-resource/src/main/java/org/eclipse/hawkbit/controller/RootController.java index 14383f30b..3969e1b83 100644 --- a/hawkbit-rest-resource/src/main/java/org/eclipse/hawkbit/controller/RootController.java +++ b/hawkbit-rest-resource/src/main/java/org/eclipse/hawkbit/controller/RootController.java @@ -318,8 +318,8 @@ public class RootController { LOG.debug("Found an active UpdateAction for target {}. returning deyploment: {}", targetid, base); - controllerManagement.registerRetrieved(action, - "Controller retrieved update action and should start now the download."); + controllerManagement.registerRetrieved(action, ControllerManagement.SERVER_MESSAGE_PREFIX + + "Target retrieved update action and should start now the download."); return new ResponseEntity<>(base, HttpStatus.OK); } @@ -497,8 +497,8 @@ public class RootController { LOG.debug("Found an active CancelAction for target {}. returning cancel: {}", targetid, cancel); - controllerManagement.registerRetrieved(action, - "Controller retrieved cancel action and should start now the cancelation."); + controllerManagement.registerRetrieved(action, ControllerManagement.SERVER_MESSAGE_PREFIX + + "Target retrieved cancel action and should start now the cancelation."); return new ResponseEntity<>(cancel, HttpStatus.OK); } From 8b7f24e202e151b5c1367f6c6ffeaedfc8698575 Mon Sep 17 00:00:00 2001 From: Kai Zimmermann Date: Thu, 12 May 2016 11:58:16 +0200 Subject: [PATCH 2/3] Add mysql profile --- .../resources/application-mysql.properties | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 examples/hawkbit-example-app/src/main/resources/application-mysql.properties diff --git a/examples/hawkbit-example-app/src/main/resources/application-mysql.properties b/examples/hawkbit-example-app/src/main/resources/application-mysql.properties new file mode 100644 index 000000000..fbb0fcbad --- /dev/null +++ b/examples/hawkbit-example-app/src/main/resources/application-mysql.properties @@ -0,0 +1,32 @@ +# +# 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 +# + +# This profile adds basic configurations for a MySQL DB usage. +# Keep in mind that you need the MaridDB driver in your classpath on compile. +# see https://github.com/eclipse/hawkbit/wiki/Run-hawkBit + +spring.jpa.database=MYSQL +spring.datasource.url=jdbc:mysql://localhost:3306/hawkbit +spring.datasource.username=root +spring.datasource.password= +spring.datasource.driverClassName=org.mariadb.jdbc.Driver + +spring.datasource.max-active=100 +spring.datasource.max-idle=10 +spring.datasource.min-idle=10 +spring.datasource.initial-size=10 +spring.datasource.validation-query=select 1 from dual +spring.datasource.validation-interval=30000 +spring.datasource.test-on-borrow=true +spring.datasource.test-on-return=false +spring.datasource.test-while-idle=true +spring.datasource.time-between-eviction-runs-millis=30000 +spring.datasource.min-evictable-idle-time-millis=60000 +spring.datasource.max-wait=10000 +spring.datasource.jmx-enabled=true \ No newline at end of file From 33a4ed117528c3789696974cf0004c3ab0071150 Mon Sep 17 00:00:00 2001 From: Michael Hirsch Date: Fri, 13 May 2016 09:30:22 +0200 Subject: [PATCH 3/3] fix typo of MariaDB --- .../src/main/resources/application-mysql.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/hawkbit-example-app/src/main/resources/application-mysql.properties b/examples/hawkbit-example-app/src/main/resources/application-mysql.properties index fbb0fcbad..202500245 100644 --- a/examples/hawkbit-example-app/src/main/resources/application-mysql.properties +++ b/examples/hawkbit-example-app/src/main/resources/application-mysql.properties @@ -8,7 +8,7 @@ # # This profile adds basic configurations for a MySQL DB usage. -# Keep in mind that you need the MaridDB driver in your classpath on compile. +# Keep in mind that you need the MariaDB driver in your classpath on compile. # see https://github.com/eclipse/hawkbit/wiki/Run-hawkBit spring.jpa.database=MYSQL @@ -29,4 +29,4 @@ spring.datasource.test-while-idle=true spring.datasource.time-between-eviction-runs-millis=30000 spring.datasource.min-evictable-idle-time-millis=60000 spring.datasource.max-wait=10000 -spring.datasource.jmx-enabled=true \ No newline at end of file +spring.datasource.jmx-enabled=true