Fix update dialog pops several times when click ok/cancel button issue#2013
Conversation
366b6f7 to
d1c5d9e
Compare
| try { | ||
| cluster.get().toBlocking().singleOrDefault(cluster); | ||
| if (Optional.ofNullable(cluster.getMasterState()).orElse("") | ||
| if (getNodeActionByName("Update") == null && Optional.ofNullable(cluster.getMasterState()).orElse("") |
There was a problem hiding this comment.
I suppose you may need to remove all actions before adding one. The method name is refreshItems #Resolved
| if (Optional.ofNullable(cluster.getMasterState()).orElse("") | ||
| if (getNodeActionByName("Update") == null && Optional.ofNullable(cluster.getMasterState()).orElse("") | ||
| .equals(SparkItemGroupState.STABLE.toString())) { | ||
| addAction("Update", new SparkServerlessUpdateAction( |
There was a problem hiding this comment.
why the action needs to be added twice? #Resolved
There was a problem hiding this comment.
After user provision a new cluster, the cluster state is not STABLE. So the actions for this new provisioned cluster node don't contain Update. Update action will be enabled when cluster is in STABLE state and user refreshes the node.
In reply to: 217964570 [](ancestors = 217964570)
d1c5d9e to
6006747
Compare
| this, cluster, SparkServerlessClusterOps.getInstance().getUpdateAction())); | ||
| } | ||
| Boolean isClusterStabled = Optional.ofNullable(cluster.getMasterState()).orElse("") | ||
| .equals(SparkItemGroupState.STABLE.toString()); |
| addAction("Update", new SparkServerlessUpdateAction( | ||
| this, cluster, SparkServerlessClusterOps.getInstance().getUpdateAction())); | ||
| } | ||
| Boolean isClusterStabled = Optional.ofNullable(cluster.getMasterState()).orElse("") |
There was a problem hiding this comment.
This val can be private function #Resolved
| this, cluster, SparkServerlessClusterOps.getInstance().getUpdateAction())); | ||
| } | ||
|
|
||
| NodeAction updateAction = addAction("Update", new SparkServerlessUpdateAction( |
There was a problem hiding this comment.
Can we assign Update to a const String value? #Resolved
6dc243b to
7af7782
Compare
| }); | ||
| } | ||
|
|
||
| private Boolean isClusterStable() { |
There was a problem hiding this comment.
no boxing, boolean is enough #Resolved
3c57c13 to
aa2a92d
Compare
wezhang
left a comment
There was a problem hiding this comment.
Thanks Rui! You can find the Squash operation.
microsoft#2013) * Fix update dialog pops several times when click ok/cancel button issue * Update based on review comments
To fix #1920