Create filter has different layout than rollout and the other widgets

--> fixed
In addition I add a constant for the header caption

Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com>
This commit is contained in:
Melanie Retter
2016-04-12 18:09:27 +02:00
parent 85ec59b04e
commit 0f0b9eab1f
3 changed files with 20 additions and 6 deletions

View File

@@ -13,7 +13,6 @@ import javax.annotation.PostConstruct;
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.SPUIButtonStyleSmall;
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorder;
import org.eclipse.hawkbit.ui.filtermanagement.event.CustomFilterUIEvent;
import org.eclipse.hawkbit.ui.filtermanagement.state.FilterManagementUIState;
@@ -79,7 +78,7 @@ public class TargetFilterHeader extends VerticalLayout {
}
private Label createHeaderCaption() {
final Label captionLabel = SPUIComponentProvider.getLabel("Custom Filters",
final Label captionLabel = SPUIComponentProvider.getLabel(getHeaderCaption(),
SPUILabelDefinitions.SP_WIDGET_CAPTION);
return captionLabel;
}
@@ -110,10 +109,9 @@ public class TargetFilterHeader extends VerticalLayout {
}
private Button createAddButton() {
final Button button = SPUIComponentProvider.getButton("camp.search.add.Id", "Create Filter", "Create Filter",
"", false, null, SPUIButtonStyleSmall.class);
final Button button = SPUIComponentProvider.getButton(getAddIconId(), "", "", null, false, FontAwesome.PLUS,
SPUIButtonStyleSmallNoBorder.class);
button.addClickListener(event -> addNewFilter());
button.addStyleName("on-focus-no-border link");
return button;
}
@@ -187,4 +185,11 @@ public class TargetFilterHeader extends VerticalLayout {
eventBus.publish(this, CustomFilterUIEvent.FILTER_BY_CUST_FILTER_TEXT_REMOVE);
}
protected String getAddIconId() {
return SPUIComponetIdProvider.TARGET_FILTER_ADD_ICON_ID;
}
protected String getHeaderCaption() {
return SPUIDefinitions.TARGET_FILTER_LIST_HEADER_CAPTION;
}
}

View File

@@ -75,6 +75,11 @@ public final class SPUIComponetIdProvider {
*/
public static final String TARGET_TEXT_FIELD = "target.search.textfield";
/**
* ID for add target filter icon
*/
public static final String TARGET_FILTER_ADD_ICON_ID = "target.filter.add.id";
/**
* ID-Dist.
*/

View File

@@ -922,6 +922,11 @@ public final class SPUIDefinitions {
*/
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.
*/
@@ -1001,7 +1006,6 @@ public final class SPUIDefinitions {
*/
public static final String ROLLOUT_GROUP_STARTED_DATE = "Started date";
/**
* Rollout group status column property.
*/