diff --git a/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/ui/GenerateDialog.java b/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/ui/GenerateDialog.java index 6d1806463..192dbe6ca 100644 --- a/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/ui/GenerateDialog.java +++ b/examples/hawkbit-device-simulator/src/main/java/org/eclipse/hawkbit/simulator/ui/GenerateDialog.java @@ -120,39 +120,6 @@ public class GenerateDialog extends Window { } - @Override - public int hashCode() {// NOSONAR - as this is generated - final int prime = 31; - int result = super.hashCode(); - result = prime * result + ((formLayout == null) ? 0 : formLayout.hashCode()); - return result; - } - - @Override - public boolean equals(final Object obj) {// NOSONAR - as this is generated - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (!super.equals(obj)) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - final GenerateDialog other = (GenerateDialog) obj; - if (formLayout == null) { - if (other.formLayout != null) { - return false; - } - } else if (!formLayout.equals(other.formLayout)) { - return false; - } - return true; - } - /** * Callback interface to retrieve the result from the dialog window. * @@ -225,19 +192,20 @@ public class GenerateDialog extends Window { }); } - private TextField createRequiredTextfield(final String caption, final String value, final Resource icon, + private static TextField createRequiredTextfield(final String caption, final String value, final Resource icon, final Validator validator) { final TextField textField = new TextField(caption, value); return addTextFieldValues(textField, icon, validator); } - private TextField createRequiredTextfield(final String caption, final Property dataSource, final Resource icon, - final Validator validator) { + private static TextField createRequiredTextfield(final String caption, final Property dataSource, + final Resource icon, final Validator validator) { final TextField textField = new TextField(caption, dataSource); return addTextFieldValues(textField, icon, validator); } - private TextField addTextFieldValues(final TextField textField, final Resource icon, final Validator validator) { + private static TextField addTextFieldValues(final TextField textField, final Resource icon, + final Validator validator) { textField.setIcon(icon); textField.setRequired(true); if (validator != null) { diff --git a/hawkbit-core/src/main/java/org/eclipse/hawkbit/api/PropertyBasedArtifactUrlHandler.java b/hawkbit-core/src/main/java/org/eclipse/hawkbit/api/PropertyBasedArtifactUrlHandler.java index 53f6492d1..91a271541 100644 --- a/hawkbit-core/src/main/java/org/eclipse/hawkbit/api/PropertyBasedArtifactUrlHandler.java +++ b/hawkbit-core/src/main/java/org/eclipse/hawkbit/api/PropertyBasedArtifactUrlHandler.java @@ -19,6 +19,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties import org.springframework.stereotype.Component; import com.google.common.base.Strings; +import com.google.common.net.UrlEscapers; /** * Implementation for ArtifactUrlHandler for creating urls to download resource @@ -55,8 +56,8 @@ public class PropertyBasedArtifactUrlHandler implements ArtifactUrlHandler { } String urlPattern = properties.getPattern(); - final Set> entrySet = getReplaceMap(targetId, softwareModuleId, filename, sha1Hash, - protocolString, properties).entrySet(); + final Set> entrySet = getReplaceMap(targetId, softwareModuleId, + UrlEscapers.urlFragmentEscaper().escape(filename), sha1Hash, protocolString, properties).entrySet(); for (final Entry entry : entrySet) { if (entry.getKey().equals(PORT_PLACEHOLDER)) { urlPattern = urlPattern.replace(":{" + entry.getKey() + "}", diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaAction.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaAction.java index 72ef46ba3..42184c8b0 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaAction.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaAction.java @@ -183,8 +183,8 @@ public class JpaAction extends AbstractJpaTenantAwareBaseEntity implements Actio @Override public void fireUpdateEvent(final DescriptorEvent descriptorEvent) { - EventBusHolder.getInstance().getEventBus().post(new ActionPropertyChangeEvent(this, - EntityPropertyChangeHelper.getChangeSet(Action.class, descriptorEvent))); + EventBusHolder.getInstance().getEventBus() + .post(new ActionPropertyChangeEvent(this, EntityPropertyChangeHelper.getChangeSet(descriptorEvent))); } @Override diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaDistributionSet.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaDistributionSet.java index 661474668..6f7d05f60 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaDistributionSet.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaDistributionSet.java @@ -72,8 +72,6 @@ import org.eclipse.persistence.descriptors.DescriptorEvent; public class JpaDistributionSet extends AbstractJpaNamedVersionedEntity implements DistributionSet, EventAwareEntity { private static final long serialVersionUID = 1L; - private static final String COMPLETE_PROPERTY = "complete"; - private static final String DELETED_PROPERTY = "deleted"; @Column(name = "required_migration_step") @@ -299,8 +297,7 @@ public class JpaDistributionSet extends AbstractJpaNamedVersionedEntity implemen @Override public void fireUpdateEvent(final DescriptorEvent descriptorEvent) { - final Map changeSet = EntityPropertyChangeHelper.getChangeSet(JpaDistributionSet.class, - descriptorEvent); + final Map changeSet = EntityPropertyChangeHelper.getChangeSet(descriptorEvent); EventBusHolder.getInstance().getEventBus().post(new DistributionSetUpdateEvent(this)); if (changeSet.containsKey(DELETED_PROPERTY)) { diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaRollout.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaRollout.java index 85395e27b..570158240 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaRollout.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaRollout.java @@ -208,8 +208,8 @@ public class JpaRollout extends AbstractJpaNamedEntity implements Rollout, Event @Override public void fireUpdateEvent(final DescriptorEvent descriptorEvent) { - EventBusHolder.getInstance().getEventBus().post(new RolloutPropertyChangeEvent(this, - EntityPropertyChangeHelper.getChangeSet(Rollout.class, descriptorEvent))); + EventBusHolder.getInstance().getEventBus() + .post(new RolloutPropertyChangeEvent(this, EntityPropertyChangeHelper.getChangeSet(descriptorEvent))); } diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaRolloutGroup.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaRolloutGroup.java index 9bb8644f4..0c43bf2da 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaRolloutGroup.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaRolloutGroup.java @@ -247,8 +247,8 @@ public class JpaRolloutGroup extends AbstractJpaNamedEntity implements RolloutGr @Override public void fireUpdateEvent(final DescriptorEvent descriptorEvent) { - EventBusHolder.getInstance().getEventBus().post(new RolloutGroupPropertyChangeEvent(this, - EntityPropertyChangeHelper.getChangeSet(RolloutGroup.class, descriptorEvent))); + EventBusHolder.getInstance().getEventBus().post( + new RolloutGroupPropertyChangeEvent(this, EntityPropertyChangeHelper.getChangeSet(descriptorEvent))); } @Override diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/helper/EntityPropertyChangeHelper.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/helper/EntityPropertyChangeHelper.java index 9e759640d..3d296c513 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/helper/EntityPropertyChangeHelper.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/helper/EntityPropertyChangeHelper.java @@ -12,7 +12,6 @@ import java.util.Map; import java.util.stream.Collectors; import org.eclipse.hawkbit.repository.eventbus.event.AbstractPropertyChangeEvent.PropertyChange; -import org.eclipse.hawkbit.repository.model.TenantAwareBaseEntity; import org.eclipse.persistence.descriptors.DescriptorEvent; import org.eclipse.persistence.internal.sessions.ObjectChangeSet; import org.eclipse.persistence.queries.UpdateObjectQuery; @@ -21,9 +20,12 @@ import org.eclipse.persistence.sessions.changesets.DirectToFieldChangeRecord; /** * Helper class to get the change set for the property changes in the Entity. * - * @param */ -public class EntityPropertyChangeHelper { +public final class EntityPropertyChangeHelper { + + private EntityPropertyChangeHelper() { + // noop + } /** * To get the map of entity property change set @@ -32,14 +34,11 @@ public class EntityPropertyChangeHelper { * @param event * @return the map of the changeSet */ - public static Map getChangeSet(final Class clazz, - final DescriptorEvent event) { - final T rolloutGroup = clazz.cast(event.getObject()); + public static Map getChangeSet(final DescriptorEvent event) { final ObjectChangeSet changeSet = ((UpdateObjectQuery) event.getQuery()).getObjectChangeSet(); return changeSet.getChanges().stream().filter(record -> record instanceof DirectToFieldChangeRecord) .map(record -> (DirectToFieldChangeRecord) record) .collect(Collectors.toMap(record -> record.getAttribute(), record -> new PropertyChange(record.getOldValue(), record.getNewValue()))); } - } diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/artifacts/smtable/SoftwareModuleAddUpdateWindow.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/artifacts/smtable/SoftwareModuleAddUpdateWindow.java index a5e6af609..7dbcdeb89 100644 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/artifacts/smtable/SoftwareModuleAddUpdateWindow.java +++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/artifacts/smtable/SoftwareModuleAddUpdateWindow.java @@ -151,8 +151,8 @@ public class SoftwareModuleAddUpdateWindow extends CustomComponent { .prompt(i18n.get("textfield.description")).id(SPUIComponentIdProvider.ADD_SW_MODULE_DESCRIPTION) .buildTextComponent(); - typeComboBox = SPUIComponentProvider.getComboBox(i18n.get("upload.swmodule.type"), "", "", null, null, true, - null, i18n.get("upload.swmodule.type")); + typeComboBox = SPUIComponentProvider.getComboBox(i18n.get("upload.swmodule.type"), "", null, null, true, null, + i18n.get("upload.swmodule.type")); typeComboBox.setId(SPUIComponentIdProvider.SW_MODULE_TYPE); typeComboBox.setStyleName(SPUIDefinitions.COMBO_BOX_SPECIFIC_STYLE + " " + ValoTheme.COMBOBOX_TINY); typeComboBox.setNewItemsAllowed(Boolean.FALSE); diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java index a32346141..7ed065ceb 100644 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java +++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java @@ -57,8 +57,6 @@ public final class SPUIComponentProvider { * * @param caption * caption of the combo box - * @param height - * combo box height * @param width * combo box width * @param style @@ -73,9 +71,9 @@ public final class SPUIComponentProvider { * input prompt * @return ComboBox */ - public static ComboBox getComboBox(final String caption, final String height, final String width, - final String style, final String styleName, final boolean required, final String data, final String promt) { - return SPUIComboBoxDecorator.decorate(caption, height, width, style, styleName, required, data, promt); + public static ComboBox getComboBox(final String caption, final String width, final String style, + final String styleName, final boolean required, final String data, final String promt) { + return SPUIComboBoxDecorator.decorate(caption, width, style, styleName, required, data, promt); } /** @@ -290,20 +288,19 @@ public final class SPUIComponentProvider { * specify how the link should be open (f. e. new windows = * _blank) * @param style - * chosen style of the link - * @param setStyle - * set true if the style should be used + * chosen style of the link. Might be {@code null} if no style + * should be used * @return a link UI component */ public static Link getLink(final String id, final String name, final String resource, final FontAwesome icon, - final String targetOpen, final String style, final boolean setStyle) { + final String targetOpen, final String style) { final Link link = new Link(name, new ExternalResource(resource)); link.setId(id); link.setIcon(icon); link.setTargetName(targetOpen); - if (setStyle) { + if (style != null) { link.setStyleName(style); } diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/decorators/SPUIComboBoxDecorator.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/decorators/SPUIComboBoxDecorator.java index 291173044..89d23709c 100644 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/decorators/SPUIComboBoxDecorator.java +++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/decorators/SPUIComboBoxDecorator.java @@ -49,7 +49,7 @@ public final class SPUIComboBoxDecorator { * as promt * @return ComboBox as comp */ - public static ComboBox decorate(final String caption, final String height, final String width, final String style, + public static ComboBox decorate(final String caption, final String width, final String style, final String styleName, final boolean required, final String data, final String prompt) { final ComboBox spUICombo = new ComboBox(); // Default settings @@ -67,10 +67,6 @@ public final class SPUIComboBoxDecorator { if (StringUtils.isNotEmpty(styleName)) { spUICombo.addStyleName(styleName); } - // Add height - if (StringUtils.isNotEmpty(height)) { - spUICombo.setHeight(height); - } // AddWidth if (StringUtils.isNotEmpty(width)) { spUICombo.setWidth(width); diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractCreateUpdateTagLayout.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractCreateUpdateTagLayout.java index 0c4aa3111..755d378ea 100644 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractCreateUpdateTagLayout.java +++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/AbstractCreateUpdateTagLayout.java @@ -189,7 +189,7 @@ public abstract class AbstractCreateUpdateTagLayout exten tagDesc.setNullRepresentation(""); - tagNameComboBox = SPUIComponentProvider.getComboBox(null, "", "", null, null, false, "", + tagNameComboBox = SPUIComponentProvider.getComboBox(null, "", null, null, false, "", i18n.get("label.combobox.tag")); tagNameComboBox.addStyleName(SPUIDefinitions.FILTER_TYPE_COMBO_STYLE); tagNameComboBox.setImmediate(true); diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/CreateUpdateTypeLayout.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/CreateUpdateTypeLayout.java index 51003fb58..b464a87c0 100644 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/CreateUpdateTypeLayout.java +++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/layouts/CreateUpdateTypeLayout.java @@ -54,8 +54,8 @@ public abstract class CreateUpdateTypeLayout extends Abst colorLabel = new LabelBuilder().name(i18n.get("label.choose.type.color")).buildLabel(); colorLabel.addStyleName(SPUIDefinitions.COLOR_LABEL_STYLE); - tagNameComboBox = SPUIComponentProvider.getComboBox(i18n.get("label.combobox.type"), "", "", null, null, false, - "", i18n.get("label.combobox.type")); + tagNameComboBox = SPUIComponentProvider.getComboBox(i18n.get("label.combobox.type"), "", null, null, false, "", + i18n.get("label.combobox.type")); tagNameComboBox.setId(SPUIDefinitions.NEW_DISTRIBUTION_SET_TYPE_NAME_COMBO); tagNameComboBox.addStyleName(SPUIDefinitions.FILTER_TYPE_COMBO_STYLE); tagNameComboBox.setImmediate(true); diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/login/LoginView.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/login/LoginView.java index 48805e1d1..6e5ea9238 100644 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/login/LoginView.java +++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/login/LoginView.java @@ -266,14 +266,14 @@ public class LoginView extends VerticalLayout implements View { if (!uiProperties.getLinks().getDocumentation().getRoot().isEmpty()) { final Link docuLink = SPUIComponentProvider.getLink(SPUIComponentIdProvider.LINK_DOCUMENTATION, i18n.get("link.documentation.name"), uiProperties.getLinks().getDocumentation().getRoot(), - FontAwesome.QUESTION_CIRCLE, "_blank", linkStyle, true); + FontAwesome.QUESTION_CIRCLE, "_blank", linkStyle); links.addComponent(docuLink); docuLink.addStyleName(ValoTheme.LINK_SMALL); } if (!uiProperties.getDemo().getUser().isEmpty()) { final Link demoLink = SPUIComponentProvider.getLink(SPUIComponentIdProvider.LINK_DEMO, - i18n.get("link.demo.name"), "?demo", FontAwesome.DESKTOP, "_top", linkStyle, true); + i18n.get("link.demo.name"), "?demo", FontAwesome.DESKTOP, "_top", linkStyle); links.addComponent(demoLink); demoLink.addStyleName(ValoTheme.LINK_SMALL); } @@ -281,7 +281,7 @@ public class LoginView extends VerticalLayout implements View { if (!uiProperties.getLinks().getRequestAccount().isEmpty()) { final Link requestAccountLink = SPUIComponentProvider.getLink(SPUIComponentIdProvider.LINK_REQUESTACCOUNT, i18n.get("link.requestaccount.name"), uiProperties.getLinks().getRequestAccount(), - FontAwesome.SHOPPING_CART, "", linkStyle, true); + FontAwesome.SHOPPING_CART, "", linkStyle); links.addComponent(requestAccountLink); requestAccountLink.addStyleName(ValoTheme.LINK_SMALL); } @@ -289,7 +289,7 @@ public class LoginView extends VerticalLayout implements View { if (!uiProperties.getLinks().getUserManagement().isEmpty()) { final Link userManagementLink = SPUIComponentProvider.getLink(SPUIComponentIdProvider.LINK_USERMANAGEMENT, i18n.get("link.usermanagement.name"), uiProperties.getLinks().getUserManagement(), - FontAwesome.USERS, "_blank", linkStyle, true); + FontAwesome.USERS, "_blank", linkStyle); links.addComponent(userManagementLink); userManagementLink.addStyleName(ValoTheme.LINK_SMALL); } diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/dstable/DistributionAddUpdateWindowLayout.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/dstable/DistributionAddUpdateWindowLayout.java index 1b96181b5..e0bf9b1df 100644 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/dstable/DistributionAddUpdateWindowLayout.java +++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/dstable/DistributionAddUpdateWindowLayout.java @@ -147,7 +147,7 @@ public class DistributionAddUpdateWindowLayout extends CustomComponent { distNameTextField = createTextField("textfield.name", SPUIComponentIdProvider.DIST_ADD_NAME); distVersionTextField = createTextField("textfield.version", SPUIComponentIdProvider.DIST_ADD_VERSION); - distsetTypeNameComboBox = SPUIComponentProvider.getComboBox(i18n.get("label.combobox.type"), "", "", null, "", + distsetTypeNameComboBox = SPUIComponentProvider.getComboBox(i18n.get("label.combobox.type"), "", null, "", false, "", i18n.get("label.combobox.type")); distsetTypeNameComboBox.setImmediate(true); distsetTypeNameComboBox.setNullSelectionAllowed(false); diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/dstable/DistributionTable.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/dstable/DistributionTable.java index b6b616417..3bf60df52 100644 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/dstable/DistributionTable.java +++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/dstable/DistributionTable.java @@ -18,7 +18,6 @@ import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; import org.eclipse.hawkbit.repository.DistributionSetManagement; -import org.eclipse.hawkbit.repository.EntityFactory; import org.eclipse.hawkbit.repository.SpPermissionChecker; import org.eclipse.hawkbit.repository.TargetManagement; import org.eclipse.hawkbit.repository.eventbus.event.DistributionCreatedEvent; @@ -84,7 +83,7 @@ public class DistributionTable extends AbstractNamedVersionTable= 1 && managementUIState.getDistributionTableFilters().isNoTagSelected()) { refreshFilter(); } @@ -414,7 +410,8 @@ public class DistributionTable extends AbstractNamedVersionTable distributionSetTypeCollection = distributionSetManagement .findDistributionSetTypesAll(pageReq); - combobox = SPUIComponentProvider.getComboBox(null, "", "330", null, null, false, "", "label.combobox.tag"); + combobox = SPUIComponentProvider.getComboBox(null, "330", null, null, false, "", "label.combobox.tag"); combobox.setId(SPUIComponentIdProvider.SYSTEM_CONFIGURATION_DEFAULTDIS_COMBOBOX); combobox.setNullSelectionAllowed(false); for (final DistributionSetType distributionSetType : distributionSetTypeCollection) { diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java index e20d4cbae..d8e93350b 100644 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java +++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java @@ -8,11 +8,9 @@ */ package org.eclipse.hawkbit.ui.utils; -import java.util.ArrayList; import java.util.Arrays; import java.util.Date; import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.TimeZone; @@ -37,10 +35,8 @@ import org.vaadin.alump.distributionbar.DistributionBar; import com.google.common.base.Strings; import com.vaadin.data.Container; import com.vaadin.data.Item; -import com.vaadin.server.Sizeable.Unit; import com.vaadin.shared.ui.label.ContentMode; import com.vaadin.ui.Button; -import com.vaadin.ui.Component; import com.vaadin.ui.Label; import com.vaadin.ui.Table; import com.vaadin.ui.UI; @@ -174,58 +170,6 @@ public final class HawkbitCommonUtil { return boldStr; } - /** - * Get target label Id. - * - * @param controllerId - * as String - * @return String as label name - */ - public static String getTargetLabelId(final String controllerId) { - return new StringBuilder("target").append('.').append(controllerId).toString(); - } - - /** - * Get distribution table cell id. - * - * @param name - * distribution name - * @param version - * distribution version - * @return String distribution label id - */ - public static String getDistributionLabelId(final String name, final String version) { - return new StringBuilder("dist").append('.').append(name).append('.').append(version).toString(); - } - - /** - * Get software module label id. - * - * @param name - * software module name - * @param version - * software module version - * @return String software module label id - */ - public static String getSwModuleLabelId(final String name, final String version) { - return new StringBuilder("swModule").append('.').append(name).append('.').append(version).toString(); - } - - /** - * Get label with software module name and description. - * - * @param name - * software module name - * @param desc - * software module description - * @return String - */ - public static String getSwModuleNameDescLabel(final String name, final String desc) { - return new StringBuilder().append( - DIV_DESCRIPTION_START + getBoldHTMLText(getFormattedName(name)) + "
" + getFormattedName(desc)) - .append(DIV_DESCRIPTION_END).toString(); - } - /** * Get Label for Artifact Details. * @@ -294,31 +238,6 @@ public final class HawkbitCommonUtil { return trimAndNullIfEmpty(orgText) == null ? SPUIDefinitions.SPACE : orgText; } - /** - * Find extra height required to increase by all the components to utilize - * the full height of browser for the responsive UI. - * - * @param newBrowserHeight - * as current browser height. - * @return extra height required to increase. - */ - public static float findRequiredExtraHeight(final float newBrowserHeight) { - return newBrowserHeight > SPUIDefinitions.REQ_MIN_BROWSER_HEIGHT - ? (newBrowserHeight - SPUIDefinitions.REQ_MIN_BROWSER_HEIGHT) : 0; - } - - /** - * Find required extra height of software module. - * - * @param newBrowserHeight - * new browser height - * @return float heigth of software module table - */ - public static float findRequiredSwModuleExtraHeight(final float newBrowserHeight) { - return newBrowserHeight > SPUIDefinitions.REQ_MIN_UPLOAD_BROWSER_HEIGHT - ? (newBrowserHeight - SPUIDefinitions.REQ_MIN_UPLOAD_BROWSER_HEIGHT) : 0; - } - /** * Find required extra width of software module. * @@ -363,94 +282,6 @@ public final class HawkbitCommonUtil { return extraWidth + minPopupHeight; } - /** - * Find extra width required to increase by all the components to utilize - * the full width of browser for the responsive UI. - * - * @param newBrowserWidth - * as current browser width. - * @return extra width required to be increased. - */ - public static float findRequiredExtraWidth(final float newBrowserWidth) { - float width = 0; - if (newBrowserWidth < SPUIDefinitions.REQ_MIN_BROWSER_WIDTH) { - width = SPUIDefinitions.REQ_MIN_BROWSER_WIDTH - newBrowserWidth; - } - return width; - } - - /** - * Find extra width required to increase by all the components to utilize - * the full width of browser for the responsive UI. - * - * @param newBrowserWidth - * as current browser width. - * @return extra width required to be increased. - */ - public static float findExtraWidth(final float newBrowserWidth) { - return newBrowserWidth > SPUIDefinitions.REQ_MIN_BROWSER_WIDTH - ? (newBrowserWidth - SPUIDefinitions.REQ_MIN_BROWSER_WIDTH) : 0; - } - - /** - * Get target table width based on screen width. - * - * @param newBrowserWidth - * new browser width. - * @param minTargetTableLength - * minimum target table width. - * @param minDistTableLength - * minimum distribution table width. - * @return float as table width - */ - public static float getTargetTableWidth(final float newBrowserWidth, final float minTargetTableLength, - final float minDistTableLength) { - float width = 0; - final float requiredExtraWidth = findRequiredExtraWidth(newBrowserWidth); - // adjusting the target table width if distribution table width has - // reached the maximum width - if (requiredExtraWidth + minDistTableLength > SPUIDefinitions.MAX_DIST_TABLE_WIDTH) { - width = requiredExtraWidth + minDistTableLength - SPUIDefinitions.MAX_DIST_TABLE_WIDTH; - } - if (width + minTargetTableLength + requiredExtraWidth > SPUIDefinitions.MAX_TARGET_TABLE_WIDTH) { - return SPUIDefinitions.MAX_TARGET_TABLE_WIDTH; - } - return width + minTargetTableLength + requiredExtraWidth; - } - - /** - * Get distribution table width based on screen width. - * - * @param newBrowserWidth - * new browser width. - * @param minTableWidth - * min distribution table width. - * @return float as distribution table width. - */ - public static float getDistTableWidth(final float newBrowserWidth, final float minTableWidth) { - final float requiredExtraWidth = findExtraWidth(newBrowserWidth); - float expectedDistWidth = minTableWidth; - if (requiredExtraWidth > 0) { - expectedDistWidth = expectedDistWidth + Math.round(requiredExtraWidth * 0.5F); - } - return expectedDistWidth; - } - - /** - * Get software module table width. - * - * @param newBrowserWidth - * @param minTableWidth - * @return - */ - public static float getSoftwareModuleTableWidth(final float newBrowserWidth, final float minTableWidth) { - final float requiredExtraWidth = findRequiredExtraWidth(newBrowserWidth); - if (requiredExtraWidth + minTableWidth > SPUIDefinitions.MAX_UPLOAD_SW_MODULE_TABLE_WIDTH) { - return SPUIDefinitions.MAX_UPLOAD_SW_MODULE_TABLE_WIDTH; - } - return requiredExtraWidth + minTableWidth; - } - /** * Remove the prefix from text. * @@ -514,55 +345,6 @@ public final class HawkbitCommonUtil { return name + ":" + version; } - /** - * Set height of artifact details table and drop area layout. - * - * @param dropLayout - * drop area layout - * @param artifactDetailsLayout - * artifact details table - * @param newHeight - * new browser height - */ - public static void setArtifactDetailsLayoutHeight(final Component artifactDetailsLayout, final float newHeight) { - final float extraBrowserHeight = HawkbitCommonUtil.findRequiredSwModuleExtraHeight(newHeight); - final float tableHeight = SPUIDefinitions.MIN_UPLOAD_ARTIFACT_TABLE_HEIGHT + extraBrowserHeight; - artifactDetailsLayout.setHeight(tableHeight, Unit.PIXELS); - } - - /** - * Set height of artifact details table and drop area layout. - * - * @param artifactDetailsLayout - * artifact details table - * @param newHeight - * new browser height - */ - public static void setManageDistArtifactDetailsLayoutHeight(final Component artifactDetailsLayout, - final float newHeight) { - final float tableHeight = SPUIDefinitions.MIN_TARGET_DIST_TABLE_HEIGHT - + HawkbitCommonUtil.findRequiredExtraHeight(newHeight) + 62; - artifactDetailsLayout.setHeight(tableHeight, Unit.PIXELS); - } - - /** - * Duplicate check - Unique Key. - * - * @param name - * as string - * @param version - * as string - * @param type - * key as string - * @return boolean as flag - */ - public static boolean isDuplicate(final String name, final String version, final String type) { - final SoftwareManagement swMgmtService = SpringContextHelper.getBean(SoftwareManagement.class); - final SoftwareModule swModule = swMgmtService.findSoftwareModuleByNameAndVersion(name, version, - swMgmtService.findSoftwareModuleTypeByName(type)); - return swModule != null; - } - /** * Add new base software module. * @@ -593,15 +375,6 @@ public final class HawkbitCommonUtil { return newSWModule; } - public static void setTargetVisibleColumns(final Table targTable) { - final List targColumnIds = new ArrayList<>(); - final List targColumnLabels = new ArrayList<>(); - targColumnIds.add(SPUIDefinitions.TARGET_TABLE_VISIBILE_COLUMN_NAME); - targColumnLabels.add(SPUIDefinitions.TARGET_TABLE_VISIBILE_COLUMN_NAME); - targTable.setVisibleColumns(targColumnIds.toArray()); - targTable.setColumnHeaders(targColumnLabels.toArray(new String[0])); - } - /** * @param distName * @param distVersion diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/SPUIComponentIdProvider.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/SPUIComponentIdProvider.java index 5c0456c7d..f074485d7 100644 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/SPUIComponentIdProvider.java +++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/SPUIComponentIdProvider.java @@ -41,30 +41,10 @@ public final class SPUIComponentIdProvider { * ID-SW.DEL. */ public static final String SW_DELETE_ALL = "swmodule.delete.all"; - /* - * ID-Targ.Detail.icon. - */ - public static final String TARGET_DETAILS_ICON = "target.details.icon"; /** * ID-Targ.Edit.icon. */ public static final String TARGET_EDIT_ICON = "target.edit.icon"; - /** - * ID-Targ.Edit.Name. - */ - public static final String TARGET_EDIT_NAME = "target.edit.name"; - /** - * ID-Targ.Edit.desc. - */ - public static final String TARGET_EDIT_DESC = "target.edit.desc"; - /** - * ID-Targ.Edit.Save. - */ - public static final String TARGET_EDIT_SAVE = "target.edit.save"; - /** - * PREFIX - JVM. - */ - public static final String TARGET_EDIT_DISCARD = "target.edit.discard"; /** * ID-Targ.PIN. */ @@ -84,10 +64,6 @@ public final class SPUIComponentIdProvider { * ID-Dist. */ public static final String DIST_TABLE_ID = "dist.tableId"; - /** - * ID-Dist.Add. - */ - public static final String DIST_ADD_ID = "dist.add.id"; /** * ID-Dist.Name. */ @@ -104,58 +80,10 @@ public final class SPUIComponentIdProvider { * ID-Dist.desc. */ public static final String DIST_ADD_DESC = "dist.add.desc"; - /** - * ID-Dist.JVM. - */ - public static final String DIST_ADD_MODULE = "dist.add.module."; - /** - * ID-Dist.JVM delete icon. - */ - public static final String DIST_DELETE_MODULE = "dist.delete.module."; /** * /** ID-Dist.DELETE. */ public static final String DIST_DELETE_ALL = "dist.delete.all"; - /** - * ID-Dist.Detail.iocn. - */ - public static final String DIST_DETAILS_ICON = "dist.details.icon"; - /** - * ID-Dist.Edit.icon. - */ - public static final String DIST_EDIT_ICON = "dist.edit.icon"; - /** - * ID-Dist.Edit.name. - */ - public static final String DIST_EDIT_NAME = "dist.edit.name"; - /** - * ID-Dist.Edit.ver. - */ - public static final String DIST_EDIT_VERSION = "dist.edit.version"; - /** - * ID-Dist.Edit.desc. - */ - public static final String DIST_EDIT_DESC = "dist.edit.desc"; - /** - * ID-Dist.Edit.JVM. - */ - public static final String DIST_EDIT_JVM = "dist.edit.jvm"; - /** - * ID-Dist.Edit.AH. - */ - public static final String DIST_EDIT_AGENTHUB = "dist.edit.agenthub"; - /** - * ID-Dist.Edit.os. - */ - public static final String DIST_EDIT_OS = "dist.edit.os"; - /** - * ID-Dist.Edit.save. - */ - public static final String DIST_EDIT_SAVE = "dist.edit.save"; - /** - * ID-Dist.Edit.Discard. - */ - public static final String DIST_EDIT_DISCARD = "dist.edit.discard"; /** * ID-Dist.MigCheck. */ @@ -172,10 +100,6 @@ public final class SPUIComponentIdProvider { * ID - Dist.Add. */ public static final String DIST_ADD_ICON = "dist.add.icon"; - /** - * ID - Dist jvm combo. - */ - public static final String DIST_MODULE_COMBO = "dist.module.combo."; /** * ID for Distribution Tag ComboBox */ @@ -198,25 +122,6 @@ public final class SPUIComponentIdProvider { */ public static final String SOFT_MODULE_VENDOR = "soft.module.vendor"; - /** - * ID - "soft.module.save. - */ - public static final String SOFT_MODULE_SAVE = "soft.module.save"; - - /** - * ID - soft.module.discar. - */ - public static final String SOFT_MODULE_DISCARD = "soft.module.discard"; - - /** DistributionSet Components Ids ends here **/ - /** - * ID- Action popup. - */ - public static final String SAVE_ACTIONS_POPUP = "save.actions.popup"; - /** - * ID- Delete SW Module Popup. - */ - public static final String DELETE_SW_MODULE_ACTIONS_POPUP = "delete.sw.module.actions.popup"; /** * ID - Save Assign. */ @@ -284,11 +189,6 @@ public final class SPUIComponentIdProvider { */ public static final String TARGET_DROP_FILTER_ICON = "target.drop.filter.icon"; - /** - * DROP filter icon id. - */ - public static final String DROP_FILTER_ICON = "drop.filter.icon"; - /** * Pending action button id. */ @@ -354,18 +254,10 @@ public final class SPUIComponentIdProvider { * Upload - process button id. */ public static final String UPLOAD_PROCESS_BUTTON = "upload.process.button"; - /** - * Software module No Action Button id. - */ - public static final String NO_ACTION_BUTTON = "no.action.button"; /** * Upload - discard button id. */ public static final String UPLOAD_DISCARD_BUTTON = "upload.discard.button"; - /** - * Upload - delete button id. - */ - public static final String UPLOAD_SOFTWARE_DELETE_BUTTON = "upload.software.delete.button"; /** * Upload - artifact detail close button. @@ -440,18 +332,10 @@ public final class SPUIComponentIdProvider { */ public static final String ADD_SW_MODULE_DESCRIPTION = "sw.module.description"; - /** - * ID-Targ.Detail.icon. - */ - public static final String SW_TABLE_DETAILS_ICON = "swmodule.details.icon"; /** * ID-Targ.Detail.icon. */ public static final String SW_TABLE_ATRTIFACT_DETAILS_ICON = "swmodule.artifact.details.icon"; - /** - * ID-swModule.Edit.Button. - */ - public static final String SW_TABLE_EDIT_DETAILS = "swmodule.edit.details"; /** * Artifact upload - sw module edit button id. @@ -467,35 +351,16 @@ public final class SPUIComponentIdProvider { */ public static final String UPLOAD_ARTIFACT_DETAILS_TABLE_MAX = "upload.artifactdetails.table.max"; - /** - * Target tag button layout id. - */ - public static final String TARGET_TAG_BUTTON_LAYOUT = "target.tag.button.layout"; - /** * Target tag close button. */ public static final String HIDE_TARGET_TAGS = "hide.target.tags"; - /** - * Distribution Type tag close button. - */ - public static final String HIDE_DIST_TYPE_TAGS = "hide.dist.type.tags"; - /** * Show target tag layout icon. */ public static final String SHOW_TARGET_TAGS = "show.target.tags.icon"; - /** - * Tag name combo box in target details layout. - */ - public static final String TARGET_TAG_COMBO = "target.tag.names"; - - /** - * Target details - assign button. - */ - public static final String TARGET_TAG_ASSIGN = "target.tag.assign"; /** * ID-Target tag table. */ @@ -548,11 +413,6 @@ public final class SPUIComponentIdProvider { */ public static final String SYSTEM_CONFIGURATION_CANCEL = "system.configuration.cancel"; - /** - * Id of the anonymous download checkbox. - */ - public static final String SYSTEM_CONFIGURATION_ANONYMOUS_DOWNLOAD_CHECKBOX = "system.configuration.anonymous.download.checkbox"; - /** * Id of maximize/minimize icon of table - Software module table. */ @@ -690,10 +550,6 @@ public final class SPUIComponentIdProvider { * Bulk target upload - tag field. */ public static final String BULK_UPLOAD_TAG = "bulkupload.tag"; - /** - * Bulk target upload - upload button. - */ - public static final String BULK_UPLOAD_BUTTON = "bulkupload.upload.button"; /** * Bulk target upload - count label. */ @@ -758,11 +614,6 @@ public final class SPUIComponentIdProvider { */ public static final String BULK_UPLOAD_STATUS_BUTTON = "bulk.upload.notification.id"; - /** - * Target Filter Status button id. - */ - public static final String TARGET_FILTER_STATUS_BUTTON = "target.filter.status.button.id"; - /** * Target bulk upload minimize button id. */ @@ -804,11 +655,6 @@ public final class SPUIComponentIdProvider { */ public static final String ROLLOUT_GROUP_TARGETS_LIST_GRID_ID = "rollout.group.targets.grid.id"; - /** - * Rollout delete button id. - */ - public static final String ROLLOUT_DELETE_ICON = "rollout.delete.button.id"; - /** * Rollout text field name id. */ @@ -836,23 +682,6 @@ public final class SPUIComponentIdProvider { * Rollout description field id. */ public static final String ROLLOUT_DESCRIPTION_ID = "rollout.description.id"; - /** - * Rollout create update window - save buttopn id. - */ - public static final String ROLLOUT_CREATE_UPDATE_SAVE_ID = "rollout.create.update.save.id"; - - /** - * Rollout create update - discard button id. - */ - public static final String ROLLOUT_CREATE_UPDATE_DISCARD_ID = "rollout.create.update.discard.id"; - /** - * Rollout name link id. - */ - public static final String ROLLOUT_NAME_LINK_ID = "rollout.name.link"; - /** - * Rollout Group name link id. - */ - public static final String ROLLOUT_GROUP_NAME_LINK_ID = "rollout.group.name.link"; /** * Rollout target filter query combo id. */ @@ -878,10 +707,6 @@ public final class SPUIComponentIdProvider { */ public static final String ROLLOUT_UPDATE_BUTTON_ID = ROLLOUT_ACTION_ID + ".11"; - /** - * Rollout save or start option group id. - */ - public static final String ROLLOUT_SAVESTARTOPTION_ID = "rollout.savestartoption.id"; /** * Rollout status label id. */ @@ -906,18 +731,10 @@ public final class SPUIComponentIdProvider { * Rollout target view- close button id. */ public static final String ROLLOUT_TARGET_VIEW_CLOSE_BUTTON_ID = "rollout.group.target.close.id"; - /** - * Rollout status progress bar id. - */ - public static final String ROLLOUT_PROGRESS_BAR = "rollout.status.progress.bar.id"; /** * Rollout group header caption. */ public static final String ROLLOUT_GROUP_HEADER_CAPTION = "rollout.group.header.caption"; - /** - * Rollout group target header caption. - */ - public static final String ROLLOUT_GROUP_TARGET_HEADER_CAPTION = "rollout.group.header.target.caption"; /** * Rollout group close id. */ @@ -962,31 +779,21 @@ public final class SPUIComponentIdProvider { */ public static final String UPLOAD_STATUS_POPUP_ID = "artifact.upload.status.popup.id"; - /** + /** * Software module table - Manage metadata id. */ public static final String SW_TABLE_MANAGE_METADATA_ID = "swtable.manage.metadata.id"; - - + /** * Metadata key id. */ public static final String METADATA_KEY_FIELD_ID = "metadata.key.id"; - + /** * Metadata value id. */ public static final String METADATA_VALUE_ID = "metadata.value.id"; - /** - * Metadata save id. - */ - public static final String METADTA_SAVE_ICON_ID = "metadata.save.icon.id"; - - /** - * Metadata discard id. - */ - public static final String METADTA_DISCARD_ICON_ID = "metadata.discard.icon.id"; - + /** * Metadata add icon id. */ @@ -995,41 +802,36 @@ public final class SPUIComponentIdProvider { * Metadata table id. */ public static final String METDATA_TABLE_ID = "metadata.table.id"; - + /** * Distribution set table - Manage metadata id. */ public static final String DS_TABLE_MANAGE_METADATA_ID = "dstable.manage.metadata.id"; - - /** + + /** * DistributionSet - Metadata button id. */ public static final String DS_METADATA_DETAIL_LINK = "distributionset.metadata.detail.link"; - + /** * Metadata popup id. */ public static final String METADATA_POPUP_ID = "metadata.popup.id"; - + /** * DistributionSet table details tab id in Distributions . */ public static final String DISTRIBUTIONSET_DETAILS_TABSHEET_ID = "distributionset.details.tabsheet"; - + /** * Software module table details tab id in Distributions . */ public static final String DIST_SW_MODULE_DETAILS_TABSHEET_ID = "dist.sw.module.details.tabsheet"; - + /** * Software Module - Metadata button id. */ public static final String SW_METADATA_DETAIL_LINK = "softwaremodule.metadata.detail.link"; - - /** - * Table multiselect for selecting DistType - */ - public static final String SELECT_DIST_TYPE = "select-dist-type"; /** * /* Private Constructor. diff --git a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/SPUIDefinitions.java b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/SPUIDefinitions.java index f2e26564f..aae1da513 100644 --- a/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/SPUIDefinitions.java +++ b/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/SPUIDefinitions.java @@ -16,11 +16,6 @@ import org.springframework.data.domain.Sort.Direction; /** * Class to provide the unchanged constants. - * - * - * - * - * */ public final class SPUIDefinitions { /** @@ -46,11 +41,6 @@ public final class SPUIDefinitions { */ public static final int DIST_TYPE_SIZE = 8; - /** - * Target and Distribution set table size. - */ - public static final int TABLE_MIN_LENGTH = 3; - /** * Action history active column. */ @@ -133,154 +123,10 @@ public final class SPUIDefinitions { */ public static final String SCHEDULED = "scheduled"; - /** - * Action history lazy fetch page length. - */ - public static final int PAGE_LEN_ACTION_HISTORY = 5; - - /** - * Action history lazy fetch page length in popup. - */ - public static final int PAGE_LEN_ACTION_HISTORY_IN_POPUP = 4; - - /** - * Action history messages page length in the popup. - */ - public static final int PAGE_LEN_MSGS_IN_ACTION_HISTORY = 3; - - /** - * Target filter box style. - */ - public static final String TARGET_FILTER_TEXTFIELD_STYLE = "target-filter-box target-filter-box-hide"; - - /** - * Distribution filter box style. - */ - public static final String DISTRIBUTION_FILTER_TEXTFIELD_STYLE = "dist-filter-box dist-filter-box-hide"; - public static final String TARGET_TAG_BUTTON = "Target Tag"; public static final String DISTRIBUTION_TAG_BUTTON = "Distribution Tag"; - public static final String SOFTWARE_MODULE_TYPE_BUTTON = "SoftwareModule Type"; - - public static final String DISTRIBUTION_SET_TYPE_BUTTON = "DistributionSet Type"; - /** - * New jvm name field id. - */ - public static final String NEW_JVM_NAME = "NewJvmName"; - /** - * New jvm version field id. - */ - public static final String NEW_JVM_VERSION = "NewJvmVersion"; - /** - * New JVM vendor name field id. - */ - public static final String NEW_JVM_VENDOR_NAME = "NewVendorName"; - /** - * save new jvm icon id. - */ - public static final String SAVE_NEW_JVM = "SaveNewJvm"; - /** - * dicard new jvm icon id. - */ - public static final String DISCARD_NEW_JVM = "DiscardNewJvm"; - /** - * New agent hub name field id. - */ - public static final String NEW_AGENT_HUB_NAME = "NewAgentHubName"; - /** - * New agent hub version field id. - */ - public static final String NEW_AGENT_HUB_VERSION = "NewAgentHubVersion"; - /** - * New agent hub vendor field id. - */ - public static final String NEW_AGENT_HUB_VENDOR = "NewAgentHubVendorName"; - /** - * Save agent hub icon id. - */ - public static final String NEW_AGENT_HUB_SAVE = "SaveNewAgentHub"; - /** - * Discard agent hub icon id. - */ - public static final String NEW_AGENT_HUB_DISCARD = "DiscardNewAgentHub"; - /** - * New OS name field id. - */ - public static final String NEW_OS_NAME = "NewOSName"; - /** - * New OS version field id. - */ - public static final String NEW_OS_VERSION = "NewOSVersion"; - /** - * New OS vendor field id. - */ - public static final String NEW_OS_VENDOR = "NewOSVendorName"; - /** - * New OS save icon id. - */ - public static final String NEW_OS_SAVE = "SaveNewOS"; - /** - * New OS discard icon id. - */ - public static final String NEW_OS_DISCARD = "DiscardNewOS"; - /** - * New distribution set name field id. - */ - public static final String NEW_DIST_NAME = "NewDistributionName"; - /** - * New distribution set version field id. - */ - public static final String NEW_DIST_VERSION = "NewDistributionVersion"; - /** - * New distribution set description field id. - */ - public static final String NEW_DIST_DESCRIPTION = "NewDistributionDescription"; - /** - * New distribution set JVM combo-box id. - */ - public static final String NEW_DIST_JVM_COMBO = "NewDistributionJvmCombo"; - /** - * New distribution set Agent hub combo-box id. - */ - public static final String NEW_DIST_AGENT_HUB_COMBO = "NewDistributionAgentHubCombo"; - /** - * New distribution set OS combo-box id. - */ - public static final String NEW_DIST_OS_COMBO = "NewDistributionOSCombo"; - /** - * New distribution set save icon id. - */ - public static final String NEW_DIST_SAVE = "NewDistributionSave"; - /** - * New distribution set discard icon id. - */ - public static final String NEW_DIST_DISCARD = "NewDistributionSave"; - /** - * New Target controller id field id. - */ - public static final String NEW_TARGET_CONTOLLERID = "NewTargetControlerId"; - /** - * New Target name field id. - */ - public static final String NEW_TARGET_NAME = "NewTargetName"; - /** - * New Target description field id. - */ - public static final String NEW_TARGET_DESC = "NewTargetDescription"; - /** - * New Target save icon id. - */ - public static final String NEW_TARGET_SAVE = "target.add.save"; - /** - * New Target add icon id. - */ - public static final String NEW_TARGET_ADD_ICON = "NewTargetAddIcon"; - /** - * New distribution set add icon id. - */ - public static final String NEW_DIST_ADD_ICON = "NewDistAddIcon"; /** * New Target tag name field id. */ @@ -310,15 +156,6 @@ public final class SPUIDefinitions { * Assign option group id(Firmware/Software). */ public static final String ASSIGN_OPTION_GROUP_SOFTWARE_MODULE_TYPE_ID = "assign.option.group.soft.module.type.id"; - /** - * SW Module Source Table ID. - */ - public static final String SW_MODULE_TYPE_SOURCE_TABLE_ID = "sw.module.type.source.tab.id"; - - /** - * SW Module target Table ID. - */ - public static final String SW_MODULE_TYPE_TARGET_TABLE_ID = "sw.module.type.target.tab.id"; /** * New Software Module desc field id. @@ -346,18 +183,6 @@ public final class SPUIDefinitions { * New Target tag desc field id. */ public static final String NEW_TARGET_TAG_DESC = "target.tag.add.desc"; - /** - * New Target tag color lable id. - */ - public static final String NEW_TARGET_TAG_COLOR = "target.tag.add.color"; - /** - * New Target tag add icon id. - */ - public static final String ADD_TARGET_TAG = "target.tag.add"; - /** - * New distribution set tag add icon id. - */ - public static final String ADD_DISTRIBUTION_TAG = "distribution.tag.add"; /** * New distribution Type set tag add icon id. */ @@ -366,23 +191,6 @@ public final class SPUIDefinitions { * New software module set type add icon id. */ public static final String ADD_SOFTWARE_MODULE_TYPE = "softwaremodule.type.add"; - - /** - * New distribution set tag name field id. - */ - public static final String NEW_DISTRIBUTION_TAG_NAME = "distribution.add.tag.name"; - /** - * New distribution set tag color lable id. - */ - public static final String NEW_DISTRIBUTION_TAG_COLOR = "NewDistributionTagColor"; - /** - * New distribution set tag save icon id. - */ - public static final String NEW_DISTRIBUTION_TAG_SAVE = "distribution.tag.save"; - /** - * New distribution set tag discard icon id. - */ - public static final String NEW_DISTRIBUTION_TAG_DISRACD = "NewDistributionTagDiscard"; /** * No data. */ @@ -426,35 +234,11 @@ public final class SPUIDefinitions { * Filter by text key. */ public static final String FILTER_BY_TEXT = "FilterByText"; - /** - * Visible column name of target table. - */ - public static final String TARGET_TABLE_VISIBILE_COLUMN_NAME = "nameDescLabel"; - /** - * Visible column name of distribution table. - */ - public static final String DISTRIBUTION_TABLE_VISIBILE_COLUMN_NAME = "nameDescLabel"; - - /** - * Text area style. - */ - public static final String TEXT_AREA_STYLE = "text-style text-area-style"; - - /** - * Combo box style. - */ - public static final String COMBO_BOX_STYLE = "combo-box-style text-field-spacing"; - /** * Text field style. */ public static final String TEXT_STYLE = "text-style"; - /** - * Message to be displayed when no data available for chosen filter. - */ - public static final String NO_DATA_MSG = "No data available for chosen filter"; - /** * Style to highlight row in orange color. */ @@ -465,16 +249,6 @@ public final class SPUIDefinitions { */ public static final String HIGHTLIGHT_GREEN = "highlight-green"; - /** - * Action window show style. - */ - public static final String ACTION_WINDOW_SHOW_STYLE = "action-window" + " " + "action-window-show"; - - /** - * Action window hide style. - */ - public static final String ACTION_WINDOW_HIDE_STYLE = "action-window" + " " + "action-window-hide"; - /** * The Combo box specific style for Distribution set. */ @@ -488,33 +262,11 @@ public final class SPUIDefinitions { /** * Target and distribution column width in save popup window. */ - public static final float TARGET_DISTRIBUTION_COLUMN_WIDTH = 2.8f; + public static final float TARGET_DISTRIBUTION_COLUMN_WIDTH = 2.8F; /** * Discard column width in save window popup. */ - public static final float DISCARD_COLUMN_WIDTH = 1.2f; - /** - * message hint text layout. - */ - public static final String MESSAGE_HINT_TEXT_LAYOUT = "message-hint-text-layout"; - - /** - * Message hint bottom layout. - */ - public static final String MESSAGE_HINT_BOTTOM_LAYOUT = "message-hint-bottom-layout"; - - /** - * The Target Tag edit icon id. - */ - public static final String EDIT_TARGET_TAG = "target.tag.edit"; - /** - * The Dist Tag edit icon id. - */ - public static final String EDIT_DISTRIBUTION_TAG = "dist.tag.edit"; - /** - * Target Tag color picker style. - */ - public static final String TARGET_COLOR_PICKER_STYLE = "target-color-picker-style"; + public static final float DISCARD_COLUMN_WIDTH = 1.2F; /** * Target tag name. */ @@ -551,11 +303,6 @@ public final class SPUIDefinitions { */ public static final String TYPE_KEY = "type-key"; - /** - * Type combo style. - */ - public static final String TYPE_COMBO_STYLE = "type-combo-specific-style"; - /** * Tag combo style. */ @@ -565,53 +312,6 @@ public final class SPUIDefinitions { */ public static final String COLOR_LABEL_STYLE = "color-label-style"; - /** - * Text area of tag description style. - */ - public static final String TARGET_TAG_TEXT_AREA_STYLE = "target-tag-desc"; - - /** - * Distribution table. - */ - public static final String DISTRIBUTION_TABLE = "dist-table"; - - /** - * Target tag. - */ - public static final String TARGET_TAG = "target-tag"; - /** - * Distribution tag. - */ - public static final String DIST_TAG = "dist-tag"; - - /** - * Minimum height for the target tags layout. In case browser height is less - * than this height, the vertical scroll bars get displayed. Used for - * Responsive UI. - */ - public static final int MIN_TARGET_TAGS_HEIGHT = 39; - - /** - * Minimum height for the distribution type tags layout. In case browser - * height is less than this height, the vertical scroll bars get displayed. - * Used for Responsive UI. - */ - public static final int MIN_DISTRIBUTION_TYPE_TAGS_HEIGHT = 39; - - /** - * Minimum height for the distribution tags layout. In case browser height - * is less than this height, the vertical scroll bars get displayed. Used - * for Responsive UI. - */ - public static final int MIN_DIST_TAGS_HEIGHT = 109; - - /** - * Minimum height required for target or distribution table with minimum - * records. This is calculated as ( no. of min rows * height of each row ). - * Used for Responsive UI. - */ - public static final int MIN_TARGET_DIST_TABLE_HEIGHT = TABLE_MIN_LENGTH * 37 - 42; - /** * Minimum width required to show tags for both target and distribution * table without horizontal scroll. In case browser width is less than this @@ -620,59 +320,6 @@ public final class SPUIDefinitions { */ public static final int REQ_MIN_BROWSER_WIDTH = 1200; - public static final int REQ_MIN_BROWSER_WIDTH_UPLOAD = 1200; - - public static final int REQ_MIN_BROWSER_WIDTH_DIST = 1300; - - /** - * Target table maximum width. - */ - public static final int MAX_TARGET_TABLE_WIDTH = 700; - - /** - * Distribution table maximum width. - */ - public static final int MAX_DIST_TABLE_WIDTH = 425; - - /** - * Details layout- initial margin left value. - */ - public static final int DETAILS_MARGIN_LEFT = 275; - - /** - * Distributions table details layout- initial margin left value. - */ - public static final int DIST_TABALE_DETAILS_MARGIN_LEFT = 288; - /** - * Minimum height required to show the application without need of vertical - * scroll. In case browser height is more than this height, the vertical - * scroll bars get displayed. Used for Responsive UI. - */ - public static final int REQ_MIN_BROWSER_HEIGHT = 350; - - public static final int MIN_TABLE_WIDTH = 300; - - /** - * Minimum width required to display action history. - */ - public static final int ACTION_HISTORY_MIN_REQ_WIDTH = 500; - - /** - * Minimum height required to display action history (5 rows minimum). - */ - public static final int ACTION_HISTORY_MIN_REQ_HEIGHT = 130; - - /** - * Position of the action history from top. - */ - public static final int ACTION_HISTORY_POSITION_Y = 160; - - /** - * The total amount of space ( top & bottom ) the action history to - * maintain. - */ - public static final int ACTION_HISTORY_LEFTOVER_HEIGHT = 420; - /** * Target tag button id prefix. */ @@ -682,6 +329,11 @@ public final class SPUIDefinitions { */ public static final String DISTRIBUTION_TAG_ID_PREFIXS = "dist.tag."; + /** + * Space. + */ + public static final String SPACE = " "; + /** * Distribution tag button id prefix. */ @@ -695,19 +347,10 @@ public final class SPUIDefinitions { * DistributionSet Type tag button id prefix. */ public static final String DISTRIBUTION_SET_TYPE_ID_PREFIXS = "dist.set.type."; - /** - * Target/distribution description length. - */ - public static final int NAME_DESCRIPTION_LENGTH = 26; /** * Target last query date format . */ public static final String LAST_QUERY_DATE_FORMAT = "EEE MMM d HH:mm:ss z yyyy"; - - /** - * Space. - */ - public static final String SPACE = " "; /** * Item Id used in drop comparisons. */ @@ -716,22 +359,10 @@ public final class SPUIDefinitions { * Expand action history. */ public static final String EXPAND_ACTION_HISTORY = "expand.action.history"; - /** - * Close action history. - */ - public static final String CLOSE_ACTION_HISTORY = "close.action.history"; /** * Filter by distribution key. */ public static final String ORDER_BY_DISTRIBUTION = "OrderByDistribution"; - /** - * Dist window width. - */ - public static final int DIST_WINDOW_WIDTH = 235; - /** - * Dist window height. - */ - public static final int DIST_WINDOW_HEIGHT = 380; /** Artifact upload related entries - start **/ /** @@ -744,13 +375,6 @@ public final class SPUIDefinitions { */ public static final String BY_SOFTWARE_MODULE_TYPE = "softwareModuleType"; - /** - * Minimum height required to show the application without need of vertical - * scroll. In case browser height is more than this height, the vertical - * scroll bars get displayed. Used for Responsive UI. - */ - public static final int REQ_MIN_UPLOAD_BROWSER_HEIGHT = 380; - /** * Minimum width required to display ui without horizontal scroll. In case * browser width is less than this width, the type layout will get hidden @@ -759,45 +383,13 @@ public final class SPUIDefinitions { */ public static final int REQ_MIN_UPLOAD_BROWSER_WIDTH = 1250; - /** - * Minimum width of software module table. - */ - public static final int MIN_SOFTWARE_MODULE_TABLE_WIDTH = 300; - - /** - * Maximum allowed width of software module table. - */ - public static final int MAX_UPLOAD_SW_MODULE_TABLE_WIDTH = 450; - - /** - * Minimum artifact table height. - */ - public static final int MIN_UPLOAD_ARTIFACT_TABLE_HEIGHT = 168; - - /** - * Maximum artifact table height. - */ - public static final int MAX_UPLOAD_ARTIFACT_TABLE_HEIGHT = 450; - - /** - * Maximum drop layout width. - */ - public static final int MAX_UPLOAD_DROP_LAYOUT_WIDTH = 650; - - /** - * Minimum drop layout width. - */ - public static final int MIN_UPLOAD_DROP_LAYOUT_WIDTH = 450; - public static final int MIN_UPLOAD_CONFIRMATION_POPUP_WIDTH = 1000; - public static final int MAX_UPLOAD_CONFIRMATION_POPUP_WIDTH = 1050; - public static final int MIN_UPLOAD_CONFIRMATION_POPUP_HEIGHT = 310; - public static final int MAX_UPLOAD_CONFIRMATION_POPUP_HEIGHT = 360; + public static final int MAX_UPLOAD_CONFIRMATION_POPUP_WIDTH = 1050; - public static final String SOFTWARE_MODULE_TABLE = "software-module-table"; + public static final int MAX_UPLOAD_CONFIRMATION_POPUP_HEIGHT = 360; /** Artifact upload related entries - end. **/ @@ -805,42 +397,17 @@ public final class SPUIDefinitions { public static final int MIN_DASHBOARD_WIDTH = 1100; - public static final int TAG_LAYOUT_WIDTH = 160; - - public static final int MIN_SWMODULE_TABLE_HEIGHT = 160; - - public static final int MIN_SWMODULE_TABLE_WIDTH = 150; - /* Target Header Filter Box */ - public static final String FILTER_BOX_SHOW = "filter-box-show"; public static final String FILTER_BOX_HIDE = "filter-box-hide"; public static final String FILTER_RESET_ICON = "filter-reset-icon"; /* Action History */ - public static final String CAPTION_ACTION_HISTORY = "caption.action.history"; public static final String DISABLE_DISTRIBUTION = "incomplete-distribution"; - public static final int MIN_SWTABLE_WIDTH = 448; - - /** - * New Target tag save icon id. - */ - public static final String NEW_SW_TYPE_SAVE = "swmodule.type.add.save"; - - /** - * New DistributionSet type save icon id. - */ - public static final String NEW_DIST_SET_TYPE_SAVE = "dist.set.type.add.save"; - - /** - * New distribution set type close icon id. - */ - public static final String NEW_DIST_SET_TYPE_COLSE = "dist.set.type.add.close"; - /** * Filter by type layout width. */ - public static final float FILTER_BY_TYPE_WIDTH = 150.0f; + public static final float FILTER_BY_TYPE_WIDTH = 150.0F; /** * Confirmation jukebox type. @@ -859,22 +426,6 @@ public final class SPUIDefinitions { */ public static final int MAX_TABLE_ENTRIES = 5000; - /** - * New software module set type add icon id. - */ - public static final String CONFIG_FILTER_BUTTON = "config.filter.button"; - - /** - * label style name for assigned sw modules. - */ - - public static final String ASSIGN_SW_MODUE_STYLE = "assignlabelstyle"; - - /** - * Software module add/update window height. - */ - public static final int SW_ADD_UPDATE_WINDOW_HEIGHT = 350; - /** * Distribution Type Twin Table selected table Id. */ @@ -910,46 +461,16 @@ public final class SPUIDefinitions { */ public static final String CUSTOM_FILTER_DELETE = "Delete"; - /** - * CUSTOM_FILTER_INSTALLED_DS. - */ - public static final String CUSTOM_FILTER_INSTALLED_DS = "Installed DS"; - - /** - * CUSTOM_FILTER_ASSIGNED_DS. - */ - public static final String CUSTOM_FILTER_ASSIGNED_DS = "Assigned DS"; - /** * TARGET_FILTER_MANAGEMENT - header caption . */ public static final String TARGET_FILTER_LIST_HEADER_CAPTION = "Custom Filters"; - /** - * CUSTOM_FILTER_STATUS. - */ - public static final String TARGET_FILTER_STATUS = "Status"; - - /** - * CUSTOM_FILTER_INSTALLED_DS. - */ - public static final String TARGET_FILTER_TAGS = "TAGS"; - - /** - * CUSTOM_FILTER_ID_HIDDEN. - */ - public static final String CUSTOM_FILTER_ID_HIDDEN = "id"; - /** * Bulk upload DS combo style. */ public static final String BULK_UPLOD_DS_COMBO_STYLE = "bulk-upload-ds-combo"; - /** - * Bulk Targets upload window. - */ - public static final String BULK_UPLOAD_WINDOW = "bulk-update-window"; - /** * Filter by target filter query. */ @@ -970,60 +491,6 @@ public final class SPUIDefinitions { */ public static final String ROLLOUT_LIST_HEADER_CAPTION = "Rollouts"; - /** - * Rollout status. - */ - public static final String ROLLOUT_STATUS = "rollout-status"; - - /** - * Rollout group list view - header caption . - */ - public static final String ROLLOUT_GROUP_LIST_HEADER_CAPTION = "Rollout Groups"; - - /** - * Rollout delete - column property name. - */ - public static final String DELETE = "delete"; - - /** - * Rollout detail status - column property status. - */ - public static final String DETAIL_STATUS = "detail-status"; - - /** - * Rollout name column property. - */ - public static final String ROLLOUT_NAME = "rollout-name"; - /** - * Rollout group name column property. - */ - public static final String ROLLOUT_GROUP_NAME = "Name"; - - /** - * Rollout group started date column property. - */ - public static final String ROLLOUT_GROUP_STARTED_DATE = "Started date"; - - /** - * Rollout group status column property. - */ - public static final String ROLLOUT_GROUP_STATUS = "Status"; - - /** - * Rollout action column property. - */ - public static final String ROLLOUT_ACTION = "rollout-action"; - - /** - * DistributionSet Metadata tab Id - */ - public static final String DISTRIBUTIONSET_METADATA_TAB_ID = "distSet.metadata.tab.id"; - - /** - * SoftwareModule Metadata tab Id - */ - public static final String SOFTWAREMODULE_METADATA_TAB_ID = "swModule.metadata.tab.id"; - /** * /** Constructor. */