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
+- 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
diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/client/LinkRendererConnector.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/client/LinkRendererConnector.java
deleted file mode 100644
index bc48d64d7..000000000
--- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/client/LinkRendererConnector.java
+++ /dev/null
@@ -1,29 +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.customrenderers.client;
-
-import org.eclipse.hawkbit.ui.customrenderers.renderers.LinkRenderer;
-
-import com.vaadin.client.connectors.ButtonRendererConnector;
-import com.vaadin.shared.ui.Connect;
-
-/**
- *
- * A connector for {@link LinkRenderer}.
- *
- */
-@Connect(org.eclipse.hawkbit.ui.customrenderers.renderers.LinkRenderer.class)
-public class LinkRendererConnector extends ButtonRendererConnector {
- private static final long serialVersionUID = 7987417436367399331L;
-
- @Override
- public org.eclipse.hawkbit.ui.customrenderers.client.renderers.LinkRenderer getRenderer() {
- return (org.eclipse.hawkbit.ui.customrenderers.client.renderers.LinkRenderer) super.getRenderer();
- }
-}
diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/client/RolloutRendererConnector.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/client/RolloutRendererConnector.java
new file mode 100644
index 000000000..2175dea29
--- /dev/null
+++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/client/RolloutRendererConnector.java
@@ -0,0 +1,37 @@
+/**
+ * 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.customrenderers.client;
+
+import org.eclipse.hawkbit.ui.customrenderers.client.renderers.RolloutRendererData;
+
+import com.google.web.bindery.event.shared.HandlerRegistration;
+import com.vaadin.client.connectors.ClickableRendererConnector;
+import com.vaadin.client.renderers.ClickableRenderer.RendererClickHandler;
+import com.vaadin.shared.ui.Connect;
+
+import elemental.json.JsonObject;
+/**
+ * A connector for {@link CustomObjectRenderer }.
+ *
+ */
+@Connect(org.eclipse.hawkbit.ui.customrenderers.renderers.RolloutRenderer.class)
+public class RolloutRendererConnector extends ClickableRendererConnector {
+ private static final long serialVersionUID = 7734682321931830566L;
+
+ public org.eclipse.hawkbit.ui.customrenderers.client.renderers.RolloutRenderer getRenderer() {
+ return (org.eclipse.hawkbit.ui.customrenderers.client.renderers.RolloutRenderer) super.getRenderer();
+ }
+
+ @Override
+ protected HandlerRegistration addClickHandler(
+ RendererClickHandler handler) {
+ return getRenderer().addClickHandler(handler);
+ }
+}
\ No newline at end of file
diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/client/renderers/LinkRenderer.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/client/renderers/LinkRenderer.java
deleted file mode 100644
index 0abe4044b..000000000
--- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/client/renderers/LinkRenderer.java
+++ /dev/null
@@ -1,42 +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.customrenderers.client.renderers;
-
-import com.google.gwt.user.client.ui.Button;
-import com.vaadin.client.renderers.ButtonRenderer;
-import com.vaadin.client.ui.VButton;
-import com.vaadin.client.widget.grid.RendererCellReference;
-
-/**
- *
- * Renders link with provided text.
- *
- */
-public class LinkRenderer extends ButtonRenderer {
- @Override
- public void render(RendererCellReference cell, String text, Button button) {
- button.setText(text);
- applystyle(button);
- // this is to allow the button to disappear, if the text is null
- button.setVisible(text != null);
- button.getElement().setId(new StringBuilder("link").append(".").append(text).toString());
- }
-
- private void applystyle(Button button) {
- button.setStyleName(VButton.CLASSNAME);
- button.addStyleName(getStyle("borderless"));
- button.addStyleName(getStyle("small"));
- button.addStyleName(getStyle("on-focus-no-border"));
- button.addStyleName(getStyle("link"));
- }
-
- private String getStyle(final String style) {
- return new StringBuilder(style).append(" ").append(VButton.CLASSNAME).append("-").append(style).toString();
- }
-}
diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/client/renderers/RolloutRenderer.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/client/renderers/RolloutRenderer.java
new file mode 100644
index 000000000..da8fc2544
--- /dev/null
+++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/client/renderers/RolloutRenderer.java
@@ -0,0 +1,65 @@
+/**
+ * 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.customrenderers.client.renderers;
+
+import com.google.gwt.core.shared.GWT;
+import com.vaadin.client.renderers.ClickableRenderer;
+import com.vaadin.client.ui.VButton;
+import com.vaadin.client.widget.grid.RendererCellReference;
+
+/**
+ * Renders button with provided CustomObject.
+ * Used to display button with link.
+ *
+ */
+public class RolloutRenderer extends ClickableRenderer {
+
+ @Override
+ public VButton createWidget() {
+ VButton b = GWT.create(VButton.class);
+ b.addClickHandler(this);
+ b.setStylePrimaryName("v-nativebutton");
+ return b;
+ }
+
+ @Override
+ public void render(RendererCellReference cell, RolloutRendererData text, VButton button) {
+ final String creating = "CREATING";
+ button.setText(text.getName());
+ applystyle(button);
+ // this is to allow the button to disappear, if the text is null
+ button.setVisible(text.getName() != null);
+ button.getElement().setId(new StringBuilder("link").append(".").append(text.getName()).toString());
+ /*
+ * checking Rollout Status for applying button style. If Rollout status
+ * is not "CREATING", then the Rollout button is applying hyperlink
+ * style
+ */
+ final boolean isStatusCreate = text.getStatus() != null && creating.equalsIgnoreCase(text.getStatus());
+ if (isStatusCreate) {
+ button.addStyleName(getStyle("boldhide"));
+ button.setEnabled(false);
+ } else {
+ button.setEnabled(true);
+ }
+ }
+
+ private void applystyle(VButton button) {
+ button.setStyleName(VButton.CLASSNAME);
+ button.addStyleName(getStyle("borderless"));
+ button.addStyleName(getStyle("small"));
+ button.addStyleName(getStyle("on-focus-no-border"));
+ button.addStyleName(getStyle("link"));
+ }
+
+ private String getStyle(final String style) {
+ return new StringBuilder(style).append(" ").append(VButton.CLASSNAME).append("-").append(style).toString();
+ }
+
+}
\ No newline at end of file
diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/client/renderers/RolloutRendererData.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/client/renderers/RolloutRendererData.java
new file mode 100644
index 000000000..6c751e6a2
--- /dev/null
+++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/client/renderers/RolloutRendererData.java
@@ -0,0 +1,62 @@
+/**
+ * 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.customrenderers.client.renderers;
+
+import java.io.Serializable;
+
+/**
+ * RendererData class with Name and Status.
+ *
+ */
+
+public class RolloutRendererData implements Serializable {
+ private static final long serialVersionUID = -5018181529953620263L;
+
+ private String name;
+
+ private String status;
+
+ /**
+ * Initialize the RendererData.
+ */
+ public RolloutRendererData() {
+
+ }
+
+ /**
+ * Initialize the RendererData.
+ *
+ * @param name
+ * Name of the Rollout.
+ * @param status
+ * Status of Rollout.
+ */
+ public RolloutRendererData(String name, String status) {
+ super();
+ this.name = name;
+ this.status = status;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+}
diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/renderers/LinkRenderer.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/renderers/LinkRenderer.java
deleted file mode 100644
index d913ca380..000000000
--- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/renderers/LinkRenderer.java
+++ /dev/null
@@ -1,37 +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.customrenderers.renderers;
-
-import com.vaadin.ui.renderers.ButtonRenderer;
-
-/**
- *
- * Renders link with provided text.
- *
- */
-public class LinkRenderer extends ButtonRenderer {
- private static final long serialVersionUID = -1242995370043404892L;
-
- /**
- * Intialise link renderer.
- */
- public LinkRenderer() {
- super();
- }
-
- /**
- * Intialise link renderer with {@link RendererClickListener}
- *
- * @param listener
- * RendererClickListener
- */
- public LinkRenderer(RendererClickListener listener) {
- super(listener);
- }
-}
diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/renderers/RolloutRenderer.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/renderers/RolloutRenderer.java
new file mode 100644
index 000000000..29663dd9d
--- /dev/null
+++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/customrenderers/renderers/RolloutRenderer.java
@@ -0,0 +1,61 @@
+/**
+ * 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.customrenderers.renderers;
+
+import org.eclipse.hawkbit.ui.customrenderers.client.renderers.RolloutRendererData;
+
+import com.vaadin.ui.renderers.ClickableRenderer;
+
+import elemental.json.JsonValue;
+
+/**
+ * Renders button with provided CustomObject.
+ * Used to display button with link.
+ *
+ */
+
+public class RolloutRenderer extends ClickableRenderer {
+
+ private static final long serialVersionUID = -8754180585906263554L;
+
+ /**
+ * Creates a new custom object renderer.
+ */
+ public RolloutRenderer() {
+ super(RolloutRendererData.class, null);
+ }
+
+ /**
+ * Initialize custom object renderer with {@link Class}
+ *
+ * @param presentationType
+ * Class
+ */
+
+ public RolloutRenderer(Class presentationType) {
+ super(presentationType);
+ }
+
+ /**
+ * Creates a new custom object renderer and adds the given click listener to it.
+ *
+ * @param listener
+ * the click listener to register
+ */
+ public RolloutRenderer(RendererClickListener listener) {
+ this();
+ addClickListener(listener);
+ }
+
+ @Override
+ public JsonValue encode(RolloutRendererData resource) {
+ return super.encode(resource, RolloutRendererData.class);
+ }
+}
diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/ProxyRollout.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/ProxyRollout.java
index b1309f8b9..6514ba2df 100644
--- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/ProxyRollout.java
+++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/ProxyRollout.java
@@ -9,122 +9,133 @@
package org.eclipse.hawkbit.ui.rollout.rollout;
import org.eclipse.hawkbit.repository.model.Rollout;
+import org.eclipse.hawkbit.ui.customrenderers.client.renderers.RolloutRendererData;
import com.vaadin.server.FontAwesome;
/**
- * Proxy rollout with suctome properties.
+ * Proxy rollout with custom properties.
*
*/
public class ProxyRollout extends Rollout {
- private static final long serialVersionUID = 4539849939617681918L;
+ private static final long serialVersionUID = 4539849939617681918L;
- private String distributionSetNameVersion;
+ private String distributionSetNameVersion;
- private String createdDate;
+ private String createdDate;
- private String modifiedDate;
+ private String modifiedDate;
- private Long numberOfGroups;
+ private Long numberOfGroups;
- private Boolean isActionRecieved = Boolean.FALSE;
+ private Boolean isActionRecieved = Boolean.FALSE;
- private String totalTargetsCount;
-
- /**
- * @return the distributionSetNameVersion
- */
- public String getDistributionSetNameVersion() {
- return distributionSetNameVersion;
- }
+ private String totalTargetsCount;
- /**
- * @param distributionSetNameVersion
- * the distributionSetNameVersion to set
- */
- public void setDistributionSetNameVersion(final String distributionSetNameVersion) {
- this.distributionSetNameVersion = distributionSetNameVersion;
- }
+ private RolloutRendererData rolloutRendererData;
- /**
- * @return the numberOfGroups
- */
- public Long getNumberOfGroups() {
- return numberOfGroups;
- }
- /**
- * @param numberOfGroups
- * the numberOfGroups to set
- */
- public void setNumberOfGroups(final Long numberOfGroups) {
- this.numberOfGroups = numberOfGroups;
- }
+ public RolloutRendererData getRolloutRendererData() {
+ return rolloutRendererData;
+ }
- /**
- * @return the createdDate
- */
- public String getCreatedDate() {
- return createdDate;
- }
+ public void setRolloutRendererData(RolloutRendererData rendererData) {
+ this.rolloutRendererData = rendererData;
+ }
- /**
- * @param createdDate
- * the createdDate to set
- */
- public void setCreatedDate(final String createdDate) {
- this.createdDate = createdDate;
- }
+ /**
+ * @return the distributionSetNameVersion
+ */
+ public String getDistributionSetNameVersion() {
+ return distributionSetNameVersion;
+ }
- /**
- * @return the modifiedDate
- */
- public String getModifiedDate() {
- return modifiedDate;
- }
+ /**
+ * @param distributionSetNameVersion
+ * the distributionSetNameVersion to set
+ */
+ public void setDistributionSetNameVersion(final String distributionSetNameVersion) {
+ this.distributionSetNameVersion = distributionSetNameVersion;
+ }
- /**
- * @param modifiedDate
- * the modifiedDate to set
- */
- public void setModifiedDate(final String modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
+ /**
+ * @return the numberOfGroups
+ */
+ public Long getNumberOfGroups() {
+ return numberOfGroups;
+ }
- /**
- * @return the isActionRecieved
- */
- public Boolean getIsActionRecieved() {
- return isActionRecieved;
- }
+ /**
+ * @param numberOfGroups
+ * the numberOfGroups to set
+ */
+ public void setNumberOfGroups(final Long numberOfGroups) {
+ this.numberOfGroups = numberOfGroups;
+ }
- /**
- * @param isActionRecieved
- * the isActionRecieved to set
- */
- public void setIsActionRecieved(final Boolean isActionRecieved) {
- this.isActionRecieved = isActionRecieved;
- }
+ /**
+ * @return the createdDate
+ */
+ public String getCreatedDate() {
+ return createdDate;
+ }
- /**
- * @return the totalTargetsCount
- */
- public String getTotalTargetsCount() {
- return totalTargetsCount;
- }
+ /**
+ * @param createdDate
+ * the createdDate to set
+ */
+ public void setCreatedDate(final String createdDate) {
+ this.createdDate = createdDate;
+ }
+
+ /**
+ * @return the modifiedDate
+ */
+ public String getModifiedDate() {
+ return modifiedDate;
+ }
+
+ /**
+ * @param modifiedDate
+ * the modifiedDate to set
+ */
+ public void setModifiedDate(final String modifiedDate) {
+ this.modifiedDate = modifiedDate;
+ }
+
+ /**
+ * @return the isActionRecieved
+ */
+ public Boolean getIsActionRecieved() {
+ return isActionRecieved;
+ }
+
+ /**
+ * @param isActionRecieved
+ * the isActionRecieved to set
+ */
+ public void setIsActionRecieved(final Boolean isActionRecieved) {
+ this.isActionRecieved = isActionRecieved;
+ }
+
+ /**
+ * @return the totalTargetsCount
+ */
+ public String getTotalTargetsCount() {
+ return totalTargetsCount;
+ }
+
+ /**
+ * @param totalTargetsCount
+ * the totalTargetsCount to set
+ */
+ public void setTotalTargetsCount(final String totalTargetsCount) {
+ this.totalTargetsCount = totalTargetsCount;
+ }
+
+ public String getAction() {
+ return FontAwesome.CIRCLE_O.getHtml();
+ }
- /**
- * @param totalTargetsCount
- * the totalTargetsCount to set
- */
- public void setTotalTargetsCount(final String totalTargetsCount) {
- this.totalTargetsCount = totalTargetsCount;
- }
-
-
- public String getAction() {
- return FontAwesome.CIRCLE_O.getHtml();
- }
-
}
diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/RolloutBeanQuery.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/RolloutBeanQuery.java
index 624f18b2f..a7a23a5c3 100644
--- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/RolloutBeanQuery.java
+++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/RolloutBeanQuery.java
@@ -18,6 +18,7 @@ import org.eclipse.hawkbit.repository.model.DistributionSet;
import org.eclipse.hawkbit.repository.model.Rollout;
import org.eclipse.hawkbit.repository.model.TotalTargetCountStatus;
import org.eclipse.hawkbit.ui.common.UserDetailsFormatter;
+import org.eclipse.hawkbit.ui.customrenderers.client.renderers.RolloutRendererData;
import org.eclipse.hawkbit.ui.rollout.state.RolloutUIState;
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
import org.eclipse.hawkbit.ui.utils.SPDateTimeUtil;
@@ -131,6 +132,8 @@ public class RolloutBeanQuery extends AbstractBeanQuery {
proxyRollout.setForcedTime(rollout.getForcedTime());
proxyRollout.setId(rollout.getId());
proxyRollout.setStatus(rollout.getStatus());
+ proxyRollout
+ .setRolloutRendererData(new RolloutRendererData(rollout.getName(), rollout.getStatus().toString()));
final TotalTargetCountStatus totalTargetCountActionStatus = rollout.getTotalTargetCountStatus();
proxyRollout.setTotalTargetCountStatus(totalTargetCountActionStatus);
diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/RolloutListGrid.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/RolloutListGrid.java
index 9c3e1992b..1bb0fd831 100644
--- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/RolloutListGrid.java
+++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/rollout/RolloutListGrid.java
@@ -22,9 +22,10 @@ import org.eclipse.hawkbit.repository.model.Rollout;
import org.eclipse.hawkbit.repository.model.Rollout.RolloutStatus;
import org.eclipse.hawkbit.repository.model.TotalTargetCountStatus;
import org.eclipse.hawkbit.ui.common.grid.AbstractGrid;
+import org.eclipse.hawkbit.ui.customrenderers.client.renderers.RolloutRendererData;
import org.eclipse.hawkbit.ui.customrenderers.renderers.HtmlButtonRenderer;
import org.eclipse.hawkbit.ui.customrenderers.renderers.HtmlLabelRenderer;
-import org.eclipse.hawkbit.ui.customrenderers.renderers.LinkRenderer;
+import org.eclipse.hawkbit.ui.customrenderers.renderers.RolloutRenderer;
import org.eclipse.hawkbit.ui.rollout.DistributionBarHelper;
import org.eclipse.hawkbit.ui.rollout.StatusFontIcon;
import org.eclipse.hawkbit.ui.rollout.event.RolloutEvent;
@@ -77,6 +78,7 @@ public class RolloutListGrid extends AbstractGrid {
private static final String START_OPTION = "Start";
+ private static final String ROLLOUT_RENDERER_DATA = "rolloutRendererData";
@Autowired
private transient RolloutManagement rolloutManagement;
@@ -95,7 +97,10 @@ public class RolloutListGrid extends AbstractGrid {
private transient Map statusIconMap = new EnumMap<>(RolloutStatus.class);
-
+ /**
+ * Handles the RolloutEvent to refresh Grid.
+ *
+ */
@EventBusListenerMethod(scope = EventScope.SESSION)
void onEvent(final RolloutEvent event) {
switch (event) {
@@ -132,10 +137,16 @@ public class RolloutListGrid extends AbstractGrid {
item.getItemProperty(SPUILabelDefinitions.VAR_STATUS).setValue(rollout.getStatus());
item.getItemProperty(SPUILabelDefinitions.VAR_TOTAL_TARGETS_COUNT_STATUS).setValue(totalTargetCountStatus);
final Long groupCount = (Long) item.getItemProperty(SPUILabelDefinitions.VAR_NUMBER_OF_GROUPS).getValue();
- if (rollout.getRolloutGroups() != null && groupCount != rollout.getRolloutGroups().size()) {
+ final int groupsCreated = rollout.getRolloutGroupsCreated();
+ if (groupsCreated != 0) {
+ item.getItemProperty(SPUILabelDefinitions.VAR_NUMBER_OF_GROUPS).setValue(Long.valueOf(groupsCreated));
+ } else if (rollout.getRolloutGroups() != null && groupCount != rollout.getRolloutGroups().size()) {
item.getItemProperty(SPUILabelDefinitions.VAR_NUMBER_OF_GROUPS)
.setValue(Long.valueOf(rollout.getRolloutGroups().size()));
}
+ item.getItemProperty(ROLLOUT_RENDERER_DATA)
+ .setValue(new RolloutRendererData(rollout.getName(), rollout.getStatus().toString()));
+
}
@Override
@@ -149,6 +160,7 @@ public class RolloutListGrid extends AbstractGrid {
protected void addContainerProperties() {
final LazyQueryContainer rolloutGridContainer = (LazyQueryContainer) getContainerDataSource();
rolloutGridContainer.addContainerProperty(SPUILabelDefinitions.VAR_NAME, String.class, "", false, false);
+ rolloutGridContainer.addContainerProperty(ROLLOUT_RENDERER_DATA, RolloutRendererData.class, null, false, false);
rolloutGridContainer.addContainerProperty(SPUILabelDefinitions.VAR_DESC, String.class, null, false, false);
rolloutGridContainer.addContainerProperty(SPUILabelDefinitions.VAR_STATUS, RolloutStatus.class, null, false,
false);
@@ -163,7 +175,7 @@ public class RolloutListGrid extends AbstractGrid {
false);
rolloutGridContainer.addContainerProperty(SPUILabelDefinitions.VAR_MODIFIED_BY, String.class, null, false,
false);
- rolloutGridContainer.addContainerProperty(SPUILabelDefinitions.VAR_NUMBER_OF_GROUPS, Integer.class, 0, false,
+ rolloutGridContainer.addContainerProperty(SPUILabelDefinitions.VAR_NUMBER_OF_GROUPS, Long.class, 0, false,
false);
rolloutGridContainer.addContainerProperty(SPUILabelDefinitions.VAR_TOTAL_TARGETS, String.class, "0", false,
false);
@@ -177,8 +189,9 @@ public class RolloutListGrid extends AbstractGrid {
@Override
protected void setColumnExpandRatio() {
- getColumn(SPUILabelDefinitions.VAR_NAME).setMinimumWidth(40);
- getColumn(SPUILabelDefinitions.VAR_NAME).setMaximumWidth(150);
+
+ getColumn(ROLLOUT_RENDERER_DATA).setMinimumWidth(40);
+ getColumn(ROLLOUT_RENDERER_DATA).setMaximumWidth(150);
getColumn(SPUILabelDefinitions.VAR_DIST_NAME_VERSION).setMinimumWidth(40);
getColumn(SPUILabelDefinitions.VAR_DIST_NAME_VERSION).setMaximumWidth(150);
@@ -202,7 +215,7 @@ public class RolloutListGrid extends AbstractGrid {
@Override
protected void setColumnHeaderNames() {
- getColumn(SPUILabelDefinitions.VAR_NAME).setHeaderCaption(i18n.get("header.name"));
+ getColumn(ROLLOUT_RENDERER_DATA).setHeaderCaption(i18n.get("header.name"));
getColumn(SPUILabelDefinitions.VAR_DIST_NAME_VERSION).setHeaderCaption(i18n.get("header.distributionset"));
getColumn(SPUILabelDefinitions.VAR_NUMBER_OF_GROUPS).setHeaderCaption(i18n.get("header.numberofgroups"));
getColumn(SPUILabelDefinitions.VAR_TOTAL_TARGETS).setHeaderCaption(i18n.get("header.total.targets"));
@@ -225,7 +238,7 @@ public class RolloutListGrid extends AbstractGrid {
@Override
protected void setColumnProperties() {
final List