-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: DHC server / connection management (#106)
This is an overhaul of how servers / connections are managed by the extension. ## Config Settings > BREAKING CHANGE: config setting keys were changed from hyphenated names to camelCase ones. - Servers no longer allow specifying console type in config since users may re-use same port to start different servers. Console type is now a connection scoped attribute as opposed to server. - Server configs now support an optional label that will show up in UI Here's an example config that should showcase this + other features in this PR. ```json "deephaven.coreServers": [ "http://localhost:10010/", { "label": "My Groovy Server", "url": "http://localhost:10011/" }, "http://localhost:10012/", "http://localhost:10013/" ], ``` ## DH View Container - Accessible via icon in activity bar (sidebar) ### Server tree view - Sections for Running / Stopped servers - ~This panel polls the servers to see if they are running by checking for 200 status return on jsapi urls. The polling starts the first time `getServers` is called on the ServerManager which shouldn't happen until a user either opens the viewcontainer or attempts to select a connection.~ No longer polls. Instead checks on key events if server treeview + window is active / visible - Open connection action (can also click on the server item as a shortcut) - Open in browser action ### Connection tree view - Shows active connections + supported console types - Editors can be associated with a supporting connection. They show up as children in the tree - Supports drag and drop of editors between supporting connections + dragging editor tab into a supporting connection ## Connection selector status bar item - Moved to right to be contextual to current editor - Shows active connections that support the language of the current editor + running servers that don't have active connections ## Smart connection selection When clicking a run code button in an editor, different rules determine what happens - If there is only 1 running server, connect to it - If there is 1 active connection that supports the language and no remaining disconnected servers, use the active connection - If there is a combination of running servers without connections and / or active connections that total > 1, prompt the user to select one - Once an editor is associated with a connection, it will keep running on that connection without re-prompting. User can re-associate it explicitly with another connection resolves #7
- Loading branch information
Showing
46 changed files
with
1,984 additions
and
694 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { EXTENSION_ID } from './constants'; | ||
|
||
export const CONNECT_TO_SERVER_CMD = `${EXTENSION_ID}.connectToServer`; | ||
export const DISCONNECT_EDITOR_CMD = `${EXTENSION_ID}.disconnectEditor`; | ||
export const DISCONNECT_FROM_SERVER_CMD = `${EXTENSION_ID}.disconnectFromServer`; | ||
export const DOWNLOAD_LOGS_CMD = `${EXTENSION_ID}.downloadLogs`; | ||
export const OPEN_IN_BROWSER_CMD = `${EXTENSION_ID}.openInBrowser`; | ||
export const REFRESH_SERVER_TREE_CMD = `${EXTENSION_ID}.refreshServerTree`; | ||
export const REFRESH_SERVER_CONNECTION_TREE_CMD = `${EXTENSION_ID}.refreshServerConnectionTree`; | ||
export const RUN_CODE_COMMAND = `${EXTENSION_ID}.runCode`; | ||
export const RUN_SELECTION_COMMAND = `${EXTENSION_ID}.runSelection`; | ||
export const SELECT_CONNECTION_COMMAND = `${EXTENSION_ID}.selectConnection`; |
Oops, something went wrong.