@@ -53,17 +53,17 @@ public class SoftwareModuleTableHeader extends AbstractTableHeader {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getHeaderCaption() {
|
protected String getHeaderCaption() {
|
||||||
return softwareHeaderCaption;
|
return i18n.get("upload.swModuleTable.header");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getSearchBoxId() {
|
protected String getSearchBoxId() {
|
||||||
return softwareSerachBoxId;
|
return SPUIComponentIdProvider.SW_MODULE_SEARCH_TEXT_FIELD;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getSearchRestIconId() {
|
protected String getSearchRestIconId() {
|
||||||
return softwareSearchResetIcon;
|
return SPUIComponentIdProvider.SW_MODULE_SEARCH_RESET_ICON;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
|||||||
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorder;
|
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorder;
|
||||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||||
import org.eclipse.hawkbit.ui.utils.I18N;
|
import org.eclipse.hawkbit.ui.utils.I18N;
|
||||||
import org.eclipse.hawkbit.ui.utils.SPUIComponentIdProvider;
|
|
||||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||||
import org.eclipse.hawkbit.ui.utils.SPUIStyleDefinitions;
|
import org.eclipse.hawkbit.ui.utils.SPUIStyleDefinitions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -69,13 +68,6 @@ public abstract class AbstractTableHeader extends VerticalLayout {
|
|||||||
|
|
||||||
private Button bulkUploadIcon;
|
private Button bulkUploadIcon;
|
||||||
|
|
||||||
protected String distributionHeaderCaption;
|
|
||||||
protected String softwareHeaderCaption;
|
|
||||||
protected String distributionSearchBoxId;
|
|
||||||
protected String softwareSerachBoxId;
|
|
||||||
protected String distributionSearchResetIcon;
|
|
||||||
protected String softwareSearchResetIcon;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialze components.
|
* Initialze components.
|
||||||
*/
|
*/
|
||||||
@@ -93,12 +85,6 @@ public abstract class AbstractTableHeader extends VerticalLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void createComponents() {
|
private void createComponents() {
|
||||||
distributionHeaderCaption = i18n.get("header.dist.table");
|
|
||||||
softwareHeaderCaption = i18n.get("upload.swModuleTable.header");
|
|
||||||
distributionSearchBoxId = SPUIComponentIdProvider.DIST_SEARCH_TEXTFIELD;
|
|
||||||
softwareSerachBoxId = SPUIComponentIdProvider.SW_MODULE_SEARCH_TEXT_FIELD;
|
|
||||||
distributionSearchResetIcon = SPUIComponentIdProvider.DIST_SEARCH_ICON;
|
|
||||||
softwareSearchResetIcon = SPUIComponentIdProvider.SW_MODULE_SEARCH_RESET_ICON;
|
|
||||||
headerCaption = createHeaderCaption();
|
headerCaption = createHeaderCaption();
|
||||||
searchField = new TextFieldBuilder(getSearchBoxId()).createSearchField(event -> searchBy(event.getText()));
|
searchField = new TextFieldBuilder(getSearchBoxId()).createSearchField(event -> searchBy(event.getText()));
|
||||||
|
|
||||||
|
|||||||
@@ -52,17 +52,17 @@ public class DistributionSetTableHeader extends AbstractTableHeader {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getHeaderCaption() {
|
protected String getHeaderCaption() {
|
||||||
return distributionHeaderCaption;
|
return i18n.get("header.dist.table");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getSearchBoxId() {
|
protected String getSearchBoxId() {
|
||||||
return distributionSearchBoxId;
|
return SPUIComponentIdProvider.DIST_SEARCH_TEXTFIELD;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getSearchRestIconId() {
|
protected String getSearchRestIconId() {
|
||||||
return distributionSearchResetIcon;
|
return SPUIComponentIdProvider.DIST_SEARCH_ICON;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -52,17 +52,17 @@ public class SwModuleTableHeader extends AbstractTableHeader {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getHeaderCaption() {
|
protected String getHeaderCaption() {
|
||||||
return softwareHeaderCaption;
|
return i18n.get("upload.swModuleTable.header");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getSearchBoxId() {
|
protected String getSearchBoxId() {
|
||||||
return softwareSerachBoxId;
|
return SPUIComponentIdProvider.SW_MODULE_SEARCH_TEXT_FIELD;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getSearchRestIconId() {
|
protected String getSearchRestIconId() {
|
||||||
return softwareSearchResetIcon;
|
return SPUIComponentIdProvider.SW_MODULE_SEARCH_RESET_ICON;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -21,12 +21,10 @@ import com.vaadin.data.Property.ValueChangeEvent;
|
|||||||
import com.vaadin.server.Page;
|
import com.vaadin.server.Page;
|
||||||
import com.vaadin.shared.ui.colorpicker.Color;
|
import com.vaadin.shared.ui.colorpicker.Color;
|
||||||
import com.vaadin.ui.Button;
|
import com.vaadin.ui.Button;
|
||||||
import com.vaadin.ui.OptionGroup;
|
|
||||||
import com.vaadin.ui.TextArea;
|
import com.vaadin.ui.TextArea;
|
||||||
import com.vaadin.ui.TextField;
|
import com.vaadin.ui.TextField;
|
||||||
import com.vaadin.ui.components.colorpicker.ColorChangeEvent;
|
import com.vaadin.ui.components.colorpicker.ColorChangeEvent;
|
||||||
import com.vaadin.ui.components.colorpicker.ColorSelector;
|
import com.vaadin.ui.components.colorpicker.ColorSelector;
|
||||||
import com.vaadin.ui.themes.ValoTheme;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Superclass defining common properties and methods for creating/updating
|
* Superclass defining common properties and methods for creating/updating
|
||||||
@@ -187,27 +185,6 @@ public abstract class CreateUpdateTypeLayout<E extends NamedEntity> extends Abst
|
|||||||
typeKey.addStyleName(SPUIDefinitions.TYPE_KEY);
|
typeKey.addStyleName(SPUIDefinitions.TYPE_KEY);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* create option group with Create tag/Update tag based on permissions.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
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);
|
|
||||||
|
|
||||||
if (hasCreatePermission) {
|
|
||||||
optiongroup.addItem(createTagStr);
|
|
||||||
}
|
|
||||||
if (hasUpdatePermission) {
|
|
||||||
optiongroup.addItem(updateTagStr);
|
|
||||||
}
|
|
||||||
setOptionGroupDefaultValue(hasCreatePermission, hasUpdatePermission);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void setColorPickerComponentsColor(final String color) {
|
protected void setColorPickerComponentsColor(final String color) {
|
||||||
|
|
||||||
if (null == color) {
|
if (null == color) {
|
||||||
|
|||||||
@@ -54,17 +54,17 @@ public class DistributionTableHeader extends AbstractTableHeader {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getHeaderCaption() {
|
protected String getHeaderCaption() {
|
||||||
return distributionHeaderCaption;
|
return i18n.get("header.dist.table");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getSearchBoxId() {
|
protected String getSearchBoxId() {
|
||||||
return distributionSearchBoxId;
|
return SPUIComponentIdProvider.DIST_SEARCH_TEXTFIELD;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getSearchRestIconId() {
|
protected String getSearchRestIconId() {
|
||||||
return distributionSearchResetIcon;
|
return SPUIComponentIdProvider.DIST_SEARCH_ICON;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user