Fixed #3954 pass connection info to new notebook flow (#4000)

* Fixed #3954 
The problem is: connectionProfileId is not passed into New Notebook flow.
The fix is: plumbing connectionProfileId via NotebookInput.

* Resolved PR comments
This commit is contained in:
Yurong He
2019-02-11 15:28:05 -08:00
committed by GitHub
parent 6d37329e74
commit 62404721ed
8 changed files with 47 additions and 7 deletions

View File

@@ -28,7 +28,14 @@ export class NotebookInputModel extends EditorModel {
private _providerId: string;
private _standardKernels: IStandardKernelWithProvider[];
private _defaultKernel: sqlops.nb.IKernelSpec;
constructor(public readonly notebookUri: URI, private readonly handle: number, private _isTrusted: boolean = false, private saveHandler?: ModeViewSaveHandler, provider?: string, private _providers?: string[]) {
constructor(public readonly notebookUri: URI,
private readonly handle: number,
private _isTrusted: boolean = false,
private saveHandler?: ModeViewSaveHandler,
provider?: string,
private _providers?: string[],
private _connectionProfileId?: string) {
super();
this.dirty = false;
this._providerId = provider;
@@ -51,6 +58,10 @@ export class NotebookInputModel extends EditorModel {
this._providers = value;
}
public get connectionProfileId(): string {
return this._connectionProfileId;
}
public get standardKernels(): IStandardKernelWithProvider[] {
return this._standardKernels;
}
@@ -131,6 +142,10 @@ export class NotebookInput extends EditorInput {
return this._model.providers;
}
public get connectionProfileId(): string {
return this._model.connectionProfileId;
}
public get standardKernels(): IStandardKernelWithProvider[] {
return this._model.standardKernels;
}