Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Show a hover over "Disconnected/Connected" label for the connection icon in the toolbar #13544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/2 Fixes/13543.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added tooltip to indicate status of server connection
2 changes: 2 additions & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@
"DataScience.connectingToJupyter": "Connecting to Jupyter server",
"DataScience.connectingToIPyKernel": "Connecting to IPython kernel",
"DataScience.connectedToIPyKernel": "Connected.",
"DataScience.connected": "Connected",
"DataScience.disconnected": "Disconnected",
"Experiments.inGroup": "User belongs to experiment group '{0}'",
"Interpreters.RefreshingInterpreters": "Refreshing Python Interpreters",
"Interpreters.entireWorkspace": "Entire workspace",
Expand Down
2 changes: 2 additions & 0 deletions src/client/common/utils/localize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,8 @@ export namespace DataScience {
'DataScience.previewNotebookOnlySupportedInVSCInsiders',
'The Preview Notebook Editor is supported only in the Insiders version of Visual Studio Code.'
);
export const connected = localize('DataScience.connected', 'Connected');
export const disconnected = localize('DataScience.disconnected', 'Disconnected');
}

export namespace StartPage {
Expand Down
7 changes: 7 additions & 0 deletions src/datascience-ui/interactive-common/jupyterInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export class JupyterInfo extends React.Component<IJupyterInfoProps> {
baseTheme={this.props.baseTheme}
class="image-button-image kernel-status-icon"
image={this.getIcon()}
title={this.getStatus()}
/>
</div>
<div className="kernel-status-divider" />
Expand Down Expand Up @@ -113,4 +114,10 @@ export class JupyterInfo extends React.Component<IJupyterInfoProps> {
? ImageName.JupyterServerDisconnected
: ImageName.JupyterServerConnected;
}

private getStatus() {
return this.props.kernel.jupyterServerStatus === ServerStatus.NotStarted
? getLocString('DataScience.disconnected', 'Disconnected')
: getLocString('DataScience.connected', 'Connected');
}
}
3 changes: 2 additions & 1 deletion src/datascience-ui/react-common/image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ interface IImageProps {
baseTheme: string;
image: ImageName;
class: string;
title?: string;
}

export class Image extends React.Component<IImageProps> {
Expand All @@ -249,6 +250,6 @@ export class Image extends React.Component<IImageProps> {
const key = ImageName[this.props.image].toString();
const image = images.hasOwnProperty(key) ? images[key] : images.Cancel; // Default is cancel.
const source = this.props.baseTheme.includes('dark') ? image.dark : image.light;
return <InlineSVG className={this.props.class} src={source} />;
return <InlineSVG className={this.props.class} src={source} title={this.props.title} />;
}
}