Merge remote-tracking branch 'origin/master' into
fix_Introduce_consitent_button_icon_for_update_create_dialogs Conflicts: hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettable/TargetAddUpdateWindowLayout.java Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com>
This commit is contained in:
@@ -208,6 +208,7 @@ public class SoftwareModuleAddUpdateWindow extends CustomComponent implements Se
|
||||
* (controller Id, name & description) and action buttons layout
|
||||
*/
|
||||
addStyleName("lay-color");
|
||||
setSizeUndefined();
|
||||
|
||||
formLayout = new FormLayout();
|
||||
formLayout.setCaption(null);
|
||||
|
||||
@@ -330,6 +330,8 @@ public class CreateUpdateSoftwareTypeLayout extends CreateUpdateTypeLayout
|
||||
getColorPickerLayout().getSelPreview().setColor(getColorPickerLayout().getSelectedColor());
|
||||
mainLayout.addComponent(colorPickerLayout, 1, 0);
|
||||
mainLayout.setComponentAlignment(colorPickerLayout, Alignment.MIDDLE_CENTER);
|
||||
} else {
|
||||
mainLayout.removeComponent(colorPickerLayout);
|
||||
}
|
||||
tagPreviewBtnClicked = !tagPreviewBtnClicked;
|
||||
}
|
||||
|
||||
@@ -53,70 +53,65 @@ public class ArtifactUploadState implements ManagmentEntityState<Long>, Serializ
|
||||
|
||||
private Set<Long> selectedSoftwareModules = Collections.emptySet();
|
||||
|
||||
private boolean swTypeFilterClosed = Boolean.FALSE;
|
||||
private boolean swTypeFilterClosed;
|
||||
|
||||
private boolean swModuleTableMaximized = Boolean.FALSE;
|
||||
private boolean swModuleTableMaximized;
|
||||
|
||||
private boolean artifactDetailsMaximized = Boolean.FALSE;
|
||||
private boolean artifactDetailsMaximized;
|
||||
|
||||
private final Set<String> selectedDeleteSWModuleTypes = new HashSet<>();
|
||||
|
||||
private boolean noDataAvilableSoftwareModule = Boolean.FALSE;
|
||||
|
||||
private boolean isStatusPopupMinimized = Boolean.FALSE;
|
||||
|
||||
private boolean isUploadCompleted = Boolean.FALSE;
|
||||
|
||||
private boolean noDataAvilableSoftwareModule;
|
||||
|
||||
private boolean statusPopupMinimized;
|
||||
|
||||
private boolean uploadCompleted;
|
||||
|
||||
private List<UploadStatusObject> uploadedFileStatusList = new ArrayList<>();
|
||||
|
||||
|
||||
private final AtomicInteger numberOfFileUploadsExpected = new AtomicInteger();
|
||||
|
||||
private final AtomicInteger numberOfFilesActuallyUpload = new AtomicInteger();
|
||||
|
||||
|
||||
private final AtomicInteger numberOfFileUploadsFailed = new AtomicInteger();
|
||||
|
||||
public AtomicInteger getNumberOfFileUploadsFailed() {
|
||||
return numberOfFileUploadsFailed;
|
||||
}
|
||||
|
||||
|
||||
public AtomicInteger getNumberOfFilesActuallyUpload() {
|
||||
return numberOfFilesActuallyUpload;
|
||||
}
|
||||
|
||||
|
||||
public AtomicInteger getNumberOfFileUploadsExpected() {
|
||||
return numberOfFileUploadsExpected;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<UploadStatusObject> getUploadedFileStatusList() {
|
||||
return uploadedFileStatusList;
|
||||
}
|
||||
|
||||
public void setUploadedFileStatusList(List<UploadStatusObject> uploadedFileStatusList) {
|
||||
|
||||
public void setUploadedFileStatusList(final List<UploadStatusObject> uploadedFileStatusList) {
|
||||
this.uploadedFileStatusList = uploadedFileStatusList;
|
||||
}
|
||||
|
||||
|
||||
public boolean isUploadCompleted() {
|
||||
return isUploadCompleted;
|
||||
}
|
||||
|
||||
public void setUploadCompleted(boolean isUploadCompleted) {
|
||||
this.isUploadCompleted = isUploadCompleted;
|
||||
return uploadCompleted;
|
||||
}
|
||||
|
||||
public void setUploadCompleted(final boolean uploadCompleted) {
|
||||
this.uploadCompleted = uploadCompleted;
|
||||
}
|
||||
|
||||
public void setStatusPopupMinimized(final boolean statusPopupMinimized) {
|
||||
this.statusPopupMinimized = statusPopupMinimized;
|
||||
}
|
||||
|
||||
|
||||
public void setStatusPopupMinimized(boolean isStatusPopupMinimized) {
|
||||
this.isStatusPopupMinimized = isStatusPopupMinimized;
|
||||
}
|
||||
|
||||
public boolean isStatusPopupMinimized() {
|
||||
return isStatusPopupMinimized;
|
||||
}
|
||||
return statusPopupMinimized;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* Set software.
|
||||
*
|
||||
* @return
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.artifacts.upload;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
|
||||
/**
|
||||
@@ -16,22 +18,24 @@ import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
* popup.
|
||||
*
|
||||
*/
|
||||
public class UploadStatusObject {
|
||||
public class UploadStatusObject implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String status;
|
||||
private Double progress;
|
||||
private String filename;
|
||||
private String reason;
|
||||
private SoftwareModule selectedSoftwareModule;
|
||||
private final SoftwareModule selectedSoftwareModule;
|
||||
|
||||
public UploadStatusObject(final String status, final Double progress, final String fileName, final String reason,
|
||||
final SoftwareModule selectedSoftwareModule) {
|
||||
this(fileName,selectedSoftwareModule);
|
||||
this(fileName, selectedSoftwareModule);
|
||||
this.status = status;
|
||||
this.progress = progress;
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
public UploadStatusObject(String fileName, SoftwareModule selectedSoftwareModule) {
|
||||
public UploadStatusObject(final String fileName, final SoftwareModule selectedSoftwareModule) {
|
||||
this.filename = fileName;
|
||||
this.selectedSoftwareModule = selectedSoftwareModule;
|
||||
}
|
||||
@@ -44,7 +48,7 @@ public class UploadStatusObject {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
public void setStatus(final String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
@@ -52,7 +56,7 @@ public class UploadStatusObject {
|
||||
return progress;
|
||||
}
|
||||
|
||||
public void setProgress(Double progress) {
|
||||
public void setProgress(final Double progress) {
|
||||
this.progress = progress;
|
||||
}
|
||||
|
||||
@@ -60,7 +64,7 @@ public class UploadStatusObject {
|
||||
return filename;
|
||||
}
|
||||
|
||||
public void setFilename(String filename) {
|
||||
public void setFilename(final String filename) {
|
||||
this.filename = filename;
|
||||
}
|
||||
|
||||
@@ -68,19 +72,38 @@ public class UploadStatusObject {
|
||||
return reason;
|
||||
}
|
||||
|
||||
public void setReason(String reason) {
|
||||
public void setReason(final String reason) {
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == null || obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (obj instanceof UploadStatusObject && this.getFilename() == ((UploadStatusObject) obj).getFilename()) {
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((filename == null) ? 0 : filename.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (!(obj instanceof UploadStatusObject)) {
|
||||
return false;
|
||||
}
|
||||
final UploadStatusObject other = (UploadStatusObject) obj;
|
||||
if (filename == null) {
|
||||
if (other.filename != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!filename.equals(other.filename)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ import com.vaadin.ui.Alignment;
|
||||
import com.vaadin.ui.Button;
|
||||
import com.vaadin.ui.Button.ClickListener;
|
||||
import com.vaadin.ui.Component;
|
||||
import com.vaadin.ui.GridLayout;
|
||||
import com.vaadin.ui.HorizontalLayout;
|
||||
import com.vaadin.ui.Label;
|
||||
import com.vaadin.ui.Link;
|
||||
@@ -187,6 +188,9 @@ public class CommonDialogWindow extends Window implements Serializable {
|
||||
((AbstractOrderedLayout) content).setSpacing(true);
|
||||
((AbstractOrderedLayout) content).setMargin(true);
|
||||
}
|
||||
if (content instanceof GridLayout) {
|
||||
addStyleName("");
|
||||
}
|
||||
|
||||
if (null != content) {
|
||||
mainLayout.addComponent(content);
|
||||
|
||||
@@ -175,11 +175,7 @@ public final class UserDetailsFormatter {
|
||||
private static UserDetails loadUserByUsername(final String username) {
|
||||
final UserDetailsService userDetailsService = SpringContextHelper.getBean(UserDetailsService.class);
|
||||
try {
|
||||
final UserDetails loadUserByUsername = userDetailsService.loadUserByUsername(username);
|
||||
if (loadUserByUsername == null) {
|
||||
throw new UsernameNotFoundException("User not found " + username);
|
||||
}
|
||||
return loadUserByUsername;
|
||||
return userDetailsService.loadUserByUsername(username);
|
||||
} catch (final UsernameNotFoundException e) {
|
||||
return new User(username, "", Collections.emptyList());
|
||||
}
|
||||
|
||||
@@ -155,6 +155,7 @@ public abstract class AbstractFilterButtons extends Table {
|
||||
columnIds.add(FILTER_BUTTON_COLUMN);
|
||||
setVisibleColumns(columnIds.toArray());
|
||||
setColumnHeaderMode(ColumnHeaderMode.HIDDEN);
|
||||
setColumnWidth(FILTER_BUTTON_COLUMN, 137);
|
||||
}
|
||||
|
||||
private Button createFilterButton(final Long id, final String name, final String description, final String color,
|
||||
@@ -179,6 +180,7 @@ public abstract class AbstractFilterButtons extends Table {
|
||||
button.setDescription(name);
|
||||
}
|
||||
button.setData(id == null ? SPUIDefinitions.NO_TAG_BUTTON_ID : itemId);
|
||||
|
||||
return button;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.decorators;
|
||||
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIButtonDefinitions;
|
||||
|
||||
import com.vaadin.server.Resource;
|
||||
import com.vaadin.ui.Button;
|
||||
import com.vaadin.ui.themes.ValoTheme;
|
||||
@@ -22,16 +20,10 @@ public class SPUITagButtonStyle implements SPUIButtonDecorator {
|
||||
@Override
|
||||
public Button decorate(final Button button, final String style, final boolean setStyle, final Resource icon) {
|
||||
|
||||
/**
|
||||
* Add ... for long name
|
||||
*/
|
||||
final String buttonCaption = button.getCaption();
|
||||
if (buttonCaption != null && buttonCaption.length() > SPUIButtonDefinitions.BUTTON_CAPTION_LENGTH) {
|
||||
button.setCaption(buttonCaption.substring(0, SPUIButtonDefinitions.BUTTON_CAPTION_LENGTH) + "...");
|
||||
}
|
||||
button.setImmediate(true);
|
||||
button.addStyleName("button-no-border" + " " + ValoTheme.BUTTON_BORDERLESS + " " + ValoTheme.BUTTON_TINY + " "
|
||||
button.addStyleName("generatedColumnPadding button-no-border" + " " + ValoTheme.BUTTON_BORDERLESS + " "
|
||||
+ "button-tag-no-border");
|
||||
|
||||
// Set Style
|
||||
if (null != style) {
|
||||
if (setStyle) {
|
||||
|
||||
@@ -717,6 +717,8 @@ public class CreateUpdateDistSetTypeLayout extends CreateUpdateTypeLayout
|
||||
getColorPickerLayout().getSelPreview().setColor(getColorPickerLayout().getSelectedColor());
|
||||
mainLayout.addComponent(colorPickerLayout, 1, 0);
|
||||
mainLayout.setComponentAlignment(colorPickerLayout, Alignment.MIDDLE_CENTER);
|
||||
} else {
|
||||
mainLayout.removeComponent(colorPickerLayout);
|
||||
}
|
||||
tagPreviewBtnClicked = !tagPreviewBtnClicked;
|
||||
}
|
||||
|
||||
@@ -198,6 +198,7 @@ public abstract class AbstractCreateUpdateTagLayout extends CustomComponent
|
||||
i18n.get("label.combobox.tag"));
|
||||
tagNameComboBox.addStyleName(SPUIDefinitions.FILTER_TYPE_COMBO_STYLE);
|
||||
tagNameComboBox.setImmediate(true);
|
||||
tagNameComboBox.setId(SPUIComponentIdProvider.DIST_TAG_COMBO);
|
||||
|
||||
tagColorPreviewBtn = new Button();
|
||||
tagColorPreviewBtn.setId(SPUIComponentIdProvider.TAG_COLOR_PREVIEW_ID);
|
||||
@@ -266,6 +267,8 @@ public abstract class AbstractCreateUpdateTagLayout extends CustomComponent
|
||||
mainLayout.getComponent(1, 0);
|
||||
mainLayout.addComponent(colorPickerLayout, 1, 0);
|
||||
mainLayout.setComponentAlignment(colorPickerLayout, Alignment.MIDDLE_CENTER);
|
||||
} else {
|
||||
mainLayout.removeComponent(colorPickerLayout);
|
||||
}
|
||||
tagPreviewBtnClicked = !tagPreviewBtnClicked;
|
||||
}
|
||||
@@ -478,6 +481,7 @@ public abstract class AbstractCreateUpdateTagLayout extends CustomComponent
|
||||
protected void createOptionGroup(final boolean hasCreatePermission, final boolean hasUpdatePermission) {
|
||||
|
||||
optiongroup = new OptionGroup("Select Action");
|
||||
optiongroup.setId(SPUIComponentIdProvider.OPTION_GROUP);
|
||||
optiongroup.addStyleName(ValoTheme.OPTIONGROUP_SMALL);
|
||||
optiongroup.addStyleName("custom-option-group");
|
||||
optiongroup.setNullSelectionAllowed(false);
|
||||
|
||||
@@ -98,7 +98,7 @@ public class BulkUploadHandler extends CustomComponent
|
||||
|
||||
final TargetBulkUpdateWindowLayout targetBulkUpdateWindowLayout;
|
||||
|
||||
private final EntityFactory entityFactory;
|
||||
private transient EntityFactory entityFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -129,13 +129,13 @@ public class TargetAddUpdateWindowLayout extends CustomComponent {
|
||||
* The main layout of the window contains mandatory info, textboxes
|
||||
* (controller Id, name & description) and action buttons layout
|
||||
*/
|
||||
|
||||
setSizeUndefined();
|
||||
formLayout = new FormLayout();
|
||||
formLayout.addComponent(controllerIDTextField);
|
||||
formLayout.addComponent(nameTextField);
|
||||
formLayout.addComponent(descTextArea);
|
||||
|
||||
nameTextField.focus();
|
||||
controllerIDTextField.focus();
|
||||
}
|
||||
|
||||
private void addListeners() {
|
||||
|
||||
@@ -176,6 +176,10 @@ public final class SPUIComponentIdProvider {
|
||||
* ID - Dist jvm combo.
|
||||
*/
|
||||
public static final String DIST_MODULE_COMBO = "dist.module.combo.";
|
||||
/**
|
||||
* ID for Distribution Tag ComboBox
|
||||
*/
|
||||
public static final String DIST_TAG_COMBO = "dist.tag.combo";
|
||||
/**
|
||||
* ID-Dist.PIN.
|
||||
*/
|
||||
@@ -302,11 +306,14 @@ public final class SPUIComponentIdProvider {
|
||||
* tag color preview button id.
|
||||
*/
|
||||
public static final String TAG_COLOR_PREVIEW_ID = "tag.color.preview";
|
||||
|
||||
/**
|
||||
* Id for ColorPickerLayout
|
||||
*/
|
||||
public static final String COLOR_PICKER_LAYOUT = "color.picker.layout";
|
||||
/**
|
||||
* Id for OptionGroup Create/Update tag
|
||||
*/
|
||||
public static final String OPTION_GROUP = "create.update.tag";
|
||||
/**
|
||||
* Confirmation dialogue OK button id.
|
||||
*/
|
||||
|
||||
@@ -344,15 +344,6 @@ public final class SPUIDefinitions {
|
||||
* New Target tag color lable id.
|
||||
*/
|
||||
public static final String NEW_TARGET_TAG_COLOR = "target.tag.add.color";
|
||||
/**
|
||||
* New Target tag save icon id.
|
||||
*/
|
||||
// public static final String NEW_TARGET_TAG_SAVE = "target.tag.add.save";
|
||||
/**
|
||||
* New Target tag discard icon id.
|
||||
*/
|
||||
// public static final String NEW_TARGET_TAG_DISRACD =
|
||||
// "target.tag.add.discard";
|
||||
/**
|
||||
* New Target tag add icon id.
|
||||
*/
|
||||
|
||||
@@ -181,4 +181,13 @@
|
||||
visibility: hidden;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.v-button-generatedColumnPadding {
|
||||
height: 28px;
|
||||
padding: 0 6px !important;
|
||||
font-size: 12px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user