Skip to content

Commit 6fcdc54

Browse files
blomarkkaizimmerm
authored andcommitted
Fix missing message property (#646)
* Added missing message property when dragging a software module twice to a distribution without saving. Signed-off-by: Markus Block <[email protected]> * Added null check in case the item dragged was released not over a distribution set to avoid a NPE. Signed-off-by: Markus Block <[email protected]>
1 parent 246936a commit 6fcdc54

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/distributions/dstable/DistributionSetTable.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,9 @@ protected void onDropEventFromTable(final DragAndDropEvent event) {
222222
final AbstractSelectTargetDetails dropData = (AbstractSelectTargetDetails) event.getTargetDetails();
223223

224224
final Object distItemId = dropData.getItemIdOver();
225-
handleDropEvent(source, softwareModulesIdList, distItemId);
225+
if (distItemId != null) {
226+
handleDropEvent(source, softwareModulesIdList, distItemId);
227+
}
226228
}
227229

228230
@Override

hawkbit-ui/src/main/resources/messages.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ message.software.assignment = {0} Software Module(s) Assignment(s) done
426426
message.dist.inuse = Distribution {0} is already assigned to target
427427
message.software.dist.already.assigned = Software Module {0} is already assigned to Distribution {1}
428428
message.software.dist.type.notallowed = Software Module {0} cannot be assigned, because Distribution {1} does not support the Software Module Type {2}
429+
message.software.already.dragged = Software Module {0} was already dragged to this Distribution.
429430
message.target.assigned = {0} is assigned to {1}
430431
message.dist.type.delete = {0} Distribution Type(s) deleted successfully.
431432
message.sw.module.type.delete = {0} Software Module Type(s) deleted successfully.

0 commit comments

Comments
 (0)