-
Notifications
You must be signed in to change notification settings - Fork 45
Description
Describe the bug
Reordering nodes using Drag&Drop removes a node (ManualOrder must not be set for the config).
Before Drag&Drop:
After Drag&Drop:
Test config:
### Business Process Config File ###
#
# Title : testConfig
# Description :
# Owner : icingaadmin
# AddToMenu : yes
# Backend :
# Statetype : soft
#
###################################
id-rom-italy = docker-master;disk & dummy-0;disk & dummy-6;ping6
display 0;id-rom-italy;Rom
id-milan-italy = dummy-0;ping & dummy-5;ping4 & dummy-9;ping4
display 0;id-milan-italy;Milan
id-italy = id-rom-italy & id-milan-italy
display 1;id-italy;Italy
id-berlin-germany = dummy-0;Hoststatus & dummy-1;Hoststatus & dummy-2;Hoststatus
display 0;id-berlin-germany;Berlin
id-munich-germany = dummy-7;Hoststatus & dummy-8;Hoststatus & dummy-9;Hoststatus
display 0;id-munich-germany;Munich
id-germany = id-berlin-germany & id-munich-germany
display 1;id-germany;Germany
To Reproduce
Provide a link to a live example, or an unambiguous set of steps to reproduce this issue. Include configuration, logs, etc. to reproduce, if relevant.
- Use the test config above.
- Drag&Drop node
ping on dummy-0as shown in theBefore Drag&Dropimage.
Why this happens?
When dropping, the nodes are sorted by ‘display_name asc’, using node aliases if available. Here the alias names are real display names (because the backend states are applied).
The function ProcessController::showAction() -> loadModifiedBpConfig() is then called, which saves the changes from the cache. Now the real aliases are not yet available (because the backend states are not yet applied), so the nodes are sorted by node name. This now provides different results than sorting by aliases.
Metadata
Metadata
Assignees
Labels
No labels