Remove preview checks from ep (#21008)

This commit is contained in:
Aasim Khan
2022-10-27 10:05:16 -07:00
committed by GitHub
parent 540ebd6f7f
commit 512eba5675
5 changed files with 11 additions and 10 deletions

View File

@@ -16,7 +16,7 @@ import { QueryResultsView } from 'sql/workbench/contrib/query/browser/queryResul
import { Disposable, dispose } from 'vs/base/common/lifecycle'; import { Disposable, dispose } from 'vs/base/common/lifecycle';
export class ExecutionPlanTab implements IPanelTab { export class ExecutionPlanTab implements IPanelTab {
public readonly title = localize('executionPlanTitle', "Query Plan (Preview)"); public readonly title = localize('executionPlanTitle', "Query Plan");
public readonly identifier = 'ExecutionPlan2Tab'; public readonly identifier = 'ExecutionPlan2Tab';
public readonly view: ExecutionPlanTabView; public readonly view: ExecutionPlanTabView;

View File

@@ -26,7 +26,7 @@ import { Disposable } from 'vs/base/common/lifecycle';
import { deepClone } from 'vs/base/common/objects'; import { deepClone } from 'vs/base/common/objects';
export class ExecutionPlanTreeTab extends Disposable implements IPanelTab { export class ExecutionPlanTreeTab extends Disposable implements IPanelTab {
public readonly title: string = localize('planTreeTab.title', 'Plan Tree (Preview)'); public readonly title: string = localize('planTreeTab.title', 'Plan Tree');
public readonly identifier: string = 'planTreeTab'; public readonly identifier: string = 'planTreeTab';
public readonly view: ExecutionPlanTreeTabView; public readonly view: ExecutionPlanTreeTabView;

View File

@@ -34,7 +34,7 @@ import { filterIconClassNames, searchPlaceholder, topOperationsSearchDescription
const TABLE_SORT_COLUMN_KEY = 'tableCostColumnForSorting'; const TABLE_SORT_COLUMN_KEY = 'tableCostColumnForSorting';
export class TopOperationsTab extends Disposable implements IPanelTab { export class TopOperationsTab extends Disposable implements IPanelTab {
public readonly title = localize('topOperationsTabTitle', "Top Operations (Preview)"); public readonly title = localize('topOperationsTabTitle', "Top Operations");
public readonly identifier: string = 'TopOperationsTab'; public readonly identifier: string = 'TopOperationsTab';
public readonly view: TopOperationsTabView; public readonly view: TopOperationsTabView;

View File

@@ -327,14 +327,18 @@ export class QueryEditor extends EditorPane {
} }
// TODO: Allow extensions to contribute toolbar actions. // TODO: Allow extensions to contribute toolbar actions.
if (previewFeaturesEnabled && providerId === 'MSSQL') { if (providerId === 'MSSQL') {
content.push( content.push(
{ element: Taskbar.createTaskbarSeparator() }, { element: Taskbar.createTaskbarSeparator() },
{ action: this._estimatedQueryPlanAction }, { action: this._estimatedQueryPlanAction },
{ action: this._toggleActualExecutionPlanMode }, { action: this._toggleActualExecutionPlanMode },
{ action: this._toggleSqlcmdMode },
{ action: this._exportAsNotebookAction }
); );
if (previewFeaturesEnabled) {
content.push(
{ action: this._toggleSqlcmdMode },
{ action: this._exportAsNotebookAction }
);
}
} }
this.taskbar.setContent(content); this.taskbar.setContent(content);

View File

@@ -17,8 +17,6 @@ import { ResultSetSubset } from 'sql/workbench/services/query/common/query';
import { isUndefined } from 'vs/base/common/types'; import { isUndefined } from 'vs/base/common/types';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from 'vs/platform/log/common/log';
import * as nls from 'vs/nls'; import * as nls from 'vs/nls';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { CONFIG_WORKBENCH_ENABLEPREVIEWFEATURES } from 'sql/workbench/common/constants';
export const SERVICE_ID = 'queryManagementService'; export const SERVICE_ID = 'queryManagementService';
@@ -123,7 +121,6 @@ export class QueryManagementService implements IQueryManagementService {
@IConnectionManagementService private _connectionService: IConnectionManagementService, @IConnectionManagementService private _connectionService: IConnectionManagementService,
@IAdsTelemetryService private _telemetryService: IAdsTelemetryService, @IAdsTelemetryService private _telemetryService: IAdsTelemetryService,
@ILogService private _logService: ILogService, @ILogService private _logService: ILogService,
@IConfigurationService private _configurationService: IConfigurationService
) { ) {
} }
@@ -337,7 +334,7 @@ export class QueryManagementService implements IQueryManagementService {
public onResultSetUpdated(resultSetInfo: azdata.QueryExecuteResultSetNotificationParams): void { public onResultSetUpdated(resultSetInfo: azdata.QueryExecuteResultSetNotificationParams): void {
this._notify(resultSetInfo.ownerUri, (runner: QueryRunner) => { this._notify(resultSetInfo.ownerUri, (runner: QueryRunner) => {
runner.handleResultSetUpdated(resultSetInfo.resultSetSummary); runner.handleResultSetUpdated(resultSetInfo.resultSetSummary);
if (resultSetInfo.executionPlans && this._configurationService.getValue<boolean>(CONFIG_WORKBENCH_ENABLEPREVIEWFEATURES)) { if (resultSetInfo.executionPlans) {
runner.handleExecutionPlanAvailable(resultSetInfo.executionPlans); runner.handleExecutionPlanAvailable(resultSetInfo.executionPlans);
} }
}); });