Reduce some duplicate code
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
This commit is contained in:
@@ -14,12 +14,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.hawkbit.ui.common.AbstractAcceptCriteria;
|
||||
import org.eclipse.hawkbit.ui.management.event.DragEvent;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.UINotification;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
|
||||
import com.vaadin.spring.annotation.SpringComponent;
|
||||
import com.vaadin.spring.annotation.ViewScope;
|
||||
@@ -28,8 +23,6 @@ import com.vaadin.ui.Component;
|
||||
/**
|
||||
* Upload UI View for Accept criteria.
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SpringComponent
|
||||
@ViewScope
|
||||
@@ -41,29 +34,6 @@ public class UploadViewAcceptCriteria extends AbstractAcceptCriteria {
|
||||
|
||||
private static final Map<String, Object> DROP_HINTS_CONFIGS = createDropHintConfigurations();
|
||||
|
||||
@Autowired
|
||||
private transient UINotification uiNotification;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@Override
|
||||
protected void analyseDragComponent(final Component compsource) {
|
||||
final String sourceID = getComponentId(compsource);
|
||||
final Object event = DROP_HINTS_CONFIGS.get(sourceID);
|
||||
eventBus.publish(this, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void hideDropHints() {
|
||||
eventBus.publish(this, DragEvent.HIDE_DROP_HINT);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void invalidDrop() {
|
||||
uiNotification.displayValidationError(SPUILabelDefinitions.ACTION_NOT_ALLOWED);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getComponentId(final Component component) {
|
||||
String id = component.getId();
|
||||
@@ -78,11 +48,6 @@ public class UploadViewAcceptCriteria extends AbstractAcceptCriteria {
|
||||
return DROP_HINTS_CONFIGS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void publishDragStartEvent(final Object event) {
|
||||
eventBus.publish(this, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Map<String, List<String>> getDropConfigurations() {
|
||||
return DROP_CONFIGS;
|
||||
|
||||
@@ -11,22 +11,15 @@ package org.eclipse.hawkbit.ui.artifacts.footer;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.UploadArtifactUIEvent;
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.UploadViewAcceptCriteria;
|
||||
import org.eclipse.hawkbit.ui.artifacts.state.ArtifactUploadState;
|
||||
import org.eclipse.hawkbit.ui.common.footer.AbstractDeleteActionsLayout;
|
||||
import org.eclipse.hawkbit.ui.management.event.DragEvent;
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.UINotification;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
import org.vaadin.spring.events.EventScope;
|
||||
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
||||
|
||||
@@ -50,18 +43,6 @@ public class SMDeleteActionsLayout extends AbstractDeleteActionsLayout {
|
||||
|
||||
private static final long serialVersionUID = -3273982053389866299L;
|
||||
|
||||
@Autowired
|
||||
private I18N i18n;
|
||||
|
||||
@Autowired
|
||||
private SpPermissionChecker permChecker;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@Autowired
|
||||
private transient UINotification notification;
|
||||
|
||||
@Autowired
|
||||
private ArtifactUploadState artifactUploadState;
|
||||
|
||||
@@ -71,22 +52,6 @@ public class SMDeleteActionsLayout extends AbstractDeleteActionsLayout {
|
||||
@Autowired
|
||||
private UploadViewAcceptCriteria uploadViewAcceptCriteria;
|
||||
|
||||
@Override
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
super.init();
|
||||
eventBus.subscribe(this);
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
/*
|
||||
* It's good manners to do this, even though vaadin-spring will
|
||||
* automatically unsubscribe when this UI is garbage collected.
|
||||
*/
|
||||
eventBus.unsubscribe(this);
|
||||
}
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
void onEvent(final UploadArtifactUIEvent event) {
|
||||
|
||||
@@ -211,26 +176,11 @@ public class SMDeleteActionsLayout extends AbstractDeleteActionsLayout {
|
||||
updateActionsCount(count);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getNoActionsButtonLabel() {
|
||||
return i18n.get("button.no.actions");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getActionsButtonLabel() {
|
||||
return i18n.get("button.actions");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void restoreActionCount() {
|
||||
updateSWActionCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getUnsavedActionsWindowCaption() {
|
||||
return i18n.get("caption.save.window");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void unsavedActionsWindowClosed() {
|
||||
final String message = uploadViewConfirmationWindowLayout.getConsolidatedMessage();
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.artifacts.smtable;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.SoftwareModuleEvent;
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.SoftwareModuleEvent.SoftwareModuleEventType;
|
||||
@@ -19,10 +15,8 @@ import org.eclipse.hawkbit.ui.artifacts.state.ArtifactUploadState;
|
||||
import org.eclipse.hawkbit.ui.common.detailslayout.AbstractTableDetailsLayout;
|
||||
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
import org.vaadin.spring.events.EventScope;
|
||||
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
||||
|
||||
@@ -46,38 +40,16 @@ public class SoftwareModuleDetails extends AbstractTableDetailsLayout {
|
||||
|
||||
private static final long serialVersionUID = -4900381301076646366L;
|
||||
|
||||
@Autowired
|
||||
private I18N i18n;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@Autowired
|
||||
private SpPermissionChecker permissionChecker;
|
||||
|
||||
@Autowired
|
||||
private SoftwareModuleAddUpdateWindow softwareModuleAddUpdateWindow;
|
||||
|
||||
@Autowired
|
||||
private ArtifactUploadState artifactUploadState;
|
||||
|
||||
private UI ui;
|
||||
|
||||
private Long swModuleId;
|
||||
|
||||
private SoftwareModule selectedSwModule;
|
||||
|
||||
/**
|
||||
* Initialize the component.
|
||||
*/
|
||||
@Override
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
super.init();
|
||||
ui = UI.getCurrent();
|
||||
eventBus.subscribe(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected String getEditButtonId() {
|
||||
return SPUIComponetIdProvider.UPLOAD_SW_MODULE_EDIT_BUTTON;
|
||||
@@ -175,58 +147,24 @@ public class SoftwareModuleDetails extends AbstractTableDetailsLayout {
|
||||
}
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
/*
|
||||
* It's good manners to do this, even though vaadin-spring will
|
||||
* automatically unsubscribe when this UI is garbage collected.
|
||||
*/
|
||||
eventBus.unsubscribe(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.hawkbit.server.ui.common.detailslayout.TableDetailsLayout#
|
||||
* getDefaultCaption()
|
||||
*/
|
||||
@Override
|
||||
protected String getDefaultCaption() {
|
||||
return i18n.get("upload.swModuleTable.header");
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.hawkbit.server.ui.common.detailslayout.TableDetailsLayout#
|
||||
* onLoadIsSwModuleSelected()
|
||||
*/
|
||||
@Override
|
||||
protected Boolean onLoadIsTableRowSelected() {
|
||||
return artifactUploadState.getSelectedBaseSoftwareModule().isPresent();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.hawkbit.server.ui.common.detailslayout.TableDetailsLayout#
|
||||
* onLoadIsTableMaximized()
|
||||
*/
|
||||
|
||||
@Override
|
||||
protected Boolean onLoadIsTableMaximized() {
|
||||
return artifactUploadState.isSwModuleTableMaximized();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.hawkbit.server.ui.common.detailslayout.TableDetailsLayout#
|
||||
* populateDetailsWidget()
|
||||
*/
|
||||
|
||||
@Override
|
||||
protected void populateDetailsWidget() {
|
||||
populateDetailsWidget(selectedSwModule);
|
||||
@@ -266,12 +204,7 @@ public class SoftwareModuleDetails extends AbstractTableDetailsLayout {
|
||||
return permissionChecker.hasUpdateDistributionPermission();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see hawkbit.server.ui.common.detailslayout.AbstractTableDetailsLayout#
|
||||
* getTabSheetId()
|
||||
*/
|
||||
|
||||
@Override
|
||||
protected String getTabSheetId() {
|
||||
return null;
|
||||
|
||||
@@ -8,20 +8,14 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.artifacts.smtable;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.SMFilterEvent;
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.SoftwareModuleEvent;
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.SoftwareModuleEvent.SoftwareModuleEventType;
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.UploadArtifactUIEvent;
|
||||
import org.eclipse.hawkbit.ui.artifacts.state.ArtifactUploadState;
|
||||
import org.eclipse.hawkbit.ui.common.table.AbstractTableHeader;
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
import org.vaadin.spring.events.EventScope;
|
||||
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
||||
|
||||
@@ -44,31 +38,12 @@ public class SoftwareModuleTableHeader extends AbstractTableHeader {
|
||||
|
||||
private static final long serialVersionUID = 242961845006626297L;
|
||||
|
||||
@Autowired
|
||||
private I18N i18n;
|
||||
|
||||
@Autowired
|
||||
private SpPermissionChecker permChecker;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventbus;
|
||||
|
||||
@Autowired
|
||||
private ArtifactUploadState artifactUploadState;
|
||||
|
||||
@Autowired
|
||||
private SoftwareModuleAddUpdateWindow softwareModuleAddUpdateWindow;
|
||||
|
||||
/**
|
||||
* Initialize the components.
|
||||
*/
|
||||
@Override
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
super.init();
|
||||
eventbus.subscribe(this);
|
||||
}
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
void onEvent(final UploadArtifactUIEvent event) {
|
||||
if (event == UploadArtifactUIEvent.HIDE_FILTER_BY_TYPE) {
|
||||
@@ -76,14 +51,6 @@ public class SoftwareModuleTableHeader extends AbstractTableHeader {
|
||||
}
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
/*
|
||||
* It's good manners to do this, even though vaadin-spring will
|
||||
* automatically unsubscribe when this UI is garbage collected.
|
||||
*/
|
||||
eventbus.unsubscribe(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getHeaderCaption() {
|
||||
|
||||
@@ -8,21 +8,17 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.artifacts.smtype;
|
||||
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.SoftwareModuleTypeEvent;
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.UploadArtifactUIEvent;
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.UploadViewAcceptCriteria;
|
||||
import org.eclipse.hawkbit.ui.artifacts.state.ArtifactUploadState;
|
||||
import org.eclipse.hawkbit.ui.common.SoftwareModuleTypeBeanQuery;
|
||||
import org.eclipse.hawkbit.ui.common.filterlayout.AbstractFilterButtonClickBehaviour;
|
||||
import org.eclipse.hawkbit.ui.common.filterlayout.AbstractFilterButtons;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.addons.lazyquerycontainer.BeanQueryFactory;
|
||||
import org.vaadin.addons.lazyquerycontainer.LazyQueryContainer;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
import org.vaadin.spring.events.EventScope;
|
||||
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
||||
|
||||
@@ -48,26 +44,6 @@ public class SMTypeFilterButtons extends AbstractFilterButtons {
|
||||
@Autowired
|
||||
private UploadViewAcceptCriteria uploadViewAcceptCriteria;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
/**
|
||||
* Initialize component.
|
||||
*
|
||||
* @param filterButtonClickBehaviour
|
||||
* the clickable behaviour.
|
||||
*/
|
||||
@Override
|
||||
public void init(final AbstractFilterButtonClickBehaviour filterButtonClickBehaviour) {
|
||||
super.init(filterButtonClickBehaviour);
|
||||
eventBus.subscribe(this);
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
eventBus.unsubscribe(this);
|
||||
}
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
void onEvent(final SoftwareModuleTypeEvent event) {
|
||||
if (event.getSoftwareModuleTypeEnum() == SoftwareModuleTypeEvent.SoftwareModuleTypeEnum.ADD_SOFTWARE_MODULE_TYPE
|
||||
|
||||
@@ -10,7 +10,6 @@ package org.eclipse.hawkbit.ui.artifacts.smtype;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.UploadArtifactUIEvent;
|
||||
import org.eclipse.hawkbit.ui.artifacts.state.ArtifactUploadState;
|
||||
import org.eclipse.hawkbit.ui.common.filterlayout.AbstractFilterHeader;
|
||||
@@ -18,7 +17,6 @@ import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
|
||||
import com.vaadin.spring.annotation.SpringComponent;
|
||||
import com.vaadin.spring.annotation.ViewScope;
|
||||
@@ -35,12 +33,6 @@ public class SMTypeFilterHeader extends AbstractFilterHeader {
|
||||
|
||||
private static final long serialVersionUID = -4855810338059032342L;
|
||||
|
||||
@Autowired
|
||||
private SpPermissionChecker permChecker;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventbus;
|
||||
|
||||
@Autowired
|
||||
private ArtifactUploadState artifactUploadState;
|
||||
|
||||
@@ -84,7 +76,7 @@ public class SMTypeFilterHeader extends AbstractFilterHeader {
|
||||
@Override
|
||||
protected void hideFilterButtonLayout() {
|
||||
artifactUploadState.setSwTypeFilterClosed(true);
|
||||
eventbus.publish(this, UploadArtifactUIEvent.HIDE_FILTER_BY_TYPE);
|
||||
eventBus.publish(this, UploadArtifactUIEvent.HIDE_FILTER_BY_TYPE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,8 +13,13 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.hawkbit.ui.management.event.DragEvent;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.UINotification;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
|
||||
import com.vaadin.event.dd.DragAndDropEvent;
|
||||
import com.vaadin.event.dd.acceptcriteria.ServerSideCriterion;
|
||||
@@ -27,9 +32,6 @@ import com.vaadin.ui.Table;
|
||||
/**
|
||||
* Abstract class for Accept criteria.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
public abstract class AbstractAcceptCriteria extends ServerSideCriterion {
|
||||
|
||||
@@ -37,13 +39,12 @@ public abstract class AbstractAcceptCriteria extends ServerSideCriterion {
|
||||
|
||||
private int previousRowCount;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.vaadin.event.dd.acceptcriteria.AcceptCriterion#accept(com.vaadin.
|
||||
* event.dd.DragAndDropEvent )
|
||||
*/
|
||||
@Autowired
|
||||
protected transient UINotification uiNotification;
|
||||
|
||||
@Autowired
|
||||
protected transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@Override
|
||||
public boolean accept(final DragAndDropEvent dragEvent) {
|
||||
final Component compsource = dragEvent.getTransferable().getSourceComponent();
|
||||
@@ -129,7 +130,7 @@ public abstract class AbstractAcceptCriteria extends ServerSideCriterion {
|
||||
protected void analyseDragComponent(final Component compsource) {
|
||||
final String sourceID = getComponentId(compsource);
|
||||
final Object event = getDropHintConfigurations().get(sourceID);
|
||||
publishDragStartEvent(event);
|
||||
eventBus.publish(this, event);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -159,23 +160,19 @@ public abstract class AbstractAcceptCriteria extends ServerSideCriterion {
|
||||
*/
|
||||
protected abstract String getComponentId(final Component component);
|
||||
|
||||
/**
|
||||
* publish the given event into eventBus.
|
||||
*
|
||||
* @param event
|
||||
* to be published in eventBus.
|
||||
*/
|
||||
protected abstract void publishDragStartEvent(Object event);
|
||||
|
||||
/**
|
||||
* Hide the drop hints. Dragging is stopped.
|
||||
*/
|
||||
protected abstract void hideDropHints();
|
||||
protected void hideDropHints() {
|
||||
eventBus.publish(this, DragEvent.HIDE_DROP_HINT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display invalid drop message.
|
||||
*/
|
||||
protected abstract void invalidDrop();
|
||||
protected void invalidDrop() {
|
||||
uiNotification.displayValidationError(SPUILabelDefinitions.ACTION_NOT_ALLOWED);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
|
||||
@@ -10,6 +10,10 @@ package org.eclipse.hawkbit.ui.common.detailslayout;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.repository.model.Target;
|
||||
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorder;
|
||||
@@ -19,6 +23,8 @@ import org.eclipse.hawkbit.ui.utils.SPDateTimeUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIStyleDefinitions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
|
||||
import com.vaadin.server.FontAwesome;
|
||||
import com.vaadin.shared.ui.label.ContentMode;
|
||||
@@ -27,6 +33,7 @@ import com.vaadin.ui.Button;
|
||||
import com.vaadin.ui.HorizontalLayout;
|
||||
import com.vaadin.ui.Label;
|
||||
import com.vaadin.ui.TabSheet;
|
||||
import com.vaadin.ui.UI;
|
||||
import com.vaadin.ui.VerticalLayout;
|
||||
|
||||
/**
|
||||
@@ -37,6 +44,17 @@ public abstract class AbstractTableDetailsLayout extends VerticalLayout {
|
||||
|
||||
private static final long serialVersionUID = 4862529368471627190L;
|
||||
|
||||
@Autowired
|
||||
protected I18N i18n;
|
||||
|
||||
@Autowired
|
||||
protected transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@Autowired
|
||||
protected SpPermissionChecker permissionChecker;
|
||||
|
||||
protected UI ui;
|
||||
|
||||
private Label caption;
|
||||
|
||||
private Button editButton;
|
||||
@@ -54,7 +72,9 @@ public abstract class AbstractTableDetailsLayout extends VerticalLayout {
|
||||
/**
|
||||
* Initialize components.
|
||||
*/
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
ui = UI.getCurrent();
|
||||
createComponents();
|
||||
buildLayout();
|
||||
/**
|
||||
@@ -62,6 +82,12 @@ public abstract class AbstractTableDetailsLayout extends VerticalLayout {
|
||||
* selected in table.
|
||||
*/
|
||||
restoreState();
|
||||
eventBus.subscribe(this);
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
eventBus.unsubscribe(this);
|
||||
}
|
||||
|
||||
private void createComponents() {
|
||||
|
||||
@@ -11,13 +11,17 @@ package org.eclipse.hawkbit.ui.common.filterlayout;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||
import org.eclipse.hawkbit.ui.decorators.SPUITagButtonStyle;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIStyleDefinitions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.addons.lazyquerycontainer.LazyQueryContainer;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
|
||||
import com.vaadin.data.Item;
|
||||
import com.vaadin.event.dd.DropHandler;
|
||||
@@ -38,10 +42,13 @@ import com.vaadin.ui.themes.ValoTheme;
|
||||
public abstract class AbstractFilterButtons extends Table {
|
||||
|
||||
private static final long serialVersionUID = 7783305719009746375L;
|
||||
|
||||
|
||||
private static final String DEFAULT_GREEN = "rgb(44,151,32)";
|
||||
|
||||
protected static final String FILTER_BUTTON_COLUMN = "filterButton";
|
||||
|
||||
@Autowired
|
||||
protected transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
private AbstractFilterButtonClickBehaviour filterButtonClickBehaviour;
|
||||
|
||||
@@ -54,6 +61,12 @@ public abstract class AbstractFilterButtons extends Table {
|
||||
public void init(final AbstractFilterButtonClickBehaviour filterButtonClickBehaviour) {
|
||||
this.filterButtonClickBehaviour = filterButtonClickBehaviour;
|
||||
createTable();
|
||||
eventBus.subscribe(this);
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
eventBus.unsubscribe(this);
|
||||
}
|
||||
|
||||
private void createTable() {
|
||||
@@ -88,12 +101,7 @@ public abstract class AbstractFilterButtons extends Table {
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
protected void addColumn() {
|
||||
addGeneratedColumn(FILTER_BUTTON_COLUMN, new ColumnGenerator() {
|
||||
@Override
|
||||
public Object generateCell(final Table source, final Object itemId, final Object columnId) {
|
||||
return addGeneratedCell(itemId);
|
||||
}
|
||||
});
|
||||
addGeneratedColumn(FILTER_BUTTON_COLUMN, (source, itemId, columnId) -> addGeneratedCell(itemId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,10 +8,13 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.common.filterlayout;
|
||||
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorder;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIStyleDefinitions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
|
||||
import com.vaadin.server.FontAwesome;
|
||||
import com.vaadin.ui.Alignment;
|
||||
@@ -31,6 +34,13 @@ public abstract class AbstractFilterHeader extends VerticalLayout {
|
||||
|
||||
private static final long serialVersionUID = -1388340600522323332L;
|
||||
|
||||
|
||||
@Autowired
|
||||
protected SpPermissionChecker permChecker;
|
||||
|
||||
@Autowired
|
||||
protected transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
private Label title;
|
||||
|
||||
private Button config;
|
||||
|
||||
@@ -8,12 +8,19 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.common.footer;
|
||||
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmall;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIStyleDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.UINotification;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
|
||||
import com.vaadin.event.dd.DragAndDropEvent;
|
||||
import com.vaadin.event.dd.DropHandler;
|
||||
@@ -42,6 +49,18 @@ public abstract class AbstractDeleteActionsLayout extends VerticalLayout impleme
|
||||
|
||||
private static final long serialVersionUID = -6047975388519155509L;
|
||||
|
||||
@Autowired
|
||||
protected I18N i18n;
|
||||
|
||||
@Autowired
|
||||
protected SpPermissionChecker permChecker;
|
||||
|
||||
@Autowired
|
||||
protected transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@Autowired
|
||||
protected transient UINotification notification;
|
||||
|
||||
private DragAndDropWrapper deleteWrapper;
|
||||
|
||||
private Button noActionBtn;
|
||||
@@ -59,6 +78,12 @@ public abstract class AbstractDeleteActionsLayout extends VerticalLayout impleme
|
||||
buildLayout();
|
||||
reload();
|
||||
}
|
||||
eventBus.subscribe(this);
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
eventBus.unsubscribe(this);
|
||||
}
|
||||
|
||||
private void reload() {
|
||||
@@ -311,14 +336,27 @@ public abstract class AbstractDeleteActionsLayout extends VerticalLayout impleme
|
||||
*
|
||||
* @return the no actions label.
|
||||
*/
|
||||
protected abstract String getNoActionsButtonLabel();
|
||||
protected String getNoActionsButtonLabel() {
|
||||
return i18n.get("button.no.actions");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the pending actions button label.
|
||||
*
|
||||
* @return the actions label.
|
||||
*/
|
||||
protected abstract String getActionsButtonLabel();
|
||||
protected String getActionsButtonLabel() {
|
||||
return i18n.get("button.actions");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get caption of unsaved actions window.
|
||||
*
|
||||
* @return caption of the window.
|
||||
*/
|
||||
protected String getUnsavedActionsWindowCaption() {
|
||||
return i18n.get("caption.save.window");
|
||||
}
|
||||
|
||||
/**
|
||||
* reload the count value.
|
||||
@@ -330,13 +368,6 @@ public abstract class AbstractDeleteActionsLayout extends VerticalLayout impleme
|
||||
*/
|
||||
protected abstract void restoreBulkUploadStatusCount();
|
||||
|
||||
/**
|
||||
* Get caption of unsaved actions window.
|
||||
*
|
||||
* @return caption of the window.
|
||||
*/
|
||||
protected abstract String getUnsavedActionsWindowCaption();
|
||||
|
||||
/**
|
||||
* This method will be called when unsaved actions window is closed.
|
||||
*/
|
||||
|
||||
@@ -8,7 +8,13 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.common.grid;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
|
||||
import com.vaadin.data.Container;
|
||||
import com.vaadin.data.Container.Indexed;
|
||||
@@ -21,10 +27,18 @@ import com.vaadin.ui.Grid;
|
||||
public abstract class AbstractGrid extends Grid {
|
||||
|
||||
private static final long serialVersionUID = 4856562746502217630L;
|
||||
|
||||
@Autowired
|
||||
protected I18N i18n;
|
||||
|
||||
@Autowired
|
||||
protected transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
|
||||
/**
|
||||
* Initialize the components.
|
||||
*/
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
setSizeFull();
|
||||
setImmediate(true);
|
||||
@@ -32,6 +46,12 @@ public abstract class AbstractGrid extends Grid {
|
||||
setSelectionMode(SelectionMode.NONE);
|
||||
setColumnReorderingAllowed(true);
|
||||
addNewContainerDS();
|
||||
eventBus.subscribe(this);
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
eventBus.unsubscribe(this);
|
||||
}
|
||||
|
||||
public void addNewContainerDS() {
|
||||
@@ -43,13 +63,13 @@ public abstract class AbstractGrid extends Grid {
|
||||
setColumnHeaderNames();
|
||||
addColumnRenderes();
|
||||
|
||||
CellDescriptionGenerator cellDescriptionGenerator = getDescriptionGenerator();
|
||||
final CellDescriptionGenerator cellDescriptionGenerator = getDescriptionGenerator();
|
||||
if (getDescriptionGenerator() != null) {
|
||||
setCellDescriptionGenerator(cellDescriptionGenerator);
|
||||
}
|
||||
|
||||
// Allow column hiding
|
||||
for (Column c : getColumns()) {
|
||||
for (final Column c : getColumns()) {
|
||||
c.setHidable(true);
|
||||
}
|
||||
setHiddenColumns();
|
||||
|
||||
@@ -8,13 +8,20 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.common.table;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.ui.components.SPUIButton;
|
||||
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorder;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIStyleDefinitions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
|
||||
import com.vaadin.event.dd.DropHandler;
|
||||
import com.vaadin.server.FontAwesome;
|
||||
@@ -37,6 +44,16 @@ import com.vaadin.ui.VerticalLayout;
|
||||
public abstract class AbstractTableHeader extends VerticalLayout {
|
||||
|
||||
private static final long serialVersionUID = 4881626370291837175L;
|
||||
|
||||
@Autowired
|
||||
protected I18N i18n;
|
||||
|
||||
@Autowired
|
||||
protected SpPermissionChecker permChecker;
|
||||
|
||||
@Autowired
|
||||
protected transient EventBus.SessionEventBus eventbus;
|
||||
|
||||
|
||||
private Label headerCaption;
|
||||
|
||||
@@ -59,10 +76,17 @@ public abstract class AbstractTableHeader extends VerticalLayout {
|
||||
/**
|
||||
* Initialze components.
|
||||
*/
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
createComponents();
|
||||
buildLayout();
|
||||
restoreState();
|
||||
eventbus.subscribe(this);
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
eventbus.unsubscribe(this);
|
||||
}
|
||||
|
||||
private void createComponents() {
|
||||
|
||||
@@ -114,7 +114,7 @@ public class DistributionTagToken extends AbstractTagToken {
|
||||
distributionList.add(selectedDS.getId());
|
||||
final DistributionSetTagAssignmentResult result = distributionSetManagement.toggleTagAssignment(distributionList,
|
||||
tagNameSelected);
|
||||
uinotification.displaySuccess(HawkbitCommonUtil.getDistributionTagAssignmentMsg(tagNameSelected, result, i18n));
|
||||
uinotification.displaySuccess(HawkbitCommonUtil.createAssignmentMessage(tagNameSelected, result, i18n));
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ public class DistributionTagToken extends AbstractTagToken {
|
||||
|
||||
protected boolean isAssign(final DistributionSetTagAssignmentResult assignmentResult) {
|
||||
if (assignmentResult.getAssigned() > 0) {
|
||||
final List<Long> assignedDsNames = assignmentResult.getAssignedDs().stream().map(t -> t.getId())
|
||||
final List<Long> assignedDsNames = assignmentResult.getAssignedEntity().stream().map(t -> t.getId())
|
||||
.collect(Collectors.toList());
|
||||
if (assignedDsNames.contains(managementUIState.getLastSelectedDsIdName().getId())) {
|
||||
return true;
|
||||
@@ -225,7 +225,7 @@ public class DistributionTagToken extends AbstractTagToken {
|
||||
|
||||
protected boolean isUnassign(final DistributionSetTagAssignmentResult assignmentResult) {
|
||||
if (assignmentResult.getUnassigned() > 0) {
|
||||
final List<Long> assignedDsNames = assignmentResult.getUnassignedDs().stream().map(t -> t.getId())
|
||||
final List<Long> assignedDsNames = assignmentResult.getUnassignedEntity().stream().map(t -> t.getId())
|
||||
.collect(Collectors.toList());
|
||||
if (assignedDsNames.contains(managementUIState.getLastSelectedDsIdName().getId())) {
|
||||
return true;
|
||||
|
||||
@@ -81,7 +81,7 @@ public class TargetTagToken extends AbstractTargetTagToken {
|
||||
final Set<String> targetList = new HashSet<>();
|
||||
targetList.add(selectedTarget.getControllerId());
|
||||
final TargetTagAssignmentResult result = targetManagement.toggleTagAssignment(targetList, tagNameSelected);
|
||||
uinotification.displaySuccess(HawkbitCommonUtil.getTargetTagAssigmentMsg(tagNameSelected, result, i18n));
|
||||
uinotification.displaySuccess(HawkbitCommonUtil.createAssignmentMessage(tagNameSelected, result, i18n));
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ public class TargetTagToken extends AbstractTargetTagToken {
|
||||
|
||||
protected boolean isAssign(final TargetTagAssignmentResult assignmentResult) {
|
||||
if (assignmentResult.getAssigned() > 0) {
|
||||
final List<String> assignedTargetNames = assignmentResult.getAssignedTargets().stream()
|
||||
final List<String> assignedTargetNames = assignmentResult.getAssignedEntity().stream()
|
||||
.map(t -> t.getControllerId()).collect(Collectors.toList());
|
||||
if (assignedTargetNames.contains(managementUIState.getLastSelectedTargetIdName().getControllerId())) {
|
||||
return true;
|
||||
@@ -162,7 +162,7 @@ public class TargetTagToken extends AbstractTargetTagToken {
|
||||
|
||||
protected boolean isUnassign(final TargetTagAssignmentResult assignmentResult) {
|
||||
if (assignmentResult.getUnassigned() > 0) {
|
||||
final List<String> unassignedTargetNamesList = assignmentResult.getUnassignedTargets().stream()
|
||||
final List<String> unassignedTargetNamesList = assignmentResult.getUnassignedEntity().stream()
|
||||
.map(t -> t.getControllerId()).collect(Collectors.toList());
|
||||
if (unassignedTargetNamesList.contains(managementUIState.getLastSelectedTargetIdName().getControllerId())) {
|
||||
return true;
|
||||
|
||||
@@ -8,10 +8,7 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.distributions.disttype;
|
||||
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.ui.common.DistributionSetTypeBeanQuery;
|
||||
import org.eclipse.hawkbit.ui.common.filterlayout.AbstractFilterButtonClickBehaviour;
|
||||
import org.eclipse.hawkbit.ui.common.filterlayout.AbstractFilterButtons;
|
||||
import org.eclipse.hawkbit.ui.distributions.event.DistributionSetTypeEvent;
|
||||
import org.eclipse.hawkbit.ui.distributions.event.DistributionsViewAcceptCriteria;
|
||||
@@ -23,7 +20,6 @@ import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.addons.lazyquerycontainer.BeanQueryFactory;
|
||||
import org.vaadin.addons.lazyquerycontainer.LazyQueryContainer;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
import org.vaadin.spring.events.EventScope;
|
||||
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
||||
|
||||
@@ -45,27 +41,12 @@ public class DSTypeFilterButtons extends AbstractFilterButtons {
|
||||
|
||||
private static final long serialVersionUID = 771251569981876005L;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@Autowired
|
||||
private ManageDistUIState manageDistUIState;
|
||||
|
||||
@Autowired
|
||||
private DistributionsViewAcceptCriteria distributionsViewAcceptCriteria;
|
||||
|
||||
/**
|
||||
* Initialize component.
|
||||
*
|
||||
* @param filterButtonClickBehaviour
|
||||
* the clickable behaviour.
|
||||
*/
|
||||
@Override
|
||||
public void init(final AbstractFilterButtonClickBehaviour filterButtonClickBehaviour) {
|
||||
super.init(filterButtonClickBehaviour);
|
||||
eventBus.subscribe(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getButtonsTableId() {
|
||||
|
||||
@@ -140,9 +121,4 @@ public class DSTypeFilterButtons extends AbstractFilterButtons {
|
||||
setContainerDataSource(createButtonsLazyQueryContainer());
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
eventBus.unsubscribe(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,14 +10,12 @@ package org.eclipse.hawkbit.ui.distributions.disttype;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.ui.common.filterlayout.AbstractFilterHeader;
|
||||
import org.eclipse.hawkbit.ui.distributions.event.DistributionsUIEvent;
|
||||
import org.eclipse.hawkbit.ui.distributions.state.ManageDistUIState;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
|
||||
import com.vaadin.spring.annotation.SpringComponent;
|
||||
import com.vaadin.spring.annotation.ViewScope;
|
||||
@@ -34,12 +32,6 @@ public class DSTypeFilterHeader extends AbstractFilterHeader {
|
||||
|
||||
private static final long serialVersionUID = 3433417459392880222L;
|
||||
|
||||
@Autowired
|
||||
private SpPermissionChecker permChecker;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventbus;
|
||||
|
||||
@Autowired
|
||||
private ManageDistUIState manageDistUIState;
|
||||
|
||||
@@ -81,8 +73,7 @@ public class DSTypeFilterHeader extends AbstractFilterHeader {
|
||||
@Override
|
||||
protected void hideFilterButtonLayout() {
|
||||
manageDistUIState.setDistTypeFilterClosed(true);
|
||||
eventbus.publish(this, DistributionsUIEvent.HIDE_DIST_FILTER_BY_TYPE);
|
||||
|
||||
eventBus.publish(this, DistributionsUIEvent.HIDE_DIST_FILTER_BY_TYPE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,12 +13,8 @@ import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.repository.DistributionSetManagement;
|
||||
import org.eclipse.hawkbit.repository.SoftwareManagement;
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSet;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSetIdName;
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
@@ -37,10 +33,8 @@ import org.eclipse.hawkbit.ui.management.dstable.DistributionAddUpdateWindowLayo
|
||||
import org.eclipse.hawkbit.ui.management.event.DistributionTableEvent;
|
||||
import org.eclipse.hawkbit.ui.management.event.DistributionTableEvent.DistributionComponentEvent;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
import org.vaadin.spring.events.EventScope;
|
||||
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
||||
|
||||
@@ -72,15 +66,6 @@ public class DistributionSetDetails extends AbstractTableDetailsLayout {
|
||||
|
||||
private static final String UNASSIGN_SOFT_MODULE = "unassignSoftModule";
|
||||
|
||||
@Autowired
|
||||
private I18N i18n;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@Autowired
|
||||
private SpPermissionChecker permissionChecker;
|
||||
|
||||
@Autowired
|
||||
private ManageDistUIState manageDistUIState;
|
||||
|
||||
@@ -104,21 +89,16 @@ public class DistributionSetDetails extends AbstractTableDetailsLayout {
|
||||
|
||||
private Long dsId;
|
||||
|
||||
private UI ui;
|
||||
|
||||
Map<String, StringBuilder> assignedSWModule = new HashMap<>();
|
||||
|
||||
/**
|
||||
* softwareLayout Initialize the component.
|
||||
*/
|
||||
@Override
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
softwareModuleTable = new SoftwareModuleDetailsTable();
|
||||
softwareModuleTable.init(i18n, true, permissionChecker, distributionSetManagement, eventBus, manageDistUIState);
|
||||
super.init();
|
||||
ui = UI.getCurrent();
|
||||
eventBus.subscribe(this);
|
||||
}
|
||||
|
||||
protected VerticalLayout createTagsLayout() {
|
||||
@@ -321,12 +301,6 @@ public class DistributionSetDetails extends AbstractTableDetailsLayout {
|
||||
this.dsId = dsId;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see hawkbit.server.ui.common.detailslayout.AbstractTableDetailsLayout#
|
||||
* onEdit(com.vaadin.ui .Button.ClickEvent)
|
||||
*/
|
||||
@Override
|
||||
protected void onEdit(final ClickEvent event) {
|
||||
final Window newDistWindow = distributionAddUpdateWindowLayout.getWindow();
|
||||
@@ -336,68 +310,32 @@ public class DistributionSetDetails extends AbstractTableDetailsLayout {
|
||||
newDistWindow.setVisible(Boolean.TRUE);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see hawkbit.server.ui.common.detailslayout.AbstractTableDetailsLayout#
|
||||
* getEditButtonId()
|
||||
*/
|
||||
@Override
|
||||
protected String getEditButtonId() {
|
||||
return SPUIComponetIdProvider.DS_EDIT_BUTTON;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see hawkbit.server.ui.common.detailslayout.AbstractTableDetailsLayout#
|
||||
* onLoadIsSwModuleSelected ()
|
||||
*/
|
||||
@Override
|
||||
protected Boolean onLoadIsTableRowSelected() {
|
||||
return manageDistUIState.getSelectedDistributions().isPresent()
|
||||
&& !manageDistUIState.getSelectedDistributions().get().isEmpty();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see hawkbit.server.ui.common.detailslayout.AbstractTableDetailsLayout#
|
||||
* onLoadIsTableMaximized ()
|
||||
*/
|
||||
@Override
|
||||
protected Boolean onLoadIsTableMaximized() {
|
||||
return manageDistUIState.isDsTableMaximized();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see hawkbit.server.ui.common.detailslayout.AbstractTableDetailsLayout#
|
||||
* populateDetailsWidget()
|
||||
*/
|
||||
@Override
|
||||
protected void populateDetailsWidget() {
|
||||
populateDetailsWidget(selectedDsModule);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see hawkbit.server.ui.common.detailslayout.AbstractTableDetailsLayout#
|
||||
* getDefaultCaption()
|
||||
*/
|
||||
@Override
|
||||
protected String getDefaultCaption() {
|
||||
return i18n.get("distribution.details.header");
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see hawkbit.server.ui.common.detailslayout.AbstractTableDetailsLayout#
|
||||
* addTabs(com.vaadin. ui.TabSheet)
|
||||
*/
|
||||
@Override
|
||||
protected void addTabs(final TabSheet detailsTab) {
|
||||
detailsTab.addTab(createDetailsLayout(), i18n.get("caption.tab.details"), null);
|
||||
@@ -407,23 +345,11 @@ public class DistributionSetDetails extends AbstractTableDetailsLayout {
|
||||
detailsTab.addTab(createLogLayout(), i18n.get("caption.logs.tab"), null);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see hawkbit.server.ui.common.detailslayout.AbstractTableDetailsLayout#
|
||||
* clearDetails()
|
||||
*/
|
||||
@Override
|
||||
protected void clearDetails() {
|
||||
populateDetailsWidget(null);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see hawkbit.server.ui.common.detailslayout.AbstractTableDetailsLayout#
|
||||
* hasEditSoftwareModulePermission()
|
||||
*/
|
||||
@Override
|
||||
protected Boolean hasEditPermission() {
|
||||
return permissionChecker.hasUpdateDistributionPermission();
|
||||
@@ -476,7 +402,7 @@ public class DistributionSetDetails extends AbstractTableDetailsLayout {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
void onEvent(final SaveActionWindowEvent saveActionWindowEvent) {
|
||||
if ((saveActionWindowEvent == SaveActionWindowEvent.SAVED_ASSIGNMENTS
|
||||
@@ -498,21 +424,6 @@ public class DistributionSetDetails extends AbstractTableDetailsLayout {
|
||||
}
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
/*
|
||||
* It's good to do this, even though vaadin-spring will automatically
|
||||
* unsubscribe .
|
||||
*/
|
||||
eventBus.unsubscribe(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see hawkbit.server.ui.common.detailslayout.AbstractTableDetailsLayout#
|
||||
* getTabSheetId()
|
||||
*/
|
||||
@Override
|
||||
protected String getTabSheetId() {
|
||||
return null;
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.distributions.dstable;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.ui.common.table.AbstractTableHeader;
|
||||
import org.eclipse.hawkbit.ui.distributions.event.DistributionsUIEvent;
|
||||
import org.eclipse.hawkbit.ui.distributions.event.DragEvent;
|
||||
@@ -20,10 +16,8 @@ import org.eclipse.hawkbit.ui.management.dstable.DistributionAddUpdateWindowLayo
|
||||
import org.eclipse.hawkbit.ui.management.event.DistributionTableEvent;
|
||||
import org.eclipse.hawkbit.ui.management.event.DistributionTableEvent.DistributionComponentEvent;
|
||||
import org.eclipse.hawkbit.ui.management.event.DistributionTableFilterEvent;
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
import org.vaadin.spring.events.EventScope;
|
||||
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
||||
|
||||
@@ -43,28 +37,12 @@ public class DistributionSetTableHeader extends AbstractTableHeader {
|
||||
|
||||
private static final long serialVersionUID = -3483238438474530748L;
|
||||
|
||||
@Autowired
|
||||
private I18N i18n;
|
||||
|
||||
@Autowired
|
||||
private SpPermissionChecker permChecker;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventbus;
|
||||
|
||||
@Autowired
|
||||
private ManageDistUIState manageDistUIstate;
|
||||
|
||||
@Autowired
|
||||
private DistributionAddUpdateWindowLayout addUpdateWindowLayout;
|
||||
|
||||
@Override
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
super.init();
|
||||
eventbus.subscribe(this);
|
||||
}
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
void onEvent(final DistributionsUIEvent event) {
|
||||
if (event == DistributionsUIEvent.HIDE_DIST_FILTER_BY_TYPE) {
|
||||
@@ -181,11 +159,6 @@ public class DistributionSetTableHeader extends AbstractTableHeader {
|
||||
eventbus.publish(this, DragEvent.HIDE_DROP_HINT);
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
eventbus.unsubscribe(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Boolean isAddNewItemAllowed() {
|
||||
return Boolean.TRUE;
|
||||
|
||||
@@ -16,10 +16,6 @@ import java.util.Map;
|
||||
import org.eclipse.hawkbit.ui.common.AbstractAcceptCriteria;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.UINotification;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
|
||||
import com.vaadin.spring.annotation.SpringComponent;
|
||||
import com.vaadin.spring.annotation.ViewScope;
|
||||
@@ -39,29 +35,6 @@ public class DistributionsViewAcceptCriteria extends AbstractAcceptCriteria {
|
||||
|
||||
private static final Map<String, List<String>> DROP_CONFIGS = createDropConfigurations();
|
||||
|
||||
@Autowired
|
||||
private transient UINotification uiNotification;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@Override
|
||||
protected void analyseDragComponent(final Component compsource) {
|
||||
final String sourceID = getComponentId(compsource);
|
||||
final Object event = DROP_HINTS_CONFIGS.get(sourceID);
|
||||
eventBus.publish(this, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void hideDropHints() {
|
||||
eventBus.publish(this, DragEvent.HIDE_DROP_HINT);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void invalidDrop() {
|
||||
uiNotification.displayValidationError(SPUILabelDefinitions.ACTION_NOT_ALLOWED);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getComponentId(final Component component) {
|
||||
String id = component.getId();
|
||||
@@ -78,11 +51,6 @@ public class DistributionsViewAcceptCriteria extends AbstractAcceptCriteria {
|
||||
return DROP_HINTS_CONFIGS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void publishDragStartEvent(final Object event) {
|
||||
eventBus.publish(this, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Map<String, List<String>> getDropConfigurations() {
|
||||
return DROP_CONFIGS;
|
||||
|
||||
@@ -15,10 +15,6 @@ import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.repository.SystemManagement;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSetIdName;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSetType;
|
||||
@@ -30,13 +26,10 @@ import org.eclipse.hawkbit.ui.distributions.event.DragEvent;
|
||||
import org.eclipse.hawkbit.ui.distributions.event.SaveActionWindowEvent;
|
||||
import org.eclipse.hawkbit.ui.distributions.state.ManageDistUIState;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.UINotification;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
import org.vaadin.spring.events.EventScope;
|
||||
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
||||
|
||||
@@ -65,21 +58,6 @@ public class DSDeleteActionsLayout extends AbstractDeleteActionsLayout {
|
||||
Arrays.asList(DragEvent.DISTRIBUTION_TYPE_DRAG, DragEvent.DISTRIBUTION_DRAG, DragEvent.SOFTWAREMODULE_DRAG,
|
||||
DragEvent.SOFTWAREMODULE_TYPE_DRAG));
|
||||
|
||||
@Autowired
|
||||
private I18N i18n;
|
||||
|
||||
@Autowired
|
||||
private SpPermissionChecker permChecker;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@Autowired
|
||||
private transient UINotification notification;
|
||||
|
||||
@Autowired
|
||||
private transient UINotification uiNotification;
|
||||
|
||||
@Autowired
|
||||
private transient SystemManagement systemManagement;
|
||||
|
||||
@@ -92,28 +70,6 @@ public class DSDeleteActionsLayout extends AbstractDeleteActionsLayout {
|
||||
@Autowired
|
||||
private DistributionsViewAcceptCriteria distributionsViewAcceptCriteria;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.hawkbit.server.ui.common.footer.DeleteActionsLayout#init()
|
||||
*/
|
||||
@Override
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
super.init();
|
||||
eventBus.subscribe(this);
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
/*
|
||||
* It's good manners to do this, even though vaadin-spring will
|
||||
* automatically unsubscribe when this UI is garbage collected.
|
||||
*/
|
||||
eventBus.unsubscribe(this);
|
||||
}
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
void onEvent(final DragEvent event) {
|
||||
if (event == DragEvent.HIDE_DROP_HINT) {
|
||||
@@ -139,77 +95,34 @@ public class DSDeleteActionsLayout extends AbstractDeleteActionsLayout {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.hawkbit.server.ui.common.footer.AbstractDeleteActionsLayout#
|
||||
* hasDeletePermission()
|
||||
*/
|
||||
@Override
|
||||
protected boolean hasDeletePermission() {
|
||||
return permChecker.hasDeleteDistributionPermission();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.hawkbit.server.ui.common.footer.AbstractDeleteActionsLayout#
|
||||
* hasUpdatePermission()
|
||||
*/
|
||||
@Override
|
||||
protected boolean hasUpdatePermission() {
|
||||
|
||||
return permChecker.hasUpdateDistributionPermission();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.hawkbit.server.ui.common.footer.AbstractDeleteActionsLayout#
|
||||
* getDeleteAreaLabel()
|
||||
*/
|
||||
@Override
|
||||
protected String getDeleteAreaLabel() {
|
||||
return i18n.get("label.components.drop.area");
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.hawkbit.server.ui.common.footer.AbstractDeleteActionsLayout#
|
||||
* getDeleteAreaId()
|
||||
*/
|
||||
@Override
|
||||
protected String getDeleteAreaId() {
|
||||
|
||||
return SPUIComponetIdProvider.DELETE_BUTTON_WRAPPER_ID;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.hawkbit.server.ui.common.footer.AbstractDeleteActionsLayout#
|
||||
* getDeleteLayoutAcceptCriteria ()
|
||||
*/
|
||||
@Override
|
||||
protected AcceptCriterion getDeleteLayoutAcceptCriteria() {
|
||||
|
||||
return distributionsViewAcceptCriteria;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.hawkbit.server.ui.common.footer.AbstractDeleteActionsLayout#
|
||||
* processDroppedComponent(com .vaadin.event.dd.DragAndDropEvent)
|
||||
*/
|
||||
@Override
|
||||
protected void processDroppedComponent(final DragAndDropEvent event) {
|
||||
final Component sourceComponent = event.getTransferable().getSourceComponent();
|
||||
@@ -298,7 +211,7 @@ public class DSDeleteActionsLayout extends AbstractDeleteActionsLayout {
|
||||
* message accordingly.
|
||||
*/
|
||||
|
||||
uiNotification.displayValidationError(i18n.get("message.targets.already.deleted"));
|
||||
notification.displayValidationError(i18n.get("message.targets.already.deleted"));
|
||||
} else if (newDeletedDistributionsSize - existingDeletedDistributionsSize != distributionIdNameSet.size()) {
|
||||
/*
|
||||
* Not the all distributions dropped now are added to the delete
|
||||
@@ -306,7 +219,7 @@ public class DSDeleteActionsLayout extends AbstractDeleteActionsLayout {
|
||||
* delete list. Hence display warning message accordingly.
|
||||
*/
|
||||
|
||||
uiNotification.displayValidationError(i18n.get("message.dist.deleted.pending"));
|
||||
notification.displayValidationError(i18n.get("message.dist.deleted.pending"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -366,64 +279,12 @@ public class DSDeleteActionsLayout extends AbstractDeleteActionsLayout {
|
||||
return SPUIComponetIdProvider.UPLOAD_SOFTWARE_MODULE_TABLE.equals(source.getId());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.hawkbit.server.ui.common.footer.AbstractDeleteActionsLayout#
|
||||
* getNoActionsButtonLabel()
|
||||
*/
|
||||
@Override
|
||||
protected String getNoActionsButtonLabel() {
|
||||
return i18n.get("button.no.actions");
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.hawkbit.server.ui.common.footer.AbstractDeleteActionsLayout#
|
||||
* getActionsButtonLabel()
|
||||
*/
|
||||
@Override
|
||||
protected String getActionsButtonLabel() {
|
||||
|
||||
return i18n.get("button.actions");
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.hawkbit.server.ui.common.footer.AbstractDeleteActionsLayout#
|
||||
* reloadActionCount()
|
||||
*/
|
||||
@Override
|
||||
protected void restoreActionCount() {
|
||||
updateDSActionCount();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.hawkbit.server.ui.common.footer.AbstractDeleteActionsLayout#
|
||||
* getUnsavedActionsWindowCaption ()
|
||||
*/
|
||||
@Override
|
||||
protected String getUnsavedActionsWindowCaption() {
|
||||
return i18n.get("caption.save.window");
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.hawkbit.server.ui.common.footer.AbstractDeleteActionsLayout#
|
||||
* unsavedActionsWindowClosed()
|
||||
*/
|
||||
@Override
|
||||
protected void unsavedActionsWindowClosed() {
|
||||
final String message = distConfirmationWindowLayout.getConsolidatedMessage();
|
||||
@@ -433,26 +294,12 @@ public class DSDeleteActionsLayout extends AbstractDeleteActionsLayout {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.hawkbit.server.ui.common.footer.AbstractDeleteActionsLayout#
|
||||
* getUnsavedActionsWindowContent ()
|
||||
*/
|
||||
@Override
|
||||
protected Component getUnsavedActionsWindowContent() {
|
||||
distConfirmationWindowLayout.init();
|
||||
return distConfirmationWindowLayout;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.hawkbit.server.ui.common.footer.AbstractDeleteActionsLayout#
|
||||
* hasUnsavedActions()
|
||||
*/
|
||||
@Override
|
||||
protected boolean hasUnsavedActions() {
|
||||
boolean unSavedActionsTypes = false;
|
||||
@@ -479,23 +326,11 @@ public class DSDeleteActionsLayout extends AbstractDeleteActionsLayout {
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.hawkbit.ui.common.footer.AbstractDeleteActionsLayout#
|
||||
* hasBulkUploadPermission()
|
||||
*/
|
||||
@Override
|
||||
protected boolean hasBulkUploadPermission() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.hawkbit.ui.common.footer.AbstractDeleteActionsLayout#
|
||||
* showBulkUploadWindow()
|
||||
*/
|
||||
@Override
|
||||
protected void showBulkUploadWindow() {
|
||||
/**
|
||||
@@ -503,12 +338,6 @@ public class DSDeleteActionsLayout extends AbstractDeleteActionsLayout {
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.hawkbit.ui.common.footer.AbstractDeleteActionsLayout#
|
||||
* restoreBulkUploadStatusCount()
|
||||
*/
|
||||
@Override
|
||||
protected void restoreBulkUploadStatusCount() {
|
||||
/**
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.distributions.smtable;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.SoftwareModuleEvent;
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.SoftwareModuleEvent.SoftwareModuleEventType;
|
||||
@@ -20,10 +16,8 @@ import org.eclipse.hawkbit.ui.common.detailslayout.AbstractTableDetailsLayout;
|
||||
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||
import org.eclipse.hawkbit.ui.distributions.state.ManageDistUIState;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
import org.vaadin.spring.events.EventScope;
|
||||
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
||||
|
||||
@@ -46,44 +40,16 @@ public class SwModuleDetails extends AbstractTableDetailsLayout {
|
||||
|
||||
private static final long serialVersionUID = -1052279281066089812L;
|
||||
|
||||
@Autowired
|
||||
private I18N i18n;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@Autowired
|
||||
private SpPermissionChecker permissionChecker;
|
||||
|
||||
@Autowired
|
||||
private SoftwareModuleAddUpdateWindow softwareModuleAddUpdateWindow;
|
||||
|
||||
@Autowired
|
||||
private ManageDistUIState manageDistUIState;
|
||||
|
||||
private UI ui;
|
||||
|
||||
private Long swModuleId;
|
||||
|
||||
private SoftwareModule selectedSwModule;
|
||||
|
||||
@Override
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
super.init();
|
||||
ui = UI.getCurrent();
|
||||
eventBus.subscribe(this);
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
/*
|
||||
* It's good manners to do this, even though vaadin-spring will
|
||||
* automatically unsubscribe when this UI is garbage collected.
|
||||
*/
|
||||
eventBus.unsubscribe(this);
|
||||
}
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
void onEvent(final SoftwareModuleEvent softwareModuleEvent) {
|
||||
if (softwareModuleEvent.getSoftwareModuleEventType() == SoftwareModuleEventType.SELECTED_SOFTWARE_MODULE
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.distributions.smtable;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.SMFilterEvent;
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.SoftwareModuleEvent;
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.SoftwareModuleEvent.SoftwareModuleEventType;
|
||||
@@ -19,10 +15,8 @@ import org.eclipse.hawkbit.ui.artifacts.smtable.SoftwareModuleAddUpdateWindow;
|
||||
import org.eclipse.hawkbit.ui.common.table.AbstractTableHeader;
|
||||
import org.eclipse.hawkbit.ui.distributions.event.DistributionsUIEvent;
|
||||
import org.eclipse.hawkbit.ui.distributions.state.ManageDistUIState;
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
import org.vaadin.spring.events.EventScope;
|
||||
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
||||
|
||||
@@ -43,14 +37,6 @@ public class SwModuleTableHeader extends AbstractTableHeader {
|
||||
|
||||
private static final long serialVersionUID = 242961845006626297L;
|
||||
|
||||
@Autowired
|
||||
private I18N i18n;
|
||||
|
||||
@Autowired
|
||||
private SpPermissionChecker permChecker;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventbus;
|
||||
|
||||
@Autowired
|
||||
private ManageDistUIState manageDistUIState;
|
||||
@@ -58,18 +44,6 @@ public class SwModuleTableHeader extends AbstractTableHeader {
|
||||
@Autowired
|
||||
private SoftwareModuleAddUpdateWindow softwareModuleAddUpdateWindow;
|
||||
|
||||
@Override
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
super.init();
|
||||
eventbus.subscribe(this);
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
eventbus.unsubscribe(this);
|
||||
}
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
void onEvent(final DistributionsUIEvent event) {
|
||||
if (event == DistributionsUIEvent.HIDE_SM_FILTER_BY_TYPE) {
|
||||
|
||||
@@ -11,11 +11,8 @@ package org.eclipse.hawkbit.ui.distributions.smtype;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.ui.artifacts.event.SoftwareModuleTypeEvent;
|
||||
import org.eclipse.hawkbit.ui.common.SoftwareModuleTypeBeanQuery;
|
||||
import org.eclipse.hawkbit.ui.common.filterlayout.AbstractFilterButtonClickBehaviour;
|
||||
import org.eclipse.hawkbit.ui.common.filterlayout.AbstractFilterButtons;
|
||||
import org.eclipse.hawkbit.ui.distributions.event.DistributionsViewAcceptCriteria;
|
||||
import org.eclipse.hawkbit.ui.distributions.event.SaveActionWindowEvent;
|
||||
@@ -27,7 +24,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.addons.lazyquerycontainer.BeanQueryFactory;
|
||||
import org.vaadin.addons.lazyquerycontainer.LazyQueryContainer;
|
||||
import org.vaadin.addons.lazyquerycontainer.LazyQueryDefinition;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
import org.vaadin.spring.events.EventScope;
|
||||
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
||||
|
||||
@@ -47,21 +43,12 @@ public class DistSMTypeFilterButtons extends AbstractFilterButtons {
|
||||
|
||||
private static final long serialVersionUID = 6804534533362387433L;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@Autowired
|
||||
private ManageDistUIState manageDistUIState;
|
||||
|
||||
@Autowired
|
||||
private DistributionsViewAcceptCriteria distributionsViewAcceptCriteria;
|
||||
|
||||
@Override
|
||||
public void init(final AbstractFilterButtonClickBehaviour filterButtonClickBehaviour) {
|
||||
super.init(filterButtonClickBehaviour);
|
||||
eventBus.subscribe(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getButtonsTableId() {
|
||||
return SPUIComponetIdProvider.SW_MODULE_TYPE_TABLE_ID;
|
||||
@@ -135,9 +122,5 @@ public class DistSMTypeFilterButtons extends AbstractFilterButtons {
|
||||
setContainerDataSource(createButtonsLazyQueryContainer());
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
eventBus.unsubscribe(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ package org.eclipse.hawkbit.ui.distributions.smtype;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.ui.artifacts.smtype.CreateUpdateSoftwareTypeLayout;
|
||||
import org.eclipse.hawkbit.ui.common.filterlayout.AbstractFilterHeader;
|
||||
import org.eclipse.hawkbit.ui.distributions.event.DistributionsUIEvent;
|
||||
@@ -19,7 +18,6 @@ import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
|
||||
import com.vaadin.spring.annotation.SpringComponent;
|
||||
import com.vaadin.spring.annotation.ViewScope;
|
||||
@@ -36,12 +34,6 @@ public class DistSMTypeFilterHeader extends AbstractFilterHeader {
|
||||
|
||||
private static final long serialVersionUID = -8763788280848718344L;
|
||||
|
||||
@Autowired
|
||||
private SpPermissionChecker permChecker;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@Autowired
|
||||
private ManageDistUIState manageDistUIState;
|
||||
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.management.dstable;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSet;
|
||||
import org.eclipse.hawkbit.ui.common.detailslayout.AbstractTableDetailsLayout;
|
||||
import org.eclipse.hawkbit.ui.common.detailslayout.SoftwareModuleDetailsTable;
|
||||
@@ -21,10 +17,8 @@ import org.eclipse.hawkbit.ui.management.event.DistributionTableEvent;
|
||||
import org.eclipse.hawkbit.ui.management.event.DistributionTableEvent.DistributionComponentEvent;
|
||||
import org.eclipse.hawkbit.ui.management.state.ManagementUIState;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
import org.vaadin.spring.events.EventScope;
|
||||
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
||||
|
||||
@@ -46,15 +40,7 @@ public class DistributionDetails extends AbstractTableDetailsLayout {
|
||||
|
||||
private static final long serialVersionUID = 350360207334118826L;
|
||||
|
||||
@Autowired
|
||||
private I18N i18n;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@Autowired
|
||||
private SpPermissionChecker permissionChecker;
|
||||
|
||||
|
||||
@Autowired
|
||||
private ManagementUIState managementUIState;
|
||||
|
||||
@@ -70,22 +56,13 @@ public class DistributionDetails extends AbstractTableDetailsLayout {
|
||||
|
||||
private DistributionSet selectedDsModule;
|
||||
|
||||
private UI ui;
|
||||
|
||||
@Override
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
eventBus.subscribe(this);
|
||||
softwareModuleTable = new SoftwareModuleDetailsTable();
|
||||
softwareModuleTable.init(i18n, false, permissionChecker, null, null, null);
|
||||
super.init();
|
||||
ui = UI.getCurrent();
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
eventBus.unsubscribe(this);
|
||||
}
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
void onEvent(final DistributionTableEvent distributionTableEvent) {
|
||||
|
||||
@@ -363,7 +363,7 @@ public class DistributionTable extends AbstractTable {
|
||||
final DistributionSetTagAssignmentResult result = distributionSetManagement.toggleTagAssignment(distList,
|
||||
distTagName);
|
||||
|
||||
notification.displaySuccess(HawkbitCommonUtil.getDistributionTagAssignmentMsg(distTagName, result, i18n));
|
||||
notification.displaySuccess(HawkbitCommonUtil.createAssignmentMessage(distTagName, result, i18n));
|
||||
if (result.getAssigned() >= 1 && managementUIState.getDistributionTableFilters().isNoTagSelected()) {
|
||||
refreshFilter();
|
||||
}
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.management.dstable;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.ui.common.table.AbstractTableHeader;
|
||||
import org.eclipse.hawkbit.ui.management.event.DistributionTableEvent;
|
||||
import org.eclipse.hawkbit.ui.management.event.DistributionTableEvent.DistributionComponentEvent;
|
||||
@@ -19,10 +15,8 @@ import org.eclipse.hawkbit.ui.management.event.DistributionTableFilterEvent;
|
||||
import org.eclipse.hawkbit.ui.management.event.DragEvent;
|
||||
import org.eclipse.hawkbit.ui.management.event.ManagementUIEvent;
|
||||
import org.eclipse.hawkbit.ui.management.state.ManagementUIState;
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
import org.vaadin.spring.events.EventScope;
|
||||
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
||||
|
||||
@@ -43,33 +37,12 @@ import com.vaadin.ui.Window;
|
||||
public class DistributionTableHeader extends AbstractTableHeader {
|
||||
private static final long serialVersionUID = 7597766804650170127L;
|
||||
|
||||
@Autowired
|
||||
private I18N i18n;
|
||||
|
||||
@Autowired
|
||||
private SpPermissionChecker permChecker;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventbus;
|
||||
|
||||
@Autowired
|
||||
private ManagementUIState managementUIState;
|
||||
|
||||
@Autowired
|
||||
private DistributionAddUpdateWindowLayout distributionAddUpdateWindowLayout;
|
||||
|
||||
@Override
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
super.init();
|
||||
eventbus.subscribe(this);
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
eventbus.unsubscribe(this);
|
||||
}
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
void onEvent(final ManagementUIEvent event) {
|
||||
if (event == ManagementUIEvent.HIDE_DISTRIBUTION_TAG_LAYOUT) {
|
||||
|
||||
@@ -11,8 +11,6 @@ package org.eclipse.hawkbit.ui.management.dstag;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.eventbus.event.DistributionSetTagCreatedBulkEvent;
|
||||
import org.eclipse.hawkbit.eventbus.event.DistributionSetTagDeletedEvent;
|
||||
import org.eclipse.hawkbit.eventbus.event.DistributionSetTagUpdateEvent;
|
||||
@@ -31,7 +29,6 @@ import org.eclipse.hawkbit.ui.utils.SPUIStyleDefinitions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.addons.lazyquerycontainer.BeanQueryFactory;
|
||||
import org.vaadin.addons.lazyquerycontainer.LazyQueryContainer;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
import org.vaadin.spring.events.EventScope;
|
||||
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
||||
|
||||
@@ -51,9 +48,6 @@ public class DistributionTagButtons extends AbstractFilterButtons {
|
||||
|
||||
private static final long serialVersionUID = -8151483237450892057L;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@Autowired
|
||||
private DistributionTagDropEvent spDistTagDropEvent;
|
||||
|
||||
@@ -64,12 +58,6 @@ public class DistributionTagButtons extends AbstractFilterButtons {
|
||||
public void init(final AbstractFilterButtonClickBehaviour filterButtonClickBehaviour) {
|
||||
super.init(filterButtonClickBehaviour);
|
||||
addNewTag(new DistributionSetTag("NO TAG"));
|
||||
eventBus.subscribe(this);
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
eventBus.unsubscribe(this);
|
||||
}
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
|
||||
@@ -10,14 +10,12 @@ package org.eclipse.hawkbit.ui.management.dstag;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.ui.common.filterlayout.AbstractFilterHeader;
|
||||
import org.eclipse.hawkbit.ui.management.event.ManagementUIEvent;
|
||||
import org.eclipse.hawkbit.ui.management.state.ManagementUIState;
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
|
||||
import com.vaadin.spring.annotation.SpringComponent;
|
||||
import com.vaadin.spring.annotation.ViewScope;
|
||||
@@ -38,12 +36,6 @@ public class DistributionTagHeader extends AbstractFilterHeader {
|
||||
@Autowired
|
||||
private I18N i18n;
|
||||
|
||||
@Autowired
|
||||
private SpPermissionChecker permChecker;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventbus;
|
||||
|
||||
@Autowired
|
||||
private ManagementUIState managementUIState;
|
||||
|
||||
@@ -90,7 +82,7 @@ public class DistributionTagHeader extends AbstractFilterHeader {
|
||||
@Override
|
||||
protected void hideFilterButtonLayout() {
|
||||
managementUIState.setDistTagFilterClosed(true);
|
||||
eventbus.publish(this, ManagementUIEvent.HIDE_DISTRIBUTION_TAG_LAYOUT);
|
||||
eventBus.publish(this, ManagementUIEvent.HIDE_DISTRIBUTION_TAG_LAYOUT);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -150,7 +150,7 @@ public class DistributionTagDropEvent implements DropHandler {
|
||||
final DistributionSetTagAssignmentResult result = distributionSetManagement.toggleTagAssignment(distributionList,
|
||||
distTagName);
|
||||
|
||||
notification.displaySuccess(HawkbitCommonUtil.getDistributionTagAssignmentMsg(distTagName, result, i18n));
|
||||
notification.displaySuccess(HawkbitCommonUtil.createAssignmentMessage(distTagName, result, i18n));
|
||||
if (result.getUnassigned() >= 1 && !tagsClickedList.isEmpty()) {
|
||||
eventBus.publish(this, TargetFilterEvent.FILTER_BY_TAG);
|
||||
}
|
||||
|
||||
@@ -16,10 +16,6 @@ import java.util.Map;
|
||||
import org.eclipse.hawkbit.ui.common.AbstractAcceptCriteria;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.UINotification;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
|
||||
import com.vaadin.spring.annotation.SpringComponent;
|
||||
import com.vaadin.spring.annotation.ViewScope;
|
||||
@@ -41,29 +37,6 @@ public class ManagementViewAcceptCriteria extends AbstractAcceptCriteria {
|
||||
|
||||
private static final Map<String, Object> DROP_HINTS_CONFIGS = createDropHintConfigurations();
|
||||
|
||||
@Autowired
|
||||
private transient UINotification uiNotification;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@Override
|
||||
protected void analyseDragComponent(final Component compsource) {
|
||||
final String sourceID = getComponentId(compsource);
|
||||
final Object event = DROP_HINTS_CONFIGS.get(sourceID);
|
||||
eventBus.publish(this, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void hideDropHints() {
|
||||
eventBus.publish(this, DragEvent.HIDE_DROP_HINT);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void invalidDrop() {
|
||||
uiNotification.displayValidationError(SPUILabelDefinitions.ACTION_NOT_ALLOWED);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getComponentId(final Component component) {
|
||||
String id = component.getId();
|
||||
@@ -80,11 +53,6 @@ public class ManagementViewAcceptCriteria extends AbstractAcceptCriteria {
|
||||
return DROP_HINTS_CONFIGS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void publishDragStartEvent(final Object event) {
|
||||
eventBus.publish(this, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Map<String, List<String>> getDropConfigurations() {
|
||||
return DROP_CONFIGS;
|
||||
|
||||
@@ -11,10 +11,6 @@ package org.eclipse.hawkbit.ui.management.footer;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.repository.TagManagement;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSetIdName;
|
||||
import org.eclipse.hawkbit.repository.model.TargetIdName;
|
||||
@@ -28,12 +24,9 @@ import org.eclipse.hawkbit.ui.management.event.TargetTableEvent;
|
||||
import org.eclipse.hawkbit.ui.management.event.TargetTableEvent.TargetComponentEvent;
|
||||
import org.eclipse.hawkbit.ui.management.state.ManagementUIState;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.UINotification;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
import org.vaadin.spring.events.EventScope;
|
||||
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
||||
|
||||
@@ -56,17 +49,6 @@ import com.vaadin.ui.UI;
|
||||
public class DeleteActionsLayout extends AbstractDeleteActionsLayout {
|
||||
|
||||
private static final long serialVersionUID = -8112907467821886253L;
|
||||
@Autowired
|
||||
private I18N i18n;
|
||||
|
||||
@Autowired
|
||||
private SpPermissionChecker permChecker;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@Autowired
|
||||
private transient UINotification notification;
|
||||
|
||||
@Autowired
|
||||
private transient TagManagement tagManagementService;
|
||||
@@ -83,18 +65,6 @@ public class DeleteActionsLayout extends AbstractDeleteActionsLayout {
|
||||
@Autowired
|
||||
private CountMessageLabel countMessageLabel;
|
||||
|
||||
@Override
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
super.init();
|
||||
eventBus.subscribe(this);
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
eventBus.unsubscribe(this);
|
||||
}
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
void onEvent(final ManagementUIEvent event) {
|
||||
if (event == ManagementUIEvent.UPDATE_COUNT) {
|
||||
@@ -226,26 +196,11 @@ public class DeleteActionsLayout extends AbstractDeleteActionsLayout {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getNoActionsButtonLabel() {
|
||||
return i18n.get("button.no.actions");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getActionsButtonLabel() {
|
||||
return i18n.get("button.actions");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void restoreActionCount() {
|
||||
updateActionCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getUnsavedActionsWindowCaption() {
|
||||
return i18n.get("caption.save.window");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void unsavedActionsWindowClosed() {
|
||||
final String message = manangementConfirmationWindowLayout.getConsolidatedMessage();
|
||||
|
||||
@@ -10,11 +10,7 @@ package org.eclipse.hawkbit.ui.management.targettable;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSet;
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
import org.eclipse.hawkbit.repository.model.Target;
|
||||
@@ -25,12 +21,10 @@ import org.eclipse.hawkbit.ui.management.event.TargetTableEvent;
|
||||
import org.eclipse.hawkbit.ui.management.event.TargetTableEvent.TargetComponentEvent;
|
||||
import org.eclipse.hawkbit.ui.management.state.ManagementUIState;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPDateTimeUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
import org.vaadin.spring.events.EventScope;
|
||||
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
||||
|
||||
@@ -60,15 +54,6 @@ public class TargetDetails extends AbstractTableDetailsLayout {
|
||||
|
||||
private static final long serialVersionUID = 4571732743399605843L;
|
||||
|
||||
@Autowired
|
||||
private I18N i18n;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@Autowired
|
||||
private SpPermissionChecker permChecker;
|
||||
|
||||
@Autowired
|
||||
private ManagementUIState managementUIState;
|
||||
|
||||
@@ -87,11 +72,9 @@ public class TargetDetails extends AbstractTableDetailsLayout {
|
||||
* Initialize the Target details.
|
||||
*/
|
||||
@Override
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
super.init();
|
||||
targetAddUpdateWindowLayout.init();
|
||||
eventBus.subscribe(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -286,7 +269,7 @@ public class TargetDetails extends AbstractTableDetailsLayout {
|
||||
|
||||
@Override
|
||||
protected Boolean hasEditPermission() {
|
||||
return permChecker.hasUpdateTargetPermission();
|
||||
return permissionChecker.hasUpdateTargetPermission();
|
||||
}
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
@@ -312,11 +295,6 @@ public class TargetDetails extends AbstractTableDetailsLayout {
|
||||
}
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
eventBus.unsubscribe(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getTabSheetId() {
|
||||
return SPUIComponetIdProvider.TARGET_DETAILS_TABSHEET;
|
||||
|
||||
@@ -644,7 +644,7 @@ public class TargetTable extends AbstractTable implements Handler {
|
||||
final TargetTagAssignmentResult result = targetManagement.toggleTagAssignment(targetList, targTagName);
|
||||
|
||||
final List<String> tagsClickedList = managementUIState.getTargetTableFilters().getClickedTargetTags();
|
||||
notification.displaySuccess(HawkbitCommonUtil.getTargetTagAssigmentMsg(targTagName, result, i18n));
|
||||
notification.displaySuccess(HawkbitCommonUtil.createAssignmentMessage(targTagName, result, i18n));
|
||||
if (result.getUnassigned() >= 1 && !tagsClickedList.isEmpty()) {
|
||||
refreshFilter();
|
||||
}
|
||||
|
||||
@@ -11,10 +11,6 @@ package org.eclipse.hawkbit.ui.management.targettable;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSetIdName;
|
||||
import org.eclipse.hawkbit.ui.common.table.AbstractTableHeader;
|
||||
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||
@@ -29,7 +25,6 @@ import org.eclipse.hawkbit.ui.management.event.TargetTableEvent;
|
||||
import org.eclipse.hawkbit.ui.management.event.TargetTableEvent.TargetComponentEvent;
|
||||
import org.eclipse.hawkbit.ui.management.state.ManagementUIState;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUITargetDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.UINotification;
|
||||
@@ -63,12 +58,6 @@ public class TargetTableHeader extends AbstractTableHeader {
|
||||
|
||||
private static final long serialVersionUID = -8647521126666320022L;
|
||||
|
||||
@Autowired
|
||||
private I18N i18n;
|
||||
|
||||
@Autowired
|
||||
private SpPermissionChecker permChecker;
|
||||
|
||||
@Autowired
|
||||
private UINotification notification;
|
||||
|
||||
@@ -90,21 +79,14 @@ public class TargetTableHeader extends AbstractTableHeader {
|
||||
private Boolean isComplexFilterViewDisplayed = Boolean.FALSE;
|
||||
|
||||
@Override
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
super.init();
|
||||
// creating add window for adding new target
|
||||
targetAddUpdateWindow.init();
|
||||
targetBulkUpdateWindow.init();
|
||||
eventBus.subscribe(this);
|
||||
onLoadRestoreState();
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
eventBus.unsubscribe(this);
|
||||
}
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
void onEvent(final ManagementUIEvent event) {
|
||||
if (event == ManagementUIEvent.HIDE_TARGET_TAG_LAYOUT) {
|
||||
|
||||
@@ -13,8 +13,6 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.eventbus.event.TargetTagCreatedBulkEvent;
|
||||
import org.eclipse.hawkbit.eventbus.event.TargetTagDeletedEvent;
|
||||
import org.eclipse.hawkbit.eventbus.event.TargetTagUpdateEvent;
|
||||
@@ -38,7 +36,6 @@ import org.eclipse.hawkbit.ui.utils.UINotification;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.addons.lazyquerycontainer.BeanQueryFactory;
|
||||
import org.vaadin.addons.lazyquerycontainer.LazyQueryContainer;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
import org.vaadin.spring.events.EventScope;
|
||||
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
||||
|
||||
@@ -63,9 +60,6 @@ public class TargetTagFilterButtons extends AbstractFilterButtons {
|
||||
|
||||
private static final long serialVersionUID = 5049554600376508073L;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@Autowired
|
||||
private ManagementUIState managementUIState;
|
||||
|
||||
@@ -99,12 +93,6 @@ public class TargetTagFilterButtons extends AbstractFilterButtons {
|
||||
this.filterButtonClickBehaviour = filterButtonClickBehaviour;
|
||||
super.init(filterButtonClickBehaviour);
|
||||
addNewTargetTag(new TargetTag("NO TAG"));
|
||||
eventBus.subscribe(this);
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
eventBus.unsubscribe(this);
|
||||
}
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
@@ -244,7 +232,7 @@ public class TargetTagFilterButtons extends AbstractFilterButtons {
|
||||
final List<String> tagsClickedList = managementUIState.getTargetTableFilters().getClickedTargetTags();
|
||||
|
||||
final TargetTagAssignmentResult result = targetManagement.toggleTagAssignment(targetList, targTagName);
|
||||
notification.displaySuccess(HawkbitCommonUtil.getTargetTagAssigmentMsg(targTagName, result, i18n));
|
||||
notification.displaySuccess(HawkbitCommonUtil.createAssignmentMessage(targTagName, result, i18n));
|
||||
|
||||
if (result.getAssigned() >= 1 && managementUIState.getTargetTableFilters().isNoTagSelected()) {
|
||||
eventBus.publish(this, ManagementUIEvent.ASSIGN_TARGET_TAG);
|
||||
|
||||
@@ -10,14 +10,12 @@ package org.eclipse.hawkbit.ui.management.targettag;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.ui.common.filterlayout.AbstractFilterHeader;
|
||||
import org.eclipse.hawkbit.ui.management.event.ManagementUIEvent;
|
||||
import org.eclipse.hawkbit.ui.management.state.ManagementUIState;
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
|
||||
import com.vaadin.spring.annotation.SpringComponent;
|
||||
import com.vaadin.spring.annotation.ViewScope;
|
||||
@@ -32,15 +30,9 @@ public class TargetTagFilterHeader extends AbstractFilterHeader {
|
||||
|
||||
private static final long serialVersionUID = 3046367045669148009L;
|
||||
|
||||
@Autowired
|
||||
private SpPermissionChecker permChecker;
|
||||
|
||||
@Autowired
|
||||
private I18N i18n;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventbus;
|
||||
|
||||
@Autowired
|
||||
private CreateUpdateTargetTagLayout createUpdateTargetTagLayout;
|
||||
|
||||
@@ -58,7 +50,6 @@ public class TargetTagFilterHeader extends AbstractFilterHeader {
|
||||
|
||||
@Override
|
||||
protected String getHideButtonId() {
|
||||
|
||||
return SPUIComponetIdProvider.HIDE_TARGET_TAGS;
|
||||
}
|
||||
|
||||
@@ -87,7 +78,7 @@ public class TargetTagFilterHeader extends AbstractFilterHeader {
|
||||
@Override
|
||||
protected void hideFilterButtonLayout() {
|
||||
managementUIState.setTargetTagFilterClosed(true);
|
||||
eventbus.publish(this, ManagementUIEvent.HIDE_TARGET_TAG_LAYOUT);
|
||||
eventBus.publish(this, ManagementUIEvent.HIDE_TARGET_TAG_LAYOUT);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,9 +15,6 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.eventbus.event.RolloutChangeEvent;
|
||||
import org.eclipse.hawkbit.repository.RolloutManagement;
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
@@ -33,7 +30,6 @@ import org.eclipse.hawkbit.ui.rollout.StatusFontIcon;
|
||||
import org.eclipse.hawkbit.ui.rollout.event.RolloutEvent;
|
||||
import org.eclipse.hawkbit.ui.rollout.state.RolloutUIState;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
|
||||
@@ -46,7 +42,6 @@ import org.vaadin.addons.lazyquerycontainer.LazyQueryDefinition;
|
||||
import org.vaadin.peter.contextmenu.ContextMenu;
|
||||
import org.vaadin.peter.contextmenu.ContextMenu.ContextMenuItem;
|
||||
import org.vaadin.peter.contextmenu.ContextMenu.ContextMenuItemClickEvent;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
import org.vaadin.spring.events.EventScope;
|
||||
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
||||
|
||||
@@ -82,11 +77,6 @@ public class RolloutListGrid extends AbstractGrid {
|
||||
|
||||
private static final String START_OPTION = "Start";
|
||||
|
||||
@Autowired
|
||||
private I18N i18n;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@Autowired
|
||||
private transient RolloutManagement rolloutManagement;
|
||||
@@ -105,17 +95,6 @@ public class RolloutListGrid extends AbstractGrid {
|
||||
|
||||
private transient Map<RolloutStatus, StatusFontIcon> statusIconMap = new EnumMap<>(RolloutStatus.class);
|
||||
|
||||
@Override
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
super.init();
|
||||
eventBus.subscribe(this);
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
eventBus.unsubscribe(this);
|
||||
}
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
void onEvent(final RolloutEvent event) {
|
||||
@@ -245,7 +224,7 @@ public class RolloutListGrid extends AbstractGrid {
|
||||
|
||||
@Override
|
||||
protected void setColumnProperties() {
|
||||
List<Object> columnList = new ArrayList<>();
|
||||
final List<Object> columnList = new ArrayList<>();
|
||||
columnList.add(SPUILabelDefinitions.VAR_NAME);
|
||||
columnList.add(SPUILabelDefinitions.VAR_DIST_NAME_VERSION);
|
||||
columnList.add(SPUILabelDefinitions.VAR_STATUS);
|
||||
@@ -265,13 +244,13 @@ public class RolloutListGrid extends AbstractGrid {
|
||||
|
||||
@Override
|
||||
protected void setHiddenColumns() {
|
||||
List<Object> columnsToBeHidden = new ArrayList<>();
|
||||
final List<Object> columnsToBeHidden = new ArrayList<>();
|
||||
columnsToBeHidden.add(SPUILabelDefinitions.VAR_CREATED_DATE);
|
||||
columnsToBeHidden.add(SPUILabelDefinitions.VAR_CREATED_USER);
|
||||
columnsToBeHidden.add(SPUILabelDefinitions.VAR_MODIFIED_DATE);
|
||||
columnsToBeHidden.add(SPUILabelDefinitions.VAR_MODIFIED_BY);
|
||||
columnsToBeHidden.add(SPUILabelDefinitions.VAR_DESC);
|
||||
for (Object propertyId : columnsToBeHidden) {
|
||||
for (final Object propertyId : columnsToBeHidden) {
|
||||
getColumn(propertyId).setHidden(true);
|
||||
}
|
||||
|
||||
@@ -318,7 +297,7 @@ public class RolloutListGrid extends AbstractGrid {
|
||||
|
||||
@Override
|
||||
public String getStyle(final CellReference cellReference) {
|
||||
String[] coulmnNames = { SPUILabelDefinitions.VAR_STATUS, SPUILabelDefinitions.ACTION };
|
||||
final String[] coulmnNames = { SPUILabelDefinitions.VAR_STATUS, SPUILabelDefinitions.ACTION };
|
||||
if (Arrays.asList(coulmnNames).contains(cellReference.getPropertyId())) {
|
||||
return "centeralign";
|
||||
}
|
||||
@@ -327,18 +306,18 @@ public class RolloutListGrid extends AbstractGrid {
|
||||
});
|
||||
}
|
||||
|
||||
private void onClickOfRolloutName(RendererClickEvent event) {
|
||||
private void onClickOfRolloutName(final RendererClickEvent event) {
|
||||
rolloutUIState.setRolloutId((long) event.getItemId());
|
||||
final String rolloutName = (String) getContainerDataSource().getItem(event.getItemId())
|
||||
.getItemProperty(SPUILabelDefinitions.VAR_NAME).getValue();
|
||||
rolloutUIState.setRolloutName(rolloutName);
|
||||
String ds = (String) getContainerDataSource().getItem(event.getItemId())
|
||||
final String ds = (String) getContainerDataSource().getItem(event.getItemId())
|
||||
.getItemProperty(SPUILabelDefinitions.VAR_DIST_NAME_VERSION).getValue();
|
||||
rolloutUIState.setRolloutDistributionSet(ds);
|
||||
eventBus.publish(this, RolloutEvent.SHOW_ROLLOUT_GROUPS);
|
||||
}
|
||||
|
||||
private void onClickOfActionBtn(RendererClickEvent event) {
|
||||
private void onClickOfActionBtn(final RendererClickEvent event) {
|
||||
final ContextMenu contextMenu = createContextMenu((Long) event.getItemId());
|
||||
contextMenu.setAsContextMenuOf((AbstractClientConnector) event.getComponent());
|
||||
contextMenu.open(event.getClientX(), event.getClientY());
|
||||
@@ -388,11 +367,11 @@ public class RolloutListGrid extends AbstractGrid {
|
||||
}
|
||||
|
||||
private String convertRolloutStatusToString(final RolloutStatus value) {
|
||||
StatusFontIcon statusFontIcon = statusIconMap.get(value);
|
||||
final StatusFontIcon statusFontIcon = statusIconMap.get(value);
|
||||
if (statusFontIcon == null) {
|
||||
return null;
|
||||
}
|
||||
String codePoint = statusFontIcon.getFontIcon() != null
|
||||
final String codePoint = statusFontIcon.getFontIcon() != null
|
||||
? Integer.toString(statusFontIcon.getFontIcon().getCodepoint()) : null;
|
||||
return HawkbitCommonUtil.getStatusLabelDetailsInString(codePoint, statusFontIcon.getStyle(),
|
||||
SPUIComponetIdProvider.ROLLOUT_STATUS_LABEL_ID);
|
||||
@@ -441,12 +420,12 @@ public class RolloutListGrid extends AbstractGrid {
|
||||
private static final long serialVersionUID = 2544026030795375748L;
|
||||
private final FontAwesome fontIcon;
|
||||
|
||||
public FontIconGenerator(FontAwesome icon) {
|
||||
public FontIconGenerator(final FontAwesome icon) {
|
||||
this.fontIcon = icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue(Item item, Object itemId, Object propertyId) {
|
||||
public String getValue(final Item item, final Object itemId, final Object propertyId) {
|
||||
return fontIcon.getHtml();
|
||||
}
|
||||
|
||||
@@ -456,7 +435,7 @@ public class RolloutListGrid extends AbstractGrid {
|
||||
}
|
||||
}
|
||||
|
||||
private String getDescription(CellReference cell) {
|
||||
private String getDescription(final CellReference cell) {
|
||||
if (SPUILabelDefinitions.VAR_STATUS.equals(cell.getPropertyId())) {
|
||||
return cell.getProperty().getValue().toString().toLowerCase();
|
||||
} else if (SPUILabelDefinitions.ACTION.equals(cell.getPropertyId())) {
|
||||
@@ -570,14 +549,14 @@ public class RolloutListGrid extends AbstractGrid {
|
||||
private static final long serialVersionUID = -5794528427855153924L;
|
||||
|
||||
@Override
|
||||
public TotalTargetCountStatus convertToModel(String value, Class<? extends TotalTargetCountStatus> targetType,
|
||||
Locale locale) throws com.vaadin.data.util.converter.Converter.ConversionException {
|
||||
public TotalTargetCountStatus convertToModel(final String value, final Class<? extends TotalTargetCountStatus> targetType,
|
||||
final Locale locale) throws com.vaadin.data.util.converter.Converter.ConversionException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String convertToPresentation(TotalTargetCountStatus value, Class<? extends String> targetType,
|
||||
Locale locale) throws com.vaadin.data.util.converter.Converter.ConversionException {
|
||||
public String convertToPresentation(final TotalTargetCountStatus value, final Class<? extends String> targetType,
|
||||
final Locale locale) throws com.vaadin.data.util.converter.Converter.ConversionException {
|
||||
return DistributionBarHelper.getDistributionBarAsHTMLString(value.getStatusTotalCountMap());
|
||||
}
|
||||
|
||||
|
||||
@@ -15,9 +15,6 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.eventbus.event.RolloutGroupChangeEvent;
|
||||
import org.eclipse.hawkbit.repository.RolloutGroupManagement;
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
@@ -32,7 +29,6 @@ import org.eclipse.hawkbit.ui.rollout.StatusFontIcon;
|
||||
import org.eclipse.hawkbit.ui.rollout.event.RolloutEvent;
|
||||
import org.eclipse.hawkbit.ui.rollout.state.RolloutUIState;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
|
||||
@@ -41,7 +37,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.addons.lazyquerycontainer.BeanQueryFactory;
|
||||
import org.vaadin.addons.lazyquerycontainer.LazyQueryContainer;
|
||||
import org.vaadin.addons.lazyquerycontainer.LazyQueryDefinition;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
import org.vaadin.spring.events.EventScope;
|
||||
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
||||
|
||||
@@ -64,12 +59,6 @@ import com.vaadin.ui.renderers.HtmlRenderer;
|
||||
public class RolloutGroupListGrid extends AbstractGrid {
|
||||
private static final long serialVersionUID = 4060904914954370524L;
|
||||
|
||||
@Autowired
|
||||
private I18N i18n;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@Autowired
|
||||
private transient RolloutGroupManagement rolloutGroupManagement;
|
||||
|
||||
@@ -81,18 +70,6 @@ public class RolloutGroupListGrid extends AbstractGrid {
|
||||
|
||||
private transient Map<RolloutGroupStatus, StatusFontIcon> statusIconMap = new EnumMap<>(RolloutGroupStatus.class);
|
||||
|
||||
@Override
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
super.init();
|
||||
eventBus.subscribe(this);
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
eventBus.unsubscribe(this);
|
||||
}
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
void onEvent(final RolloutEvent event) {
|
||||
if (RolloutEvent.SHOW_ROLLOUT_GROUPS != event) {
|
||||
@@ -218,7 +195,7 @@ public class RolloutGroupListGrid extends AbstractGrid {
|
||||
|
||||
@Override
|
||||
protected void setColumnProperties() {
|
||||
List<Object> columnList = new ArrayList<>();
|
||||
final List<Object> columnList = new ArrayList<>();
|
||||
columnList.add(SPUILabelDefinitions.VAR_NAME);
|
||||
columnList.add(SPUILabelDefinitions.VAR_STATUS);
|
||||
columnList.add(SPUILabelDefinitions.VAR_TOTAL_TARGETS_COUNT_STATUS);
|
||||
@@ -251,13 +228,13 @@ public class RolloutGroupListGrid extends AbstractGrid {
|
||||
|
||||
@Override
|
||||
protected void setHiddenColumns() {
|
||||
List<Object> columnsToBeHidden = new ArrayList<>();
|
||||
final List<Object> columnsToBeHidden = new ArrayList<>();
|
||||
columnsToBeHidden.add(SPUILabelDefinitions.VAR_CREATED_DATE);
|
||||
columnsToBeHidden.add(SPUILabelDefinitions.VAR_CREATED_USER);
|
||||
columnsToBeHidden.add(SPUILabelDefinitions.VAR_MODIFIED_DATE);
|
||||
columnsToBeHidden.add(SPUILabelDefinitions.VAR_MODIFIED_BY);
|
||||
columnsToBeHidden.add(SPUILabelDefinitions.VAR_DESC);
|
||||
for (Object propertyId : columnsToBeHidden) {
|
||||
for (final Object propertyId : columnsToBeHidden) {
|
||||
getColumn(propertyId).setHidden(true);
|
||||
}
|
||||
}
|
||||
@@ -267,18 +244,18 @@ public class RolloutGroupListGrid extends AbstractGrid {
|
||||
return cell -> getDescription(cell);
|
||||
}
|
||||
|
||||
private void onClickOfRolloutGroupName(RendererClickEvent event) {
|
||||
private void onClickOfRolloutGroupName(final RendererClickEvent event) {
|
||||
rolloutUIState
|
||||
.setRolloutGroup(rolloutGroupManagement.findRolloutGroupWithDetailedStatus((Long) event.getItemId()));
|
||||
eventBus.publish(this, RolloutEvent.SHOW_ROLLOUT_GROUP_TARGETS);
|
||||
}
|
||||
|
||||
private String convertRolloutGroupStatusToString(final RolloutGroupStatus value) {
|
||||
StatusFontIcon statusFontIcon = statusIconMap.get(value);
|
||||
final StatusFontIcon statusFontIcon = statusIconMap.get(value);
|
||||
if (statusFontIcon == null) {
|
||||
return null;
|
||||
}
|
||||
String codePoint = statusFontIcon.getFontIcon() != null
|
||||
final String codePoint = statusFontIcon.getFontIcon() != null
|
||||
? Integer.toString(statusFontIcon.getFontIcon().getCodepoint()) : null;
|
||||
return HawkbitCommonUtil.getStatusLabelDetailsInString(codePoint, statusFontIcon.getStyle(),
|
||||
SPUIComponetIdProvider.ROLLOUT_GROUP_STATUS_LABEL_ID);
|
||||
@@ -298,7 +275,7 @@ public class RolloutGroupListGrid extends AbstractGrid {
|
||||
new StatusFontIcon(FontAwesome.EXCLAMATION_CIRCLE, SPUIStyleDefinitions.STATUS_ICON_RED));
|
||||
}
|
||||
|
||||
private String getDescription(CellReference cell) {
|
||||
private String getDescription(final CellReference cell) {
|
||||
if (SPUILabelDefinitions.VAR_STATUS.equals(cell.getPropertyId())) {
|
||||
return cell.getProperty().getValue().toString().toLowerCase();
|
||||
} else if (SPUILabelDefinitions.ACTION.equals(cell.getPropertyId())) {
|
||||
@@ -318,7 +295,7 @@ public class RolloutGroupListGrid extends AbstractGrid {
|
||||
|
||||
@Override
|
||||
public String getStyle(final CellReference cellReference) {
|
||||
String[] coulmnNames = { SPUILabelDefinitions.VAR_STATUS,
|
||||
final String[] coulmnNames = { SPUILabelDefinitions.VAR_STATUS,
|
||||
SPUILabelDefinitions.VAR_TOTAL_TARGETS_COUNT_STATUS };
|
||||
if (Arrays.asList(coulmnNames).contains(cellReference.getPropertyId())) {
|
||||
return "centeralign";
|
||||
@@ -339,14 +316,14 @@ public class RolloutGroupListGrid extends AbstractGrid {
|
||||
private static final long serialVersionUID = -9205943894818450807L;
|
||||
|
||||
@Override
|
||||
public TotalTargetCountStatus convertToModel(String value, Class<? extends TotalTargetCountStatus> targetType,
|
||||
Locale locale) throws com.vaadin.data.util.converter.Converter.ConversionException {
|
||||
public TotalTargetCountStatus convertToModel(final String value, final Class<? extends TotalTargetCountStatus> targetType,
|
||||
final Locale locale) throws com.vaadin.data.util.converter.Converter.ConversionException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String convertToPresentation(TotalTargetCountStatus value, Class<? extends String> targetType,
|
||||
Locale locale) throws com.vaadin.data.util.converter.Converter.ConversionException {
|
||||
public String convertToPresentation(final TotalTargetCountStatus value, final Class<? extends String> targetType,
|
||||
final Locale locale) throws com.vaadin.data.util.converter.Converter.ConversionException {
|
||||
return DistributionBarHelper.getDistributionBarAsHTMLString(value.getStatusTotalCountMap());
|
||||
}
|
||||
|
||||
|
||||
@@ -14,9 +14,6 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import org.eclipse.hawkbit.repository.model.Action.Status;
|
||||
import org.eclipse.hawkbit.repository.model.RolloutGroup;
|
||||
import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupStatus;
|
||||
@@ -26,7 +23,6 @@ import org.eclipse.hawkbit.ui.rollout.StatusFontIcon;
|
||||
import org.eclipse.hawkbit.ui.rollout.event.RolloutEvent;
|
||||
import org.eclipse.hawkbit.ui.rollout.state.RolloutUIState;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponetIdProvider;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
|
||||
@@ -35,7 +31,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.vaadin.addons.lazyquerycontainer.BeanQueryFactory;
|
||||
import org.vaadin.addons.lazyquerycontainer.LazyQueryContainer;
|
||||
import org.vaadin.addons.lazyquerycontainer.LazyQueryDefinition;
|
||||
import org.vaadin.spring.events.EventBus;
|
||||
import org.vaadin.spring.events.EventScope;
|
||||
import org.vaadin.spring.events.annotation.EventBusListenerMethod;
|
||||
|
||||
@@ -55,29 +50,12 @@ import com.vaadin.spring.annotation.ViewScope;
|
||||
public class RolloutGroupTargetsListGrid extends AbstractGrid {
|
||||
|
||||
private static final long serialVersionUID = -2244756637458984597L;
|
||||
|
||||
@Autowired
|
||||
private I18N i18n;
|
||||
|
||||
@Autowired
|
||||
private transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
|
||||
@Autowired
|
||||
private transient RolloutUIState rolloutUIState;
|
||||
|
||||
private transient Map<Status, StatusFontIcon> statusIconMap = new EnumMap<>(Status.class);
|
||||
|
||||
@Override
|
||||
@PostConstruct
|
||||
protected void init() {
|
||||
super.init();
|
||||
eventBus.subscribe(this);
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
eventBus.unsubscribe(this);
|
||||
}
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
void onEvent(final RolloutEvent event) {
|
||||
@@ -158,7 +136,7 @@ public class RolloutGroupTargetsListGrid extends AbstractGrid {
|
||||
|
||||
@Override
|
||||
protected void setColumnProperties() {
|
||||
List<Object> columnList = new ArrayList<>();
|
||||
final List<Object> columnList = new ArrayList<>();
|
||||
columnList.add(SPUILabelDefinitions.VAR_NAME);
|
||||
columnList.add(SPUILabelDefinitions.VAR_CREATED_DATE);
|
||||
columnList.add(SPUILabelDefinitions.VAR_CREATED_BY);
|
||||
@@ -241,11 +219,11 @@ public class RolloutGroupTargetsListGrid extends AbstractGrid {
|
||||
}
|
||||
|
||||
private String processActionStatus(final Status status) {
|
||||
StatusFontIcon statusFontIcon = statusIconMap.get(status);
|
||||
final StatusFontIcon statusFontIcon = statusIconMap.get(status);
|
||||
if (statusFontIcon == null) {
|
||||
return null;
|
||||
}
|
||||
String codePoint = statusFontIcon.getFontIcon() != null
|
||||
final String codePoint = statusFontIcon.getFontIcon() != null
|
||||
? Integer.toString(statusFontIcon.getFontIcon().getCodepoint()) : null;
|
||||
return HawkbitCommonUtil.getStatusLabelDetailsInString(codePoint, statusFontIcon.getStyle(), null);
|
||||
}
|
||||
@@ -286,7 +264,7 @@ public class RolloutGroupTargetsListGrid extends AbstractGrid {
|
||||
}
|
||||
}
|
||||
|
||||
private String getDescription(CellReference cell) {
|
||||
private String getDescription(final CellReference cell) {
|
||||
if (!SPUILabelDefinitions.VAR_STATUS.equals(cell.getPropertyId())) {
|
||||
return null;
|
||||
}
|
||||
@@ -304,7 +282,7 @@ public class RolloutGroupTargetsListGrid extends AbstractGrid {
|
||||
if (rolloutGroup != null && rolloutGroup.getStatus() == RolloutGroupStatus.READY) {
|
||||
return RolloutGroupStatus.READY.toString().toLowerCase();
|
||||
} else if (rolloutGroup != null && rolloutGroup.getStatus() == RolloutGroupStatus.FINISHED) {
|
||||
String ds = rolloutUIState.getRolloutDistributionSet().isPresent()
|
||||
final String ds = rolloutUIState.getRolloutDistributionSet().isPresent()
|
||||
? rolloutUIState.getRolloutDistributionSet().get() : "";
|
||||
return i18n.get("message.dist.already.assigned", new Object[] { ds });
|
||||
}
|
||||
|
||||
@@ -24,14 +24,14 @@ import java.util.TimeZone;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.hawkbit.im.authentication.UserPrincipal;
|
||||
import org.eclipse.hawkbit.repository.SoftwareManagement;
|
||||
import org.eclipse.hawkbit.repository.model.AssignmentResult;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSetIdName;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSetTagAssignmentResult;
|
||||
import org.eclipse.hawkbit.repository.model.NamedEntity;
|
||||
import org.eclipse.hawkbit.repository.model.RolloutGroup;
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModuleType;
|
||||
import org.eclipse.hawkbit.repository.model.TargetIdName;
|
||||
import org.eclipse.hawkbit.repository.model.TargetInfo.PollStatus;
|
||||
import org.eclipse.hawkbit.repository.model.TargetTagAssignmentResult;
|
||||
import org.eclipse.hawkbit.repository.model.TargetUpdateStatus;
|
||||
import org.eclipse.hawkbit.repository.model.TotalTargetCountStatus;
|
||||
import org.eclipse.hawkbit.repository.model.TotalTargetCountStatus.Status;
|
||||
@@ -868,7 +868,7 @@ public final class HawkbitCommonUtil {
|
||||
/**
|
||||
* Display Target Tag action message.
|
||||
*
|
||||
* @param targTagName
|
||||
* @param tagName
|
||||
* as tag name
|
||||
* @param result
|
||||
* as TargetTagAssigmentResult
|
||||
@@ -878,7 +878,7 @@ public final class HawkbitCommonUtil {
|
||||
* I18N
|
||||
* @return message
|
||||
*/
|
||||
public static String getTargetTagAssigmentMsg(final String targTagName, final TargetTagAssignmentResult result,
|
||||
public static String createAssignmentMessage(final String tagName, final AssignmentResult<? extends NamedEntity> result,
|
||||
final I18N i18n) {
|
||||
final StringBuilder formMsg = new StringBuilder();
|
||||
final int assignedCount = result.getAssigned();
|
||||
@@ -887,10 +887,10 @@ public final class HawkbitCommonUtil {
|
||||
|
||||
if (assignedCount == 1) {
|
||||
formMsg.append(i18n.get("message.target.assigned.one",
|
||||
new Object[] { result.getAssignedTargets().get(0).getName(), targTagName })).append("<br>");
|
||||
new Object[] { result.getAssignedEntity().get(0).getName(), tagName })).append("<br>");
|
||||
|
||||
} else if (assignedCount > 1) {
|
||||
formMsg.append(i18n.get("message.target.assigned.many", new Object[] { assignedCount, targTagName }))
|
||||
formMsg.append(i18n.get("message.target.assigned.many", new Object[] { assignedCount, tagName }))
|
||||
.append("<br>");
|
||||
|
||||
if (alreadyAssignedCount > 0) {
|
||||
@@ -902,55 +902,10 @@ public final class HawkbitCommonUtil {
|
||||
|
||||
if (unassignedCount == 1) {
|
||||
formMsg.append(i18n.get("message.target.unassigned.one",
|
||||
new Object[] { result.getUnassignedTargets().get(0).getName(), targTagName })).append("<br>");
|
||||
new Object[] { result.getUnassignedEntity().get(0).getName(), tagName })).append("<br>");
|
||||
|
||||
} else if (unassignedCount > 1) {
|
||||
formMsg.append(i18n.get("message.target.unassigned.many", new Object[] { unassignedCount, targTagName }))
|
||||
.append("<br>");
|
||||
}
|
||||
return formMsg.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get message to be displayed after distribution tag assignment.
|
||||
*
|
||||
* @param targTagName
|
||||
* tag name
|
||||
* @param result
|
||||
* DistributionSetTagAssigmentResult
|
||||
* @param tagsClickedList
|
||||
* list of clicked tags
|
||||
* @param i18n
|
||||
* I18N
|
||||
* @return message
|
||||
*/
|
||||
public static String getDistributionTagAssignmentMsg(final String targTagName,
|
||||
final DistributionSetTagAssignmentResult result, final I18N i18n) {
|
||||
final StringBuilder formMsg = new StringBuilder();
|
||||
final int assignedCount = result.getAssigned();
|
||||
final int alreadyAssignedCount = result.getAlreadyAssigned();
|
||||
final int unassignedCount = result.getUnassigned();
|
||||
|
||||
if (assignedCount == 1) {
|
||||
formMsg.append(i18n.get("message.target.assigned.one",
|
||||
new Object[] { result.getAssignedDs().get(0).getName(), targTagName })).append("<br>");
|
||||
|
||||
} else if (assignedCount > 1) {
|
||||
formMsg.append(i18n.get("message.target.assigned.many", new Object[] { assignedCount, targTagName }))
|
||||
.append("<br>");
|
||||
|
||||
if (alreadyAssignedCount > 0) {
|
||||
final String alreadyAssigned = i18n.get("message.target.alreadyAssigned",
|
||||
new Object[] { alreadyAssignedCount });
|
||||
formMsg.append(alreadyAssigned).append("<br>");
|
||||
}
|
||||
}
|
||||
|
||||
if (unassignedCount == 1) {
|
||||
formMsg.append(i18n.get("message.target.unassigned.one",
|
||||
new Object[] { result.getUnassignedDs().get(0).getName(), targTagName })).append("<br>");
|
||||
} else if (unassignedCount > 1) {
|
||||
formMsg.append(i18n.get("message.target.unassigned.many", new Object[] { unassignedCount, targTagName }))
|
||||
formMsg.append(i18n.get("message.target.unassigned.many", new Object[] { unassignedCount, tagName }))
|
||||
.append("<br>");
|
||||
}
|
||||
return formMsg.toString();
|
||||
|
||||
Reference in New Issue
Block a user