mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Put export as SQL/Notebook under preview flag (#11726)
* Put export as SQL/Notebook under preview flag * add sqlcmd under preview * Remove comment
This commit is contained in:
@@ -474,7 +474,7 @@
|
|||||||
"notebook/toolbar": [
|
"notebook/toolbar": [
|
||||||
{
|
{
|
||||||
"command": "mssql.exportNotebookToSql",
|
"command": "mssql.exportNotebookToSql",
|
||||||
"when": "providerId == sql"
|
"when": "config.workbench.enablePreviewFeatures && providerId == sql"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -256,26 +256,31 @@ export class QueryEditor extends BaseEditor {
|
|||||||
|
|
||||||
private setTaskbarContent(): void {
|
private setTaskbarContent(): void {
|
||||||
// Create HTML Elements for the taskbar
|
// Create HTML Elements for the taskbar
|
||||||
let separator = Taskbar.createTaskbarSeparator();
|
const separator = Taskbar.createTaskbarSeparator();
|
||||||
|
let content: ITaskbarContent[];
|
||||||
// Set the content in the order we desire
|
const previewFeaturesEnabled = this.configurationService.getValue('workbench')['enablePreviewFeatures'];
|
||||||
let content: ITaskbarContent[] = [
|
if (previewFeaturesEnabled) {
|
||||||
{ action: this._runQueryAction },
|
content = [
|
||||||
{ action: this._cancelQueryAction },
|
{ action: this._runQueryAction },
|
||||||
{ element: separator },
|
{ action: this._cancelQueryAction },
|
||||||
{ action: this._toggleConnectDatabaseAction },
|
{ element: separator },
|
||||||
{ action: this._changeConnectionAction },
|
{ action: this._toggleConnectDatabaseAction },
|
||||||
{ action: this._listDatabasesAction },
|
{ action: this._changeConnectionAction },
|
||||||
{ element: separator },
|
{ action: this._listDatabasesAction },
|
||||||
{ action: this._estimatedQueryPlanAction },
|
{ element: separator },
|
||||||
{ action: this._toggleSqlcmdMode },
|
{ action: this._estimatedQueryPlanAction }, // Preview
|
||||||
{ action: this._exportAsNotebookAction }
|
{ action: this._toggleSqlcmdMode }, // Preview
|
||||||
];
|
{ action: this._exportAsNotebookAction } // Preview
|
||||||
|
];
|
||||||
// Remove the estimated query plan action if preview features are not enabled
|
} else {
|
||||||
let previewFeaturesEnabled = this.configurationService.getValue('workbench')['enablePreviewFeatures'];
|
content = [
|
||||||
if (!previewFeaturesEnabled) {
|
{ action: this._runQueryAction },
|
||||||
content.splice(7, 1);
|
{ action: this._cancelQueryAction },
|
||||||
|
{ element: separator },
|
||||||
|
{ action: this._toggleConnectDatabaseAction },
|
||||||
|
{ action: this._changeConnectionAction },
|
||||||
|
{ action: this._listDatabasesAction }
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
this.taskbar.setContent(content);
|
this.taskbar.setContent(content);
|
||||||
|
|||||||
Reference in New Issue
Block a user