Display cluster name for each connection & add autoconnect #678
Display cluster name for each connection & add autoconnect #678
Conversation
| createGateway(); | ||
| } | ||
| }, [cluster.connected]); | ||
|
|
There was a problem hiding this comment.
What kind of scenario is this + the change in the reconnect above are going to handle?
There was a problem hiding this comment.
When you click on a connection it opens new tab with text: Click to reconnect, even when you are connected to the cluster (and in useReconnect it just changes document status).
After this change, clicking on a connection will try to make the connection automatically and open a tab.
| ctx.clustersService.findRootClusterByResource(serverUri); | ||
| const documentsService = ctx.workspacesService.getWorkspaceDocumentService( | ||
| cluster.uri | ||
| rootCluster.uri |
There was a problem hiding this comment.
Yeah, I'm still kinda conflicted whether we should convert a resource URI to a root cluster URI this way. The root cluster URI seems to be baked into every other URI, so theoretically we should be able to get it just from operations on that string alone, without having to use clustersService. My main concern is that in other places it'll require pulling in that clustersService which can unnecessarily complicate tests.
We might think about something like routing.extractRootClusterUri in the future. For now I added just ensureRootClusterUri there which takes any kind of cluster URI and converts it to a root cluster URI.
There was a problem hiding this comment.
Good point, I will add it to our master ticket
faad431 to
49e615d
Compare
0194935 to
ee326da
Compare
ee326da to
15e9f2e
Compare
15e9f2e to
f07ad95
Compare
Also fixes a bug when connecting to server in a leaf cluster