mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-24 09:35:37 -05:00
Integrate notebook service with notebook UI (#3143)
Port notebookView code over to notebook.component.ts. Integrate loading of notebook contents into the UI
This commit is contained in:
@@ -20,6 +20,7 @@ import { INotebookManager } from 'sql/services/notebook/notebookService';
|
||||
import { SparkMagicContexts } from 'sql/parts/notebook/models/sparkMagicContexts';
|
||||
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
||||
import { NotebookConnection } from 'sql/parts/notebook/models/notebookConnection';
|
||||
import { INotification, Severity } from 'vs/platform/notification/common/notification';
|
||||
|
||||
/*
|
||||
* Used to control whether a message in a dialog/wizard is displayed as an error,
|
||||
@@ -71,7 +72,7 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
|
||||
private _cells: ICellModel[];
|
||||
private _defaultLanguageInfo: nb.ILanguageInfo;
|
||||
private onErrorEmitter = new Emitter<ErrorInfo>();
|
||||
private onErrorEmitter = new Emitter<INotification>();
|
||||
private _savedKernelInfo: nb.IKernelInfo;
|
||||
private readonly _nbformat: number = nbversion.MAJOR_VERSION;
|
||||
private readonly _nbformatMinor: number = nbversion.MINOR_VERSION;
|
||||
@@ -147,7 +148,7 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
return this._inErrorState;
|
||||
}
|
||||
|
||||
public get onError(): Event<ErrorInfo> {
|
||||
public get onError(): Event<INotification> {
|
||||
return this.onErrorEmitter.event;
|
||||
}
|
||||
|
||||
@@ -242,7 +243,7 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
}
|
||||
|
||||
private notifyError(error: string): void {
|
||||
this.onErrorEmitter.fire(new ErrorInfo(error, MessageLevel.Error));
|
||||
this.onErrorEmitter.fire({ message: error, severity: Severity.Error });
|
||||
}
|
||||
|
||||
public backgroundStartSession(): void {
|
||||
|
||||
Reference in New Issue
Block a user