Merge remote-tracking branch 'eclipse/master' into

feature_split_repo_into_api_impl

# Conflicts:
#	hawkbit-repository/src/main/java/org/eclipse/hawkbit/repository/DeploymentManagement.java
#	hawkbit-repository/src/main/java/org/eclipse/hawkbit/repository/model/Target.java


Signed-off-by: Kai Zimmermann <kai.zimmermann@bosch-si.com>
This commit is contained in:
Kai Zimmermann
2016-05-24 21:51:59 +02:00
30 changed files with 263 additions and 137 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,9 +78,8 @@ public class TargetFilterHeader extends VerticalLayout {
}
private Label createHeaderCaption() {
final Label captionLabel = SPUIComponentProvider.getLabel("Custom Filters",
return SPUIComponentProvider.getLabel(SPUIDefinitions.TARGET_FILTER_LIST_HEADER_CAPTION,
SPUILabelDefinitions.SP_WIDGET_CAPTION);
return captionLabel;
}
private void buildLayout() {
@@ -110,10 +108,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(SPUIComponetIdProvider.TARGET_FILTER_ADD_ICON_ID, "", "",
null, false, FontAwesome.PLUS, SPUIButtonStyleSmallNoBorder.class);
button.addClickListener(event -> addNewFilter());
button.addStyleName("on-focus-no-border link");
return button;
}

View File

@@ -296,8 +296,8 @@ public class ActionHistoryTable extends TreeTable implements Handler {
* add distribution name to the item which will be displayed in the
* table. The name should not exceed certain limit.
*/
item.getItemProperty(SPUIDefinitions.ACTION_HIS_TBL_DIST).setValue(HawkbitCommonUtil
.getFormattedText(actionWithStatusCount.getDsName() + ":" + actionWithStatusCount.getDsVersion()));
item.getItemProperty(SPUIDefinitions.ACTION_HIS_TBL_DIST).setValue(actionWithStatusCount.getDsName() + ":" +
actionWithStatusCount.getDsVersion());
item.getItemProperty(SPUIDefinitions.ACTION_HIS_TBL_FORCED).setValue(action);
/* Default no child */
@@ -446,8 +446,8 @@ public class ActionHistoryTable extends TreeTable implements Handler {
childItem.getItemProperty(SPUIDefinitions.ACTION_HIS_TBL_ACTIVE_HIDDEN).setValue("");
childItem.getItemProperty(SPUIDefinitions.ACTION_HIS_TBL_DIST)
.setValue(HawkbitCommonUtil.getFormattedText(action.getDistributionSet().getName() + ":"
+ action.getDistributionSet().getVersion()));
.setValue(action.getDistributionSet().getName() + ":"
+ action.getDistributionSet().getVersion());
childItem.getItemProperty(SPUIDefinitions.ACTION_HIS_TBL_DATETIME)
.setValue(SPDateTimeUtil.getFormattedDate(actionStatus.getCreatedAt()));

View File

@@ -431,27 +431,7 @@ public final class HawkbitCommonUtil {
return trimAndNullIfEmpty(orgText) == null ? SPUIDefinitions.SPACE : orgText;
}
/**
* Format the lengthy text.
*
* @param orgText
* text to be formatted
* @return String formatted text
*/
public static String getFormattedText(final String orgText) {
if (orgText == null) {
return StringUtils.EMPTY;
}
final int txtLengthAllowed = SPUIDefinitions.NAME_DESCRIPTION_LENGTH;
if (orgText.length() > txtLengthAllowed) {
return new StringBuilder(orgText.substring(0, txtLengthAllowed)).append("...").toString();
}
return orgText;
}
/**
/**
* Find extra height required to increase by all the components to utilize
* the full height of browser for the responsive UI.
*

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.
*/

View File

@@ -132,4 +132,12 @@ $v-included-components: remove($v-included-components, form);
left: 50%;
margin-left: -20px;
}
.v-generated-body &.v-app {
background-image: $app-background-image, linear-gradient(to bottom, $app-background-image-gradient) !important;
background-image: $app-background-image, -webkit-linear-gradient(top, $app-background-image-gradient) !important;
background-image: $app-background-image, -moz-linear-gradient(top, $app-background-image-gradient) !important;
background-position: bottom;
background-repeat: no-repeat;
}
}