Skip to content

Drag&Drop removes a node #481

@sukhwinder33445

Description

@sukhwinder33445

Describe the bug

Reordering nodes using Drag&Drop removes a node (ManualOrder must not be set for the config).

Before Drag&Drop:

Image

After Drag&Drop:

Image

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.

  1. Use the test config above.
  2. Drag&Drop node ping on dummy-0 as shown in the Before Drag&Drop image.

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

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions