Added empty kernel and hook up with Kernel drop down (#3173)

* Initial toolbar work
- This is in-progress and needs additional fixes

* Resolve PR comments

* Added empty kernel and hook up with Kernel dropdown

* Resolve PR comments
This commit is contained in:
Yurong He
2018-11-08 14:27:20 -08:00
committed by GitHub
parent bbf6cbd8fb
commit 7508192ab9
12 changed files with 336 additions and 33 deletions

View File

@@ -119,14 +119,14 @@ export class ClientSession implements IClientSession {
path: this.notebookUri.fsPath,
kernelName: undefined
});
session.defaultKernelLoaded = false;
} else {
throw err;
}
session.defaultKernelLoaded = false;
}
this._session = session;
await this.runKernelConfigActions(kernelName);
this._statusChangedEmitter.fire(session);
this._session = session;
await this.runKernelConfigActions(kernelName);
this._statusChangedEmitter.fire(session);
}
private async runKernelConfigActions(kernelName: string): Promise<void> {

View File

@@ -36,7 +36,7 @@ export class NotebookConnection {
}
public get connectionProfile(): IConnectionProfile {
return this.connectionProfile;
return this._connectionProfile;
}
@@ -70,11 +70,11 @@ export class NotebookConnection {
}
public get user(): string {
return this.connectionProfile.options[constants.userPropName];
return this._connectionProfile.options[constants.userPropName];
}
public get password(): string {
return this.connectionProfile.options[constants.passwordPropName];
return this._connectionProfile.options[constants.passwordPropName];
}
public get knoxport(): string {

View File

@@ -148,7 +148,7 @@ export class SparkMagicContexts {
} else {
// Handle kernels
if (savedKernelInfo && savedKernelInfo.name.toLowerCase().indexOf('spark') > -1) {
notificationService.warn(localize('sparkKernelRequiresConnection', 'Cannot use kernel {0} as no connection is active. The default kernel of Python3 will be used instead.', savedKernelInfo.display_name));
notificationService.warn(localize('sparkKernelRequiresConnection', 'Cannot use kernel {0} as no connection is active. The default kernel of {1} will be used instead.', savedKernelInfo.display_name, defaultKernel.display_name));
}
}