From b3efcff49ec30233f27c87b7afb396917298cfd8 Mon Sep 17 00:00:00 2001 From: Asharani Date: Mon, 11 Apr 2016 11:21:46 +0530 Subject: [PATCH 1/4] Add documentation for client side debugging Signed-off-by: Asharani --- hawkbit-ui/README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 hawkbit-ui/README.md diff --git a/hawkbit-ui/README.md b/hawkbit-ui/README.md new file mode 100644 index 000000000..f8e020648 --- /dev/null +++ b/hawkbit-ui/README.md @@ -0,0 +1,34 @@ +# hawkBit User Interface + +The application with user interface to create and manage rollouts. + +## Debugging client-side code +### Debug usings SuperDevMode +The SuperDevMode can be used to debug client side code without any browser plugin. + +#### Using SuperDevMode with chrome : + +- Add required maven dependencies + - Add vaadin-client-compiler dependency + - Add jetty dependencies (version : 8.1x) +- Set redirect property in the AppWidgetSet.gwt.xml module descriptor as follows + - < set-configuration-property name="devModeRedirectEnabled" value="true" /> +- Create launch configuration for the SuperDevMode + - The main class to execute should be com.google.gwt.dev.codeserver.CodeServer. + - Add fully-qualified class name of widgetset (org.eclipse.hawkbit.ui.AppWidgetSet) as parameter +- Enable debug in chrome + - Chrome inspector window ▸ Click on settings icon ▸ Scripts ▸ Enable source maps option +- Run the SuperDevMode Code Server with the launch configuration created above +- Open http://localhost:8080/UI/?debug .Click on "SuperDev" button in debug console (Alternatively can directly add ?superdevmode parameter to URL) +- Widgetset is compiled and you can see the java code files loaded in 'Chrome inspector window ▸ Source tab' + + +#### Using SuperDevMode with Eclipse : + +- Install the plugin from http://sdbg.github.io/p2 +- Start the server and Super Dev Mode as mentioned above +- Create a new launch configuration in Eclipse + - Type is "Launch Chrome" + - http://localhost:8080/UI/?superdevmode +- Launch the new configuration in debug mode +- Now breakpoints in eclipse can be set \ No newline at end of file From 2bf328402cbcb57fbbafc060a2947be4f1d63e6b Mon Sep 17 00:00:00 2001 From: Kai Zimmermann Date: Mon, 11 Apr 2016 12:41:16 +0200 Subject: [PATCH 2/4] Send DMF message only in case of DMF sim. Signed-off-by: Kai Zimmermann --- .../org/eclipse/hawkbit/simulator/SimulationController.java | 5 ++++- .../java/org/eclipse/hawkbit/simulator/SimulatorStartup.java | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/SimulationController.java b/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/SimulationController.java index 426860d8b..649d88477 100644 --- a/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/SimulationController.java +++ b/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/SimulationController.java @@ -86,7 +86,10 @@ public class SimulationController { final String deviceId = name + i; repository.add(deviceFactory.createSimulatedDevice(deviceId, tenant, protocol, pollDelay, new URL(endpoint), gatewayToken)); - spSenderService.createOrUpdateThing(tenant, deviceId); + + if (protocol == Protocol.DMF_AMQP) { + spSenderService.createOrUpdateThing(tenant, deviceId); + } } return ResponseEntity.ok("Updated " + amount + " DMF connected targets!"); diff --git a/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/SimulatorStartup.java b/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/SimulatorStartup.java index 60f3055bd..b772bae1f 100644 --- a/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/SimulatorStartup.java +++ b/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/SimulatorStartup.java @@ -11,6 +11,7 @@ package org.eclipse.hawkbit.simulator; import java.net.MalformedURLException; import java.net.URL; +import org.eclipse.hawkbit.simulator.AbstractSimulatedDevice.Protocol; import org.eclipse.hawkbit.simulator.amqp.SpSenderService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -52,7 +53,9 @@ public class SimulatorStartup implements ApplicationListener Date: Thu, 14 Apr 2016 09:54:56 +0530 Subject: [PATCH 3/4] Corrected the typo as per review comment --- hawkbit-ui/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hawkbit-ui/README.md b/hawkbit-ui/README.md index f8e020648..e1c7d8ffc 100644 --- a/hawkbit-ui/README.md +++ b/hawkbit-ui/README.md @@ -3,7 +3,7 @@ The application with user interface to create and manage rollouts. ## Debugging client-side code -### Debug usings SuperDevMode +### Debug using SuperDevMode The SuperDevMode can be used to debug client side code without any browser plugin. #### Using SuperDevMode with chrome : @@ -31,4 +31,4 @@ The SuperDevMode can be used to debug client side code without any browser plugi - Type is "Launch Chrome" - http://localhost:8080/UI/?superdevmode - Launch the new configuration in debug mode -- Now breakpoints in eclipse can be set \ No newline at end of file +- Now breakpoints in eclipse can be set From 878c5c869c0bccd7acccd92db7ec2d7e6f938bea Mon Sep 17 00:00:00 2001 From: Michael Hirsch Date: Mon, 18 Apr 2016 07:54:38 +0200 Subject: [PATCH 4/4] adapt hawkBit user interface sentence Signed-off-by: Michael Hirsch --- hawkbit-ui/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hawkbit-ui/README.md b/hawkbit-ui/README.md index e1c7d8ffc..4bf9d67da 100644 --- a/hawkbit-ui/README.md +++ b/hawkbit-ui/README.md @@ -1,6 +1,6 @@ # hawkBit User Interface -The application with user interface to create and manage rollouts. +The hawkBit user interface is based on the Vaadin and Vaadin-Spring framework and allows to manage software updates and large scale roll-outs via a user interface. ## Debugging client-side code ### Debug using SuperDevMode