Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tchiotludo committed Nov 6, 2022
1 parent 7cfc7d2 commit 375e5c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion client/src/containers/Node/NodeList/NodesList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class NodesList extends Root {
id: JSON.stringify(node.id) || '',
host: `${node.host}:${node.port}` || '',
rack: node.rack || '',
controller: nodes.controller.id === node.id ? 'True' : 'False' || '',
controller: nodes.controller && nodes.controller.id === node.id ? 'True' : 'False' || '',
partition: undefined
};
});
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/org/akhq/models/Cluster.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ public Cluster(DescribeClusterResult result) throws ExecutionException, Interrup
this.nodes.add(new Node(node));
}

Optional.ofNullable(result.controller().get()).ifPresentOrElse(
node -> this.controller = new Node(node),
() -> this.controller = new Node());
/*
if (result.controller().get() != null) {
this.controller = new Node(result.controller().get());
}*/
}
}

0 comments on commit 375e5c3

Please sign in to comment.