Fix for the max assignments.
This commit is contained in:
@@ -70,10 +70,10 @@ public class SoftwareModuleDetails extends AbstractNamedVersionedEntityTableDeta
|
||||
protected void populateDetailsWidget() {
|
||||
String maxAssign = HawkbitCommonUtil.SP_STRING_EMPTY;
|
||||
if (getSelectedBaseEntity() != null) {
|
||||
if (getSelectedBaseEntity().getType().getMaxAssignments() == Integer.MAX_VALUE) {
|
||||
maxAssign = getI18n().get("label.multiAssign.type");
|
||||
} else {
|
||||
if (getSelectedBaseEntity().getType().getMaxAssignments() == 1) {
|
||||
maxAssign = getI18n().get("label.singleAssign.type");
|
||||
} else {
|
||||
maxAssign = getI18n().get("label.multiAssign.type");
|
||||
}
|
||||
updateSoftwareModuleDetailsLayout(getSelectedBaseEntity().getType().getName(),
|
||||
getSelectedBaseEntity().getVendor(), maxAssign);
|
||||
|
||||
@@ -181,7 +181,7 @@ public class DistributionSetDetails extends AbstractNamedVersionedEntityTableDet
|
||||
* type is drroped, then add to the list.
|
||||
*/
|
||||
|
||||
if (module.getType().getMaxAssignments() == Integer.MAX_VALUE) {
|
||||
if (module.getType().getMaxAssignments() > 1) {
|
||||
assignedSWModule.get(module.getType().getName()).append("</br>").append("<I>")
|
||||
.append(getUnsavedAssigedSwModule(module.getName(), module.getVersion())).append("</I>");
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ public class DistributionSetTable extends AbstractNamedVersionTable<Distribution
|
||||
|
||||
private void handleSoftwareCase(final Map<Long, HashSet<SoftwareModuleIdName>> map,
|
||||
final SoftwareModule softwareModule, final SoftwareModuleIdName softwareModuleIdName) {
|
||||
if (softwareModule.getType().getMaxAssignments() == Integer.MAX_VALUE) {
|
||||
if (softwareModule.getType().getMaxAssignments() > 1) {
|
||||
if (!map.containsKey(softwareModule.getType().getId())) {
|
||||
map.put(softwareModule.getType().getId(), new HashSet<SoftwareModuleIdName>());
|
||||
}
|
||||
|
||||
@@ -99,10 +99,10 @@ public class SwModuleDetails extends AbstractNamedVersionedEntityTableDetailsLay
|
||||
private void populateDetails() {
|
||||
String maxAssign = HawkbitCommonUtil.SP_STRING_EMPTY;
|
||||
if (getSelectedBaseEntity() != null) {
|
||||
if (getSelectedBaseEntity().getType().getMaxAssignments() == Integer.MAX_VALUE) {
|
||||
maxAssign = getI18n().get("label.multiAssign.type");
|
||||
} else {
|
||||
if (getSelectedBaseEntity().getType().getMaxAssignments() == 1) {
|
||||
maxAssign = getI18n().get("label.singleAssign.type");
|
||||
} else {
|
||||
maxAssign = getI18n().get("label.multiAssign.type");
|
||||
}
|
||||
updateSwModuleDetailsLayout(getSelectedBaseEntity().getType().getName(),
|
||||
getSelectedBaseEntity().getVendor(), maxAssign);
|
||||
|
||||
Reference in New Issue
Block a user