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:
Charles Gagnon
2020-08-09 16:09:51 -07:00
committed by GitHub
parent 2b0b529b21
commit 858c1e826d
2 changed files with 26 additions and 21 deletions

View File

@@ -256,26 +256,31 @@ export class QueryEditor extends BaseEditor {
private setTaskbarContent(): void {
// Create HTML Elements for the taskbar
let separator = Taskbar.createTaskbarSeparator();
// Set the content in the order we desire
let content: ITaskbarContent[] = [
{ action: this._runQueryAction },
{ action: this._cancelQueryAction },
{ element: separator },
{ action: this._toggleConnectDatabaseAction },
{ action: this._changeConnectionAction },
{ action: this._listDatabasesAction },
{ element: separator },
{ action: this._estimatedQueryPlanAction },
{ action: this._toggleSqlcmdMode },
{ action: this._exportAsNotebookAction }
];
// Remove the estimated query plan action if preview features are not enabled
let previewFeaturesEnabled = this.configurationService.getValue('workbench')['enablePreviewFeatures'];
if (!previewFeaturesEnabled) {
content.splice(7, 1);
const separator = Taskbar.createTaskbarSeparator();
let content: ITaskbarContent[];
const previewFeaturesEnabled = this.configurationService.getValue('workbench')['enablePreviewFeatures'];
if (previewFeaturesEnabled) {
content = [
{ action: this._runQueryAction },
{ action: this._cancelQueryAction },
{ element: separator },
{ action: this._toggleConnectDatabaseAction },
{ action: this._changeConnectionAction },
{ action: this._listDatabasesAction },
{ element: separator },
{ action: this._estimatedQueryPlanAction }, // Preview
{ action: this._toggleSqlcmdMode }, // Preview
{ action: this._exportAsNotebookAction } // Preview
];
} else {
content = [
{ action: this._runQueryAction },
{ action: this._cancelQueryAction },
{ element: separator },
{ action: this._toggleConnectDatabaseAction },
{ action: this._changeConnectionAction },
{ action: this._listDatabasesAction }
];
}
this.taskbar.setContent(content);