mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Enable script to notebook actions under preview flag (#13164)
This commit is contained in:
@@ -474,7 +474,7 @@
|
|||||||
"notebook/toolbar": [
|
"notebook/toolbar": [
|
||||||
{
|
{
|
||||||
"command": "mssql.exportNotebookToSql",
|
"command": "mssql.exportNotebookToSql",
|
||||||
"when": "config.notebook.showNotebookConvertActions && providerId == sql"
|
"when": "config.workbench.enablePreviewFeatures && providerId == sql"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -211,11 +211,6 @@ configurationRegistry.registerConfiguration({
|
|||||||
'default': false,
|
'default': false,
|
||||||
'description': localize('notebook.showAllKernels', "(Preview) show all kernels for the current notebook provider.")
|
'description': localize('notebook.showAllKernels', "(Preview) show all kernels for the current notebook provider.")
|
||||||
},
|
},
|
||||||
'notebook.showNotebookConvertActions': {
|
|
||||||
'type': 'boolean',
|
|
||||||
'default': false,
|
|
||||||
'description': localize('notebook.showNotebookConvertActions', "(Preview) Show buttons for converting a Notebook to and from SQL.")
|
|
||||||
},
|
|
||||||
'notebook.allowAzureDataStudioCommands': {
|
'notebook.allowAzureDataStudioCommands': {
|
||||||
'type': 'boolean',
|
'type': 'boolean',
|
||||||
'default': false,
|
'default': false,
|
||||||
|
|||||||
@@ -299,14 +299,11 @@ export class QueryEditor extends EditorPane {
|
|||||||
|
|
||||||
if (providerId === 'MSSQL') {
|
if (providerId === 'MSSQL') {
|
||||||
content.push({ element: separator },
|
content.push({ element: separator },
|
||||||
{ action: this._estimatedQueryPlanAction }, // Preview
|
{ action: this._estimatedQueryPlanAction },
|
||||||
{ action: this._toggleSqlcmdMode } // Preview)
|
{ action: this._toggleSqlcmdMode }
|
||||||
);
|
);
|
||||||
|
|
||||||
const notebookConvertActionsEnabled = this.configurationService.getValue('notebook')['showNotebookConvertActions'];
|
content.push({ action: this._exportAsNotebookAction });
|
||||||
if (notebookConvertActionsEnabled) {
|
|
||||||
content.push({ action: this._exportAsNotebookAction });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
content = [
|
content = [
|
||||||
@@ -317,15 +314,6 @@ export class QueryEditor extends EditorPane {
|
|||||||
{ action: this._changeConnectionAction },
|
{ action: this._changeConnectionAction },
|
||||||
{ action: this._listDatabasesAction }
|
{ action: this._listDatabasesAction }
|
||||||
];
|
];
|
||||||
|
|
||||||
if (providerId === 'MSSQL') {
|
|
||||||
const notebookConvertActionsEnabled = this.configurationService.getValue('notebook')['notebook.showNotebookConvertActions'];
|
|
||||||
if (notebookConvertActionsEnabled) {
|
|
||||||
content.push(
|
|
||||||
{ element: separator },
|
|
||||||
{ action: this._exportAsNotebookAction });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user