Fix combobox initial selection (#1012)

* extended TargetFilterQueryAware interface with target filter name to fix the combobox initial selection rendering issue

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* introduced ProxyTargetFilterQueryInfo for consistency and usage of binder convertor, adapted code

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* removed ProxyIdNameVersion in favour of ProxyDistributionSetInfo, adapted usage

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* changed DsIdAware to use ProxyDistributionSetInfo in order to fix the initial combobox selection, adapted corresponding usages

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* changed ProxySystemConfigWindow to use the ProxyTypeInfo for fixing the initial selection of Ds type, adapted code

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
This commit is contained in:
Bondar Bogdan
2020-09-22 12:02:37 +02:00
committed by GitHub
parent 30d5df59bd
commit 16ce6f35bf
36 changed files with 558 additions and 451 deletions

View File

@@ -19,11 +19,13 @@ import org.eclipse.hawkbit.ui.common.data.aware.StartOptionAware;
import org.eclipse.hawkbit.ui.common.data.aware.TargetFilterQueryAware; import org.eclipse.hawkbit.ui.common.data.aware.TargetFilterQueryAware;
import org.eclipse.hawkbit.ui.common.data.aware.TypeInfoAware; import org.eclipse.hawkbit.ui.common.data.aware.TypeInfoAware;
import org.eclipse.hawkbit.ui.common.data.aware.VersionAware; import org.eclipse.hawkbit.ui.common.data.aware.VersionAware;
import org.eclipse.hawkbit.ui.common.data.providers.DistributionSetStatelessDataProvider;
import org.eclipse.hawkbit.ui.common.data.providers.AbstractProxyDataProvider; import org.eclipse.hawkbit.ui.common.data.providers.AbstractProxyDataProvider;
import org.eclipse.hawkbit.ui.common.data.providers.DistributionSetStatelessDataProvider;
import org.eclipse.hawkbit.ui.common.data.providers.TargetFilterQueryDataProvider; import org.eclipse.hawkbit.ui.common.data.providers.TargetFilterQueryDataProvider;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyDistributionSet; import org.eclipse.hawkbit.ui.common.data.proxies.ProxyDistributionSet;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyDistributionSetInfo;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyTargetFilterQuery; import org.eclipse.hawkbit.ui.common.data.proxies.ProxyTargetFilterQuery;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyTargetFilterQueryInfo;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyType; import org.eclipse.hawkbit.ui.common.data.proxies.ProxyType;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyTypeInfo; import org.eclipse.hawkbit.ui.common.data.proxies.ProxyTypeInfo;
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider; import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
@@ -240,24 +242,21 @@ public final class FormComponentBuilder {
i18n.getMessage(UIMessageIdProvider.HEADER_DISTRIBUTION_SET), i18n.getMessage(PROMPT_DISTRIBUTION_SET), i18n.getMessage(UIMessageIdProvider.HEADER_DISTRIBUTION_SET), i18n.getMessage(PROMPT_DISTRIBUTION_SET),
i18n.getMessage(PROMPT_DISTRIBUTION_SET), false, ProxyDistributionSet::getNameVersion, dataProvider); i18n.getMessage(PROMPT_DISTRIBUTION_SET), false, ProxyDistributionSet::getNameVersion, dataProvider);
final Binding<T, Long> binding = binder.forField(dsComboBox) final Binding<T, ProxyDistributionSetInfo> binding = binder.forField(dsComboBox)
.asRequired(i18n.getMessage(UIMessageIdProvider.MESSAGE_ERROR_DISTRIBUTIONSET_REQUIRED)) .asRequired(i18n.getMessage(UIMessageIdProvider.MESSAGE_ERROR_DISTRIBUTIONSET_REQUIRED))
.withConverter(ds -> { .withConverter(ds -> {
if (ds == null) { if (ds == null) {
return null; return null;
} }
return ds.getId(); return ds.getInfo();
}, dsId -> { }, dsInfo -> {
if (dsId == null) { if (dsInfo == null) {
return null; return null;
} }
final ProxyDistributionSet ds = new ProxyDistributionSet(); return ProxyDistributionSet.of(dsInfo);
ds.setId(dsId); }).bind(DsIdAware::getDistributionSetInfo, DsIdAware::setDistributionSetInfo);
return ds;
}).bind(DsIdAware::getDistributionSetId, DsIdAware::setDistributionSetId);
return new BoundComponent<>(dsComboBox, binding); return new BoundComponent<>(dsComboBox, binding);
} }
@@ -293,20 +292,19 @@ public final class FormComponentBuilder {
bindingBuilder.withValidator(validator); bindingBuilder.withValidator(validator);
} }
final Binding<T, ProxyTargetFilterQuery> binding = bindingBuilder.bind(tfqAwareBean -> { final Binding<T, ProxyTargetFilterQueryInfo> binding = bindingBuilder.withConverter(tfq -> {
if (tfqAwareBean.getTargetFilterId() == null) { if (tfq == null) {
return null; return null;
} }
final ProxyTargetFilterQuery filter = new ProxyTargetFilterQuery(); return tfq.getInfo();
filter.setId(tfqAwareBean.getTargetFilterId()); }, tfqInfo -> {
filter.setQuery(tfqAwareBean.getTargetFilterQuery()); if (tfqInfo == null) {
return null;
}
return filter; return ProxyTargetFilterQuery.of(tfqInfo);
}, (tfqAwareBean, filter) -> { }).bind(TargetFilterQueryAware::getTargetFilterQueryInfo, TargetFilterQueryAware::setTargetFilterQueryInfo);
tfqAwareBean.setTargetFilterId(filter != null ? filter.getId() : null);
tfqAwareBean.setTargetFilterQuery(filter != null ? filter.getQuery() : null);
});
return new BoundComponent<>(tfqCombo, binding); return new BoundComponent<>(tfqCombo, binding);
} }

View File

@@ -8,11 +8,13 @@
*/ */
package org.eclipse.hawkbit.ui.common.data.aware; package org.eclipse.hawkbit.ui.common.data.aware;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyDistributionSetInfo;
/** /**
* Element provides a distribution set id * Element provides a distribution set info
*/ */
public interface DsIdAware { public interface DsIdAware {
void setDistributionSetId(Long id); void setDistributionSetInfo(ProxyDistributionSetInfo dsInfo);
Long getDistributionSetId(); ProxyDistributionSetInfo getDistributionSetInfo();
} }

View File

@@ -8,15 +8,13 @@
*/ */
package org.eclipse.hawkbit.ui.common.data.aware; package org.eclipse.hawkbit.ui.common.data.aware;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyTargetFilterQueryInfo;
/** /**
* Element is used for target filter query combobox * Element is used for target filter query combobox
*/ */
public interface TargetFilterQueryAware { public interface TargetFilterQueryAware {
void setTargetFilterId(Long id); void setTargetFilterQueryInfo(ProxyTargetFilterQueryInfo tfqInfo);
Long getTargetFilterId(); ProxyTargetFilterQueryInfo getTargetFilterQueryInfo();
void setTargetFilterQuery(String query);
String getTargetFilterQuery();
} }

View File

