Rollout management issues
Signed-off-by: venu1278 <venugopal.boodidadinne@in.bosch.com>
This commit is contained in:
@@ -13,6 +13,11 @@ import com.vaadin.client.renderers.ClickableRenderer;
|
|||||||
import com.vaadin.client.ui.VButton;
|
import com.vaadin.client.ui.VButton;
|
||||||
import com.vaadin.client.widget.grid.RendererCellReference;
|
import com.vaadin.client.widget.grid.RendererCellReference;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renders button with provided CustomObject.
|
||||||
|
* Used to display button with link.
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class CustomObjectRenederer extends ClickableRenderer<CustomObject, VButton> {
|
public class CustomObjectRenederer extends ClickableRenderer<CustomObject, VButton> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -15,26 +15,36 @@ import com.vaadin.ui.renderers.ClickableRenderer;
|
|||||||
|
|
||||||
import elemental.json.JsonValue;
|
import elemental.json.JsonValue;
|
||||||
|
|
||||||
public class CustomObjectRenderer extends ClickableRenderer<CustomObject> {
|
/**
|
||||||
|
* Renders button with provided CustomObject.
|
||||||
/**
|
* Used to display button with link.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
public class CustomObjectRenderer extends ClickableRenderer<CustomObject> {
|
||||||
|
|
||||||
private static final long serialVersionUID = -8754180585906263554L;
|
private static final long serialVersionUID = -8754180585906263554L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new image renderer.
|
* Creates a new custom object renderer.
|
||||||
*/
|
*/
|
||||||
public CustomObjectRenderer() {
|
public CustomObjectRenderer() {
|
||||||
super(CustomObject.class, null);
|
super(CustomObject.class, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize custom object renderer with {@link Class<CustomObject>}
|
||||||
|
*
|
||||||
|
* @param presentationType
|
||||||
|
* Class<CustomObject>
|
||||||
|
*/
|
||||||
|
|
||||||
public CustomObjectRenderer(Class<CustomObject> presentationType) {
|
public CustomObjectRenderer(Class<CustomObject> presentationType) {
|
||||||
super(presentationType);
|
super(presentationType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new image renderer and adds the given click listener to it.
|
* Creates a new custom object renderer and adds the given click listener to it.
|
||||||
*
|
*
|
||||||
* @param listener
|
* @param listener
|
||||||
* the click listener to register
|
* the click listener to register
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import org.eclipse.hawkbit.ui.customrenderers.client.renderers.CustomObject;
|
|||||||
import com.vaadin.server.FontAwesome;
|
import com.vaadin.server.FontAwesome;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Proxy rollout with suctome properties.
|
* Proxy rollout with custom properties.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ProxyRollout extends Rollout {
|
public class ProxyRollout extends Rollout {
|
||||||
|
|||||||
@@ -97,6 +97,10 @@ public class RolloutListGrid extends AbstractGrid {
|
|||||||
|
|
||||||
private transient Map<RolloutStatus, StatusFontIcon> statusIconMap = new EnumMap<>(RolloutStatus.class);
|
private transient Map<RolloutStatus, StatusFontIcon> statusIconMap = new EnumMap<>(RolloutStatus.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles the RolloutEvent to refresh Grid.
|
||||||
|
*
|
||||||
|
*/
|
||||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||||
void onEvent(final RolloutEvent event) {
|
void onEvent(final RolloutEvent event) {
|
||||||
switch (event) {
|
switch (event) {
|
||||||
@@ -419,6 +423,9 @@ public class RolloutListGrid extends AbstractGrid {
|
|||||||
((LazyQueryContainer) getContainerDataSource()).refresh();
|
((LazyQueryContainer) getContainerDataSource()).refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generator to generate fontIcon by String.
|
||||||
|
*/
|
||||||
public final class FontIconGenerator extends PropertyValueGenerator<String> {
|
public final class FontIconGenerator extends PropertyValueGenerator<String> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 2544026030795375748L;
|
private static final long serialVersionUID = 2544026030795375748L;
|
||||||
@@ -585,11 +592,9 @@ public class RolloutListGrid extends AbstractGrid {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Converter to convert 0 to empty, if total target groups is zero.
|
||||||
* Converter to convert 0 to empty , if total target groups is zero.
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class TotalTargetGroupsConverter implements Converter<String, Long> {
|
class TotalTargetGroupsConverter implements Converter<String, Long> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 6589305227035220369L;
|
private static final long serialVersionUID = 6589305227035220369L;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import org.eclipse.hawkbit.repository.model.RolloutGroup;
|
|||||||
import org.eclipse.hawkbit.ui.customrenderers.client.renderers.CustomObject;
|
import org.eclipse.hawkbit.ui.customrenderers.client.renderers.CustomObject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Proxy rollout group with suctome properties.
|
* Proxy rollout group with custom properties.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ProxyRolloutGroup extends RolloutGroup {
|
public class ProxyRolloutGroup extends RolloutGroup {
|
||||||
|
|||||||
Reference in New Issue
Block a user