Protection against misuse with system-wide quota definitions (#670)
* Added quota for meta data per software module Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Added unit test for "meta data per module" quota Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * quota test enhancements Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Verify enforcement of meta data quota via REST Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Quota for distribution set meta data Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Verify enforcement of distribution set meta data quota via REST Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * software modules per distribution set quota Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Integration test enhancements for Modules per DistSet quota Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Quota for software module types per distribution set type Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Quota for max artifacts per software module Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Quotas for ActionStatus per Action and Messages per ActionStatus Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Quota attributes per target Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Quota targets per rollout group Signed-off-by: stefbehl <stefan.behl@bosch-si.com> * Quota max targets per rollout group Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per rollout group Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per rollout group Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per rollout group Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per group Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * quota max actions per target Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per rollout group Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max actions per target Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max actions per target Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per auto assignment Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per manual assignment Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per auto assignment Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per auto assign Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per auto assignment Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max actions per target Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per manual assignment Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix issues caused by merge Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Improve JavaDoc Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix Sonar issues Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix Sonar findings Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max artifact size Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Optimize quota configuration Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix test failures Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Improve test coverage Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max rollout groups per rollout Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Configure Rollout UI enhancements Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * UI enhancements Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Minor changes Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per group Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Quota max targets per group Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix Sonar findings Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix Sonar findings Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix Sonar finding Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix code review findings Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix review findings Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * New approach for 'max artifact size' enforcement Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix Sonar findings Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix failing tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Reduce max artifact size for tests Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com> * Fix Kai's review findings Signed-off-by: Stefan Behl <stefan.behl@bosch-si.com>
This commit is contained in:
committed by
Kai Zimmermann
parent
fcc15a0484
commit
6dd98d2134
@@ -20,6 +20,7 @@ import org.eclipse.hawkbit.repository.ArtifactManagement;
|
||||
import org.eclipse.hawkbit.repository.exception.ArtifactUploadFailedException;
|
||||
import org.eclipse.hawkbit.repository.exception.InvalidMD5HashException;
|
||||
import org.eclipse.hawkbit.repository.exception.InvalidSHA1HashException;
|
||||
import org.eclipse.hawkbit.repository.exception.QuotaExceededException;
|
||||
import org.eclipse.hawkbit.repository.model.Artifact;
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
import org.eclipse.hawkbit.ui.artifacts.state.ArtifactUploadState;
|
||||
@@ -591,7 +592,8 @@ public class UploadConfirmationWindow implements Button.ClickListener {
|
||||
customFile.getBaseSoftwareModuleName(), customFile.getBaseSoftwareModuleVersion());
|
||||
if (customFile.getFileName().equals(fileName)
|
||||
&& baseSwModuleNameVersion.equals(baseSoftwareModuleNameVersion)) {
|
||||
createArtifact(itemId, customFile.getFilePath(), artifactManagement, bSoftwareModule);
|
||||
createArtifact(itemId, customFile.getFilePath(), customFile.getFileSize(), artifactManagement,
|
||||
bSoftwareModule);
|
||||
}
|
||||
}
|
||||
refreshArtifactDetailsLayout = checkIfArtifactDetailsDisplayed(bSoftwareModule.getId());
|
||||
@@ -618,8 +620,8 @@ public class UploadConfirmationWindow implements Button.ClickListener {
|
||||
currentUploadResultWindow = null;
|
||||
}
|
||||
|
||||
private void createArtifact(final String itemId, final String filePath, final ArtifactManagement artifactManagement,
|
||||
final SoftwareModule baseSw) {
|
||||
private void createArtifact(final String itemId, final String filePath, final long fileSize,
|
||||
final ArtifactManagement artifactManagement, final SoftwareModule baseSw) {
|
||||
|
||||
final File newFile = new File(filePath);
|
||||
final Item item = tableContainer.getItem(itemId);
|
||||
@@ -638,11 +640,11 @@ public class UploadConfirmationWindow implements Button.ClickListener {
|
||||
try (FileInputStream fis = new FileInputStream(newFile)) {
|
||||
|
||||
artifactManagement.create(fis, baseSw.getId(), providedFileName, md5Checksum, sha1Checksum, true,
|
||||
customFile.getMimeType());
|
||||
customFile.getMimeType(), fileSize);
|
||||
saveUploadStatus(providedFileName, swModuleNameVersion, SPUILabelDefinitions.SUCCESS, "");
|
||||
|
||||
} catch (final ArtifactUploadFailedException | InvalidSHA1HashException | InvalidMD5HashException
|
||||
| FileNotFoundException e) {
|
||||
| FileNotFoundException | QuotaExceededException e) {
|
||||
|
||||
saveUploadStatus(providedFileName, swModuleNameVersion, SPUILabelDefinitions.FAILED, e.getMessage());
|
||||
LOG.error(ARTIFACT_UPLOAD_EXCEPTION, e);
|
||||
|
||||
@@ -91,14 +91,17 @@ import com.vaadin.ui.themes.ValoTheme;
|
||||
/**
|
||||
* Rollout add or update popup layout.
|
||||
*/
|
||||
@SuppressWarnings({ "squid:MaximumInheritanceDepth", "squid:S2160" })
|
||||
public class AddUpdateRolloutWindowLayout extends GridLayout {
|
||||
|
||||
private static final long serialVersionUID = 2999293468801479916L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(AddUpdateRolloutWindowLayout.class);
|
||||
|
||||
private static final String MESSAGE_ROLLOUT_FIELD_VALUE_RANGE = "message.rollout.field.value.range";
|
||||
|
||||
private static final String MESSAGE_ROLLOUT_MAX_GROUP_SIZE_EXCEEDED = "message.rollout.max.group.size.exceeded";
|
||||
|
||||
private static final String MESSAGE_ROLLOUT_FILTER_TARGET_EXISTS = "message.rollout.filter.target.exists";
|
||||
|
||||
private static final String MESSAGE_ENTER_NUMBER = "message.enter.number";
|
||||
@@ -167,6 +170,7 @@ public class AddUpdateRolloutWindowLayout extends GridLayout {
|
||||
|
||||
private final NullValidator nullValidator = new NullValidator(null, false);
|
||||
|
||||
@SuppressWarnings("squid:S00107")
|
||||
AddUpdateRolloutWindowLayout(final RolloutManagement rolloutManagement, final TargetManagement targetManagement,
|
||||
final UINotification uiNotification, final UiProperties uiProperties, final EntityFactory entityFactory,
|
||||
final VaadinMessageSource i18n, final UIEventBus eventBus,
|
||||
@@ -339,7 +343,7 @@ public class AddUpdateRolloutWindowLayout extends GridLayout {
|
||||
|
||||
private int getErrorThresholdPercentage(final int amountGroup) {
|
||||
int errorThresoldPercent = Integer.parseInt(errorThreshold.getValue());
|
||||
if (errorThresholdOptionGroup.getValue().equals(ERRORTHRESOLDOPTIONS.COUNT.getValue())) {
|
||||
if (errorThresholdOptionGroup.getValue().equals(ERROR_THRESHOLD_OPTIONS.COUNT.getValue())) {
|
||||
final int groupSize = (int) Math.ceil((double) totalTargetsCount / (double) amountGroup);
|
||||
final int erroThresoldCount = Integer.parseInt(errorThreshold.getValue());
|
||||
errorThresoldPercent = (int) Math.ceil(((float) erroThresoldCount / (float) groupSize) * 100);
|
||||
@@ -626,7 +630,7 @@ public class AddUpdateRolloutWindowLayout extends GridLayout {
|
||||
|
||||
private OptionGroup createErrorThresholdOptionGroup() {
|
||||
final OptionGroup errorThresoldOptions = new OptionGroup();
|
||||
for (final ERRORTHRESOLDOPTIONS option : ERRORTHRESOLDOPTIONS.values()) {
|
||||
for (final ERROR_THRESHOLD_OPTIONS option : ERROR_THRESHOLD_OPTIONS.values()) {
|
||||
errorThresoldOptions.addItem(option.getValue());
|
||||
}
|
||||
errorThresoldOptions.setId(UIComponentIdProvider.ROLLOUT_ERROR_THRESOLD_OPTION_ID);
|
||||
@@ -640,8 +644,8 @@ public class AddUpdateRolloutWindowLayout extends GridLayout {
|
||||
private void listenerOnErrorThresoldOptionChange(final ValueChangeEvent event) {
|
||||
errorThreshold.clear();
|
||||
errorThreshold.removeAllValidators();
|
||||
if (event.getProperty().getValue().equals(ERRORTHRESOLDOPTIONS.COUNT.getValue())) {
|
||||
errorThreshold.addValidator(new ErrorThresoldOptionValidator());
|
||||
if (event.getProperty().getValue().equals(ERROR_THRESHOLD_OPTIONS.COUNT.getValue())) {
|
||||
errorThreshold.addValidator(new ErrorThresholdOptionValidator());
|
||||
} else {
|
||||
errorThreshold.addValidator(new ThresholdFieldValidator());
|
||||
}
|
||||
@@ -732,6 +736,7 @@ public class AddUpdateRolloutWindowLayout extends GridLayout {
|
||||
groupsLegendLayout.populateTotalTargets(totalTargetsCount);
|
||||
defineGroupsLayout.setTargetFilter(filterQueryString);
|
||||
}
|
||||
noOfGroups.markAsDirty();
|
||||
onGroupNumberChange(event);
|
||||
}
|
||||
|
||||
@@ -771,7 +776,7 @@ public class AddUpdateRolloutWindowLayout extends GridLayout {
|
||||
}
|
||||
|
||||
private void setDefaultSaveStartGroupOption() {
|
||||
errorThresholdOptionGroup.setValue(ERRORTHRESOLDOPTIONS.PERCENT.getValue());
|
||||
errorThresholdOptionGroup.setValue(ERROR_THRESHOLD_OPTIONS.PERCENT.getValue());
|
||||
}
|
||||
|
||||
private static TextArea createDescription() {
|
||||
@@ -802,6 +807,7 @@ public class AddUpdateRolloutWindowLayout extends GridLayout {
|
||||
final TextField noOfGroupsField = createIntegerTextField("prompt.number.of.groups",
|
||||
UIComponentIdProvider.ROLLOUT_NO_OF_GROUPS_ID);
|
||||
noOfGroupsField.addValidator(new GroupNumberValidator());
|
||||
noOfGroupsField.addValidator(new GroupSizeValidator());
|
||||
noOfGroupsField.setMaxLength(3);
|
||||
noOfGroupsField.addValueChangeListener(this::onGroupNumberChange);
|
||||
return noOfGroupsField;
|
||||
@@ -850,8 +856,8 @@ public class AddUpdateRolloutWindowLayout extends GridLayout {
|
||||
return rolloutNameField;
|
||||
}
|
||||
|
||||
class ErrorThresoldOptionValidator implements Validator {
|
||||
private static final long serialVersionUID = 9049939751976326550L;
|
||||
class ErrorThresholdOptionValidator implements Validator {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public void validate(final Object value) {
|
||||
@@ -879,6 +885,7 @@ public class AddUpdateRolloutWindowLayout extends GridLayout {
|
||||
}
|
||||
|
||||
class TargetExistsValidator implements Validator {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
@@ -891,7 +898,7 @@ public class AddUpdateRolloutWindowLayout extends GridLayout {
|
||||
}
|
||||
|
||||
class ThresholdFieldValidator implements Validator {
|
||||
private static final long serialVersionUID = 9049939751976326550L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public void validate(final Object value) {
|
||||
@@ -903,13 +910,29 @@ public class AddUpdateRolloutWindowLayout extends GridLayout {
|
||||
}
|
||||
|
||||
class GroupNumberValidator implements Validator {
|
||||
private static final long serialVersionUID = 9043919751971326521L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public void validate(final Object value) {
|
||||
if (value != null) {
|
||||
new IntegerRangeValidator(i18n.getMessage(MESSAGE_ROLLOUT_FIELD_VALUE_RANGE, 1, 500), 1, 500)
|
||||
.validate(Integer.valueOf(value.toString()));
|
||||
final int maxGroups = quotaManagement.getMaxRolloutGroupsPerRollout();
|
||||
new IntegerRangeValidator(i18n.getMessage(MESSAGE_ROLLOUT_FIELD_VALUE_RANGE, 1, maxGroups), 1,
|
||||
maxGroups).validate(Integer.valueOf(value.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class GroupSizeValidator implements Validator {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
@Override
|
||||
public void validate(final Object value) {
|
||||
if (value != null && totalTargetsCount != null) {
|
||||
final int maxGroupSize = quotaManagement.getMaxTargetsPerRolloutGroup();
|
||||
if (getGroupSize() > maxGroupSize) {
|
||||
final String msg = i18n.getMessage(MESSAGE_ROLLOUT_MAX_GROUP_SIZE_EXCEEDED, maxGroupSize);
|
||||
throw new InvalidValueException(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1020,12 +1043,15 @@ public class AddUpdateRolloutWindowLayout extends GridLayout {
|
||||
}
|
||||
}
|
||||
|
||||
private enum ERRORTHRESOLDOPTIONS {
|
||||
PERCENT("%"), COUNT("Count");
|
||||
private enum ERROR_THRESHOLD_OPTIONS {
|
||||
|
||||
String value;
|
||||
PERCENT("%"),
|
||||
|
||||
ERRORTHRESOLDOPTIONS(final String val) {
|
||||
COUNT("Count");
|
||||
|
||||
private final String value;
|
||||
|
||||
ERROR_THRESHOLD_OPTIONS(final String val) {
|
||||
value = val;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,9 @@ import com.vaadin.ui.UI;
|
||||
*/
|
||||
public class DefineGroupsLayout extends GridLayout {
|
||||
|
||||
private static final long serialVersionUID = 2939193468001472916L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static final String MESSAGE_ROLLOUT_MAX_GROUP_SIZE_EXCEEDED = "message.rollout.max.group.size.exceeded.advanced";
|
||||
|
||||
private final VaadinMessageSource i18n;
|
||||
|
||||
@@ -267,7 +269,7 @@ public class DefineGroupsLayout extends GridLayout {
|
||||
validateRemainingTargets();
|
||||
|
||||
} else {
|
||||
resetRemainingTargetsError();
|
||||
resetErrors();
|
||||
setValidationStatus(ValidationStatus.INVALID);
|
||||
}
|
||||
}
|
||||
@@ -279,12 +281,12 @@ public class DefineGroupsLayout extends GridLayout {
|
||||
}
|
||||
}
|
||||
|
||||
private void resetRemainingTargetsError() {
|
||||
groupRows.forEach(GroupRow::hideLastGroupError);
|
||||
private void resetErrors() {
|
||||
groupRows.forEach(GroupRow::resetError);
|
||||
}
|
||||
|
||||
private void validateRemainingTargets() {
|
||||
resetRemainingTargetsError();
|
||||
resetErrors();
|
||||
if (targetFilter == null) {
|
||||
return;
|
||||
}
|
||||
@@ -318,16 +320,33 @@ public class DefineGroupsLayout extends GridLayout {
|
||||
}
|
||||
groupsValidation = validation;
|
||||
|
||||
final GroupRow lastRow = groupRows.get(groupRows.size() - 1);
|
||||
final int lastIdx = groupRows.size() - 1;
|
||||
final GroupRow lastRow = groupRows.get(lastIdx);
|
||||
if (groupsValidation != null && groupsValidation.isValid() && validationStatus != ValidationStatus.INVALID) {
|
||||
lastRow.hideLastGroupError();
|
||||
lastRow.resetError();
|
||||
setValidationStatus(ValidationStatus.VALID);
|
||||
|
||||
} else {
|
||||
lastRow.markWithLastGroupError();
|
||||
lastRow.setError(i18n.getMessage("message.rollout.remaining.targets.error"));
|
||||
setValidationStatus(ValidationStatus.INVALID);
|
||||
}
|
||||
|
||||
// validate the single groups
|
||||
final int maxTargets = quotaManagement.getMaxTargetsPerRolloutGroup();
|
||||
final boolean hasRemainingTargetsError = validationStatus == ValidationStatus.INVALID;
|
||||
for (int i = 0; i < groupRows.size(); ++i) {
|
||||
final GroupRow row = groupRows.get(i);
|
||||
// do not mask the 'remaining targets' error
|
||||
if (hasRemainingTargetsError && row.equals(lastRow)) {
|
||||
continue;
|
||||
}
|
||||
row.resetError();
|
||||
final Long count = groupsValidation.getTargetsPerGroup().get(i);
|
||||
if (count != null && count > maxTargets) {
|
||||
row.setError(i18n.getMessage(MESSAGE_ROLLOUT_MAX_GROUP_SIZE_EXCEEDED, maxTargets));
|
||||
setValidationStatus(ValidationStatus.INVALID);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private List<RolloutGroupCreate> getGroupsFromRows() {
|
||||
@@ -389,13 +408,9 @@ public class DefineGroupsLayout extends GridLayout {
|
||||
groupName = createTextField("textfield.name", UIComponentIdProvider.ROLLOUT_GROUP_LIST_GRID_ID);
|
||||
groupName.setValue(i18n.getMessage("textfield.rollout.group.default.name", groupsCount));
|
||||
groupName.setStyleName("rollout-group-name");
|
||||
groupName.addValueChangeListener(
|
||||
groupName.addValueChangeListener(event -> valueChanged());
|
||||
|
||||
event -> valueChanged());
|
||||
|
||||
targetFilterQueryCombo =
|
||||
|
||||
createTargetFilterQueryCombo();
|
||||
targetFilterQueryCombo = createTargetFilterQueryCombo();
|
||||
|
||||
populateTargetFilterQuery();
|
||||
targetFilterQueryCombo.addValueChangeListener(event -> valueChanged());
|
||||
@@ -617,18 +632,16 @@ public class DefineGroupsLayout extends GridLayout {
|
||||
&& triggerThreshold.isValid() && errorThreshold.isValid();
|
||||
}
|
||||
|
||||
private void markWithLastGroupError() {
|
||||
targetPercentage
|
||||
.setComponentError(new UserError(i18n.getMessage("message.rollout.remaining.targets.error")));
|
||||
private void setError(final String error) {
|
||||
targetPercentage.setComponentError(new UserError(error));
|
||||
}
|
||||
|
||||
/**
|
||||
* Hides an error of the row
|
||||
*/
|
||||
private void hideLastGroupError() {
|
||||
private void resetError() {
|
||||
targetPercentage.setComponentError(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import org.springframework.data.domain.Sort.Direction;
|
||||
* Class to provide the unchanged constants.
|
||||
*/
|
||||
public final class SPUIDefinitions {
|
||||
|
||||
/**
|
||||
* Available locales.
|
||||
*/
|
||||
@@ -27,10 +28,12 @@ public final class SPUIDefinitions {
|
||||
* Default locale.
|
||||
*/
|
||||
public static final String DEFAULT_LOCALE = "en";
|
||||
|
||||
/**
|
||||
* Locale cookie name.
|
||||
*/
|
||||
public static final String COOKIE_NAME = "BOSCHSI_UII_LOCALE";
|
||||
|
||||
/**
|
||||
* Lazy query container page size.
|
||||
*/
|
||||
@@ -166,10 +169,12 @@ public final class SPUIDefinitions {
|
||||
* New Software Module desc field id.
|
||||
*/
|
||||
public static final String NEW_SOFTWARE_TYPE_DESC = "software.type.add.desc";
|
||||
|
||||
/**
|
||||
* Hide filter by dist type layout button.
|
||||
*/
|
||||
public static final String HIDE_FILTER_DIST_TYPE = "hide.filter.dist.type.layout";
|
||||
|
||||
/**
|
||||
* New Distribution Type distribution field id.
|
||||
*/
|
||||
@@ -184,18 +189,22 @@ public final class SPUIDefinitions {
|
||||
* New Software Module key field id.
|
||||
*/
|
||||
public static final String NEW_SOFTWARE_TYPE_KEY = "software.type.add.key";
|
||||
|
||||
/**
|
||||
* New Target tag desc field id.
|
||||
*/
|
||||
public static final String NEW_TARGET_TAG_DESC = "target.tag.add.desc";
|
||||
|
||||
/**
|
||||
* New distribution Type set tag add icon id.
|
||||
*/
|
||||
public static final String ADD_DISTRIBUTION_TYPE_TAG = "distribution.type.tag.add";
|
||||
|
||||
/**
|
||||
* New software module set type add icon id.
|
||||
*/
|
||||
public static final String ADD_SOFTWARE_MODULE_TYPE = "softwaremodule.type.add";
|
||||
|
||||
/**
|
||||
* No data.
|
||||
*/
|
||||
@@ -220,10 +229,12 @@ public final class SPUIDefinitions {
|
||||
* Filter by tag key.
|
||||
*/
|
||||
public static final String FILTER_BY_TAG = "FilterByTag";
|
||||
|
||||
/**
|
||||
* Filter by no tag button.
|
||||
*/
|
||||
public static final String FILTER_BY_NO_TAG = "FilterByNoTag";
|
||||
|
||||
/**
|
||||
* Filter by target filter query.
|
||||
*/
|
||||
@@ -233,34 +244,42 @@ public final class SPUIDefinitions {
|
||||
* Filter by distribution key.
|
||||
*/
|
||||
public static final String FILTER_BY_DISTRIBUTION = "FilterByDistribution";
|
||||
|
||||
/**
|
||||
* Filter by distributionSet Type.
|
||||
*/
|
||||
public static final String FILTER_BY_DISTRIBUTION_SET_TYPE = "FilterByDistributionSetType";
|
||||
|
||||
/**
|
||||
* Order by pinnedTarget.
|
||||
*/
|
||||
public static final String ORDER_BY_PINNED_TARGET = "OrderByPinnedTarget";
|
||||
|
||||
/**
|
||||
* Filter by text key.
|
||||
*/
|
||||
public static final String FILTER_BY_TEXT = "FilterByText";
|
||||
|
||||
/**
|
||||
* Text field style.
|
||||
*/
|
||||
public static final String TEXT_STYLE = "text-style";
|
||||
|
||||
/**
|
||||
* Show actions for a target.
|
||||
*/
|
||||
public static final String ACTIONS_BY_TARGET = "ActionsByTarget";
|
||||
|
||||
/**
|
||||
* Show action-states for a action.
|
||||
*/
|
||||
public static final String ACTIONSTATES_BY_ACTION = "ActionStatesByAction";
|
||||
|
||||
/**
|
||||
* Show messages for a action-status.
|
||||
*/
|
||||
public static final String MESSAGES_BY_ACTIONSTATUS = "MessagesByActionStatus";
|
||||
|
||||
/**
|
||||
* Key for no-message MessageProxy.
|
||||
*/
|
||||
@@ -290,22 +309,27 @@ public final class SPUIDefinitions {
|
||||
* Target and distribution column width in save popup window.
|
||||
*/
|
||||
public static final float TARGET_DISTRIBUTION_COLUMN_WIDTH = 2.8F;
|
||||
|
||||
/**
|
||||
* Discard column width in save window popup.
|
||||
*/
|
||||
public static final float DISCARD_COLUMN_WIDTH = 1.2F;
|
||||
|
||||
/**
|
||||
* Target tag name.
|
||||
*/
|
||||
public static final String TAG_NAME = "target-tag-name";
|
||||
|
||||
/**
|
||||
* Target tag desc.
|
||||
*/
|
||||
public static final String TAG_DESC = "target-tag-desc";
|
||||
|
||||
/**
|
||||
* Software type name.
|
||||
*/
|
||||
public static final String TYPE_NAME = "type-name";
|
||||
|
||||
/**
|
||||
* DistributionSet type name.
|
||||
*/
|
||||
@@ -320,6 +344,7 @@ public final class SPUIDefinitions {
|
||||
* DistributionSet type key.
|
||||
*/
|
||||
public static final String DIST_SET_TYPE_KEY = "dist-set-type-key";
|
||||
|
||||
/**
|
||||
* Software type desc.
|
||||
*/
|
||||
@@ -334,6 +359,7 @@ public final class SPUIDefinitions {
|
||||
* Tag combo style.
|
||||
*/
|
||||
public static final String FILTER_TYPE_COMBO_STYLE = "filter-combo-specific-style";
|
||||
|
||||
/**
|
||||
* Color label style.
|
||||
*/
|
||||
@@ -351,6 +377,7 @@ public final class SPUIDefinitions {
|
||||
* Target tag button id prefix.
|
||||
*/
|
||||
public static final String TARGET_TAG_ID_PREFIXS = "target.tag.";
|
||||
|
||||
/**
|
||||
* Distribution tag button id prefix.
|
||||
*/
|
||||
@@ -359,7 +386,7 @@ public final class SPUIDefinitions {
|
||||
/**
|
||||
* Space.
|
||||
*/
|
||||
static final String SPACE = " ";
|
||||
public static final String SPACE = " ";
|
||||
|
||||
/**
|
||||
* Distribution tag button id prefix.
|
||||
@@ -370,27 +397,33 @@ public final class SPUIDefinitions {
|
||||
* DistributionSet Type tag button id prefix.
|
||||
*/
|
||||
public static final String DISTRIBUTION_SET_TYPE_ID_PREFIXS = "dist.set.type.";
|
||||
|
||||
/**
|
||||
* Target last query date format .
|
||||
*/
|
||||
public static final String LAST_QUERY_DATE_FORMAT = "EEE MMM d HH:mm:ss z yyyy";
|
||||
|
||||
/**
|
||||
* Target last query date format .
|
||||
*/
|
||||
public static final String LAST_QUERY_DATE_FORMAT_SHORT = "MMM d HH:mm z ''yy";
|
||||
|
||||
/**
|
||||
* Item Id used in drop comparisons.
|
||||
*/
|
||||
public static final String ITEMID = "itemId";
|
||||
|
||||
/**
|
||||
* Expand action history.
|
||||
*/
|
||||
public static final String EXPAND_ACTION_HISTORY = "expand.action.history";
|
||||
|
||||
/**
|
||||
* Filter by distribution key.
|
||||
*/
|
||||
public static final String ORDER_BY_DISTRIBUTION = "OrderByDistribution";
|
||||
|
||||
|
||||
/** Artifact upload related entries - start **/
|
||||
/**
|
||||
* Artifact details by Base software module id.
|
||||
@@ -408,15 +441,15 @@ public final class SPUIDefinitions {
|
||||
* automatically and also horizontal scroll bars get displayed. Used for
|
||||
* Responsive UI.
|
||||
*/
|
||||
static final int REQ_MIN_UPLOAD_BROWSER_WIDTH = 1250;
|
||||
public static final int REQ_MIN_UPLOAD_BROWSER_WIDTH = 1250;
|
||||
|
||||
public static final int MIN_UPLOAD_CONFIRMATION_POPUP_WIDTH = 1000;
|
||||
|
||||
public static final int MIN_UPLOAD_CONFIRMATION_POPUP_HEIGHT = 310;
|
||||
|
||||
static final int MAX_UPLOAD_CONFIRMATION_POPUP_WIDTH = 1050;
|
||||
public static final int MAX_UPLOAD_CONFIRMATION_POPUP_WIDTH = 1050;
|
||||
|
||||
static final int MAX_UPLOAD_CONFIRMATION_POPUP_HEIGHT = 360;
|
||||
public static final int MAX_UPLOAD_CONFIRMATION_POPUP_HEIGHT = 360;
|
||||
|
||||
/** Artifact upload related entries - end. **/
|
||||
|
||||
|
||||
@@ -566,6 +566,8 @@ message.correct.invalid.value = Please correct invalid values
|
||||
message.enter.number = Please enter number
|
||||
message.rollout.field.value.range = Value should be in range {0} to {1}
|
||||
message.rollout.filter.target.exists = The selected target filter does not match any existing target
|
||||
message.rollout.max.group.size.exceeded = The maximum group size of {0} targets is exceeded. Please increase the number of groups or select a different target filter
|
||||
message.rollout.max.group.size.exceeded.advanced = The maximum size of {0} targets is exceeded for this group. Please re-distribute the targets across the groups and create further groups if needed
|
||||
message.rollout.started = Rollout {0} started successfully
|
||||
message.rollout.paused = Rollout {0} paused successfully
|
||||
message.rollout.resumed = Rollout {0} resumed successfully
|
||||
|
||||
Reference in New Issue
Block a user