@@ -16,6 +16,7 @@ import org.eclipse.hawkbit.repository.TargetFilterQueryManagement;
import org.eclipse.hawkbit.repository.model.RolloutGroup; import org.eclipse.hawkbit.repository.model.RolloutGroup;
import org.eclipse.hawkbit.repository.model.TargetFilterQuery; import org.eclipse.hawkbit.repository.model.TargetFilterQuery;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyAdvancedRolloutGroup; import org.eclipse.hawkbit.ui.common.data.proxies.ProxyAdvancedRolloutGroup;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyTargetFilterQueryInfo;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.PageRequest;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
@@ -32,7 +33,7 @@ public class RolloutGroupToAdvancedDefinitionMapper {
* Constructor for RolloutGroupToAdvancedDefinitionMapper * Constructor for RolloutGroupToAdvancedDefinitionMapper
* *
* @param targetFilterQueryManagement * @param targetFilterQueryManagement
* TargetFilterQueryManagement * TargetFilterQueryManagement
*/ */
public RolloutGroupToAdvancedDefinitionMapper(final TargetFilterQueryManagement targetFilterQueryManagement) { public RolloutGroupToAdvancedDefinitionMapper(final TargetFilterQueryManagement targetFilterQueryManagement) {
this.targetFilterQueryManagement = targetFilterQueryManagement; this.targetFilterQueryManagement = targetFilterQueryManagement;
@@ -42,7 +43,7 @@ public class RolloutGroupToAdvancedDefinitionMapper {
* Map advanced Rollout Group * Map advanced Rollout Group
* *
* @param rolloutGroup * @param rolloutGroup
* RolloutGroup * RolloutGroup
* *
* @return ProxyAdvancedRolloutGroup * @return ProxyAdvancedRolloutGroup
*/ */
@@ -57,7 +58,9 @@ public class RolloutGroupToAdvancedDefinitionMapper {
final Page<TargetFilterQuery> filterQueries = targetFilterQueryManagement.findByQuery(PageRequest.of(0, 1), final Page<TargetFilterQuery> filterQueries = targetFilterQueryManagement.findByQuery(PageRequest.of(0, 1),
groupTargetFilterQuery); groupTargetFilterQuery);
if (filterQueries.getTotalElements() == 1) { if (filterQueries.getTotalElements() == 1) {
advancedGroupRow.setTargetFilterId(filterQueries.getContent().get(0).getId()); final TargetFilterQuery tfq = filterQueries.getContent().get(0);
advancedGroupRow.setTargetFilterQueryInfo(
new ProxyTargetFilterQueryInfo(tfq.getId(), tfq.getName(), tfq.getQuery()));
} }
} }
@@ -72,11 +75,11 @@ public class RolloutGroupToAdvancedDefinitionMapper {
* Fetch rollout group data from the backend * Fetch rollout group data from the backend
* *
* @param rolloutId * @param rolloutId
* Rollout id * Rollout id
* @param rolloutGroupManagement * @param rolloutGroupManagement
* RolloutGroupManagement * RolloutGroupManagement
* @param pageCount * @param pageCount
* Total page count * Total page count
* *
* @return List of advance rollout group * @return List of advance rollout group
*/ */

View File

@@ -10,8 +10,8 @@ package org.eclipse.hawkbit.ui.common.data.mappers;
import org.eclipse.hawkbit.repository.model.DistributionSet; import org.eclipse.hawkbit.repository.model.DistributionSet;
import org.eclipse.hawkbit.repository.model.Rollout; import org.eclipse.hawkbit.repository.model.Rollout;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyDistributionSetInfo;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyRollout; import org.eclipse.hawkbit.ui.common.data.proxies.ProxyRollout;
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
/** /**
* Maps {@link Rollout} entities, fetched from backend, to the * Maps {@link Rollout} entities, fetched from backend, to the
@@ -37,11 +37,8 @@ public class RolloutToProxyRolloutMapper extends AbstractNamedEntityToProxyNamed
mapNamedEntityAttributes(rollout, proxyRollout); mapNamedEntityAttributes(rollout, proxyRollout);
final DistributionSet distributionSet = rollout.getDistributionSet(); final DistributionSet ds = rollout.getDistributionSet();
proxyRollout.setDistributionSetNameVersion( proxyRollout.setDsInfo(new ProxyDistributionSetInfo(ds.getId(), ds.getName(), ds.getVersion()));
HawkbitCommonUtil.getFormattedNameVersion(distributionSet.getName(), distributionSet.getVersion()));
proxyRollout.setDistributionSetId(distributionSet.getId());
proxyRollout proxyRollout
.setNumberOfGroups(rollout.getRolloutGroupsCreated() > 0 ? rollout.getRolloutGroupsCreated() : null); .setNumberOfGroups(rollout.getRolloutGroupsCreated() > 0 ? rollout.getRolloutGroupsCreated() : null);
proxyRollout.setForcedTime(rollout.getForcedTime() > 0 ? rollout.getForcedTime() : null); proxyRollout.setForcedTime(rollout.getForcedTime() > 0 ? rollout.getForcedTime() : null);

View File

@@ -11,7 +11,7 @@ package org.eclipse.hawkbit.ui.common.data.mappers;
import org.eclipse.hawkbit.repository.model.DistributionSet; import org.eclipse.hawkbit.repository.model.DistributionSet;
import org.eclipse.hawkbit.repository.model.TargetFilterQuery; import org.eclipse.hawkbit.repository.model.TargetFilterQuery;
import org.eclipse.hawkbit.ui.common.UserDetailsFormatter; import org.eclipse.hawkbit.ui.common.UserDetailsFormatter;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyIdNameVersion; import org.eclipse.hawkbit.ui.common.data.proxies.ProxyDistributionSetInfo;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyTargetFilterQuery; import org.eclipse.hawkbit.ui.common.data.proxies.ProxyTargetFilterQuery;
import org.eclipse.hawkbit.ui.utils.SPDateTimeUtil; import org.eclipse.hawkbit.ui.utils.SPDateTimeUtil;
@@ -37,7 +37,7 @@ public class TargetFilterQueryToProxyTargetFilterMapper
final DistributionSet distributionSet = targetFilterQuery.getAutoAssignDistributionSet(); final DistributionSet distributionSet = targetFilterQuery.getAutoAssignDistributionSet();
if (distributionSet != null) { if (distributionSet != null) {
proxyTargetFilter.setAutoAssignmentEnabled(true); proxyTargetFilter.setAutoAssignmentEnabled(true);
proxyTargetFilter.setAutoAssignDsIdNameVersion(new ProxyIdNameVersion(distributionSet.getId(), proxyTargetFilter.setDistributionSetInfo(new ProxyDistributionSetInfo(distributionSet.getId(),
distributionSet.getName(), distributionSet.getVersion())); distributionSet.getName(), distributionSet.getVersion()));
proxyTargetFilter.setAutoAssignActionType(targetFilterQuery.getAutoAssignActionType()); proxyTargetFilter.setAutoAssignActionType(targetFilterQuery.getAutoAssignActionType());
} }

View File

@@ -20,8 +20,7 @@ public class ProxyAdvancedRolloutGroup implements Serializable, TargetFilterQuer
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private String groupName; private String groupName;
private String targetFilterQuery; private ProxyTargetFilterQueryInfo targetFilterInfo;
private Long targetFilterId;
private Float targetPercentage; private Float targetPercentage;
private String triggerThresholdPercentage; private String triggerThresholdPercentage;
private String errorThresholdPercentage; private String errorThresholdPercentage;
@@ -40,30 +39,32 @@ public class ProxyAdvancedRolloutGroup implements Serializable, TargetFilterQuer
* Sets the groupName * Sets the groupName
* *
* @param groupName * @param groupName
* name of the group * name of the group
*/ */
public void setGroupName(final String groupName) { public void setGroupName(final String groupName) {
this.groupName = groupName; this.groupName = groupName;
} }
@Override @Override
public ProxyTargetFilterQueryInfo getTargetFilterQueryInfo() {
return targetFilterInfo;
}
@Override
public void setTargetFilterQueryInfo(final ProxyTargetFilterQueryInfo tfqInfo) {
this.targetFilterInfo = tfqInfo;
}
public String getTargetFilterQuery() { public String getTargetFilterQuery() {
return targetFilterQuery; return targetFilterInfo != null ? targetFilterInfo.getQuery() : null;
} }
@Override
public void setTargetFilterQuery(final String targetFilterQuery) { public void setTargetFilterQuery(final String targetFilterQuery) {
this.targetFilterQuery = targetFilterQuery; if (targetFilterInfo != null) {
} targetFilterInfo.setQuery(targetFilterQuery);
} else {
@Override targetFilterInfo = new ProxyTargetFilterQueryInfo(null, null, targetFilterQuery);
public Long getTargetFilterId() { }
return targetFilterId;
}
@Override
public void setTargetFilterId(final Long targetFilterId) {
this.targetFilterId = targetFilterId;
} }
/** /**
@@ -79,7 +80,7 @@ public class ProxyAdvancedRolloutGroup implements Serializable, TargetFilterQuer
* Sets the targetPercentage * Sets the targetPercentage
* *
* @param targetPercentage * @param targetPercentage
* percentage of the target * percentage of the target
*/ */
public void setTargetPercentage(final Float targetPercentage) { public void setTargetPercentage(final Float targetPercentage) {
this.targetPercentage = targetPercentage; this.targetPercentage = targetPercentage;
@@ -98,7 +99,7 @@ public class ProxyAdvancedRolloutGroup implements Serializable, TargetFilterQuer
* Sets the triggerThresholdPercentage * Sets the triggerThresholdPercentage
* *
* @param triggerThresholdPercentage * @param triggerThresholdPercentage
* percentage of the triggerThreshold * percentage of the triggerThreshold
*/ */
public void setTriggerThresholdPercentage(final String triggerThresholdPercentage) { public void setTriggerThresholdPercentage(final String triggerThresholdPercentage) {
this.triggerThresholdPercentage = triggerThresholdPercentage; this.triggerThresholdPercentage = triggerThresholdPercentage;
@@ -117,7 +118,7 @@ public class ProxyAdvancedRolloutGroup implements Serializable, TargetFilterQuer
* Sets the errorThresholdPercentage * Sets the errorThresholdPercentage
* *
* @param errorThresholdPercentage * @param errorThresholdPercentage
* percentage of the errorThreshold * percentage of the errorThreshold
*/ */
public void setErrorThresholdPercentage(final String errorThresholdPercentage) { public void setErrorThresholdPercentage(final String errorThresholdPercentage) {
this.errorThresholdPercentage = errorThresholdPercentage; this.errorThresholdPercentage = errorThresholdPercentage;

View File

@@ -20,27 +20,29 @@ import org.eclipse.hawkbit.ui.common.data.aware.DsIdAware;
public class ProxyBulkUploadWindow implements Serializable, DescriptionAware, DsIdAware { public class ProxyBulkUploadWindow implements Serializable, DescriptionAware, DsIdAware {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private Long distributionSetId; private ProxyDistributionSetInfo dsInfo;
private Map<Long, String> tagIdsWithNameToAssign; private Map<Long, String> tagIdsWithNameToAssign;
private String description; private String description;
/** /**
* Gets the distributionSetId * Gets the distribution set info
* *
* @return distributionSetId * @return dsInfo
*/ */
public Long getDistributionSetId() { @Override
return distributionSetId; public ProxyDistributionSetInfo getDistributionSetInfo() {
return dsInfo;
} }
/** /**
* Sets the distributionSetId * Sets the distribution set info
* *
* @param distributionSetId * @param dsInfo
* Id of distribution set * Info of distribution set
*/ */
public void setDistributionSetId(final Long distributionSetId) { @Override
this.distributionSetId = distributionSetId; public void setDistributionSetInfo(final ProxyDistributionSetInfo dsInfo) {
this.dsInfo = dsInfo;
} }
/** /**
@@ -56,7 +58,7 @@ public class ProxyBulkUploadWindow implements Serializable, DescriptionAware, Ds
* Sets the tagIdsWithNameToAssign * Sets the tagIdsWithNameToAssign
* *
* @param tagIdsWithNameToAssign * @param tagIdsWithNameToAssign
* list of tagIds WithNameToAssign * list of tagIds WithNameToAssign
*/ */
public void setTagIdsWithNameToAssign(final Map<Long, String> tagIdsWithNameToAssign) { public void setTagIdsWithNameToAssign(final Map<Long, String> tagIdsWithNameToAssign) {
this.tagIdsWithNameToAssign = tagIdsWithNameToAssign; this.tagIdsWithNameToAssign = tagIdsWithNameToAssign;
@@ -67,6 +69,7 @@ public class ProxyBulkUploadWindow implements Serializable, DescriptionAware, Ds
* *
* @return description * @return description
*/ */
@Override
public String getDescription() { public String getDescription() {
return description; return description;
} }
@@ -75,8 +78,9 @@ public class ProxyBulkUploadWindow implements Serializable, DescriptionAware, Ds
* Sets the description * Sets the description
* *
* @param description * @param description
* entity description * entity description
*/ */
@Override
public void setDescription(final String description) { public void setDescription(final String description) {
this.description = description; this.description = description;
} }

View File

@@ -128,17 +128,18 @@ public class ProxyDistributionSet extends ProxyNamedEntity implements VersionAwa
/** /**
* Sets the Id, name and version of distribution set * Sets the Id, name and version of distribution set
* *
* @param dsIdNameVersion * @param dsInfo
* ProxyIdNameVersion * ProxyDistributionSetInfo
* *
* @return proxy of distribution set * @return proxy of distribution set
*/ */
public ProxyDistributionSet of(final ProxyIdNameVersion dsIdNameVersion) { public static ProxyDistributionSet of(final ProxyDistributionSetInfo dsInfo) {
final ProxyDistributionSet ds = new ProxyDistributionSet(); final ProxyDistributionSet ds = new ProxyDistributionSet();
ds.setId(dsIdNameVersion.getId()); ds.setId(dsInfo.getId());
ds.setName(dsIdNameVersion.getName()); ds.setName(dsInfo.getName());
ds.setVersion(dsIdNameVersion.getVersion()); ds.setVersion(dsInfo.getVersion());
ds.setNameVersion(dsInfo.getNameVersion());
return ds; return ds;
} }
@@ -148,7 +149,7 @@ public class ProxyDistributionSet extends ProxyNamedEntity implements VersionAwa
* *
* @return proxy of Id, Name and version * @return proxy of Id, Name and version
*/ */
public ProxyIdNameVersion getIdNameVersion() { public ProxyDistributionSetInfo getInfo() {
return new ProxyIdNameVersion(getId(), getName(), getVersion()); return new ProxyDistributionSetInfo(getId(), getName(), getVersion());
} }
} }

View File

@@ -0,0 +1,96 @@
/**
* Copyright (c) 2020 Bosch.IO GmbH and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.hawkbit.ui.common.data.proxies;
import java.util.Objects;
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
/**
* Holds information about a distribution set
*/
public class ProxyDistributionSetInfo extends ProxyIdentifiableEntity {
private static final long serialVersionUID = 1L;
private String name;
private String version;
private String nameVersion;
/**
* Constructor
*/
public ProxyDistributionSetInfo() {
super();
}
/**
* Constructor
*
* @param id
* distribution set ID
* @param name
* distribution set name
* @param version
* distribution set version
*/
public ProxyDistributionSetInfo(final Long id, final String name, final String version) {
super(id);
this.name = name;
this.version = version;
this.nameVersion = HawkbitCommonUtil.getFormattedNameVersion(name, version);
}
public String getName() {
return name;
}
public void setName(final String name) {
this.name = name;
}
public String getVersion() {
return version;
}
public void setVersion(final String version) {
this.version = version;
}
public String getNameVersion() {
return nameVersion;
}
public void setNameVersion(final String nameVersion) {
this.nameVersion = nameVersion;
}
@Override
public int hashCode() {
// nameVersion is ignored because it is a composition of name and
// version
return Objects.hash(getId(), getName(), getVersion());
}
@Override
public boolean equals(final Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final ProxyDistributionSetInfo other = (ProxyDistributionSetInfo) obj;
// nameVersion is ignored because it is a composition of name and
// version
return Objects.equals(this.getId(), other.getId()) && Objects.equals(this.getName(), other.getName())
&& Objects.equals(this.getVersion(), other.getVersion());
}
}

View File

@@ -1,75 +0,0 @@
/**
* Copyright (c) 2020 Bosch.IO GmbH and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.hawkbit.ui.common.data.proxies;
/**
* Represent a data transfer object for the ui with id, name and version.
*/
public class ProxyIdNameVersion extends ProxyIdentifiableEntity {
private static final long serialVersionUID = 1L;
private String name;
private String version;
/**
* Constructor.
*
* @param id
* the id
* @param name
* the name
* @param version
* the version
*
*/
public ProxyIdNameVersion(final Long id, final String name, final String version) {
super(id);
this.name = name;
this.version = version;
}
/**
* Gets the name
*
* @return name
*/
public String getName() {
return name;
}
/**
* Sets the name
*
* @param name
* Name of entity
*/
public void setName(final String name) {
this.name = name;
}
/**
* Gets the version
*
* @return version
*/
public String getVersion() {
return version;
}
/**
* Sets the version
*
* @param version
* Version of entity
*/
public void setVersion(final String version) {
this.version = version;
}
}

View File

@@ -22,7 +22,7 @@ public class ProxyRollout extends ProxyNamedEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private String distributionSetNameVersion; private ProxyDistributionSetInfo dsInfo;
private Integer numberOfGroups; private Integer numberOfGroups;
@@ -44,10 +44,8 @@ public class ProxyRollout extends ProxyNamedEntity {
private ActionType actionType; private ActionType actionType;
private Long distributionSetId;
/** /**
* Constructor * Constructor
*/ */
public ProxyRollout() { public ProxyRollout() {
} }
@@ -56,12 +54,24 @@ public class ProxyRollout extends ProxyNamedEntity {
* Constructor for ProxyRollout * Constructor for ProxyRollout
* *
* @param id * @param id
* Rollout entity Id * Rollout entity Id
*/ */
public ProxyRollout(final Long id) { public ProxyRollout(final Long id) {
super(id); super(id);
} }
public ProxyDistributionSetInfo getDsInfo() {
return dsInfo;
}
public void setDsInfo(final ProxyDistributionSetInfo dsInfo) {
this.dsInfo = dsInfo;
}
public String getDsNameVersion() {
return dsInfo != null ? dsInfo.getNameVersion() : null;
}
/** /**
* Gets the rollout actionType * Gets the rollout actionType
* *
@@ -75,30 +85,12 @@ public class ProxyRollout extends ProxyNamedEntity {
* Sets the actionType * Sets the actionType
* *
* @param actionType * @param actionType
* Rollout actionType * Rollout actionType
*/ */
public void setActionType(final ActionType actionType) { public void setActionType(final ActionType actionType) {
this.actionType = actionType; this.actionType = actionType;
} }
/**
* Get the distributionSetNameVersion
*
* @return distributionSetNameVersion
*/
public String getDistributionSetNameVersion() {
return distributionSetNameVersion;
}
/**
* Sets the distributionSetNameVersion
* @param distributionSetNameVersion
* Name and version of distribution set
*/
public void setDistributionSetNameVersion(final String distributionSetNameVersion) {
this.distributionSetNameVersion = distributionSetNameVersion;
}
/** /**
* Gets the numberOfGroups * Gets the numberOfGroups
* *
@@ -112,7 +104,7 @@ public class ProxyRollout extends ProxyNamedEntity {
* Sets the numberOfGroups * Sets the numberOfGroups
* *
* @param numberOfGroups * @param numberOfGroups
* Number of rollout groups * Number of rollout groups
*/ */
public void setNumberOfGroups(final Integer numberOfGroups) { public void setNumberOfGroups(final Integer numberOfGroups) {
this.numberOfGroups = numberOfGroups; this.numberOfGroups = numberOfGroups;
@@ -131,7 +123,7 @@ public class ProxyRollout extends ProxyNamedEntity {
* Sets the forcedTime * Sets the forcedTime
* *
* @param forcedTime * @param forcedTime
* Forced time * Forced time
*/ */
public void setForcedTime(final Long forcedTime) { public void setForcedTime(final Long forcedTime) {
this.forcedTime = forcedTime; this.forcedTime = forcedTime;
@@ -150,7 +142,7 @@ public class ProxyRollout extends ProxyNamedEntity {
* Sets the rollout status * Sets the rollout status
* *
* @param status * @param status
* Rollout current status * Rollout current status
*/ */
public void setStatus(final RolloutStatus status) { public void setStatus(final RolloutStatus status) {
this.status = status; this.status = status;
@@ -169,7 +161,7 @@ public class ProxyRollout extends ProxyNamedEntity {
* Sets the approvalDecidedBy * Sets the approvalDecidedBy
* *
* @param approvalDecidedBy * @param approvalDecidedBy
* approval DecidedBy for rollout * approval DecidedBy for rollout
*/ */
public void setApprovalDecidedBy(final String approvalDecidedBy) { public void setApprovalDecidedBy(final String approvalDecidedBy) {
this.approvalDecidedBy = approvalDecidedBy; this.approvalDecidedBy = approvalDecidedBy;
@@ -188,7 +180,7 @@ public class ProxyRollout extends ProxyNamedEntity {
* Sets the approvalRemark * Sets the approvalRemark
* *
* @param approvalRemark * @param approvalRemark
* Remark for approval * Remark for approval
*/ */
public void setApprovalRemark(final String approvalRemark) { public void setApprovalRemark(final String approvalRemark) {
this.approvalRemark = approvalRemark; this.approvalRemark = approvalRemark;
@@ -207,7 +199,7 @@ public class ProxyRollout extends ProxyNamedEntity {
* Sets the targetFilterQuery * Sets the targetFilterQuery
* *
* @param targetFilterQuery * @param targetFilterQuery
* Target filter query * Target filter query
*/ */
public void setTargetFilterQuery(final String targetFilterQuery) { public void setTargetFilterQuery(final String targetFilterQuery) {
this.targetFilterQuery = targetFilterQuery; this.targetFilterQuery = targetFilterQuery;
@@ -226,7 +218,7 @@ public class ProxyRollout extends ProxyNamedEntity {
* Sets the totalTargets * Sets the totalTargets
* *
* @param totalTargets * @param totalTargets
* Total targets * Total targets
*/ */
public void setTotalTargets(final long totalTargets) { public void setTotalTargets(final long totalTargets) {
this.totalTargets = totalTargets; this.totalTargets = totalTargets;
@@ -245,31 +237,12 @@ public class ProxyRollout extends ProxyNamedEntity {
* Sets the startAt * Sets the startAt
* *
* @param startAt * @param startAt
* time rollout starts at * time rollout starts at
*/ */
public void setStartAt(final Long startAt) { public void setStartAt(final Long startAt) {
this.startAt = startAt; this.startAt = startAt;
} }
/**
* Gets the Id of distribution set
*
* @return distributionSetId
*/
public Long getDistributionSetId() {
return distributionSetId;
}
/**
* Sets the distributionSetId
*
* @param distributionSetId
* Id of distribution set
*/
public void setDistributionSetId(final Long distributionSetId) {
this.distributionSetId = distributionSetId;
}
/** /**
* Gets the total count of all the rollout status * Gets the total count of all the rollout status
* *
@@ -283,7 +256,7 @@ public class ProxyRollout extends ProxyNamedEntity {
* Sets the statusTotalCountMap * Sets the statusTotalCountMap
* *
* @param statusTotalCountMap * @param statusTotalCountMap
* total count of all the rollout status * total count of all the rollout status
*/ */
public void setStatusTotalCountMap(final Map<Status, Long> statusTotalCountMap) { public void setStatusTotalCountMap(final Map<Status, Long> statusTotalCountMap) {
this.statusTotalCountMap = statusTotalCountMap; this.statusTotalCountMap = statusTotalCountMap;

View File

@@ -28,9 +28,8 @@ public class ProxyRolloutForm implements Serializable, NameAware, DsIdAware, Tar
private Long id; private Long id;
private String name; private String name;
private Long distributionSetId; private ProxyTargetFilterQueryInfo targetFilterInfo;
private Long targetFilterId; private ProxyDistributionSetInfo dsInfo;
private String targetFilterQuery;
private String description; private String description;
private ActionType actionType; private ActionType actionType;
private Long forcedTime; private Long forcedTime;
@@ -39,6 +38,7 @@ public class ProxyRolloutForm implements Serializable, NameAware, DsIdAware, Tar
/** /**
* Gets the rollout form id * Gets the rollout form id
*
* @return id * @return id
*/ */
public Long getId() { public Long getId() {
@@ -49,7 +49,7 @@ public class ProxyRolloutForm implements Serializable, NameAware, DsIdAware, Tar
* Sets the form id * Sets the form id
* *
* @param id * @param id
* rollout form id * rollout form id
*/ */
public void setId(final Long id) { public void setId(final Long id) {
this.id = id; this.id = id;
@@ -66,33 +66,35 @@ public class ProxyRolloutForm implements Serializable, NameAware, DsIdAware, Tar
} }
@Override @Override
public Long getDistributionSetId() { public ProxyTargetFilterQueryInfo getTargetFilterQueryInfo() {
return distributionSetId; return targetFilterInfo;
} }
@Override @Override
public void setDistributionSetId(final Long distributionSetId) { public void setTargetFilterQueryInfo(final ProxyTargetFilterQueryInfo tfqInfo) {
this.distributionSetId = distributionSetId; this.targetFilterInfo = tfqInfo;
} }
@Override
public Long getTargetFilterId() {
return targetFilterId;
}
@Override
public void setTargetFilterId(final Long targetFilterId) {
this.targetFilterId = targetFilterId;
}
@Override
public String getTargetFilterQuery() { public String getTargetFilterQuery() {
return targetFilterQuery; return targetFilterInfo != null ? targetFilterInfo.getQuery() : null;
}
public void setTargetFilterQuery(final String targetFilterQuery) {
if (targetFilterInfo != null) {
targetFilterInfo.setQuery(targetFilterQuery);
} else {
targetFilterInfo = new ProxyTargetFilterQueryInfo(null, null, targetFilterQuery);
}
} }
@Override @Override
public void setTargetFilterQuery(final String targetFilterQuery) { public ProxyDistributionSetInfo getDistributionSetInfo() {
this.targetFilterQuery = targetFilterQuery; return dsInfo;
}
@Override
public void setDistributionSetInfo(final ProxyDistributionSetInfo dsInfo) {
this.dsInfo = dsInfo;
} }
@Override @Override

View File

@@ -52,8 +52,8 @@ public class ProxyRolloutWindow implements Serializable {
setActionType(rollout.getActionType()); setActionType(rollout.getActionType());
setStartAt(rollout.getStartAt()); setStartAt(rollout.getStartAt());
setForcedTime(rollout.getForcedTime()); setForcedTime(rollout.getForcedTime());
setDistributionSetId(rollout.getDistributionSetId());
setTargetFilterQuery(rollout.getTargetFilterQuery()); setTargetFilterQuery(rollout.getTargetFilterQuery());
setDistributionSetInfo(rollout.getDsInfo());
setNumberOfGroups(rollout.getNumberOfGroups()); setNumberOfGroups(rollout.getNumberOfGroups());
} }
@@ -186,25 +186,6 @@ public class ProxyRolloutWindow implements Serializable {
rolloutApproval.setApprovalRemark(approvalRemark); rolloutApproval.setApprovalRemark(approvalRemark);
} }
/**
* Gets the rollout form targetFilterQuery
*
* @return targetFilterQuery
*/
public String getTargetFilterQuery() {
return rolloutForm.getTargetFilterQuery();
}
/**
* Sets the targetFilterQuery
*
* @param targetFilterQuery
* Rollout form target filter query
*/
public void setTargetFilterQuery(final String targetFilterQuery) {
rolloutForm.setTargetFilterQuery(targetFilterQuery);
}
/** /**
* Gets the time rollout start time * Gets the time rollout start time
* *
@@ -224,40 +205,59 @@ public class ProxyRolloutWindow implements Serializable {
rolloutForm.setStartAt(startAt); rolloutForm.setStartAt(startAt);
} }
/**
* @return Rollout form targetFilter Info
*/
public ProxyTargetFilterQueryInfo getTargetFilterInfo() {
return rolloutForm.getTargetFilterQueryInfo();
}
/**
* Sets the targetFilter Info
*
* @param tfqInfo
* Info of rollout form targetFilter
*/
public void setTargetFilterInfo(final ProxyTargetFilterQueryInfo tfqInfo) {
rolloutForm.setTargetFilterQueryInfo(tfqInfo);
}
/**
* Gets the rollout form targetFilterQuery
*
* @return targetFilterQuery
*/
public String getTargetFilterQuery() {
return rolloutForm.getTargetFilterQuery();
}
/**
* Sets the targetFilterQuery
*
* @param targetFilterQuery
* Rollout form target filter query
*/
public void setTargetFilterQuery(final String targetFilterQuery) {
rolloutForm.setTargetFilterQuery(targetFilterQuery);
}
/** /**
* Gets the Id of rollout form distribution set * Gets the Id of rollout form distribution set
* *
* @return distributionSetId * @return distributionSetId
*/ */
public Long getDistributionSetId() { public Long getDistributionSetId() {
return rolloutForm.getDistributionSetId(); return rolloutForm.getDistributionSetInfo() != null ? rolloutForm.getDistributionSetInfo().getId() : null;
} }
/** /**
* Sets the distributionSetId * Sets the distribution set info
* *
* @param distributionSetId * @param dsInfo
* Id of rollout form distribution set * Info of rollout form distribution set
*/ */
public void setDistributionSetId(final Long distributionSetId) { public void setDistributionSetInfo(final ProxyDistributionSetInfo dsInfo) {
rolloutForm.setDistributionSetId(distributionSetId); rolloutForm.setDistributionSetInfo(dsInfo);
}
/**
* @return Rollout form targetFilter id
*/
public Long getTargetFilterId() {
return rolloutForm.getTargetFilterId();
}
/**
* Sets the targetFilterId
*
* @param targetFilterId
* Id of rollout form targetFilter
*/
public void setTargetFilterId(final Long targetFilterId) {
rolloutForm.setTargetFilterId(targetFilterId);
} }
/** /**

View File

@@ -23,7 +23,7 @@ public class ProxySystemConfigWindow implements Serializable {
private Long id; private Long id;
private String name; private String name;
private String description; private String description;
private Long distributionSetTypeId; private ProxyTypeInfo dsTypeInfo;
private Long repositoryConfigId; private Long repositoryConfigId;
private Long rolloutConfigId; private Long rolloutConfigId;
private Long caRootAuthorityId; private Long caRootAuthorityId;
@@ -222,23 +222,12 @@ public class ProxySystemConfigWindow implements Serializable {
this.description = description; this.description = description;
} }
/** public ProxyTypeInfo getDsTypeInfo() {
* Gets the id of distributionSetType return dsTypeInfo;
*
* @return distributionSetTypeId
*/
public Long getDistributionSetTypeId() {
return distributionSetTypeId;
} }
/** public void setDsTypeInfo(final ProxyTypeInfo dsTypeInfo) {
* Sets the distributionSetTypeId this.dsTypeInfo = dsTypeInfo;
*
* @param distributionSetTypeId
* System config window distributionSetTypeId
*/
public void setDistributionSetTypeId(final Long distributionSetTypeId) {
this.distributionSetTypeId = distributionSetTypeId;
} }
/** /**

View File

@@ -22,7 +22,7 @@ public class ProxyTargetFilterQuery extends ProxyNamedEntity implements DsIdAwar
private boolean isAutoAssignmentEnabled; private boolean isAutoAssignmentEnabled;
private ProxyIdNameVersion autoAssignDsIdNameVersion; private ProxyDistributionSetInfo autoAssignDsInfo;
private ActionType autoAssignActionType; private ActionType autoAssignActionType;
@@ -36,7 +36,7 @@ public class ProxyTargetFilterQuery extends ProxyNamedEntity implements DsIdAwar
* Constructor for ProxyTargetFilterQuery * Constructor for ProxyTargetFilterQuery
* *
* @param id * @param id
* Target filter query id * Target filter query id
*/ */
public ProxyTargetFilterQuery(final Long id) { public ProxyTargetFilterQuery(final Long id) {
super(id); super(id);
@@ -55,7 +55,7 @@ public class ProxyTargetFilterQuery extends ProxyNamedEntity implements DsIdAwar
* Sets the query * Sets the query
* *
* @param query * @param query
* Target filter query * Target filter query
*/ */
public void setQuery(final String query) { public void setQuery(final String query) {
this.query = query; this.query = query;
@@ -74,7 +74,7 @@ public class ProxyTargetFilterQuery extends ProxyNamedEntity implements DsIdAwar
* Sets the autoAssignActionType * Sets the autoAssignActionType
* *
* @param autoAssignActionType * @param autoAssignActionType
* ActionType * ActionType
*/ */
public void setAutoAssignActionType(final ActionType autoAssignActionType) { public void setAutoAssignActionType(final ActionType autoAssignActionType) {
this.autoAssignActionType = autoAssignActionType; this.autoAssignActionType = autoAssignActionType;
@@ -102,35 +102,50 @@ public class ProxyTargetFilterQuery extends ProxyNamedEntity implements DsIdAwar
} }
/** /**
* Gets the autoAssign Distribution set IdNameVersion * Gets the autoAssign Distribution set Info
* *
* @return autoAssignDsIdNameVersion * @return ProxyDistributionSetInfo
*/ */
public ProxyIdNameVersion getAutoAssignDsIdNameVersion() { @Override
return autoAssignDsIdNameVersion; public ProxyDistributionSetInfo getDistributionSetInfo() {
return autoAssignDsInfo;
} }
/** /**
* Sets the securityToken * Sets the autoAssign Distribution set Info
* *
* @param autoAssignDsIdNameVersion * @param dsInfo
* Target filter autoAssign Distribution set IdNameVersion * Target filter autoAssign Distribution set Info
*/ */
public void setAutoAssignDsIdNameVersion(final ProxyIdNameVersion autoAssignDsIdNameVersion) { @Override
this.autoAssignDsIdNameVersion = autoAssignDsIdNameVersion; public void setDistributionSetInfo(final ProxyDistributionSetInfo dsInfo) {
this.autoAssignDsInfo = dsInfo;
} }
@Override /**
public void setDistributionSetId(final Long id) { * Sets the Id, name and query of target filter query
if (autoAssignDsIdNameVersion != null) { *
autoAssignDsIdNameVersion.setId(id); * @param tfqInfo
} else { * ProxyTargetFilterQuery
autoAssignDsIdNameVersion = new ProxyIdNameVersion(id, null, null); *
} * @return proxy of target filter query
*/
public static ProxyTargetFilterQuery of(final ProxyTargetFilterQueryInfo tfqInfo) {
final ProxyTargetFilterQuery tfq = new ProxyTargetFilterQuery();
tfq.setId(tfqInfo.getId());
tfq.setName(tfqInfo.getName());
tfq.setQuery(tfqInfo.getQuery());
return tfq;
} }
@Override /**
public Long getDistributionSetId() { * Gets the Id, name and query of target filter query
return autoAssignDsIdNameVersion != null ? autoAssignDsIdNameVersion.getId() : null; *
* @return proxy of Id, Name and query
*/
public ProxyTargetFilterQueryInfo getInfo() {
return new ProxyTargetFilterQueryInfo(getId(), getName(), getQuery());
} }
} }

View File

@@ -0,0 +1,78 @@
/**
* Copyright (c) 2020 Bosch.IO GmbH and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.hawkbit.ui.common.data.proxies;
import java.util.Objects;
/**
* Holds information about a target filter query
*/
public class ProxyTargetFilterQueryInfo extends ProxyIdentifiableEntity {
private static final long serialVersionUID = 1L;
private String name;
private String query;
/**
* Constructor
*/
public ProxyTargetFilterQueryInfo() {
super();
}
/**
* Constructor
*
* @param id
* target filter ID
* @param name
* target filter name
* @param query
* target filter query
*/
public ProxyTargetFilterQueryInfo(final Long id, final String name, final String query) {
super(id);
this.name = name;
this.query = query;
}
public String getName() {
return name;
}
public void setName(final String name) {
this.name = name;
}
public String getQuery() {
return query;
}
public void setQuery(final String query) {
this.query = query;
}
@Override
public int hashCode() {
return Objects.hash(getId(), getName(), getQuery());
}
@Override
public boolean equals(final Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final ProxyTargetFilterQueryInfo other = (ProxyTargetFilterQueryInfo) obj;
return Objects.equals(this.getId(), other.getId()) && Objects.equals(this.getName(), other.getName())
&& Objects.equals(this.getQuery(), other.getQuery());
}
}

View File

@@ -47,20 +47,11 @@ public class ProxyType extends ProxyFilterButton {
return key; return key;
} }
/**
* Gets the key and name
*
* @return keyAndName
*/
public String getKeyAndName() {
return key + " (" + getName() + ")";
}
/** /**
* Sets the key * Sets the key
* *
* @param key * @param key
* Entity key * Entity key
*/ */
public void setKey(final String key) { public void setKey(final String key) {
this.key = key; this.key = key;
@@ -121,7 +112,7 @@ public class ProxyType extends ProxyFilterButton {
* Sets the smTypeAssign * Sets the smTypeAssign
* *
* @param smTypeAssign * @param smTypeAssign
* Software module type assign * Software module type assign
*/ */
public void setSmTypeAssign(final SmTypeAssign smTypeAssign) { public void setSmTypeAssign(final SmTypeAssign smTypeAssign) {
this.smTypeAssign = smTypeAssign; this.smTypeAssign = smTypeAssign;
@@ -140,7 +131,7 @@ public class ProxyType extends ProxyFilterButton {
* Sets the selectedSmTypes * Sets the selectedSmTypes
* *
* @param selectedSmTypes * @param selectedSmTypes
* Selected software module types * Selected software module types
*/ */
public void setSelectedSmTypes(final Set<ProxyType> selectedSmTypes) { public void setSelectedSmTypes(final Set<ProxyType> selectedSmTypes) {
this.selectedSmTypes = selectedSmTypes; this.selectedSmTypes = selectedSmTypes;
@@ -159,7 +150,7 @@ public class ProxyType extends ProxyFilterButton {
* Sets the maxAssignments * Sets the maxAssignments
* *
* @param maxAssignments * @param maxAssignments
* Entity maxAssignments * Entity maxAssignments
*/ */
public void setMaxAssignments(final int maxAssignments) { public void setMaxAssignments(final int maxAssignments) {
this.maxAssignments = maxAssignments; this.maxAssignments = maxAssignments;

View File

@@ -30,9 +30,9 @@ public class ProxyTypeInfo extends ProxyIdentifiableEntity {
* Constructor * Constructor
* *
* @param id * @param id
* type name
* @param name
* type ID * type ID
* @param name
* type name
* @param key * @param key
* type key * type key
*/ */
@@ -58,6 +58,15 @@ public class ProxyTypeInfo extends ProxyIdentifiableEntity {
this.key = key; this.key = key;
} }
/**
* Gets the key and name
*
* @return keyAndName
*/
public String getKeyAndName() {
return key + " (" + getName() + ")";
}
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(getId(), getName(), getKey()); return Objects.hash(getId(), getName(), getKey());

View File

@@ -25,7 +25,6 @@ import org.eclipse.hawkbit.ui.common.layout.listener.EntityDraggingListener;
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider; import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleNoBorder; import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleNoBorder;
import org.eclipse.hawkbit.ui.management.targettable.TargetGridLayoutUiState; import org.eclipse.hawkbit.ui.management.targettable.TargetGridLayoutUiState;
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
import org.eclipse.hawkbit.ui.utils.SPUITargetDefinitions; import org.eclipse.hawkbit.ui.utils.SPUITargetDefinitions;
import org.eclipse.hawkbit.ui.utils.UIComponentIdProvider; import org.eclipse.hawkbit.ui.utils.UIComponentIdProvider;
import org.eclipse.hawkbit.ui.utils.UINotification; import org.eclipse.hawkbit.ui.utils.UINotification;
@@ -170,7 +169,7 @@ public class DistributionSetFilterDropAreaSupport implements HeaderSupport {
currentDsFilterInfo.removeAllComponents(); currentDsFilterInfo.removeAllComponents();
currentDsFilterInfo.setSizeUndefined(); currentDsFilterInfo.setSizeUndefined();
targetGridLayoutUiState.setFilterDsIdNameVersion(null); targetGridLayoutUiState.setFilterDsInfo(null);
} }
private static String sanitizeDsNameVersion(final String dsNameAndVersion) { private static String sanitizeDsNameVersion(final String dsNameAndVersion) {
@@ -182,7 +181,7 @@ public class DistributionSetFilterDropAreaSupport implements HeaderSupport {
} }
private void updateUiState(final ProxyDistributionSet ds) { private void updateUiState(final ProxyDistributionSet ds) {
targetGridLayoutUiState.setFilterDsIdNameVersion(ds.getIdNameVersion()); targetGridLayoutUiState.setFilterDsInfo(ds.getInfo());
} }
private void addDropStylingListener() { private void addDropStylingListener() {
@@ -204,11 +203,8 @@ public class DistributionSetFilterDropAreaSupport implements HeaderSupport {
@Override @Override
public void restoreState() { public void restoreState() {
if (targetGridLayoutUiState.getFilterDsIdNameVersion() != null) { if (targetGridLayoutUiState.getFilterDsInfo() != null) {
final String dsNameVersion = HawkbitCommonUtil.getFormattedNameVersion( addDsFilterDropAreaTextField(targetGridLayoutUiState.getFilterDsInfo().getNameVersion());
targetGridLayoutUiState.getFilterDsIdNameVersion().getName(),
targetGridLayoutUiState.getFilterDsIdNameVersion().getVersion());
addDsFilterDropAreaTextField(dsNameVersion);
} }
} }

View File

@@ -16,6 +16,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import com.vaadin.data.provider.DataProvider; import com.vaadin.data.provider.DataProvider;
import com.vaadin.data.provider.ListDataProvider;
import com.vaadin.icons.VaadinIcons; import com.vaadin.icons.VaadinIcons;
import com.vaadin.server.ExternalResource; import com.vaadin.server.ExternalResource;
import com.vaadin.server.Resource; import com.vaadin.server.Resource;
@@ -187,7 +188,7 @@ public final class SPUIComponentProvider {
} }
/** /**
* Create generic combobox. * Create generic combobox with backend data provider.
* *
* @param id * @param id
* id of the combobox * id of the combobox
@@ -209,6 +210,16 @@ public final class SPUIComponentProvider {
public static <T> ComboBox<T> getComboBox(final String id, final String caption, final String description, public static <T> ComboBox<T> getComboBox(final String id, final String caption, final String description,
final String placeholder, final boolean isEmptySelectionAllowed, final String placeholder, final boolean isEmptySelectionAllowed,
final ItemCaptionGenerator<T> itemCaptionGenerator, final DataProvider<T, String> dataProvider) { final ItemCaptionGenerator<T> itemCaptionGenerator, final DataProvider<T, String> dataProvider) {
final ComboBox<T> comboBox = getComboBox(id, caption, description, placeholder, isEmptySelectionAllowed,
itemCaptionGenerator);
comboBox.setDataProvider(dataProvider);
return comboBox;
}
private static <T> ComboBox<T> getComboBox(final String id, final String caption, final String description,
final String placeholder, final boolean isEmptySelectionAllowed,
final ItemCaptionGenerator<T> itemCaptionGenerator) {
final ComboBox<T> comboBox = new ComboBox<>(); final ComboBox<T> comboBox = new ComboBox<>();
comboBox.setId(id); comboBox.setId(id);
comboBox.setCaption(caption); comboBox.setCaption(caption);
@@ -218,6 +229,35 @@ public final class SPUIComponentProvider {
comboBox.setEmptySelectionAllowed(isEmptySelectionAllowed); comboBox.setEmptySelectionAllowed(isEmptySelectionAllowed);
comboBox.setItemCaptionGenerator(itemCaptionGenerator); comboBox.setItemCaptionGenerator(itemCaptionGenerator);
return comboBox;
}
/**
* Create generic combobox with list in-memory data provider.
*
* @param id
* id of the combobox
* @param caption
* caption of the combobox
* @param description
* description of the combobox
* @param placeholder
* placeholder of the combobox
* @param isEmptySelectionAllowed
* flag for empty selection enabled
* @param itemCaptionGenerator
* generator fot item captions
* @param dataProvider
* provides data/items
*
* @return generic ComboBox
*/
public static <T> ComboBox<T> getComboBox(final String id, final String caption, final String description,
final String placeholder, final boolean isEmptySelectionAllowed,
final ItemCaptionGenerator<T> itemCaptionGenerator, final ListDataProvider<T> dataProvider) {
final ComboBox<T> comboBox = getComboBox(id, caption, description, placeholder, isEmptySelectionAllowed,
itemCaptionGenerator);
comboBox.setDataProvider(dataProvider); comboBox.setDataProvider(dataProvider);
return comboBox; return comboBox;

View File

@@ -47,19 +47,19 @@ public class AutoAssignmentWindowController
* Constructor for AutoAssignmentWindowController * Constructor for AutoAssignmentWindowController
* *
* @param i18n * @param i18n
* VaadinMessageSource * VaadinMessageSource
* @param entityFactory * @param entityFactory
* EntityFactory * EntityFactory
* @param eventBus * @param eventBus
* UIEventBus * UIEventBus
* @param uiNotification * @param uiNotification
* UINotification * UINotification
* @param targetManagement * @param targetManagement
* TargetManagement * TargetManagement
* @param targetFilterQueryManagement * @param targetFilterQueryManagement
* TargetFilterQueryManagement * TargetFilterQueryManagement
* @param layout * @param layout
* AutoAssignmentWindowLayout * AutoAssignmentWindowLayout
*/ */
public AutoAssignmentWindowController(final VaadinMessageSource i18n, final UIEventBus eventBus, public AutoAssignmentWindowController(final VaadinMessageSource i18n, final UIEventBus eventBus,
final UINotification uiNotification, final EntityFactory entityFactory, final UINotification uiNotification, final EntityFactory entityFactory,
@@ -88,14 +88,14 @@ public class AutoAssignmentWindowController
autoAssignmentFilter.setId(proxyEntity.getId()); autoAssignmentFilter.setId(proxyEntity.getId());
autoAssignmentFilter.setQuery(proxyEntity.getQuery()); autoAssignmentFilter.setQuery(proxyEntity.getQuery());
if (proxyEntity.getAutoAssignDsIdNameVersion() != null) { if (proxyEntity.getDistributionSetInfo() != null) {
autoAssignmentFilter.setAutoAssignmentEnabled(true); autoAssignmentFilter.setAutoAssignmentEnabled(true);
autoAssignmentFilter.setAutoAssignActionType(proxyEntity.getAutoAssignActionType()); autoAssignmentFilter.setAutoAssignActionType(proxyEntity.getAutoAssignActionType());
autoAssignmentFilter.setAutoAssignDsIdNameVersion(proxyEntity.getAutoAssignDsIdNameVersion()); autoAssignmentFilter.setDistributionSetInfo(proxyEntity.getDistributionSetInfo());
} else { } else {
autoAssignmentFilter.setAutoAssignmentEnabled(false); autoAssignmentFilter.setAutoAssignmentEnabled(false);
autoAssignmentFilter.setAutoAssignActionType(ActionType.FORCED); autoAssignmentFilter.setAutoAssignActionType(ActionType.FORCED);
autoAssignmentFilter.setAutoAssignDsIdNameVersion(null); autoAssignmentFilter.setDistributionSetInfo(null);
} }
return autoAssignmentFilter; return autoAssignmentFilter;
@@ -108,8 +108,8 @@ public class AutoAssignmentWindowController
@Override @Override
protected void persistEntity(final ProxyTargetFilterQuery entity) { protected void persistEntity(final ProxyTargetFilterQuery entity) {
if (entity.isAutoAssignmentEnabled() && entity.getAutoAssignDsIdNameVersion() != null) { if (entity.isAutoAssignmentEnabled() && entity.getDistributionSetInfo() != null) {
final Long autoAssignDsId = entity.getAutoAssignDsIdNameVersion().getId(); final Long autoAssignDsId = entity.getDistributionSetInfo().getId();
final Long targetsForAutoAssignmentCount = targetManagement.countByRsqlAndNonDS(autoAssignDsId, final Long targetsForAutoAssignmentCount = targetManagement.countByRsqlAndNonDS(autoAssignDsId,
entity.getQuery()); entity.getQuery());
@@ -155,7 +155,7 @@ public class AutoAssignmentWindowController
@Override @Override
protected boolean isEntityValid(final ProxyTargetFilterQuery entity) { protected boolean isEntityValid(final ProxyTargetFilterQuery entity) {
if (entity.isAutoAssignmentEnabled() if (entity.isAutoAssignmentEnabled()
&& (entity.getAutoAssignActionType() == null || entity.getAutoAssignDsIdNameVersion() == null)) { && (entity.getAutoAssignActionType() == null || entity.getDistributionSetInfo() == null)) {
uiNotification.displayValidationError( uiNotification.displayValidationError(
i18n.getMessage(UIMessageIdProvider.MESSAGE_AUTOASSIGN_CREATE_ERROR_MISSINGELEMENTS)); i18n.getMessage(UIMessageIdProvider.MESSAGE_AUTOASSIGN_CREATE_ERROR_MISSINGELEMENTS));
return false; return false;

View File

@@ -18,7 +18,6 @@ import org.eclipse.hawkbit.ui.common.builder.GridComponentBuilder;
import org.eclipse.hawkbit.ui.common.builder.StatusIconBuilder.ActionTypeIconSupplier; import org.eclipse.hawkbit.ui.common.builder.StatusIconBuilder.ActionTypeIconSupplier;
import org.eclipse.hawkbit.ui.common.data.mappers.TargetFilterQueryToProxyTargetFilterMapper; import org.eclipse.hawkbit.ui.common.data.mappers.TargetFilterQueryToProxyTargetFilterMapper;
import org.eclipse.hawkbit.ui.common.data.providers.TargetFilterQueryDataProvider; import org.eclipse.hawkbit.ui.common.data.providers.TargetFilterQueryDataProvider;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyIdNameVersion;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyIdentifiableEntity; import org.eclipse.hawkbit.ui.common.data.proxies.ProxyIdentifiableEntity;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyTargetFilterQuery; import org.eclipse.hawkbit.ui.common.data.proxies.ProxyTargetFilterQuery;
import org.eclipse.hawkbit.ui.common.event.CommandTopics; import org.eclipse.hawkbit.ui.common.event.CommandTopics;
@@ -33,7 +32,6 @@ import org.eclipse.hawkbit.ui.common.grid.AbstractGrid;
import org.eclipse.hawkbit.ui.common.grid.support.DeleteSupport; import org.eclipse.hawkbit.ui.common.grid.support.DeleteSupport;
import org.eclipse.hawkbit.ui.common.grid.support.FilterSupport; import org.eclipse.hawkbit.ui.common.grid.support.FilterSupport;
import org.eclipse.hawkbit.ui.filtermanagement.state.TargetFilterGridLayoutUiState; import org.eclipse.hawkbit.ui.filtermanagement.state.TargetFilterGridLayoutUiState;
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
import org.eclipse.hawkbit.ui.utils.UIComponentIdProvider; import org.eclipse.hawkbit.ui.utils.UIComponentIdProvider;
import org.eclipse.hawkbit.ui.utils.UIMessageIdProvider; import org.eclipse.hawkbit.ui.utils.UIMessageIdProvider;
import org.eclipse.hawkbit.ui.utils.UINotification; import org.eclipse.hawkbit.ui.utils.UINotification;
@@ -185,6 +183,24 @@ public class TargetFilterGrid extends AbstractGrid<ProxyTargetFilterQuery, Strin
new ShowFormEventPayload<ProxyTargetFilterQuery>(FormType.EDIT, targetFilter, EventView.TARGET_FILTER)); new ShowFormEventPayload<ProxyTargetFilterQuery>(FormType.EDIT, targetFilter, EventView.TARGET_FILTER));
} }
private Button buildAutoAssignmentLink(final ProxyTargetFilterQuery targetFilter) {
final String caption;
if (targetFilter.isAutoAssignmentEnabled() && targetFilter.getDistributionSetInfo() != null) {
caption = targetFilter.getDistributionSetInfo().getNameVersion();
} else {
caption = i18n.getMessage(UIMessageIdProvider.BUTTON_NO_AUTO_ASSIGNMENT);
}
final Button link = GridComponentBuilder.buildLink(targetFilter, "distSetButton", caption,
permissionChecker.hasReadRepositoryPermission(),
clickEvent -> onClickOfAutoAssignmentLink(targetFilter));
final String description = i18n.getMessage(UIMessageIdProvider.BUTTON_AUTO_ASSIGNMENT_DESCRIPTION);
link.setDescription(description);
return link;
}
private void onClickOfAutoAssignmentLink(final ProxyTargetFilterQuery targetFilter) { private void onClickOfAutoAssignmentLink(final ProxyTargetFilterQuery targetFilter) {
if (permissionChecker.hasReadRepositoryPermission()) { if (permissionChecker.hasReadRepositoryPermission()) {
final Window autoAssignmentWindow = autoAssignmentWindowBuilder.getWindowForAutoAssignment(targetFilter); final Window autoAssignmentWindow = autoAssignmentWindowBuilder.getWindowForAutoAssignment(targetFilter);
@@ -199,24 +215,4 @@ public class TargetFilterGrid extends AbstractGrid<ProxyTargetFilterQuery, Strin
i18n.getMessage("message.permission.insufficient", SpPermission.READ_REPOSITORY)); i18n.getMessage("message.permission.insufficient", SpPermission.READ_REPOSITORY));
} }
} }
private Button buildAutoAssignmentLink(final ProxyTargetFilterQuery targetFilter) {
final String caption;
if (targetFilter.isAutoAssignmentEnabled()) {
final ProxyIdNameVersion autoAssignDsIdNameVersion = targetFilter.getAutoAssignDsIdNameVersion();
caption = HawkbitCommonUtil.getFormattedNameVersion(autoAssignDsIdNameVersion.getName(),
autoAssignDsIdNameVersion.getVersion());
} else {
caption = i18n.getMessage(UIMessageIdProvider.BUTTON_NO_AUTO_ASSIGNMENT);
}
final Button link = GridComponentBuilder.buildLink(targetFilter, "distSetButton", caption,
permissionChecker.hasReadRepositoryPermission(),
clickEvent -> onClickOfAutoAssignmentLink(targetFilter));
final String description = i18n.getMessage(UIMessageIdProvider.BUTTON_AUTO_ASSIGNMENT_DESCRIPTION);
link.setDescription(description);
return link;
}
} }

View File

@@ -168,9 +168,9 @@ public class BulkUploadHandler implements SucceededListener, FailedListener, Rec
* Constructor for UploadAsync * Constructor for UploadAsync
* *
* @param vaadinSession * @param vaadinSession
* VaadinSession * VaadinSession
* @param vaadinUI * @param vaadinUI
* UI * UI
*/ */
public UploadAsync(final VaadinSession vaadinSession, final UI vaadinUI) { public UploadAsync(final VaadinSession vaadinSession, final UI vaadinUI) {
this.vaadinSession = vaadinSession; this.vaadinSession = vaadinSession;
@@ -296,7 +296,7 @@ public class BulkUploadHandler implements SucceededListener, FailedListener, Rec
private String saveAllAssignments() { private String saveAllAssignments() {
final ActionType actionType = ActionType.FORCED; final ActionType actionType = ActionType.FORCED;
final long forcedTimeStamp = new Date().getTime(); final long forcedTimeStamp = new Date().getTime();
final Long dsId = bulkUploadInputs.getDistributionSetId(); final Long dsId = bulkUploadInputs.getDistributionSetInfo().getId();
if (!distributionSetManagement.get(dsId).isPresent()) { if (!distributionSetManagement.get(dsId).isPresent()) {
return i18n.getMessage("message.bulk.upload.assignment.failed"); return i18n.getMessage("message.bulk.upload.assignment.failed");
@@ -342,7 +342,7 @@ public class BulkUploadHandler implements SucceededListener, FailedListener, Rec
} }
private boolean isDsSelected() { private boolean isDsSelected() {
return bulkUploadInputs.getDistributionSetId() != null; return bulkUploadInputs.getDistributionSetInfo() != null;
} }
private boolean areTargetsCreatedSuccessfully() { private boolean areTargetsCreatedSuccessfully() {

View File

@@ -156,7 +156,7 @@ public class TargetBulkUpdateWindowLayout extends CustomComponent {
private ProxyBulkUploadWindow getBulkUploadInputsBean() { private ProxyBulkUploadWindow getBulkUploadInputsBean() {
final ProxyBulkUploadWindow bean = new ProxyBulkUploadWindow(); final ProxyBulkUploadWindow bean = new ProxyBulkUploadWindow();
bean.setDistributionSetId(binder.getBean().getDistributionSetId()); bean.setDistributionSetInfo(binder.getBean().getDistributionSetInfo());
bean.setTagIdsWithNameToAssign(getTagIdsWithNameToAssign()); bean.setTagIdsWithNameToAssign(getTagIdsWithNameToAssign());
bean.setDescription(binder.getBean().getDescription()); bean.setDescription(binder.getBean().getDescription());
@@ -269,7 +269,7 @@ public class TargetBulkUpdateWindowLayout extends CustomComponent {
* Actions once start of upload * Actions once start of upload
*/ */
public void onStartOfUpload() { public void onStartOfUpload() {
targetBulkUploadUiState.setDsId(binder.getBean().getDistributionSetId()); targetBulkUploadUiState.setDsInfo(binder.getBean().getDistributionSetInfo());
targetBulkUploadUiState.setTagIdsWithNameToAssign(getTagIdsWithNameToAssign()); targetBulkUploadUiState.setTagIdsWithNameToAssign(getTagIdsWithNameToAssign());
targetBulkUploadUiState.setDescription(binder.getBean().getDescription()); targetBulkUploadUiState.setDescription(binder.getBean().getDescription());
@@ -377,7 +377,7 @@ public class TargetBulkUpdateWindowLayout extends CustomComponent {
* Reset target bulk upload ui state * Reset target bulk upload ui state
*/ */
public void clearUiState() { public void clearUiState() {
targetBulkUploadUiState.setDsId(null); targetBulkUploadUiState.setDsInfo(null);
targetBulkUploadUiState.getTagIdsWithNameToAssign().clear(); targetBulkUploadUiState.getTagIdsWithNameToAssign().clear();
targetBulkUploadUiState.setDescription(null); targetBulkUploadUiState.setDescription(null);
} }
@@ -387,7 +387,7 @@ public class TargetBulkUpdateWindowLayout extends CustomComponent {
*/ */
public void restoreComponentsValue() { public void restoreComponentsValue() {
final ProxyBulkUploadWindow bulkUploadInputsToRestore = new ProxyBulkUploadWindow(); final ProxyBulkUploadWindow bulkUploadInputsToRestore = new ProxyBulkUploadWindow();
bulkUploadInputsToRestore.setDistributionSetId(targetBulkUploadUiState.getDsId()); bulkUploadInputsToRestore.setDistributionSetInfo(targetBulkUploadUiState.getDsInfo());
bulkUploadInputsToRestore.setDescription(targetBulkUploadUiState.getDescription()); bulkUploadInputsToRestore.setDescription(targetBulkUploadUiState.getDescription());
bulkUploadInputsToRestore.setTagIdsWithNameToAssign(targetBulkUploadUiState.getTagIdsWithNameToAssign()); bulkUploadInputsToRestore.setTagIdsWithNameToAssign(targetBulkUploadUiState.getTagIdsWithNameToAssign());

View File

@@ -12,6 +12,8 @@ import java.io.Serializable;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyDistributionSetInfo;
/** /**
* Target bulk upload ui state * Target bulk upload ui state
*/ */
@@ -20,7 +22,7 @@ public class TargetBulkUploadUiState implements Serializable {
private boolean isInProgress; private boolean isInProgress;
private Long dsId; private ProxyDistributionSetInfo dsInfo;
private final Map<Long, String> tagIdsWithNameToAssign = new HashMap<>(); private final Map<Long, String> tagIdsWithNameToAssign = new HashMap<>();
private String description; private String description;
@@ -35,27 +37,27 @@ public class TargetBulkUploadUiState implements Serializable {
* Sets the upload progress * Sets the upload progress
* *
* @param isInProgress * @param isInProgress
* boolean * boolean
*/ */
public void setInProgress(final boolean isInProgress) { public void setInProgress(final boolean isInProgress) {
this.isInProgress = isInProgress; this.isInProgress = isInProgress;
} }
/** /**
* @return Distribution set id * @return Distribution set info
*/ */
public Long getDsId() { public ProxyDistributionSetInfo getDsInfo() {
return dsId; return dsInfo;
} }
/** /**
* Sets the distribution set id * Sets the distribution set info
* *
* @param dsId * @param dsInfo
* Id * Info of distribution set
*/ */
public void setDsId(final Long dsId) { public void setDsInfo(final ProxyDistributionSetInfo dsInfo) {
this.dsId = dsId; this.dsInfo = dsInfo;
} }
/** /**
@@ -69,7 +71,7 @@ public class TargetBulkUploadUiState implements Serializable {
* Sets the Tag ids with name * Sets the Tag ids with name
* *
* @param tagIdsWithNameToAssign * @param tagIdsWithNameToAssign
* Tag ids with name * Tag ids with name
*/ */
public void setTagIdsWithNameToAssign(final Map<Long, String> tagIdsWithNameToAssign) { public void setTagIdsWithNameToAssign(final Map<Long, String> tagIdsWithNameToAssign) {
this.tagIdsWithNameToAssign.clear(); this.tagIdsWithNameToAssign.clear();
@@ -87,7 +89,7 @@ public class TargetBulkUploadUiState implements Serializable {
* Sets the description of target bulk upload * Sets the description of target bulk upload
* *
* @param description * @param description
* Description * Description
*/ */
public void setDescription(final String description) { public void setDescription(final String description) {
this.description = description; this.description = description;

View File

@@ -273,8 +273,7 @@ public class TargetGrid extends AbstractGrid<ProxyTarget, TargetManagementFilter
getFilterSupport().addMapping(FilterType.QUERY, TargetManagementFilterParams::setTargetFilterQueryId, getFilterSupport().addMapping(FilterType.QUERY, TargetManagementFilterParams::setTargetFilterQueryId,
targetTagFilterLayoutUiState.getClickedTargetFilterQueryId()); targetTagFilterLayoutUiState.getClickedTargetFilterQueryId());
getFilterSupport().addMapping(FilterType.DISTRIBUTION, TargetManagementFilterParams::setDistributionId, getFilterSupport().addMapping(FilterType.DISTRIBUTION, TargetManagementFilterParams::setDistributionId,
targetGridLayoutUiState.getFilterDsIdNameVersion() != null targetGridLayoutUiState.getFilterDsInfo() != null ? targetGridLayoutUiState.getFilterDsInfo().getId()
? targetGridLayoutUiState.getFilterDsIdNameVersion().getId()
: null); : null);
} }

View File

@@ -151,7 +151,7 @@ public class TargetGridHeader extends AbstractEntityGridHeader {
bulkUploadWindowBuilder.restoreState(); bulkUploadWindowBuilder.restoreState();
} }
if (targetGridLayoutUiState.getFilterDsIdNameVersion() != null) { if (targetGridLayoutUiState.getFilterDsInfo() != null) {
distributionSetFilterDropAreaSupport.restoreState(); distributionSetFilterDropAreaSupport.restoreState();
} }
} }
@@ -198,7 +198,7 @@ public class TargetGridHeader extends AbstractEntityGridHeader {
* Perform tasks on bulk upload state * Perform tasks on bulk upload state
* *
* @param eventPayload * @param eventPayload
* BulkUploadEventPayload * BulkUploadEventPayload
*/ */
public void onBulkUploadChanged(final BulkUploadEventPayload eventPayload) { public void onBulkUploadChanged(final BulkUploadEventPayload eventPayload) {
bulkUploadWindowBuilder.getLayout() bulkUploadWindowBuilder.getLayout()

View File

@@ -8,7 +8,7 @@
*/ */
package org.eclipse.hawkbit.ui.management.targettable; package org.eclipse.hawkbit.ui.management.targettable;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyIdNameVersion; import org.eclipse.hawkbit.ui.common.data.proxies.ProxyDistributionSetInfo;
import org.eclipse.hawkbit.ui.common.state.GridLayoutUiState; import org.eclipse.hawkbit.ui.common.state.GridLayoutUiState;
/** /**
@@ -19,7 +19,7 @@ public class TargetGridLayoutUiState extends GridLayoutUiState {
private Long pinnedTargetId; private Long pinnedTargetId;
private String pinnedControllerId; private String pinnedControllerId;
private ProxyIdNameVersion filterDsIdNameVersion; private ProxyDistributionSetInfo filterDsInfo;
/** /**
* @return Pinned controller id * @return Pinned controller id
@@ -32,7 +32,7 @@ public class TargetGridLayoutUiState extends GridLayoutUiState {
* Sets the pinned controller id * Sets the pinned controller id
* *
* @param pinnedControllerId * @param pinnedControllerId
* Id * Id
*/ */
public void setPinnedControllerId(final String pinnedControllerId) { public void setPinnedControllerId(final String pinnedControllerId) {
this.pinnedControllerId = pinnedControllerId; this.pinnedControllerId = pinnedControllerId;
@@ -49,7 +49,7 @@ public class TargetGridLayoutUiState extends GridLayoutUiState {
* Sets the pinned target id * Sets the pinned target id
* *
* @param pinnedTargetId * @param pinnedTargetId
* Id * Id
*/ */
public void setPinnedTargetId(final Long pinnedTargetId) { public void setPinnedTargetId(final Long pinnedTargetId) {
this.pinnedTargetId = pinnedTargetId; this.pinnedTargetId = pinnedTargetId;
@@ -58,17 +58,17 @@ public class TargetGridLayoutUiState extends GridLayoutUiState {
/** /**
* @return filter distribution set id name and version * @return filter distribution set id name and version
*/ */
public ProxyIdNameVersion getFilterDsIdNameVersion() { public ProxyDistributionSetInfo getFilterDsInfo() {
return filterDsIdNameVersion; return filterDsInfo;
} }
/** /**
* Sets the filter distribution set id name and version * Sets the filter distribution set id name and version
* *
* @param filterDsIdNameVersion * @param dsInfo
* ProxyIdNameVersion * ProxyDistributionSetInfo
*/ */
public void setFilterDsIdNameVersion(final ProxyIdNameVersion filterDsIdNameVersion) { public void setFilterDsInfo(final ProxyDistributionSetInfo dsInfo) {
this.filterDsIdNameVersion = filterDsIdNameVersion; this.filterDsInfo = dsInfo;
} }
} }

View File

@@ -268,7 +268,7 @@ public class RolloutGrid extends AbstractGrid<ProxyRollout, String> {
GridComponentBuilder.addDescriptionColumn(this, i18n, DESC_ID).setHidable(true).setHidden(true); GridComponentBuilder.addDescriptionColumn(this, i18n, DESC_ID).setHidable(true).setHidden(true);
GridComponentBuilder.addColumn(this, ProxyRollout::getDistributionSetNameVersion).setId(DIST_NAME_VERSION_ID) GridComponentBuilder.addColumn(this, ProxyRollout::getDsNameVersion).setId(DIST_NAME_VERSION_ID)
.setCaption(i18n.getMessage("header.distributionset")).setHidable(true).setExpandRatio(2); .setCaption(i18n.getMessage("header.distributionset")).setHidable(true).setExpandRatio(2);
GridComponentBuilder GridComponentBuilder

View File

@@ -20,6 +20,7 @@ import org.eclipse.hawkbit.ui.common.data.proxies.ProxyAdvancedRolloutGroup;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyRollout; import org.eclipse.hawkbit.ui.common.data.proxies.ProxyRollout;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyRolloutWindow; import org.eclipse.hawkbit.ui.common.data.proxies.ProxyRolloutWindow;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyRolloutWindow.GroupDefinitionMode; import org.eclipse.hawkbit.ui.common.data.proxies.ProxyRolloutWindow.GroupDefinitionMode;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyTargetFilterQueryInfo;
import org.eclipse.hawkbit.ui.rollout.window.RolloutWindowDependencies; import org.eclipse.hawkbit.ui.rollout.window.RolloutWindowDependencies;
import org.eclipse.hawkbit.ui.rollout.window.components.AutoStartOptionGroupLayout.AutoStartOption; import org.eclipse.hawkbit.ui.rollout.window.components.AutoStartOptionGroupLayout.AutoStartOption;
import org.eclipse.hawkbit.ui.rollout.window.layouts.AddRolloutWindowLayout; import org.eclipse.hawkbit.ui.rollout.window.layouts.AddRolloutWindowLayout;
@@ -87,7 +88,9 @@ public class CopyRolloutWindowController extends AddRolloutWindowController {
final Page<TargetFilterQuery> filterQueries = targetFilterQueryManagement.findByQuery(PageRequest.of(0, 1), final Page<TargetFilterQuery> filterQueries = targetFilterQueryManagement.findByQuery(PageRequest.of(0, 1),
proxyRolloutWindow.getTargetFilterQuery()); proxyRolloutWindow.getTargetFilterQuery());
if (filterQueries.getTotalElements() > 0) { if (filterQueries.getTotalElements() > 0) {
proxyRolloutWindow.setTargetFilterId(filterQueries.getContent().get(0).getId()); final TargetFilterQuery tfq = filterQueries.getContent().get(0);
proxyRolloutWindow
.setTargetFilterInfo(new ProxyTargetFilterQueryInfo(tfq.getId(), tfq.getName(), tfq.getQuery()));
} }
} }

View File

@@ -10,12 +10,13 @@ package org.eclipse.hawkbit.ui.tenantconfiguration;
import org.eclipse.hawkbit.repository.DistributionSetTypeManagement; import org.eclipse.hawkbit.repository.DistributionSetTypeManagement;
import org.eclipse.hawkbit.repository.SystemManagement; import org.eclipse.hawkbit.repository.SystemManagement;
import org.eclipse.hawkbit.repository.model.DistributionSetType;
import org.eclipse.hawkbit.ui.SpPermissionChecker; import org.eclipse.hawkbit.ui.SpPermissionChecker;
import org.eclipse.hawkbit.ui.common.builder.LabelBuilder; import org.eclipse.hawkbit.ui.common.builder.LabelBuilder;
import org.eclipse.hawkbit.ui.common.data.mappers.TypeToProxyTypeMapper; import org.eclipse.hawkbit.ui.common.data.mappers.TypeToTypeInfoMapper;
import org.eclipse.hawkbit.ui.common.data.providers.DistributionSetTypeDataProvider; import org.eclipse.hawkbit.ui.common.data.providers.DistributionSetTypeDataProvider;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxySystemConfigWindow; import org.eclipse.hawkbit.ui.common.data.proxies.ProxySystemConfigWindow;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyType; import org.eclipse.hawkbit.ui.common.data.proxies.ProxyTypeInfo;
import org.eclipse.hawkbit.ui.tenantconfiguration.window.SystemConfigWindowDependencies; import org.eclipse.hawkbit.ui.tenantconfiguration.window.SystemConfigWindowDependencies;
import org.eclipse.hawkbit.ui.tenantconfiguration.window.SystemConfigWindowLayoutComponentBuilder; import org.eclipse.hawkbit.ui.tenantconfiguration.window.SystemConfigWindowLayoutComponentBuilder;
import org.eclipse.hawkbit.ui.utils.VaadinMessageSource; import org.eclipse.hawkbit.ui.utils.VaadinMessageSource;
@@ -41,7 +42,7 @@ public class DefaultDistributionSetTypeLayout extends CustomComponent {
private final SpPermissionChecker permissionChecker; private final SpPermissionChecker permissionChecker;
private Long currentDefaultDistSetTypeId; private Long currentDefaultDistSetTypeId;
private ComboBox<ProxyType> dsSetTypeComboBox = new ComboBox<>(); private ComboBox<ProxyTypeInfo> dsSetTypeComboBox;
private final Binder<ProxySystemConfigWindow> binder; private final Binder<ProxySystemConfigWindow> binder;
private final transient SystemConfigWindowLayoutComponentBuilder builder; private final transient SystemConfigWindowLayoutComponentBuilder builder;
private Label changeIcon; private Label changeIcon;
@@ -52,8 +53,8 @@ public class DefaultDistributionSetTypeLayout extends CustomComponent {
this.i18n = i18n; this.i18n = i18n;
this.permissionChecker = permChecker; this.permissionChecker = permChecker;
this.binder = binder; this.binder = binder;
final DistributionSetTypeDataProvider<ProxyType> dataProvider = new DistributionSetTypeDataProvider<>( final DistributionSetTypeDataProvider<ProxyTypeInfo> dataProvider = new DistributionSetTypeDataProvider<>(
dsTypeManagement, new TypeToProxyTypeMapper<>()); dsTypeManagement, new TypeToTypeInfoMapper<DistributionSetType>());
final SystemConfigWindowDependencies dependencies = new SystemConfigWindowDependencies(systemManagement, i18n, final SystemConfigWindowDependencies dependencies = new SystemConfigWindowDependencies(systemManagement, i18n,
permChecker, dsTypeManagement, dataProvider); permChecker, dsTypeManagement, dataProvider);
this.builder = new SystemConfigWindowLayoutComponentBuilder(dependencies); this.builder = new SystemConfigWindowLayoutComponentBuilder(dependencies);
@@ -105,7 +106,7 @@ public class DefaultDistributionSetTypeLayout extends CustomComponent {
} }
private Long getCurrentDistributionSetTypeId() { private Long getCurrentDistributionSetTypeId() {
return binder.getBean().getDistributionSetTypeId(); return binder.getBean().getDsTypeInfo().getId();
} }
/** /**
@@ -113,7 +114,7 @@ public class DefaultDistributionSetTypeLayout extends CustomComponent {
* *
* @param event * @param event
*/ */
private void selectDistributionSetTypeValue(final HasValue.ValueChangeEvent<ProxyType> event) { private void selectDistributionSetTypeValue(final HasValue.ValueChangeEvent<ProxyTypeInfo> event) {
changeIcon.setVisible(!event.getValue().getId().equals(currentDefaultDistSetTypeId)); changeIcon.setVisible(!event.getValue().getId().equals(currentDefaultDistSetTypeId));
} }

View File

@@ -28,6 +28,7 @@ import org.eclipse.hawkbit.repository.SystemManagement;
import org.eclipse.hawkbit.repository.TenantConfigurationManagement; import org.eclipse.hawkbit.repository.TenantConfigurationManagement;
import org.eclipse.hawkbit.repository.model.Action; import org.eclipse.hawkbit.repository.model.Action;
import org.eclipse.hawkbit.repository.model.Action.Status; import org.eclipse.hawkbit.repository.model.Action.Status;
import org.eclipse.hawkbit.repository.model.DistributionSetType;
import org.eclipse.hawkbit.repository.model.TenantConfigurationValue; import org.eclipse.hawkbit.repository.model.TenantConfigurationValue;
import org.eclipse.hawkbit.security.SecurityTokenGenerator; import org.eclipse.hawkbit.security.SecurityTokenGenerator;
import org.eclipse.hawkbit.tenancy.configuration.DurationHelper; import org.eclipse.hawkbit.tenancy.configuration.DurationHelper;
@@ -35,6 +36,7 @@ import org.eclipse.hawkbit.tenancy.configuration.TenantConfigurationProperties.T
import org.eclipse.hawkbit.ui.AbstractHawkbitUI; import org.eclipse.hawkbit.ui.AbstractHawkbitUI;
import org.eclipse.hawkbit.ui.SpPermissionChecker; import org.eclipse.hawkbit.ui.SpPermissionChecker;
import org.eclipse.hawkbit.ui.UiProperties; import org.eclipse.hawkbit.ui.UiProperties;
import org.eclipse.hawkbit.ui.common.data.mappers.TypeToTypeInfoMapper;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxySystemConfigWindow; import org.eclipse.hawkbit.ui.common.data.proxies.ProxySystemConfigWindow;
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider; import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleNoBorder; import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleNoBorder;
@@ -169,7 +171,8 @@ public class TenantConfigurationDashboardView extends CustomComponent implements
private ProxySystemConfigWindow populateAndGetSystemConfig() { private ProxySystemConfigWindow populateAndGetSystemConfig() {
final ProxySystemConfigWindow configBean = new ProxySystemConfigWindow(); final ProxySystemConfigWindow configBean = new ProxySystemConfigWindow();
configBean.setDistributionSetTypeId(systemManagement.getTenantMetadata().getDefaultDsType().getId()); configBean.setDsTypeInfo(new TypeToTypeInfoMapper<DistributionSetType>()
.map(systemManagement.getTenantMetadata().getDefaultDsType()));
configBean.setRolloutApproval(readConfigOption(TenantConfigurationKey.ROLLOUT_APPROVAL_ENABLED)); configBean.setRolloutApproval(readConfigOption(TenantConfigurationKey.ROLLOUT_APPROVAL_ENABLED));
configBean.setActionAutoclose(readConfigOption(TenantConfigurationKey.REPOSITORY_ACTIONS_AUTOCLOSE_ENABLED)); configBean.setActionAutoclose(readConfigOption(TenantConfigurationKey.REPOSITORY_ACTIONS_AUTOCLOSE_ENABLED));
configBean.setMultiAssignments(readConfigOption(TenantConfigurationKey.MULTI_ASSIGNMENTS_ENABLED)); configBean.setMultiAssignments(readConfigOption(TenantConfigurationKey.MULTI_ASSIGNMENTS_ENABLED));
@@ -263,7 +266,7 @@ public class TenantConfigurationDashboardView extends CustomComponent implements
private void saveSystemConfigBean() { private void saveSystemConfigBean() {
final ProxySystemConfigWindow configWindowBean = binder.getBean(); final ProxySystemConfigWindow configWindowBean = binder.getBean();
systemManagement.updateTenantMetadata(configWindowBean.getDistributionSetTypeId()); systemManagement.updateTenantMetadata(configWindowBean.getDsTypeInfo().getId());
writeConfigOption(TenantConfigurationKey.ROLLOUT_APPROVAL_ENABLED, configWindowBean.isRolloutApproval()); writeConfigOption(TenantConfigurationKey.ROLLOUT_APPROVAL_ENABLED, configWindowBean.isRolloutApproval());
writeConfigOption(TenantConfigurationKey.ACTION_CLEANUP_ENABLED, configWindowBean.isActionAutocleanup()); writeConfigOption(TenantConfigurationKey.ACTION_CLEANUP_ENABLED, configWindowBean.isActionAutocleanup());
writeConfigOption(TenantConfigurationKey.AUTHENTICATION_MODE_TARGET_SECURITY_TOKEN_ENABLED, writeConfigOption(TenantConfigurationKey.AUTHENTICATION_MODE_TARGET_SECURITY_TOKEN_ENABLED,

View File

@@ -25,6 +25,7 @@ import org.eclipse.hawkbit.ui.utils.VaadinMessageSource;
import com.vaadin.data.Binder; import com.vaadin.data.Binder;
import com.vaadin.data.ValidationResult; import com.vaadin.data.ValidationResult;
import com.vaadin.data.provider.DataProvider;
import com.vaadin.data.validator.IntegerRangeValidator; import com.vaadin.data.validator.IntegerRangeValidator;
import com.vaadin.ui.ComboBox; import com.vaadin.ui.ComboBox;
import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.HorizontalLayout;
@@ -77,14 +78,12 @@ public class ActionAutoCleanupConfigurationItem extends VerticalLayout {
container.setSpacing(false); container.setSpacing(false);
container.setMargin(false); container.setMargin(false);
final HorizontalLayout row1 = newHorizontalLayout(); final HorizontalLayout row1 = newHorizontalLayout();
actionStatusCombobox = new ComboBox<>(); actionStatusCombobox = SPUIComponentProvider.getComboBox(
actionStatusCombobox.setDescription("label.combobox.action.status.options"); UIComponentIdProvider.SYSTEM_CONFIGURATION_ACTION_CLEANUP_ACTION_TYPES, null, null, null, false,
actionStatusCombobox.setId(UIComponentIdProvider.SYSTEM_CONFIGURATION_ACTION_CLEANUP_ACTION_TYPES); ActionStatusOption::getName, DataProvider.ofCollection(ACTION_STATUS_OPTIONS));
actionStatusCombobox.removeStyleName(ValoTheme.COMBOBOX_SMALL);
actionStatusCombobox.addStyleName(ValoTheme.COMBOBOX_TINY); actionStatusCombobox.addStyleName(ValoTheme.COMBOBOX_TINY);
actionStatusCombobox.setWidth(200.0F, Unit.PIXELS); actionStatusCombobox.setWidth(200.0F, Unit.PIXELS);
actionStatusCombobox.setEmptySelectionAllowed(false);
actionStatusCombobox.setItems(ACTION_STATUS_OPTIONS);
actionStatusCombobox.setItemCaptionGenerator(ActionStatusOption::getName);
binder.bind(actionStatusCombobox, ProxySystemConfigWindow::getActionCleanupStatus, binder.bind(actionStatusCombobox, ProxySystemConfigWindow::getActionCleanupStatus,
ProxySystemConfigWindow::setActionCleanupStatus); ProxySystemConfigWindow::setActionCleanupStatus);
actionExpiryInput = new TextFieldBuilder(TenantConfiguration.VALUE_MAX_SIZE).buildTextComponent(); actionExpiryInput = new TextFieldBuilder(TenantConfiguration.VALUE_MAX_SIZE).buildTextComponent();

View File

@@ -12,7 +12,7 @@ import org.eclipse.hawkbit.repository.DistributionSetTypeManagement;
import org.eclipse.hawkbit.repository.SystemManagement; import org.eclipse.hawkbit.repository.SystemManagement;
import org.eclipse.hawkbit.ui.SpPermissionChecker; import org.eclipse.hawkbit.ui.SpPermissionChecker;
import org.eclipse.hawkbit.ui.common.data.providers.DistributionSetTypeDataProvider; import org.eclipse.hawkbit.ui.common.data.providers.DistributionSetTypeDataProvider;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyType; import org.eclipse.hawkbit.ui.common.data.proxies.ProxyTypeInfo;
import org.eclipse.hawkbit.ui.utils.VaadinMessageSource; import org.eclipse.hawkbit.ui.utils.VaadinMessageSource;
/** /**
@@ -24,7 +24,7 @@ public class SystemConfigWindowDependencies {
private final VaadinMessageSource i18n; private final VaadinMessageSource i18n;
private final SpPermissionChecker permissionChecker; private final SpPermissionChecker permissionChecker;
private final DistributionSetTypeManagement distributionSetTypeManagement; private final DistributionSetTypeManagement distributionSetTypeManagement;
private final DistributionSetTypeDataProvider<ProxyType> distributionSetTypeDataProvider; private final DistributionSetTypeDataProvider<ProxyTypeInfo> distributionSetTypeDataProvider;
/** /**
* Constructor for VaadinMessageSource * Constructor for VaadinMessageSource
@@ -43,7 +43,7 @@ public class SystemConfigWindowDependencies {
public SystemConfigWindowDependencies(final SystemManagement systemManagement, final VaadinMessageSource i18n, public SystemConfigWindowDependencies(final SystemManagement systemManagement, final VaadinMessageSource i18n,
final SpPermissionChecker permissionChecker, final SpPermissionChecker permissionChecker,
final DistributionSetTypeManagement distributionSetTypeManagement, final DistributionSetTypeManagement distributionSetTypeManagement,
final DistributionSetTypeDataProvider<ProxyType> distributionSetTypeDataProvider) { final DistributionSetTypeDataProvider<ProxyTypeInfo> distributionSetTypeDataProvider) {
this.systemManagement = systemManagement; this.systemManagement = systemManagement;
this.i18n = i18n; this.i18n = i18n;
this.permissionChecker = permissionChecker; this.permissionChecker = permissionChecker;
@@ -82,7 +82,7 @@ public class SystemConfigWindowDependencies {
/** /**
* @return Distribution set type data provider * @return Distribution set type data provider
*/ */
public DistributionSetTypeDataProvider<ProxyType> getDistributionSetTypeDataProvider() { public DistributionSetTypeDataProvider<ProxyTypeInfo> getDistributionSetTypeDataProvider() {
return distributionSetTypeDataProvider; return distributionSetTypeDataProvider;
} }
} }

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.ui.tenantconfiguration.window; package org.eclipse.hawkbit.ui.tenantconfiguration.window;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxySystemConfigWindow; import org.eclipse.hawkbit.ui.common.data.proxies.ProxySystemConfigWindow;
import org.eclipse.hawkbit.ui.common.data.proxies.ProxyType; import org.eclipse.hawkbit.ui.common.data.proxies.ProxyTypeInfo;
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider; import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
import org.eclipse.hawkbit.ui.utils.UIComponentIdProvider; import org.eclipse.hawkbit.ui.utils.UIComponentIdProvider;
@@ -42,32 +42,18 @@ public class SystemConfigWindowLayoutComponentBuilder {
* *
* @return Distribution set type combo box * @return Distribution set type combo box
*/ */
public ComboBox<ProxyType> createDistributionSetTypeCombo(final Binder<ProxySystemConfigWindow> binder) { public ComboBox<ProxyTypeInfo> createDistributionSetTypeCombo(final Binder<ProxySystemConfigWindow> binder) {
final ComboBox<ProxyType> distributionSetType = SPUIComponentProvider.getComboBox( final ComboBox<ProxyTypeInfo> dsTypeCombo = SPUIComponentProvider.getComboBox(
UIComponentIdProvider.SYSTEM_CONFIGURATION_DEFAULTDIS_COMBOBOX, null, UIComponentIdProvider.SYSTEM_CONFIGURATION_DEFAULTDIS_COMBOBOX, null,
dependencies.getI18n().getMessage("caption.type"), null, false, ProxyType::getKeyAndName, dependencies.getI18n().getMessage("caption.type"), null, false, ProxyTypeInfo::getKeyAndName,
dependencies.getDistributionSetTypeDataProvider()); dependencies.getDistributionSetTypeDataProvider());
distributionSetType.removeStyleName(ValoTheme.COMBOBOX_SMALL); dsTypeCombo.removeStyleName(ValoTheme.COMBOBOX_SMALL);
distributionSetType.addStyleName(ValoTheme.COMBOBOX_TINY); dsTypeCombo.addStyleName(ValoTheme.COMBOBOX_TINY);
distributionSetType.setWidth(330.0F, Unit.PIXELS); dsTypeCombo.setWidth(330.0F, Unit.PIXELS);
binder.forField(distributionSetType).withConverter(dstType -> { binder.forField(dsTypeCombo).bind(ProxySystemConfigWindow::getDsTypeInfo,
if (dstType == null) { ProxySystemConfigWindow::setDsTypeInfo);
return null;
}
return dstType.getId(); return dsTypeCombo;
}, dstTypeId -> {
if (dstTypeId == null) {
return null;
}
final ProxyType dstType = new ProxyType();
dstType.setId(dstTypeId);
return dstType;
}).bind(ProxySystemConfigWindow::getDistributionSetTypeId, ProxySystemConfigWindow::setDistributionSetTypeId);
return distributionSetType;
} }
} }