mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Adding back save api (#4407)
* #4339: Kernel change event occurs after model load * #4347: Code cleanup - Notebooks Save * Remove save method from sqlops * Adding save method to api's * Adding save method to ext host * Misc change
This commit is contained in:
@@ -53,26 +53,6 @@ export class AddCellAction extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
export class SaveNotebookAction extends Action {
|
||||
private static readonly notebookSavedMsg = localize('notebookSavedMsg', 'Notebook saved successfully.');
|
||||
private static readonly notebookFailedSaveMsg = localize('notebookFailedSaveMsg', 'Failed to save Notebook.');
|
||||
constructor(
|
||||
id: string, label: string, cssClass: string,
|
||||
@INotificationService private _notificationService: INotificationService
|
||||
) {
|
||||
super(id, label, cssClass);
|
||||
}
|
||||
|
||||
public async run(context: NotebookComponent): TPromise<boolean> {
|
||||
const actions: INotificationActions = { primary: [] };
|
||||
let saved = await context.save();
|
||||
if (saved) {
|
||||
this._notificationService.notify({ severity: Severity.Info, message: SaveNotebookAction.notebookSavedMsg, actions });
|
||||
}
|
||||
return saved;
|
||||
}
|
||||
}
|
||||
|
||||
export interface IToggleableState {
|
||||
baseClass?: string;
|
||||
shouldToggleTooltip?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user