-
Notifications
You must be signed in to change notification settings - Fork 36
Display cluster name for each connection & add autoconnect #678
Changes from all commits
74629d1
e705d4f
39860ce
f07ad95
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,8 +23,10 @@ export default function useServerConnect({ serverUri, onClose }: Props) { | |
| const logins = cluster?.loggedInUser?.sshLoginsList || []; | ||
|
|
||
| const connect = (login: string) => { | ||
| const rootCluster = | ||
| ctx.clustersService.findRootClusterByResource(serverUri); | ||
| const documentsService = ctx.workspacesService.getWorkspaceDocumentService( | ||
| cluster.uri | ||
| rootCluster.uri | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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 We might think about something like
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point, I will add it to our master ticket |
||
| ); | ||
| const doc = documentsService.createTshNodeDocument(serverUri); | ||
| doc.title = `${login}@${server.hostname}`; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What kind of scenario is this + the change in the
reconnectabove are going to handle?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
useReconnectit just changes document status).After this change, clicking on a connection will try to make the connection automatically and open a tab.