@@ -8,14 +8,11 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.common.builder;
|
||||
|
||||
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
|
||||
|
||||
import com.vaadin.shared.ui.label.ContentMode;
|
||||
import com.vaadin.ui.Label;
|
||||
import com.vaadin.ui.themes.ValoTheme;
|
||||
|
||||
/**
|
||||
* Simple Decorator for the label.
|
||||
* Label Builder.
|
||||
*
|
||||
*/
|
||||
public class LabelBuilder {
|
||||
@@ -57,7 +54,7 @@ public class LabelBuilder {
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple builder.
|
||||
* Build caption label.
|
||||
*
|
||||
* @return Label
|
||||
*/
|
||||
@@ -69,19 +66,7 @@ public class LabelBuilder {
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple builder.
|
||||
*
|
||||
* @return Label
|
||||
*/
|
||||
public Label buildMessageLabel() {
|
||||
final Label label = createLabel();
|
||||
label.setContentMode(ContentMode.HTML);
|
||||
label.addStyleName(SPUILabelDefinitions.SP_LABEL_MESSAGE_STYLE);
|
||||
return label;
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple builder.
|
||||
* Build label.
|
||||
*
|
||||
* @return Label
|
||||
*/
|
||||
|
||||
@@ -576,13 +576,11 @@ public class ActionHistoryTable extends TreeTable {
|
||||
final long currentTimeMillis = System.currentTimeMillis();
|
||||
|
||||
final HorizontalLayout hLayout = new HorizontalLayout();
|
||||
final Label autoForceLabel = new LabelBuilder().name("").buildLabel();
|
||||
final Label autoForceLabel = new LabelBuilder().name("").id("action.history.table.timedforceId").buildLabel();
|
||||
|
||||
actionLabel.setValue(FontAwesome.BOLT.getHtml());
|
||||
autoForceLabel.setContentMode(ContentMode.HTML);
|
||||
autoForceLabel.setValue(FontAwesome.HISTORY.getHtml());
|
||||
// setted Id for TimedForced.
|
||||
autoForceLabel.setId("action.history.table.timedforceId");
|
||||
|
||||
hLayout.addComponent(actionLabel);
|
||||
hLayout.addComponent(autoForceLabel);
|
||||
|
||||
@@ -283,28 +283,27 @@ public class AddUpdateRolloutWindowLayout extends GridLayout {
|
||||
populateTargetFilterQuery();
|
||||
|
||||
noOfGroups = createNoOfGroupsField();
|
||||
groupSizeLabel = createGroupSizeLabel();
|
||||
groupSizeLabel = createCountLabel();
|
||||
triggerThreshold = createTriggerThreshold();
|
||||
errorThreshold = createErrorThreshold();
|
||||
description = createDescription();
|
||||
errorThresholdOptionGroup = createErrorThresholdOptionGroup();
|
||||
setDefaultSaveStartGroupOption();
|
||||
actionTypeOptionGroupLayout.selectDefaultOption();
|
||||
totalTargetsLabel = createTotalTargetsLabel();
|
||||
totalTargetsLabel = createCountLabel();
|
||||
targetFilterQuery = createTargetFilterQuery();
|
||||
actionTypeOptionGroupLayout.addStyleName(SPUIStyleDefinitions.ROLLOUT_ACTION_TYPE_LAYOUT);
|
||||
}
|
||||
|
||||
private Label createGroupSizeLabel() {
|
||||
final Label groupSize = new LabelBuilder().name("").buildLabel();
|
||||
private static Label createCountLabel() {
|
||||
final Label groupSize = new LabelBuilder().visible(false).name("").buildLabel();
|
||||
groupSize.addStyleName(ValoTheme.LABEL_TINY + " " + "rollout-target-count-message");
|
||||
groupSize.setImmediate(true);
|
||||
groupSize.setVisible(false);
|
||||
groupSize.setSizeUndefined();
|
||||
return groupSize;
|
||||
}
|
||||
|
||||
private TextArea createTargetFilterQuery() {
|
||||
private static TextArea createTargetFilterQuery() {
|
||||
final TextArea filterField = SPUIComponentProvider.getTextArea(null, "text-area-style",
|
||||
ValoTheme.TEXTFIELD_TINY, false, null, null,
|
||||
SPUILabelDefinitions.TARGET_FILTER_QUERY_TEXT_FIELD_LENGTH);
|
||||
@@ -315,15 +314,6 @@ public class AddUpdateRolloutWindowLayout extends GridLayout {
|
||||
return filterField;
|
||||
}
|
||||
|
||||
private Label createTotalTargetsLabel() {
|
||||
final Label targetCountLabel = new LabelBuilder().name("").buildLabel();
|
||||
targetCountLabel.addStyleName(ValoTheme.LABEL_TINY + " " + "rollout-target-count-message");
|
||||
targetCountLabel.setImmediate(true);
|
||||
targetCountLabel.setVisible(false);
|
||||
targetCountLabel.setSizeUndefined();
|
||||
return targetCountLabel;
|
||||
}
|
||||
|
||||
private OptionGroup createErrorThresholdOptionGroup() {
|
||||
final OptionGroup errorThresoldOptions = new OptionGroup();
|
||||
for (final ERRORTHRESOLDOPTIONS option : ERRORTHRESOLDOPTIONS.values()) {
|
||||
|
||||
@@ -149,8 +149,8 @@ public class RolloutGroupsListHeader extends AbstractGridHeader {
|
||||
|
||||
@Override
|
||||
protected HorizontalLayout getHeaderCaptionLayout() {
|
||||
headerCaption = new LabelBuilder().name("").buildCaptionLabel();
|
||||
headerCaption.setId(SPUIComponentIdProvider.ROLLOUT_GROUP_HEADER_CAPTION);
|
||||
headerCaption = new LabelBuilder().id(SPUIComponentIdProvider.ROLLOUT_GROUP_HEADER_CAPTION).name("")
|
||||
.buildCaptionLabel();
|
||||
final Button rolloutsListViewLink = SPUIComponentProvider.getButton(null, "", "", null, false, null,
|
||||
SPUIButtonStyleSmallNoBorder.class);
|
||||
rolloutsListViewLink.setStyleName(ValoTheme.LINK_SMALL + " " + "on-focus-no-border link rollout-caption-links");
|
||||
|
||||
Reference in New Issue
Block a user