Update product references from 'sqlops' to 'azdata' (#4259)

* Update extensions to use azdata

* Switch core code to use azdata
This commit is contained in:
Karl Burtram
2019-03-01 13:59:37 -08:00
committed by GitHub
parent 220685a522
commit 84890eb1b4
371 changed files with 3208 additions and 3184 deletions

View File

@@ -5,7 +5,7 @@
'use strict';
import * as nls from 'vscode-nls';
import * as sqlops from 'sqlops';
import * as azdata from 'azdata';
import * as vscode from 'vscode';
import { IAgentDialogData, AgentDialogMode } from '../interfaces';
@@ -18,7 +18,7 @@ export abstract class AgentDialog<T extends IAgentDialogData> {
protected _onSuccess: vscode.EventEmitter<T> = new vscode.EventEmitter<T>();
public readonly onSuccess: vscode.Event<T> = this._onSuccess.event;
public dialog: sqlops.window.Dialog;
public dialog: azdata.window.Dialog;
// Dialog Name for Telemetry
public dialogName: string;
@@ -32,11 +32,11 @@ export abstract class AgentDialog<T extends IAgentDialogData> {
protected abstract async updateModel();
protected abstract async initializeDialog(dialog: sqlops.window.Dialog);
protected abstract async initializeDialog(dialog: azdata.window.Dialog);
public async openDialog(dialogName?: string) {
let event = dialogName ? dialogName : null;
this.dialog = sqlops.window.createModelViewDialog(this.title, event);
this.dialog = azdata.window.createModelViewDialog(this.title, event);
await this.model.initialize();
@@ -48,7 +48,7 @@ export abstract class AgentDialog<T extends IAgentDialogData> {
this.dialog.cancelButton.label = AgentDialog.CancelButtonText;
this.dialog.cancelButton.onClick(async () => await this.cancel());
sqlops.window.openDialog(this.dialog);
azdata.window.openDialog(this.dialog);
}
protected async execute() {
@@ -60,18 +60,18 @@ export abstract class AgentDialog<T extends IAgentDialogData> {
protected async cancel() {
}
protected getActualConditionValue(checkbox: sqlops.CheckBoxComponent, dropdown: sqlops.DropDownComponent): sqlops.JobCompletionActionCondition {
return checkbox.checked ? Number(this.getDropdownValue(dropdown)) : sqlops.JobCompletionActionCondition.Never;
protected getActualConditionValue(checkbox: azdata.CheckBoxComponent, dropdown: azdata.DropDownComponent): azdata.JobCompletionActionCondition {
return checkbox.checked ? Number(this.getDropdownValue(dropdown)) : azdata.JobCompletionActionCondition.Never;
}
protected getDropdownValue(dropdown: sqlops.DropDownComponent): string {
protected getDropdownValue(dropdown: azdata.DropDownComponent): string {
return (typeof dropdown.value === 'string') ? dropdown.value : dropdown.value.name;
}
protected setConditionDropdownSelectedValue(dropdown: sqlops.DropDownComponent, selectedValue: number) {
protected setConditionDropdownSelectedValue(dropdown: azdata.DropDownComponent, selectedValue: number) {
let idx: number = 0;
for (idx = 0; idx < dropdown.values.length; idx++) {
if (Number((<sqlops.CategoryValue>dropdown.values[idx]).name) === selectedValue) {
if (Number((<azdata.CategoryValue>dropdown.values[idx]).name) === selectedValue) {
dropdown.value = dropdown.values[idx];
break;
}