Skip to content

Commit

Permalink
#15: Fixed bulk removal of cluster instances
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Geisselmeier committed Aug 15, 2016
1 parent e72427f commit fe56f6b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,14 @@ private void loadControlElements() {
});
settings.instances.addListener((ListChangeListener<? super String>) change -> {
while (change.next()) {
change.getRemoved().forEach(removed -> {
controlElements.removeIf(sc -> sc.getClusterInstance().getServerName().equals(removed));
});
change.getAddedSubList().forEach(added -> {
final StatusControl newInstance = new StatusControl(new ClusterInstance(added), this);
controlElements.add(newInstance);
runUpdateAsyn(newInstance);
});
if (change.wasRemoved()) {
controlElements.remove(change.getFrom());
}
// TODO: Support for permutation / update
}
// Workaround against GridView issue #494
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ public ClusterInstance(String jmxUrl) {
public StringProperty serverNameProperty() {
return serverNameProperty;
}

public String getServerName() {
return serverNameProperty.get();
}

public ObjectProperty<HealthStatus> healthProperty() {
return healthProperty;
Expand Down

0 comments on commit fe56f6b

Please sign in to comment.