mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-23 17:23:02 -05:00
Update product references from 'sqlops' to 'azdata' (#4259)
* Update extensions to use azdata * Switch core code to use azdata
This commit is contained in:
4
src/sql/azdata.proposed.d.ts
vendored
4
src/sql/azdata.proposed.d.ts
vendored
@@ -2349,7 +2349,7 @@ declare module 'azdata' {
|
||||
|
||||
export namespace window {
|
||||
/**
|
||||
* @deprecated this method has been deprecated and will be removed in a future release, please use sqlops.window.createWebViewDialog instead.
|
||||
* @deprecated this method has been deprecated and will be removed in a future release, please use azdata.window.createWebViewDialog instead.
|
||||
* @param title
|
||||
*/
|
||||
export function createDialog(
|
||||
@@ -3249,7 +3249,7 @@ declare module 'azdata' {
|
||||
|
||||
export namespace window {
|
||||
/**
|
||||
* @deprecated this namespace has been deprecated and will be removed in a future release, please use the methods under sqlops.window namespace.
|
||||
* @deprecated this namespace has been deprecated and will be removed in a future release, please use the methods under azdata.window namespace.
|
||||
*/
|
||||
export namespace modelviewdialog {
|
||||
/**
|
||||
|
||||
23
src/sql/azdata.test.d.ts
vendored
Normal file
23
src/sql/azdata.test.d.ts
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// This is the place for APIs used for testing
|
||||
|
||||
import * as core from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
|
||||
declare module 'azdata' {
|
||||
|
||||
export namespace extensions {
|
||||
export function install(vsixPath: string): Thenable<string>;
|
||||
}
|
||||
|
||||
export namespace objectexplorer {
|
||||
/**
|
||||
* get object explorer node context menu actions
|
||||
*/
|
||||
export function getNodeActions(connectionId: string, nodePath: string): Thenable<string[]>;
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,7 @@ import { ViewletPanel, IViewletPanelOptions } from 'vs/workbench/browser/parts/v
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { values } from 'vs/base/common/map';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { Button } from 'sql/base/browser/ui/button/button';
|
||||
import { Modal } from 'sql/workbench/browser/modal/modal';
|
||||
@@ -39,7 +39,7 @@ import * as TelemetryKeys from 'sql/common/telemetryKeys';
|
||||
|
||||
class AccountPanel extends ViewletPanel {
|
||||
public index: number;
|
||||
private accountList: List<sqlops.Account>;
|
||||
private accountList: List<azdata.Account>;
|
||||
|
||||
constructor(
|
||||
private options: IViewletPanelOptions,
|
||||
@@ -53,7 +53,7 @@ class AccountPanel extends ViewletPanel {
|
||||
}
|
||||
|
||||
protected renderBody(container: HTMLElement): void {
|
||||
this.accountList = new List<sqlops.Account>(container, new AccountListDelegate(AccountDialog.ACCOUNTLIST_HEIGHT), [this.instantiationService.createInstance(AccountListRenderer)]);
|
||||
this.accountList = new List<azdata.Account>(container, new AccountListDelegate(AccountDialog.ACCOUNTLIST_HEIGHT), [this.instantiationService.createInstance(AccountListRenderer)]);
|
||||
this.disposables.push(attachListStyler(this.accountList, this.themeService));
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ class AccountPanel extends ViewletPanel {
|
||||
this.accountList.domFocus();
|
||||
}
|
||||
|
||||
public updateAccounts(accounts: sqlops.Account[]) {
|
||||
public updateAccounts(accounts: azdata.Account[]) {
|
||||
this.accountList.splice(0, this.accountList.length, accounts);
|
||||
}
|
||||
|
||||
@@ -315,7 +315,7 @@ export class AccountDialog extends Modal {
|
||||
this._providerViewsMap.set(newProvider.addedProvider.id, { view: providerView, addAccountAction: addAccountAction });
|
||||
}
|
||||
|
||||
private removeProvider(removedProvider: sqlops.AccountProviderMetadata) {
|
||||
private removeProvider(removedProvider: azdata.AccountProviderMetadata) {
|
||||
// Skip removing the provider if it doesn't exist
|
||||
let providerView = this._providerViewsMap.get(removedProvider.id);
|
||||
if (!providerView || !providerView.view) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IAccountManagementService } from 'sql/platform/accountManagement/common/interfaces';
|
||||
import { AccountProviderAddedEventParams, UpdateAccountListEventParams } from 'sql/platform/accountManagement/common/eventTypes';
|
||||
@@ -18,8 +18,8 @@ export class AccountViewModel {
|
||||
private _addProviderEmitter: Emitter<AccountProviderAddedEventParams>;
|
||||
public get addProviderEvent(): Event<AccountProviderAddedEventParams> { return this._addProviderEmitter.event; }
|
||||
|
||||
private _removeProviderEmitter: Emitter<sqlops.AccountProviderMetadata>;
|
||||
public get removeProviderEvent(): Event<sqlops.AccountProviderMetadata> { return this._removeProviderEmitter.event; }
|
||||
private _removeProviderEmitter: Emitter<azdata.AccountProviderMetadata>;
|
||||
public get removeProviderEvent(): Event<azdata.AccountProviderMetadata> { return this._removeProviderEmitter.event; }
|
||||
|
||||
private _updateAccountListEmitter: Emitter<UpdateAccountListEventParams>;
|
||||
public get updateAccountListEvent(): Event<UpdateAccountListEventParams> { return this._updateAccountListEmitter.event; }
|
||||
@@ -29,7 +29,7 @@ export class AccountViewModel {
|
||||
|
||||
// Create our event emitters
|
||||
this._addProviderEmitter = new Emitter<AccountProviderAddedEventParams>();
|
||||
this._removeProviderEmitter = new Emitter<sqlops.AccountProviderMetadata>();
|
||||
this._removeProviderEmitter = new Emitter<azdata.AccountProviderMetadata>();
|
||||
this._updateAccountListEmitter = new Emitter<UpdateAccountListEventParams>();
|
||||
|
||||
// Register handlers for any changes to the providers or accounts
|
||||
@@ -53,7 +53,7 @@ export class AccountViewModel {
|
||||
// 3) Build parameters to add a provider and return it
|
||||
return this._accountManagementService.getAccountProviderMetadata()
|
||||
.then(
|
||||
(providers: sqlops.AccountProviderMetadata[]) => {
|
||||
(providers: azdata.AccountProviderMetadata[]) => {
|
||||
let promises = providers.map(provider => {
|
||||
return self._accountManagementService.getAccountsForProvider(provider.id)
|
||||
.then(
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { localize } from 'vs/nls';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
@@ -79,7 +79,7 @@ export class RemoveAccountAction extends Action {
|
||||
public static LABEL = localize('removeAccount', 'Remove account');
|
||||
|
||||
constructor(
|
||||
private _account: sqlops.Account,
|
||||
private _account: azdata.Account,
|
||||
@IDialogService private _dialogService: IDialogService,
|
||||
@INotificationService private _notificationService: INotificationService,
|
||||
@IAccountManagementService private _accountManagementService: IAccountManagementService
|
||||
@@ -147,7 +147,7 @@ export class ApplyFilterAction extends Action {
|
||||
export class RefreshAccountAction extends Action {
|
||||
public static ID = 'account.refresh';
|
||||
public static LABEL = localize('refreshAccount', 'Reenter your credentials');
|
||||
public account: sqlops.Account;
|
||||
public account: azdata.Account;
|
||||
|
||||
constructor(
|
||||
@IAccountManagementService private _accountManagementService: IAccountManagementService
|
||||
|
||||
@@ -15,20 +15,20 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
|
||||
|
||||
import { RemoveAccountAction, RefreshAccountAction } from 'sql/parts/accountManagement/common/accountActions';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
export class AccountListDelegate implements IListVirtualDelegate<sqlops.Account> {
|
||||
export class AccountListDelegate implements IListVirtualDelegate<azdata.Account> {
|
||||
|
||||
constructor(
|
||||
private _height: number
|
||||
) {
|
||||
}
|
||||
|
||||
public getHeight(element: sqlops.Account): number {
|
||||
public getHeight(element: azdata.Account): number {
|
||||
return this._height;
|
||||
}
|
||||
|
||||
public getTemplateId(element: sqlops.Account): string {
|
||||
public getTemplateId(element: azdata.Account): string {
|
||||
return 'accountListRenderer';
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,7 @@ export interface AccountListTemplate {
|
||||
actions?: ActionBar;
|
||||
}
|
||||
|
||||
export class AccountPickerListRenderer implements IListRenderer<sqlops.Account, AccountListTemplate> {
|
||||
export class AccountPickerListRenderer implements IListRenderer<azdata.Account, AccountListTemplate> {
|
||||
public static TEMPLATE_ID = 'accountListRenderer';
|
||||
|
||||
public get templateId(): string {
|
||||
@@ -64,7 +64,7 @@ export class AccountPickerListRenderer implements IListRenderer<sqlops.Account,
|
||||
return tableTemplate;
|
||||
}
|
||||
|
||||
public renderElement(account: sqlops.Account, index: number, templateData: AccountListTemplate): void {
|
||||
public renderElement(account: azdata.Account, index: number, templateData: AccountListTemplate): void {
|
||||
// Set the account icon
|
||||
templateData.icon.classList.add('account-logo', account.displayInfo.accountType);
|
||||
|
||||
@@ -81,7 +81,7 @@ export class AccountPickerListRenderer implements IListRenderer<sqlops.Account,
|
||||
// noop
|
||||
}
|
||||
|
||||
public disposeElement(element: sqlops.Account, index: number, templateData: AccountListTemplate): void {
|
||||
public disposeElement(element: azdata.Account, index: number, templateData: AccountListTemplate): void {
|
||||
// noop
|
||||
}
|
||||
}
|
||||
@@ -105,7 +105,7 @@ export class AccountListRenderer extends AccountPickerListRenderer {
|
||||
return tableTemplate;
|
||||
}
|
||||
|
||||
public renderElement(account: sqlops.Account, index: number, templateData: AccountListTemplate): void {
|
||||
public renderElement(account: azdata.Account, index: number, templateData: AccountListTemplate): void {
|
||||
super.renderElement(account, index, templateData);
|
||||
if (account.isStale) {
|
||||
templateData.content.innerText = localize('refreshCredentials', 'You need to refresh the credentials for this account.');
|
||||
|
||||
@@ -22,7 +22,7 @@ import { IWindowsService } from 'vs/platform/windows/common/windows';
|
||||
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||
import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { Button } from 'sql/base/browser/ui/button/button';
|
||||
import { Modal } from 'sql/workbench/browser/modal/modal';
|
||||
import { FirewallRuleViewModel } from 'sql/parts/accountManagement/firewallRuleDialog/firewallRuleViewModel';
|
||||
@@ -304,7 +304,7 @@ export class FirewallRuleDialog extends Modal {
|
||||
}
|
||||
}
|
||||
|
||||
public onAccountSelectionChange(account: sqlops.Account): void {
|
||||
public onAccountSelectionChange(account: azdata.Account): void {
|
||||
this.viewModel.selectedAccount = account;
|
||||
if (account && !account.isStale) {
|
||||
this._createButton.enabled = true;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import { localize } from 'vs/nls';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
|
||||
import { FirewallRuleDialog } from 'sql/parts/accountManagement/firewallRuleDialog/firewallRuleDialog';
|
||||
@@ -62,7 +62,7 @@ export class FirewallRuleDialogController {
|
||||
let resourceProviderId = this._resourceProviderId;
|
||||
|
||||
this._accountManagementService.getSecurityToken(this._firewallRuleDialog.viewModel.selectedAccount, AzureResource.ResourceManagement).then(tokenMappings => {
|
||||
let firewallRuleInfo: sqlops.FirewallRuleInfo = {
|
||||
let firewallRuleInfo: azdata.FirewallRuleInfo = {
|
||||
startIpAddress: this._firewallRuleDialog.viewModel.isIPAddressSelected ? this._firewallRuleDialog.viewModel.defaultIPAddress : this._firewallRuleDialog.viewModel.fromSubnetIPRange,
|
||||
endIpAddress: this._firewallRuleDialog.viewModel.isIPAddressSelected ? this._firewallRuleDialog.viewModel.defaultIPAddress : this._firewallRuleDialog.viewModel.toSubnetIPRange,
|
||||
serverName: this._connection.serverName,
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
/**
|
||||
* View model for firewall rule dialog
|
||||
*/
|
||||
export class FirewallRuleViewModel {
|
||||
public isIPAddressSelected: boolean;
|
||||
public selectedAccount: sqlops.Account;
|
||||
public selectedAccount: azdata.Account;
|
||||
|
||||
private _defaultIPAddress: string;
|
||||
private _defaultFromSubnetIPRange: string;
|
||||
|
||||
@@ -11,7 +11,7 @@ import { ConnectionManagementInfo } from 'sql/platform/connection/common/connect
|
||||
import { IAdminService } from 'sql/workbench/services/admin/common/adminService';
|
||||
import { ITaskDialogComponent } from 'sql/parts/tasks/common/tasks';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import * as nls from 'vs/nls';
|
||||
|
||||
export const CREATEDATABASE_SELECTOR: string = 'createdatabase-component';
|
||||
@@ -51,8 +51,8 @@ export class CreateDatabaseComponent implements ITaskDialogComponent {
|
||||
) {
|
||||
}
|
||||
|
||||
private getDatabaseInfo(form: NgForm): sqlops.DatabaseInfo {
|
||||
return <sqlops.DatabaseInfo>{
|
||||
private getDatabaseInfo(form: NgForm): azdata.DatabaseInfo {
|
||||
return <azdata.DatabaseInfo>{
|
||||
options: {
|
||||
name: form.value.databaseName,
|
||||
owner: form.value.databaseOwner
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
import { RawContextKey, IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IConnectionProfile } from 'sqlops';
|
||||
import { IConnectionProfile } from 'azdata';
|
||||
|
||||
export class ConnectionContextKey implements IContextKey<IConnectionProfile> {
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { ConnectionSummary } from 'sqlops';
|
||||
import { ConnectionSummary } from 'azdata';
|
||||
import { IStatusbarService } from 'vs/platform/statusbar/common/statusbar';
|
||||
import * as LocalizedConstants from 'sql/parts/connection/common/localizedConstants';
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
// // import { AdvancedPropertiesDialog } from 'sql/parts/connection/connectionDialog/advancedPropertiesDialog';
|
||||
import { OptionsDialog } from 'sql/workbench/browser/modal/optionsDialog';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { localize } from 'vs/nls';
|
||||
import * as TelemetryKeys from 'sql/common/telemetryKeys';
|
||||
|
||||
@@ -26,7 +26,7 @@ export class AdvancedPropertiesController {
|
||||
this._options = this._advancedDialog.optionValues;
|
||||
}
|
||||
|
||||
public showDialog(providerOptions: sqlops.ConnectionOption[], container: HTMLElement, options: { [name: string]: any }): void {
|
||||
public showDialog(providerOptions: azdata.ConnectionOption[], container: HTMLElement, options: { [name: string]: any }): void {
|
||||
this._options = options;
|
||||
var serviceOptions = providerOptions.map(option => AdvancedPropertiesController.connectionOptionToServiceOption(option));
|
||||
this.advancedDialog.open(serviceOptions, this._options);
|
||||
@@ -47,7 +47,7 @@ export class AdvancedPropertiesController {
|
||||
this._advancedDialog = dialog;
|
||||
}
|
||||
|
||||
public static connectionOptionToServiceOption(connectionOption: sqlops.ConnectionOption): sqlops.ServiceOption {
|
||||
public static connectionOptionToServiceOption(connectionOption: azdata.ConnectionOption): azdata.ServiceOption {
|
||||
return {
|
||||
name: connectionOption.name,
|
||||
displayName: connectionOption.displayName,
|
||||
|
||||
@@ -30,43 +30,43 @@ const tabSchema: IJSONSchema = {
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string',
|
||||
description: localize('sqlops.extension.contributes.dashboard.tab.id', "Unique identifier for this tab. Will be passed to the extension for any requests.")
|
||||
description: localize('azdata.extension.contributes.dashboard.tab.id', "Unique identifier for this tab. Will be passed to the extension for any requests.")
|
||||
},
|
||||
title: {
|
||||
type: 'string',
|
||||
description: localize('sqlops.extension.contributes.dashboard.tab.title', "Title of the tab to show the user.")
|
||||
description: localize('azdata.extension.contributes.dashboard.tab.title', "Title of the tab to show the user.")
|
||||
},
|
||||
description: {
|
||||
description: localize('sqlops.extension.contributes.dashboard.tab.description', "Description of this tab that will be shown to the user."),
|
||||
description: localize('azdata.extension.contributes.dashboard.tab.description', "Description of this tab that will be shown to the user."),
|
||||
type: 'string'
|
||||
},
|
||||
when: {
|
||||
description: localize('sqlops.extension.contributes.tab.when', 'Condition which must be true to show this item'),
|
||||
description: localize('azdata.extension.contributes.tab.when', 'Condition which must be true to show this item'),
|
||||
type: 'string'
|
||||
},
|
||||
provider: {
|
||||
description: localize('sqlops.extension.contributes.tab.provider', 'Defines the connection types this tab is compatible with. Defaults to "MSSQL" if not set'),
|
||||
description: localize('azdata.extension.contributes.tab.provider', 'Defines the connection types this tab is compatible with. Defaults to "MSSQL" if not set'),
|
||||
type: ['string', 'array']
|
||||
|
||||
},
|
||||
container: {
|
||||
description: localize('sqlops.extension.contributes.dashboard.tab.container', "The container that will be displayed in this tab."),
|
||||
description: localize('azdata.extension.contributes.dashboard.tab.container', "The container that will be displayed in this tab."),
|
||||
type: 'object',
|
||||
properties: generateContainerTypeSchemaProperties()
|
||||
},
|
||||
alwaysShow: {
|
||||
description: localize('sqlops.extension.contributes.dashboard.tab.alwaysShow', "Whether or not this tab should always be shown or only when the user adds it."),
|
||||
description: localize('azdata.extension.contributes.dashboard.tab.alwaysShow', "Whether or not this tab should always be shown or only when the user adds it."),
|
||||
type: 'boolean'
|
||||
},
|
||||
isHomeTab: {
|
||||
description: localize('sqlops.extension.contributes.dashboard.tab.isHomeTab', "Whether or not this tab should be used as the Home tab for a connection type."),
|
||||
description: localize('azdata.extension.contributes.dashboard.tab.isHomeTab', "Whether or not this tab should be used as the Home tab for a connection type."),
|
||||
type: 'boolean'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const tabContributionSchema: IJSONSchema = {
|
||||
description: localize('sqlops.extension.contributes.tabs', "Contributes a single or multiple tabs for users to add to their dashboard."),
|
||||
description: localize('azdata.extension.contributes.tabs', "Contributes a single or multiple tabs for users to add to their dashboard."),
|
||||
oneOf: [
|
||||
tabSchema,
|
||||
{
|
||||
|
||||
@@ -34,10 +34,10 @@ const containerSchema: IJSONSchema = {
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string',
|
||||
description: localize('sqlops.extension.contributes.dashboard.container.id', "Unique identifier for this container.")
|
||||
description: localize('azdata.extension.contributes.dashboard.container.id', "Unique identifier for this container.")
|
||||
},
|
||||
container: {
|
||||
description: localize('sqlops.extension.contributes.dashboard.container.container', "The container that will be displayed in the tab."),
|
||||
description: localize('azdata.extension.contributes.dashboard.container.container', "The container that will be displayed in the tab."),
|
||||
type: 'object',
|
||||
properties: generateContainerTypeSchemaProperties()
|
||||
}
|
||||
@@ -45,7 +45,7 @@ const containerSchema: IJSONSchema = {
|
||||
};
|
||||
|
||||
const containerContributionSchema: IJSONSchema = {
|
||||
description: localize('sqlops.extension.contributes.containers', "Contributes a single or multiple dashboard containers for users to add to their dashboard."),
|
||||
description: localize('azdata.extension.contributes.containers', "Contributes a single or multiple dashboard containers for users to add to their dashboard."),
|
||||
oneOf: [
|
||||
containerSchema,
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { CommonServiceInterface } from 'sql/services/common/commonServiceInterface.service';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { memoize } from 'vs/base/common/decorators';
|
||||
import { AgentViewComponent } from '../../jobManagement/agent/agentView.component';
|
||||
|
||||
@@ -48,9 +48,9 @@ export class ControlHostContent {
|
||||
}
|
||||
|
||||
@memoize
|
||||
public get connection(): sqlops.connection.Connection {
|
||||
public get connection(): azdata.connection.Connection {
|
||||
let currentConnection = this._dashboardService.connectionManagementService.connectionInfo.connectionProfile;
|
||||
let connection: sqlops.connection.Connection = {
|
||||
let connection: azdata.connection.Connection = {
|
||||
providerName: currentConnection.providerName,
|
||||
connectionId: currentConnection.id,
|
||||
options: currentConnection.options
|
||||
@@ -59,7 +59,7 @@ export class ControlHostContent {
|
||||
}
|
||||
|
||||
@memoize
|
||||
public get serverInfo(): sqlops.ServerInfo {
|
||||
public get serverInfo(): azdata.ServerInfo {
|
||||
return this._dashboardService.connectionManagementService.connectionInfo.serverInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import { IDashboardWebview, IDashboardViewService } from 'sql/platform/dashboard
|
||||
import { AngularDisposable } from 'sql/base/node/lifecycle';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
|
||||
@Component({
|
||||
@@ -68,9 +68,9 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
|
||||
}
|
||||
|
||||
@memoize
|
||||
public get connection(): sqlops.connection.Connection {
|
||||
public get connection(): azdata.connection.Connection {
|
||||
let currentConnection = this._dashboardService.connectionManagementService.connectionInfo.connectionProfile;
|
||||
let connection: sqlops.connection.Connection = {
|
||||
let connection: azdata.connection.Connection = {
|
||||
providerName: currentConnection.providerName,
|
||||
connectionId: currentConnection.id,
|
||||
options: currentConnection.options
|
||||
@@ -79,7 +79,7 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
|
||||
}
|
||||
|
||||
@memoize
|
||||
public get serverInfo(): sqlops.ServerInfo {
|
||||
public get serverInfo(): azdata.ServerInfo {
|
||||
return this._dashboardService.connectionManagementService.connectionInfo.serverInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ export function generateDashboardWidgetSchema(type?: 'database' | 'server', exte
|
||||
type: 'string'
|
||||
},
|
||||
when: {
|
||||
description: localize('sqlops.extension.contributes.widget.when', 'Condition which must be true to show this item'),
|
||||
description: localize('azdata.extension.contributes.widget.when', 'Condition which must be true to show this item'),
|
||||
type: 'string'
|
||||
},
|
||||
gridItemConfig: {
|
||||
@@ -117,7 +117,7 @@ export function generateDashboardGridLayoutSchema(type?: 'database' | 'server',
|
||||
]
|
||||
},
|
||||
when: {
|
||||
description: localize('sqlops.extension.contributes.widget.when', 'Condition which must be true to show this item'),
|
||||
description: localize('azdata.extension.contributes.widget.when', 'Condition which must be true to show this item'),
|
||||
type: 'string'
|
||||
}
|
||||
}
|
||||
@@ -130,7 +130,7 @@ export function generateDashboardTabSchema(type?: 'database' | 'server'): IJSONS
|
||||
properties: {
|
||||
tabId: {
|
||||
type: 'string',
|
||||
description: localize('sqlops.extension.contributes.dashboardPage.tab.id', "Unique identifier for this tab. Will be passed to the extension for any requests."),
|
||||
description: localize('azdata.extension.contributes.dashboardPage.tab.id', "Unique identifier for this tab. Will be passed to the extension for any requests."),
|
||||
enum: [],
|
||||
enumDescriptions: [],
|
||||
errorMessage: localize('dashboardTabError', "Extension tab is unknown or not installed.")
|
||||
|
||||
@@ -20,7 +20,7 @@ import { IScriptingService } from 'sql/platform/scripting/common/scriptingServic
|
||||
import { IAngularEventingService } from 'sql/platform/angularEventing/common/angularEventingService';
|
||||
import { IErrorMessageService } from 'sql/platform/errorMessage/common/errorMessageService';
|
||||
|
||||
import { ObjectMetadata } from 'sqlops';
|
||||
import { ObjectMetadata } from 'azdata';
|
||||
|
||||
import * as tree from 'vs/base/parts/tree/browser/tree';
|
||||
import * as TreeDefaults from 'vs/base/parts/tree/browser/treeDefaults';
|
||||
|
||||
@@ -18,7 +18,7 @@ import { Extensions, IInsightRegistry } from 'sql/platform/dashboard/common/insi
|
||||
import { insertValueRegex } from 'sql/workbench/services/insights/common/insightsDialogService';
|
||||
import { RunInsightQueryAction } from './actions';
|
||||
|
||||
import { SimpleExecuteResult } from 'sqlops';
|
||||
import { SimpleExecuteResult } from 'azdata';
|
||||
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import * as types from 'vs/base/common/types';
|
||||
|
||||
@@ -12,7 +12,7 @@ import { toDisposableSubscription } from 'sql/base/node/rxjsUtils';
|
||||
import { error } from 'sql/base/common/log';
|
||||
import { IDashboardRegistry, Extensions as DashboardExtensions } from 'sql/platform/dashboard/common/dashboardRegistry';
|
||||
|
||||
import { DatabaseInfo, ServerInfo } from 'sqlops';
|
||||
import { DatabaseInfo, ServerInfo } from 'azdata';
|
||||
|
||||
import { EventType, addDisposableListener } from 'vs/base/browser/dom';
|
||||
import * as types from 'vs/base/common/types';
|
||||
|
||||
@@ -15,7 +15,7 @@ import { DashboardServiceInterface } from 'sql/parts/dashboard/services/dashboar
|
||||
import { CommonServiceInterface } from 'sql/services/common/commonServiceInterface.service';
|
||||
import { IDashboardWebview, IDashboardViewService } from 'sql/platform/dashboard/common/dashboardViewService';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
@@ -74,9 +74,9 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
||||
}
|
||||
|
||||
@memoize
|
||||
public get connection(): sqlops.connection.Connection {
|
||||
public get connection(): azdata.connection.Connection {
|
||||
let currentConnection = this._dashboardService.connectionManagementService.connectionInfo.connectionProfile;
|
||||
let connection: sqlops.connection.Connection = {
|
||||
let connection: azdata.connection.Connection = {
|
||||
providerName: currentConnection.providerName,
|
||||
connectionId: currentConnection.id,
|
||||
options: currentConnection.options
|
||||
@@ -85,7 +85,7 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
||||
}
|
||||
|
||||
@memoize
|
||||
public get serverInfo(): sqlops.ServerInfo {
|
||||
public get serverInfo(): azdata.ServerInfo {
|
||||
return this._dashboardService.connectionManagementService.connectionInfo.serverInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { mixin } from 'vs/base/common/objects';
|
||||
import * as strings from 'vs/base/common/strings';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { Button } from 'sql/base/browser/ui/button/button';
|
||||
import { Checkbox } from 'sql/base/browser/ui/checkbox/checkbox';
|
||||
@@ -127,7 +127,7 @@ export class RestoreDialog extends Modal {
|
||||
public onDatabaseListFocused: Event<void> = this._onDatabaseListFocused.event;
|
||||
|
||||
constructor(
|
||||
optionsMetadata: sqlops.ServiceOption[],
|
||||
optionsMetadata: azdata.ServiceOption[],
|
||||
@IPartService partService: IPartService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IContextViewService private _contextViewService: IContextViewService,
|
||||
@@ -843,7 +843,7 @@ export class RestoreDialog extends Modal {
|
||||
}
|
||||
}
|
||||
|
||||
private updateRestoreDatabaseFiles(dbFiles: sqlops.RestoreDatabaseFileInfo[]) {
|
||||
private updateRestoreDatabaseFiles(dbFiles: azdata.RestoreDatabaseFileInfo[]) {
|
||||
this.clearFileListTable();
|
||||
if (dbFiles && dbFiles.length > 0) {
|
||||
let data = [];
|
||||
@@ -864,7 +864,7 @@ export class RestoreDialog extends Modal {
|
||||
}
|
||||
}
|
||||
|
||||
private updateBackupSetsToRestore(backupSetsToRestore: sqlops.DatabaseFileInfo[]) {
|
||||
private updateBackupSetsToRestore(backupSetsToRestore: azdata.DatabaseFileInfo[]) {
|
||||
if (this._isBackupFileCheckboxChanged) {
|
||||
let selectedRow = [];
|
||||
for (let i = 0; i < backupSetsToRestore.length; i++) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import * as DialogHelper from 'sql/workbench/browser/modal/dialogHelper';
|
||||
import * as types from 'vs/base/common/types';
|
||||
|
||||
@@ -12,7 +12,7 @@ import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
|
||||
export interface RestoreOptionsElement {
|
||||
optionMetadata: sqlops.ServiceOption;
|
||||
optionMetadata: azdata.ServiceOption;
|
||||
defaultValue: any;
|
||||
currentValue: any;
|
||||
}
|
||||
@@ -62,15 +62,15 @@ export class RestoreViewModel {
|
||||
private _onSetRestoreOption = new Emitter<RestoreOptionParam>();
|
||||
public onSetRestoreOption: Event<RestoreOptionParam> = this._onSetRestoreOption.event;
|
||||
|
||||
private _onUpdateBackupSetsToRestore = new Emitter<sqlops.DatabaseFileInfo[]>();
|
||||
public onUpdateBackupSetsToRestore: Event<sqlops.DatabaseFileInfo[]> = this._onUpdateBackupSetsToRestore.event;
|
||||
private _onUpdateBackupSetsToRestore = new Emitter<azdata.DatabaseFileInfo[]>();
|
||||
public onUpdateBackupSetsToRestore: Event<azdata.DatabaseFileInfo[]> = this._onUpdateBackupSetsToRestore.event;
|
||||
|
||||
private _onUpdateRestoreDatabaseFiles = new Emitter<sqlops.RestoreDatabaseFileInfo[]>();
|
||||
public onUpdateRestoreDatabaseFiles: Event<sqlops.RestoreDatabaseFileInfo[]> = this._onUpdateRestoreDatabaseFiles.event;
|
||||
private _onUpdateRestoreDatabaseFiles = new Emitter<azdata.RestoreDatabaseFileInfo[]>();
|
||||
public onUpdateRestoreDatabaseFiles: Event<azdata.RestoreDatabaseFileInfo[]> = this._onUpdateRestoreDatabaseFiles.event;
|
||||
|
||||
private _optionsMap: { [name: string]: RestoreOptionsElement } = {};
|
||||
|
||||
constructor(optionsMetadata: sqlops.ServiceOption[]) {
|
||||
constructor(optionsMetadata: azdata.ServiceOption[]) {
|
||||
optionsMetadata.forEach(optionMetadata => {
|
||||
let defaultValue = this.getDisplayValue(optionMetadata, optionMetadata.defaultValue);
|
||||
this._optionsMap[optionMetadata.name] = {
|
||||
@@ -84,7 +84,7 @@ export class RestoreViewModel {
|
||||
/**
|
||||
* Get option display value
|
||||
*/
|
||||
public getDisplayValue(optionMetadata: sqlops.ServiceOption, optionValue: any): any {
|
||||
public getDisplayValue(optionMetadata: azdata.ServiceOption, optionValue: any): any {
|
||||
let displayValue: any;
|
||||
switch (optionMetadata.valueType) {
|
||||
case ServiceOptionType.boolean:
|
||||
@@ -119,7 +119,7 @@ export class RestoreViewModel {
|
||||
/**
|
||||
* Get option metadata from the option map
|
||||
*/
|
||||
public getOptionMetadata(optionName: string): sqlops.ServiceOption {
|
||||
public getOptionMetadata(optionName: string): azdata.ServiceOption {
|
||||
return this._optionsMap[optionName] ? this._optionsMap[optionName].optionMetadata : undefined;
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ export class RestoreViewModel {
|
||||
/**
|
||||
* On restore plan response will update all the information from restore plan response
|
||||
*/
|
||||
public onRestorePlanResponse(restorePlanResponse: sqlops.RestorePlanResponse): void {
|
||||
public onRestorePlanResponse(restorePlanResponse: azdata.RestorePlanResponse): void {
|
||||
if (restorePlanResponse.planDetails && restorePlanResponse.planDetails['lastBackupTaken']) {
|
||||
this.updateLastBackupTaken(restorePlanResponse.planDetails['lastBackupTaken'].currentValue);
|
||||
}
|
||||
@@ -187,7 +187,7 @@ export class RestoreViewModel {
|
||||
/**
|
||||
* Update options with plan details
|
||||
*/
|
||||
public updateOptionWithPlanDetail(planDetails: { [key: string]: sqlops.RestorePlanDetailInfo }): void {
|
||||
public updateOptionWithPlanDetail(planDetails: { [key: string]: azdata.RestorePlanDetailInfo }): void {
|
||||
if (planDetails) {
|
||||
for (var key in planDetails) {
|
||||
let optionElement = this._optionsMap[key];
|
||||
@@ -234,7 +234,7 @@ export class RestoreViewModel {
|
||||
/**
|
||||
* Update backup sets to restore
|
||||
*/
|
||||
public updateBackupSetsToRestore(backupSetsToRestore: sqlops.DatabaseFileInfo[]): void {
|
||||
public updateBackupSetsToRestore(backupSetsToRestore: azdata.DatabaseFileInfo[]): void {
|
||||
this.selectedBackupSets = null;
|
||||
if (backupSetsToRestore) {
|
||||
this.selectedBackupSets = [];
|
||||
|
||||
@@ -9,7 +9,7 @@ import { IConnectionManagementService, IConnectableInput, INewConnectionParams }
|
||||
import { IQueryModelService } from 'sql/platform/query/common/queryModel';
|
||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { EditSessionReadyParams, ISelectionData } from 'sqlops';
|
||||
import { EditSessionReadyParams, ISelectionData } from 'azdata';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import nls = require('vs/nls');
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
|
||||
@@ -9,7 +9,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
import { Subject } from 'rxjs/Subject';
|
||||
import { Observer } from 'rxjs/Observer';
|
||||
|
||||
import { ResultSetSubset, EditUpdateCellResult, EditSubsetResult, EditCreateRowResult } from 'sqlops';
|
||||
import { ResultSetSubset, EditUpdateCellResult, EditSubsetResult, EditCreateRowResult } from 'azdata';
|
||||
import { IQueryModelService } from 'sql/platform/query/common/queryModel';
|
||||
import { ResultSerializer } from 'sql/platform/node/resultSerializer';
|
||||
import { ISaveRequest } from 'sql/parts/grid/common/interfaces';
|
||||
|
||||
@@ -39,7 +39,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
|
||||
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { EditUpdateCellResult } from 'sqlops';
|
||||
import { EditUpdateCellResult } from 'azdata';
|
||||
export const EDITDATA_SELECTOR: string = 'editdata-component';
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -8,7 +8,7 @@ import 'sql/parts/dashboard/common/dashboardPanelStyles';
|
||||
|
||||
import * as nls from 'vs/nls';
|
||||
import { Component, Inject, forwardRef, ChangeDetectorRef, ViewChild, Injectable } from '@angular/core';
|
||||
import { AgentJobInfo } from 'sqlops';
|
||||
import { AgentJobInfo } from 'azdata';
|
||||
import { PanelComponent, IPanelOptions, NavigationBarLayout } from 'sql/base/browser/ui/panel/panel.component';
|
||||
import { IJobManagementService } from 'sql/platform/jobManagement/common/interfaces';
|
||||
import { IDashboardService } from 'sql/platform/dashboard/browser/dashboardService';
|
||||
|
||||
@@ -14,7 +14,7 @@ import 'vs/css!sql/base/browser/ui/table/media/table';
|
||||
|
||||
import * as dom from 'vs/base/browser/dom';
|
||||
import * as nls from 'vs/nls';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { Component, Inject, forwardRef, ElementRef, ChangeDetectorRef, ViewChild, OnInit, OnDestroy } from '@angular/core';
|
||||
import { TabChild } from 'sql/base/browser/ui/panel/tab.component';
|
||||
import { Table } from 'sql/base/browser/ui/table/table';
|
||||
@@ -72,7 +72,7 @@ export class AlertsViewComponent extends JobManagementView implements OnInit, On
|
||||
private _didTabChange: boolean;
|
||||
@ViewChild('jobalertsgrid') _gridEl: ElementRef;
|
||||
|
||||
public alerts: sqlops.AgentAlertInfo[];
|
||||
public alerts: azdata.AgentAlertInfo[];
|
||||
public contextAction = NewAlertAction;
|
||||
|
||||
constructor(
|
||||
@@ -181,7 +181,7 @@ export class AlertsViewComponent extends JobManagementView implements OnInit, On
|
||||
}
|
||||
}
|
||||
|
||||
private onAlertsAvailable(alerts: sqlops.AgentAlertInfo[]) {
|
||||
private onAlertsAvailable(alerts: azdata.AgentAlertInfo[]) {
|
||||
let items: any = alerts.map((item) => {
|
||||
return {
|
||||
id: item.id,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import 'vs/css!./jobHistory';
|
||||
import 'vs/css!sql/media/icons/common-icons';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import * as nls from 'vs/nls';
|
||||
import * as dom from 'vs/base/browser/dom';
|
||||
import { OnInit, Component, Inject, Input, forwardRef, ElementRef, ChangeDetectorRef, ViewChild, ChangeDetectionStrategy, Injectable } from '@angular/core';
|
||||
@@ -53,9 +53,9 @@ export class JobHistoryComponent extends JobManagementView implements OnInit {
|
||||
@ViewChild('table') private _tableContainer: ElementRef;
|
||||
@ViewChild('jobsteps') private _jobStepsView: ElementRef;
|
||||
|
||||
@Input() public agentJobInfo: sqlops.AgentJobInfo = undefined;
|
||||
@Input() public agentJobHistories: sqlops.AgentJobHistoryInfo[] = undefined;
|
||||
public agentJobHistoryInfo: sqlops.AgentJobHistoryInfo = undefined;
|
||||
@Input() public agentJobInfo: azdata.AgentJobInfo = undefined;
|
||||
@Input() public agentJobHistories: azdata.AgentJobHistoryInfo[] = undefined;
|
||||
public agentJobHistoryInfo: azdata.AgentJobHistoryInfo = undefined;
|
||||
|
||||
private _isVisible: boolean = false;
|
||||
private _stepRows: JobStepsViewRow[] = [];
|
||||
@@ -63,7 +63,7 @@ export class JobHistoryComponent extends JobManagementView implements OnInit {
|
||||
private _showPreviousRuns: boolean = undefined;
|
||||
private _runStatus: string = undefined;
|
||||
private _jobCacheObject: JobCacheObject;
|
||||
private _agentJobInfo: sqlops.AgentJobInfo;
|
||||
private _agentJobInfo: azdata.AgentJobInfo;
|
||||
private _noJobsAvailable: boolean = false;
|
||||
|
||||
private static readonly HEADING_HEIGHT: number = 24;
|
||||
@@ -217,7 +217,7 @@ export class JobHistoryComponent extends JobManagementView implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
private didJobFail(job: sqlops.AgentJobHistoryInfo): boolean {
|
||||
private didJobFail(job: azdata.AgentJobHistoryInfo): boolean {
|
||||
for (let i = 0; i < job.steps.length; i++) {
|
||||
if (job.steps[i].runStatus === 0) {
|
||||
return true;
|
||||
@@ -226,7 +226,7 @@ export class JobHistoryComponent extends JobManagementView implements OnInit {
|
||||
return false;
|
||||
}
|
||||
|
||||
private buildHistoryTree(self: any, jobHistories: sqlops.AgentJobHistoryInfo[]) {
|
||||
private buildHistoryTree(self: any, jobHistories: azdata.AgentJobHistoryInfo[]) {
|
||||
self._treeController.jobHistories = jobHistories;
|
||||
let jobHistoryRows = this._treeController.jobHistories.map(job => self.convertToJobHistoryRow(job));
|
||||
self._treeDataSource.data = jobHistoryRows;
|
||||
@@ -259,7 +259,7 @@ export class JobHistoryComponent extends JobManagementView implements OnInit {
|
||||
this._agentViewComponent.showHistory = false;
|
||||
}
|
||||
|
||||
private convertToJobHistoryRow(historyInfo: sqlops.AgentJobHistoryInfo): JobHistoryRow {
|
||||
private convertToJobHistoryRow(historyInfo: azdata.AgentJobHistoryInfo): JobHistoryRow {
|
||||
let jobHistoryRow = new JobHistoryRow();
|
||||
jobHistoryRow.runDate = this.formatTime(historyInfo.runDate);
|
||||
jobHistoryRow.runStatus = JobManagementUtilities.convertToStatusString(historyInfo.runStatus);
|
||||
|
||||
@@ -13,7 +13,7 @@ import { Promise, TPromise } from 'vs/base/common/winjs.base';
|
||||
import { IMouseEvent } from 'vs/base/browser/mouseEvent';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { AgentJobHistoryInfo } from 'sqlops';
|
||||
import { AgentJobHistoryInfo } from 'azdata';
|
||||
import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
|
||||
export class JobHistoryRow {
|
||||
|
||||
@@ -12,7 +12,7 @@ import 'vs/css!../common/media/jobs';
|
||||
import 'vs/css!sql/media/icons/common-icons';
|
||||
import 'vs/css!sql/base/browser/ui/table/media/table';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import * as nls from 'vs/nls';
|
||||
import * as dom from 'vs/base/browser/dom';
|
||||
import { Component, Inject, forwardRef, ElementRef, ChangeDetectorRef, ViewChild, OnInit, OnDestroy } from '@angular/core';
|
||||
@@ -87,11 +87,11 @@ export class JobsViewComponent extends JobManagementView implements OnInit, OnDe
|
||||
private filterValueMap: { [columnName: string]: string[]; } = {};
|
||||
private sortingStylingMap: { [columnName: string]: any; } = {};
|
||||
|
||||
public jobs: sqlops.AgentJobInfo[];
|
||||
private jobHistories: { [jobId: string]: sqlops.AgentJobHistoryInfo[]; } = Object.create(null);
|
||||
private jobSteps: { [jobId: string]: sqlops.AgentJobStepInfo[]; } = Object.create(null);
|
||||
private jobAlerts: { [jobId: string]: sqlops.AgentAlertInfo[]; } = Object.create(null);
|
||||
private jobSchedules: { [jobId: string]: sqlops.AgentJobScheduleInfo[]; } = Object.create(null);
|
||||
public jobs: azdata.AgentJobInfo[];
|
||||
private jobHistories: { [jobId: string]: azdata.AgentJobHistoryInfo[]; } = Object.create(null);
|
||||
private jobSteps: { [jobId: string]: azdata.AgentJobStepInfo[]; } = Object.create(null);
|
||||
private jobAlerts: { [jobId: string]: azdata.AgentAlertInfo[]; } = Object.create(null);
|
||||
private jobSchedules: { [jobId: string]: azdata.AgentJobScheduleInfo[]; } = Object.create(null);
|
||||
public contextAction = NewJobAction;
|
||||
|
||||
@ViewChild('jobsgrid') _gridEl: ElementRef;
|
||||
@@ -223,7 +223,7 @@ export class JobsViewComponent extends JobManagementView implements OnInit, OnDe
|
||||
}
|
||||
}
|
||||
|
||||
private onJobsAvailable(jobs: sqlops.AgentJobInfo[]) {
|
||||
private onJobsAvailable(jobs: azdata.AgentJobInfo[]) {
|
||||
let jobViews: any;
|
||||
let start: boolean = true;
|
||||
if (!jobs) {
|
||||
@@ -545,7 +545,7 @@ export class JobsViewComponent extends JobManagementView implements OnInit, OnDe
|
||||
}
|
||||
}
|
||||
|
||||
private separateFailingJobs(): sqlops.AgentJobInfo[][] {
|
||||
private separateFailingJobs(): azdata.AgentJobInfo[][] {
|
||||
let failing = [];
|
||||
let nonFailing = [];
|
||||
for (let i = 0; i < this.jobs.length; i++) {
|
||||
@@ -573,7 +573,7 @@ export class JobsViewComponent extends JobManagementView implements OnInit, OnDe
|
||||
return cell.classList.contains('error-row');
|
||||
}
|
||||
|
||||
private getJob(args: Slick.OnClickEventArgs<any>): sqlops.AgentJobInfo {
|
||||
private getJob(args: Slick.OnClickEventArgs<any>): azdata.AgentJobInfo {
|
||||
let row = args.row;
|
||||
let jobName: string;
|
||||
let cell = args.grid.getCellNode(row, 1);
|
||||
@@ -586,7 +586,7 @@ export class JobsViewComponent extends JobManagementView implements OnInit, OnDe
|
||||
return job;
|
||||
}
|
||||
|
||||
private async curateJobHistory(jobs: sqlops.AgentJobInfo[], ownerUri: string) {
|
||||
private async curateJobHistory(jobs: azdata.AgentJobInfo[], ownerUri: string) {
|
||||
const self = this;
|
||||
for (let job of jobs) {
|
||||
let result = await this._jobManagementService.getJobHistory(ownerUri, job.jobId, job.name);
|
||||
@@ -600,7 +600,7 @@ export class JobsViewComponent extends JobManagementView implements OnInit, OnDe
|
||||
self._jobCacheObject.setJobAlerts(job.jobId, self.jobAlerts[job.jobId]);
|
||||
self._jobCacheObject.setJobSchedules(job.jobId, self.jobSchedules[job.jobId]);
|
||||
let jobHistories = self._jobCacheObject.getJobHistory(job.jobId);
|
||||
let previousRuns: sqlops.AgentJobHistoryInfo[];
|
||||
let previousRuns: azdata.AgentJobHistoryInfo[];
|
||||
if (jobHistories.length >= 5) {
|
||||
previousRuns = jobHistories.slice(jobHistories.length - 5, jobHistories.length);
|
||||
} else {
|
||||
@@ -620,7 +620,7 @@ export class JobsViewComponent extends JobManagementView implements OnInit, OnDe
|
||||
}
|
||||
}
|
||||
|
||||
private createJobChart(jobId: string, jobHistories: sqlops.AgentJobHistoryInfo[]): void {
|
||||
private createJobChart(jobId: string, jobHistories: azdata.AgentJobHistoryInfo[]): void {
|
||||
let chartHeights = this.getChartHeights(jobHistories);
|
||||
let runCharts = [];
|
||||
for (let i = 0; i < chartHeights.length; i++) {
|
||||
@@ -642,7 +642,7 @@ export class JobsViewComponent extends JobManagementView implements OnInit, OnDe
|
||||
}
|
||||
|
||||
// chart height normalization logic
|
||||
private getChartHeights(jobHistories: sqlops.AgentJobHistoryInfo[]): string[] {
|
||||
private getChartHeights(jobHistories: azdata.AgentJobHistoryInfo[]): string[] {
|
||||
if (!jobHistories || jobHistories.length === 0) {
|
||||
return [];
|
||||
}
|
||||
@@ -866,10 +866,10 @@ export class JobsViewComponent extends JobManagementView implements OnInit, OnDe
|
||||
return actions;
|
||||
}
|
||||
|
||||
protected convertStepsToStepInfos(steps: sqlops.AgentJobStep[], job: sqlops.AgentJobInfo): sqlops.AgentJobStepInfo[] {
|
||||
protected convertStepsToStepInfos(steps: azdata.AgentJobStep[], job: azdata.AgentJobInfo): azdata.AgentJobStepInfo[] {
|
||||
let result = [];
|
||||
steps.forEach(step => {
|
||||
let stepInfo: sqlops.AgentJobStepInfo = {
|
||||
let stepInfo: azdata.AgentJobStepInfo = {
|
||||
jobId: job.jobId,
|
||||
jobName: job.name,
|
||||
script: null,
|
||||
@@ -916,7 +916,7 @@ export class JobsViewComponent extends JobManagementView implements OnInit, OnDe
|
||||
}
|
||||
}
|
||||
|
||||
let job: sqlops.AgentJobInfo[] = this.jobs.filter(job => {
|
||||
let job: azdata.AgentJobInfo[] = this.jobs.filter(job => {
|
||||
return job.jobId === jobId;
|
||||
});
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import 'vs/css!sql/base/browser/ui/table/media/table';
|
||||
|
||||
import * as dom from 'vs/base/browser/dom';
|
||||
import * as nls from 'vs/nls';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { Component, Inject, forwardRef, ElementRef, ChangeDetectorRef, ViewChild, OnInit, OnDestroy } from '@angular/core';
|
||||
import { Table } from 'sql/base/browser/ui/table/table';
|
||||
import { AgentViewComponent } from 'sql/parts/jobManagement/agent/agentView.component';
|
||||
@@ -71,7 +71,7 @@ export class OperatorsViewComponent extends JobManagementView implements OnInit,
|
||||
private _didTabChange: boolean;
|
||||
@ViewChild('operatorsgrid') _gridEl: ElementRef;
|
||||
|
||||
public operators: sqlops.AgentOperatorInfo[];
|
||||
public operators: azdata.AgentOperatorInfo[];
|
||||
public contextAction = NewOperatorAction;
|
||||
|
||||
constructor(
|
||||
@@ -183,7 +183,7 @@ export class OperatorsViewComponent extends JobManagementView implements OnInit,
|
||||
}
|
||||
}
|
||||
|
||||
private onOperatorsAvailable(operators: sqlops.AgentOperatorInfo[]) {
|
||||
private onOperatorsAvailable(operators: azdata.AgentOperatorInfo[]) {
|
||||
let items: any = operators.map((item) => {
|
||||
return {
|
||||
id: item.id,
|
||||
|
||||
@@ -13,7 +13,7 @@ import 'vs/css!sql/media/icons/common-icons';
|
||||
import 'vs/css!sql/base/browser/ui/table/media/table';
|
||||
|
||||
import * as dom from 'vs/base/browser/dom';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import * as nls from 'vs/nls';
|
||||
import { Component, Inject, forwardRef, ElementRef, ChangeDetectorRef, ViewChild, OnInit, OnDestroy } from '@angular/core';
|
||||
import { Table } from 'sql/base/browser/ui/table/table';
|
||||
@@ -72,7 +72,7 @@ export class ProxiesViewComponent extends JobManagementView implements OnInit, O
|
||||
private _isCloud: boolean;
|
||||
private _proxiesCacheObject: ProxiesCacheObject;
|
||||
|
||||
public proxies: sqlops.AgentProxyInfo[];
|
||||
public proxies: azdata.AgentProxyInfo[];
|
||||
public readonly contextAction = NewProxyAction;
|
||||
|
||||
private _didTabChange: boolean;
|
||||
@@ -186,7 +186,7 @@ export class ProxiesViewComponent extends JobManagementView implements OnInit, O
|
||||
}
|
||||
}
|
||||
|
||||
private onProxiesAvailable(proxies: sqlops.AgentProxyInfo[]) {
|
||||
private onProxiesAvailable(proxies: azdata.AgentProxyInfo[]) {
|
||||
let items: any = proxies.map((item) => {
|
||||
return {
|
||||
id: item.accountName,
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
ViewChild, ElementRef, OnDestroy, AfterViewInit
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { ComponentWithIconBase } from 'sql/parts/modelComponents/componentWithIconBase';
|
||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
@@ -132,47 +132,47 @@ export default class ButtonComponent extends ComponentWithIconBase implements IC
|
||||
// CSS-bound properties
|
||||
|
||||
private get label(): string {
|
||||
return this.getPropertyOrDefault<sqlops.ButtonProperties, string>((props) => props.label, '');
|
||||
return this.getPropertyOrDefault<azdata.ButtonProperties, string>((props) => props.label, '');
|
||||
}
|
||||
|
||||
private set label(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.ButtonProperties, string>(this.setValueProperties, newValue);
|
||||
this.setPropertyFromUI<azdata.ButtonProperties, string>(this.setValueProperties, newValue);
|
||||
}
|
||||
|
||||
private get isFile(): boolean {
|
||||
return this.getPropertyOrDefault<sqlops.ButtonProperties, boolean>((props) => props.isFile, false);
|
||||
return this.getPropertyOrDefault<azdata.ButtonProperties, boolean>((props) => props.isFile, false);
|
||||
}
|
||||
|
||||
private set isFile(newValue: boolean) {
|
||||
this.setPropertyFromUI<sqlops.ButtonProperties, boolean>(this.setFileProperties, newValue);
|
||||
this.setPropertyFromUI<azdata.ButtonProperties, boolean>(this.setFileProperties, newValue);
|
||||
}
|
||||
|
||||
private get fileContent(): string {
|
||||
return this.getPropertyOrDefault<sqlops.ButtonProperties, string>((props) => props.fileContent, '');
|
||||
return this.getPropertyOrDefault<azdata.ButtonProperties, string>((props) => props.fileContent, '');
|
||||
}
|
||||
|
||||
private set fileContent(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.ButtonProperties, string>(this.setFileContentProperties, newValue);
|
||||
this.setPropertyFromUI<azdata.ButtonProperties, string>(this.setFileContentProperties, newValue);
|
||||
}
|
||||
|
||||
private setFileContentProperties(properties: sqlops.ButtonProperties, fileContent: string): void {
|
||||
private setFileContentProperties(properties: azdata.ButtonProperties, fileContent: string): void {
|
||||
properties.fileContent = fileContent;
|
||||
}
|
||||
|
||||
private setValueProperties(properties: sqlops.ButtonProperties, label: string): void {
|
||||
private setValueProperties(properties: azdata.ButtonProperties, label: string): void {
|
||||
properties.label = label;
|
||||
}
|
||||
|
||||
private setFileProperties(properties: sqlops.ButtonProperties, isFile: boolean): void {
|
||||
private setFileProperties(properties: azdata.ButtonProperties, isFile: boolean): void {
|
||||
properties.isFile = isFile;
|
||||
}
|
||||
|
||||
private get title(): string {
|
||||
return this.getPropertyOrDefault<sqlops.ButtonProperties, string>((props) => props.title, '');
|
||||
return this.getPropertyOrDefault<azdata.ButtonProperties, string>((props) => props.title, '');
|
||||
}
|
||||
|
||||
private set title(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.ButtonProperties, string>((properties, title) => { properties.title = title; }, newValue);
|
||||
this.setPropertyFromUI<azdata.ButtonProperties, string>((properties, title) => { properties.title = title; }, newValue);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
ViewChild, ViewChildren, ElementRef, Injector, OnDestroy, QueryList,
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
|
||||
import * as colors from 'vs/platform/theme/common/colorRegistry';
|
||||
@@ -121,11 +121,11 @@ export default class CardComponent extends ComponentWithIconBase implements ICom
|
||||
}
|
||||
|
||||
public get selected(): boolean {
|
||||
return this.getPropertyOrDefault<sqlops.CardProperties, boolean>((props) => props.selected, false);
|
||||
return this.getPropertyOrDefault<azdata.CardProperties, boolean>((props) => props.selected, false);
|
||||
}
|
||||
|
||||
public set selected(newValue: boolean) {
|
||||
this.setPropertyFromUI<sqlops.CardProperties, boolean>((props, value) => props.selected = value, newValue);
|
||||
this.setPropertyFromUI<azdata.CardProperties, boolean>((props, value) => props.selected = value, newValue);
|
||||
}
|
||||
|
||||
public get isDetailsCard(): boolean {
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
ViewChild, ElementRef, OnDestroy, AfterViewInit
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { ComponentBase } from 'sql/parts/modelComponents/componentBase';
|
||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
@@ -87,18 +87,18 @@ export default class CheckBoxComponent extends ComponentBase implements ICompone
|
||||
// CSS-bound properties
|
||||
|
||||
public get checked(): boolean {
|
||||
return this.getPropertyOrDefault<sqlops.CheckBoxProperties, boolean>((props) => props.checked, false);
|
||||
return this.getPropertyOrDefault<azdata.CheckBoxProperties, boolean>((props) => props.checked, false);
|
||||
}
|
||||
|
||||
public set checked(newValue: boolean) {
|
||||
this.setPropertyFromUI<sqlops.CheckBoxProperties, boolean>((properties, value) => { properties.checked = value; }, newValue);
|
||||
this.setPropertyFromUI<azdata.CheckBoxProperties, boolean>((properties, value) => { properties.checked = value; }, newValue);
|
||||
}
|
||||
|
||||
private get label(): string {
|
||||
return this.getPropertyOrDefault<sqlops.CheckBoxProperties, string>((props) => props.label, '');
|
||||
return this.getPropertyOrDefault<azdata.CheckBoxProperties, string>((props) => props.label, '');
|
||||
}
|
||||
|
||||
private set label(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.CheckBoxProperties, string>((properties, label) => { properties.label = label; }, newValue);
|
||||
this.setPropertyFromUI<azdata.CheckBoxProperties, string>((properties, label) => { properties.label = label; }, newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
import * as types from 'vs/base/common/types';
|
||||
|
||||
import { IComponent, IComponentDescriptor, IModelStore, IComponentEventArgs, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { ComponentHostDirective } from 'sql/parts/dashboard/common/componentHost.directive';
|
||||
import { DashboardServiceInterface } from 'sql/parts/dashboard/services/dashboardServiceInterface.service';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
@@ -137,35 +137,35 @@ export abstract class ComponentBase extends Disposable implements IComponent, On
|
||||
}
|
||||
|
||||
public get height(): number | string {
|
||||
return this.getPropertyOrDefault<sqlops.ComponentProperties, number | string>((props) => props.height, undefined);
|
||||
return this.getPropertyOrDefault<azdata.ComponentProperties, number | string>((props) => props.height, undefined);
|
||||
}
|
||||
|
||||
public set height(newValue: number | string) {
|
||||
this.setPropertyFromUI<sqlops.ComponentProperties, number | string>((props, value) => props.height = value, newValue);
|
||||
this.setPropertyFromUI<azdata.ComponentProperties, number | string>((props, value) => props.height = value, newValue);
|
||||
}
|
||||
|
||||
public get width(): number | string {
|
||||
return this.getPropertyOrDefault<sqlops.ComponentProperties, number | string>((props) => props.width, undefined);
|
||||
return this.getPropertyOrDefault<azdata.ComponentProperties, number | string>((props) => props.width, undefined);
|
||||
}
|
||||
|
||||
public set width(newValue: number | string) {
|
||||
this.setPropertyFromUI<sqlops.ComponentProperties, number | string>((props, value) => props.width = value, newValue);
|
||||
this.setPropertyFromUI<azdata.ComponentProperties, number | string>((props, value) => props.width = value, newValue);
|
||||
}
|
||||
|
||||
public get position(): string {
|
||||
return this.getPropertyOrDefault<sqlops.ComponentProperties, string>((props) => props.position, '');
|
||||
return this.getPropertyOrDefault<azdata.ComponentProperties, string>((props) => props.position, '');
|
||||
}
|
||||
|
||||
public set position(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.ComponentProperties, string>((properties, position) => { properties.position = position; }, newValue);
|
||||
this.setPropertyFromUI<azdata.ComponentProperties, string>((properties, position) => { properties.position = position; }, newValue);
|
||||
}
|
||||
|
||||
public get CSSStyles(): { [key: string]: string } {
|
||||
return this.getPropertyOrDefault<sqlops.ComponentProperties, { [key: string]: string }>((props) => props.CSSStyles, {});
|
||||
return this.getPropertyOrDefault<azdata.ComponentProperties, { [key: string]: string }>((props) => props.CSSStyles, {});
|
||||
}
|
||||
|
||||
public set CSSStyles(newValue: { [key: string]: string }) {
|
||||
this.setPropertyFromUI<sqlops.ComponentProperties, { [key: string]: string }>((properties, CSSStyles) => { properties.CSSStyles = CSSStyles; }, newValue);
|
||||
this.setPropertyFromUI<azdata.ComponentProperties, { [key: string]: string }>((properties, CSSStyles) => { properties.CSSStyles = CSSStyles; }, newValue);
|
||||
}
|
||||
|
||||
public convertSizeToNumber(size: number | string): number {
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
} from '@angular/core';
|
||||
|
||||
import { IComponent, IComponentDescriptor, IModelStore, IComponentEventArgs, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { IdGenerator } from 'vs/base/common/idGenerator';
|
||||
import { createCSSRule, removeCSSRulesContainingSelector } from 'vs/base/browser/dom';
|
||||
@@ -89,15 +89,15 @@ export abstract class ComponentWithIconBase extends ComponentBase {
|
||||
}
|
||||
|
||||
public get iconPath(): string | URI | { light: string | URI; dark: string | URI } {
|
||||
return this.getPropertyOrDefault<sqlops.ComponentWithIcon, IUserFriendlyIcon>((props) => props.iconPath, undefined);
|
||||
return this.getPropertyOrDefault<azdata.ComponentWithIcon, IUserFriendlyIcon>((props) => props.iconPath, undefined);
|
||||
}
|
||||
|
||||
public get iconHeight(): number | string {
|
||||
return this.getPropertyOrDefault<sqlops.ComponentWithIcon, number | string>((props) => props.iconHeight, '50px');
|
||||
return this.getPropertyOrDefault<azdata.ComponentWithIcon, number | string>((props) => props.iconHeight, '50px');
|
||||
}
|
||||
|
||||
public get iconWidth(): number | string {
|
||||
return this.getPropertyOrDefault<sqlops.ComponentWithIcon, number | string>((props) => props.iconWidth, '50px');
|
||||
return this.getPropertyOrDefault<azdata.ComponentWithIcon, number | string>((props) => props.iconWidth, '50px');
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
ViewChild, ViewChildren, ElementRef, Injector, OnDestroy, QueryList, AfterViewInit
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { ComponentBase } from 'sql/parts/modelComponents/componentBase';
|
||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
@@ -88,17 +88,17 @@ export default class DeclarativeTableComponent extends ComponentBase implements
|
||||
}
|
||||
|
||||
private isCheckBox(cell: number): boolean {
|
||||
let column: sqlops.DeclarativeTableColumn = this.columns[cell];
|
||||
let column: azdata.DeclarativeTableColumn = this.columns[cell];
|
||||
return column.valueType === DeclarativeDataType.boolean;
|
||||
}
|
||||
|
||||
private isControlEnabled(cell: number): boolean {
|
||||
let column: sqlops.DeclarativeTableColumn = this.columns[cell];
|
||||
let column: azdata.DeclarativeTableColumn = this.columns[cell];
|
||||
return !column.isReadOnly;
|
||||
}
|
||||
|
||||
private isLabel(cell: number): boolean {
|
||||
let column: sqlops.DeclarativeTableColumn = this.columns[cell];
|
||||
let column: azdata.DeclarativeTableColumn = this.columns[cell];
|
||||
return column.isReadOnly && column.valueType === DeclarativeDataType.string;
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ export default class DeclarativeTableComponent extends ComponentBase implements
|
||||
|
||||
private onSelectBoxChanged(e: ISelectData | string, row: number, cell: number): void {
|
||||
|
||||
let column: sqlops.DeclarativeTableColumn = this.columns[cell];
|
||||
let column: azdata.DeclarativeTableColumn = this.columns[cell];
|
||||
if (column.categoryValues) {
|
||||
if (typeof e === 'string') {
|
||||
let category = column.categoryValues.find(c => c.displayName === e);
|
||||
@@ -135,7 +135,7 @@ export default class DeclarativeTableComponent extends ComponentBase implements
|
||||
private onCellDataChanged(newValue: any, row: number, cell: number): void {
|
||||
this.data[row][cell] = newValue;
|
||||
this.data = this.data;
|
||||
let newCellData: sqlops.TableCell = {
|
||||
let newCellData: azdata.TableCell = {
|
||||
row: row,
|
||||
column: cell,
|
||||
value: newValue
|
||||
@@ -147,32 +147,32 @@ export default class DeclarativeTableComponent extends ComponentBase implements
|
||||
}
|
||||
|
||||
private isSelectBox(cell: number): boolean {
|
||||
let column: sqlops.DeclarativeTableColumn = this.columns[cell];
|
||||
let column: azdata.DeclarativeTableColumn = this.columns[cell];
|
||||
return column.valueType === DeclarativeDataType.category;
|
||||
}
|
||||
|
||||
private isEditableSelectBox(cell: number): boolean {
|
||||
let column: sqlops.DeclarativeTableColumn = this.columns[cell];
|
||||
let column: azdata.DeclarativeTableColumn = this.columns[cell];
|
||||
return column.valueType === DeclarativeDataType.editableCategory;
|
||||
}
|
||||
|
||||
private isInputBox(cell: number): boolean {
|
||||
let column: sqlops.DeclarativeTableColumn = this.columns[cell];
|
||||
let column: azdata.DeclarativeTableColumn = this.columns[cell];
|
||||
return column.valueType === DeclarativeDataType.string && !column.isReadOnly;
|
||||
}
|
||||
|
||||
private getColumnWidth(cell: number): string {
|
||||
let column: sqlops.DeclarativeTableColumn = this.columns[cell];
|
||||
let column: azdata.DeclarativeTableColumn = this.columns[cell];
|
||||
return this.convertSize(column.width, '30px');
|
||||
}
|
||||
|
||||
private GetOptions(cell: number): string[] {
|
||||
let column: sqlops.DeclarativeTableColumn = this.columns[cell];
|
||||
let column: azdata.DeclarativeTableColumn = this.columns[cell];
|
||||
return column.categoryValues ? column.categoryValues.map(x => x.displayName) : [];
|
||||
}
|
||||
|
||||
private GetSelectedOptionDisplayName(row: number, cell: number): string {
|
||||
let column: sqlops.DeclarativeTableColumn = this.columns[cell];
|
||||
let column: azdata.DeclarativeTableColumn = this.columns[cell];
|
||||
let cellData = this.data[row][cell];
|
||||
if (cellData && column.categoryValues) {
|
||||
let category = column.categoryValues.find(v => v.name === cellData);
|
||||
@@ -200,18 +200,18 @@ export default class DeclarativeTableComponent extends ComponentBase implements
|
||||
}
|
||||
|
||||
public get data(): any[][] {
|
||||
return this.getPropertyOrDefault<sqlops.DeclarativeTableProperties, any[]>((props) => props.data, []);
|
||||
return this.getPropertyOrDefault<azdata.DeclarativeTableProperties, any[]>((props) => props.data, []);
|
||||
}
|
||||
|
||||
public set data(newValue: any[][]) {
|
||||
this.setPropertyFromUI<sqlops.DeclarativeTableProperties, any[][]>((props, value) => props.data = value, newValue);
|
||||
this.setPropertyFromUI<azdata.DeclarativeTableProperties, any[][]>((props, value) => props.data = value, newValue);
|
||||
}
|
||||
|
||||
public get columns(): sqlops.DeclarativeTableColumn[] {
|
||||
return this.getPropertyOrDefault<sqlops.DeclarativeTableProperties, sqlops.DeclarativeTableColumn[]>((props) => props.columns, []);
|
||||
public get columns(): azdata.DeclarativeTableColumn[] {
|
||||
return this.getPropertyOrDefault<azdata.DeclarativeTableProperties, azdata.DeclarativeTableColumn[]>((props) => props.columns, []);
|
||||
}
|
||||
|
||||
public set columns(newValue: sqlops.DeclarativeTableColumn[]) {
|
||||
this.setPropertyFromUI<sqlops.DeclarativeTableProperties, sqlops.DeclarativeTableColumn[]>((props, value) => props.columns = value, newValue);
|
||||
public set columns(newValue: azdata.DeclarativeTableColumn[]) {
|
||||
this.setPropertyFromUI<azdata.DeclarativeTableProperties, azdata.DeclarativeTableColumn[]>((props, value) => props.columns = value, newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
} from '@angular/core';
|
||||
|
||||
import { IComponent, IComponentDescriptor, IModelStore } from 'sql/parts/modelComponents/interfaces';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { DashboardServiceInterface } from 'sql/parts/dashboard/services/dashboardServiceInterface.service';
|
||||
import { ContainerBase } from 'sql/parts/modelComponents/componentBase';
|
||||
@@ -19,7 +19,7 @@ import { ModelComponentWrapper } from 'sql/parts/modelComponents/modelComponentW
|
||||
import types = require('vs/base/common/types');
|
||||
|
||||
class DivItem {
|
||||
constructor(public descriptor: IComponentDescriptor, public config: sqlops.DivItemLayout) { }
|
||||
constructor(public descriptor: IComponentDescriptor, public config: azdata.DivItemLayout) { }
|
||||
}
|
||||
|
||||
@Component({
|
||||
@@ -32,7 +32,7 @@ class DivItem {
|
||||
</div>
|
||||
`
|
||||
})
|
||||
export default class DivContainer extends ContainerBase<sqlops.DivItemLayout> implements IComponent, OnDestroy {
|
||||
export default class DivContainer extends ContainerBase<azdata.DivItemLayout> implements IComponent, OnDestroy {
|
||||
@Input() descriptor: IComponentDescriptor;
|
||||
@Input() modelStore: IModelStore;
|
||||
@ViewChild('divContainer', { read: ElementRef }) divContainer;
|
||||
@@ -59,7 +59,7 @@ export default class DivContainer extends ContainerBase<sqlops.DivItemLayout> im
|
||||
|
||||
/// IComponent implementation
|
||||
|
||||
public setLayout(layout: sqlops.DivLayout): void {
|
||||
public setLayout(layout: azdata.DivLayout): void {
|
||||
this._height = this.convertSize(layout.height);
|
||||
this._width = this.convertSize(layout.width);
|
||||
this.layout();
|
||||
@@ -98,17 +98,17 @@ export default class DivContainer extends ContainerBase<sqlops.DivItemLayout> im
|
||||
|
||||
// CSS-bound properties
|
||||
public get overflowY(): string {
|
||||
return this.getPropertyOrDefault<sqlops.DivContainerProperties, any>((props) => props.overflowY, '');
|
||||
return this.getPropertyOrDefault<azdata.DivContainerProperties, any>((props) => props.overflowY, '');
|
||||
}
|
||||
public set overflowY(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.DivContainerProperties, any>((properties, newValue) => { properties.overflowY = newValue; }, newValue);
|
||||
this.setPropertyFromUI<azdata.DivContainerProperties, any>((properties, newValue) => { properties.overflowY = newValue; }, newValue);
|
||||
}
|
||||
|
||||
public get yOffsetChange(): number {
|
||||
return this.getPropertyOrDefault<sqlops.DivContainerProperties, any>((props) => props.yOffsetChange, 0);
|
||||
return this.getPropertyOrDefault<azdata.DivContainerProperties, any>((props) => props.yOffsetChange, 0);
|
||||
}
|
||||
public set yOffsetChange(newValue: number) {
|
||||
this.setPropertyFromUI<sqlops.DivContainerProperties, any>((properties, newValue) => { properties.yOffsetChange = newValue; }, newValue);
|
||||
this.setPropertyFromUI<azdata.DivContainerProperties, any>((properties, newValue) => { properties.yOffsetChange = newValue; }, newValue);
|
||||
}
|
||||
|
||||
private getItemOrder(item: DivItem): number {
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
ViewChild, ViewChildren, ElementRef, Injector, OnDestroy, QueryList
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { $, Builder } from 'sql/base/browser/builder';
|
||||
|
||||
@@ -83,10 +83,10 @@ export default class DomComponent extends ComponentBase implements IComponent, O
|
||||
|
||||
// CSS-bound properties
|
||||
public get html(): string {
|
||||
return this.getPropertyOrDefault<sqlops.DomProperties, string>((props) => props.html, '');
|
||||
return this.getPropertyOrDefault<azdata.DomProperties, string>((props) => props.html, '');
|
||||
}
|
||||
|
||||
public set html(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.DomProperties, string>((properties, html) => { properties.html = html; }, newValue);
|
||||
this.setPropertyFromUI<azdata.DomProperties, string>((properties, html) => { properties.html = html; }, newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
ViewChild, ElementRef, OnDestroy, AfterViewInit
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { ComponentBase } from 'sql/parts/modelComponents/componentBase';
|
||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
@@ -128,7 +128,7 @@ export default class DropDownComponent extends ComponentBase implements ICompone
|
||||
if (!this.valuesHaveDisplayName()) {
|
||||
return this.values as string[];
|
||||
} else {
|
||||
return (<sqlops.CategoryValue[]>this.values).map(v => v.displayName);
|
||||
return (<azdata.CategoryValue[]>this.values).map(v => v.displayName);
|
||||
}
|
||||
}
|
||||
return [];
|
||||
@@ -140,8 +140,8 @@ export default class DropDownComponent extends ComponentBase implements ICompone
|
||||
|
||||
private getSelectedValue(): string {
|
||||
if (this.values && this.values.length > 0 && this.valuesHaveDisplayName()) {
|
||||
let selectedValue = <sqlops.CategoryValue>this.value || <sqlops.CategoryValue>this.values[0];
|
||||
let valueCategory = (<sqlops.CategoryValue[]>this.values).find(v => v.name === selectedValue.name);
|
||||
let selectedValue = <azdata.CategoryValue>this.value || <azdata.CategoryValue>this.values[0];
|
||||
let valueCategory = (<azdata.CategoryValue[]>this.values).find(v => v.name === selectedValue.name);
|
||||
return valueCategory && valueCategory.displayName;
|
||||
} else {
|
||||
if (!this.value && this.values && this.values.length > 0) {
|
||||
@@ -153,7 +153,7 @@ export default class DropDownComponent extends ComponentBase implements ICompone
|
||||
|
||||
private setSelectedValue(newValue: string): void {
|
||||
if (this.values && this.valuesHaveDisplayName()) {
|
||||
let valueCategory = (<sqlops.CategoryValue[]>this.values).find(v => v.displayName === newValue);
|
||||
let valueCategory = (<azdata.CategoryValue[]>this.values).find(v => v.displayName === newValue);
|
||||
this.value = valueCategory;
|
||||
} else {
|
||||
this.value = newValue;
|
||||
@@ -162,12 +162,12 @@ export default class DropDownComponent extends ComponentBase implements ICompone
|
||||
|
||||
// CSS-bound properties
|
||||
|
||||
private get value(): string | sqlops.CategoryValue {
|
||||
return this.getPropertyOrDefault<sqlops.DropDownProperties, string | sqlops.CategoryValue>((props) => props.value, '');
|
||||
private get value(): string | azdata.CategoryValue {
|
||||
return this.getPropertyOrDefault<azdata.DropDownProperties, string | azdata.CategoryValue>((props) => props.value, '');
|
||||
}
|
||||
|
||||
private get editable(): boolean {
|
||||
return this.getPropertyOrDefault<sqlops.DropDownProperties, boolean>((props) => props.editable, false);
|
||||
return this.getPropertyOrDefault<azdata.DropDownProperties, boolean>((props) => props.editable, false);
|
||||
}
|
||||
|
||||
public getEditableDisplay(): string {
|
||||
@@ -178,23 +178,23 @@ export default class DropDownComponent extends ComponentBase implements ICompone
|
||||
return !this.editable ? '' : 'none';
|
||||
}
|
||||
|
||||
private set value(newValue: string | sqlops.CategoryValue) {
|
||||
this.setPropertyFromUI<sqlops.DropDownProperties, string | sqlops.CategoryValue>(this.setValueProperties, newValue);
|
||||
private set value(newValue: string | azdata.CategoryValue) {
|
||||
this.setPropertyFromUI<azdata.DropDownProperties, string | azdata.CategoryValue>(this.setValueProperties, newValue);
|
||||
}
|
||||
|
||||
private get values(): string[] | sqlops.CategoryValue[] {
|
||||
return this.getPropertyOrDefault<sqlops.DropDownProperties, string[] | sqlops.CategoryValue[]>((props) => props.values, []);
|
||||
private get values(): string[] | azdata.CategoryValue[] {
|
||||
return this.getPropertyOrDefault<azdata.DropDownProperties, string[] | azdata.CategoryValue[]>((props) => props.values, []);
|
||||
}
|
||||
|
||||
private set values(newValue: string[] | sqlops.CategoryValue[]) {
|
||||
this.setPropertyFromUI<sqlops.DropDownProperties, string[] | sqlops.CategoryValue[]>(this.setValuesProperties, newValue);
|
||||
private set values(newValue: string[] | azdata.CategoryValue[]) {
|
||||
this.setPropertyFromUI<azdata.DropDownProperties, string[] | azdata.CategoryValue[]>(this.setValuesProperties, newValue);
|
||||
}
|
||||
|
||||
private setValueProperties(properties: sqlops.DropDownProperties, value: string | sqlops.CategoryValue): void {
|
||||
private setValueProperties(properties: azdata.DropDownProperties, value: string | azdata.CategoryValue): void {
|
||||
properties.value = value;
|
||||
}
|
||||
|
||||
private setValuesProperties(properties: sqlops.DropDownProperties, values: string[] | sqlops.CategoryValue[]): void {
|
||||
private setValuesProperties(properties: azdata.DropDownProperties, values: string[] | azdata.CategoryValue[]): void {
|
||||
properties.values = values;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
ViewChild, ViewChildren, ElementRef, Injector, OnDestroy, QueryList
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ITextModel } from 'vs/editor/common/model';
|
||||
@@ -161,42 +161,42 @@ export default class EditorComponent extends ComponentBase implements IComponent
|
||||
|
||||
// CSS-bound properties
|
||||
public get content(): string {
|
||||
return this.getPropertyOrDefault<sqlops.EditorProperties, string>((props) => props.content, undefined);
|
||||
return this.getPropertyOrDefault<azdata.EditorProperties, string>((props) => props.content, undefined);
|
||||
}
|
||||
|
||||
public set content(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.EditorProperties, string>((properties, content) => { properties.content = content; }, newValue);
|
||||
this.setPropertyFromUI<azdata.EditorProperties, string>((properties, content) => { properties.content = content; }, newValue);
|
||||
}
|
||||
|
||||
public get languageMode(): string {
|
||||
return this.getPropertyOrDefault<sqlops.EditorProperties, string>((props) => props.languageMode, undefined);
|
||||
return this.getPropertyOrDefault<azdata.EditorProperties, string>((props) => props.languageMode, undefined);
|
||||
}
|
||||
|
||||
public set languageMode(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.EditorProperties, string>((properties, languageMode) => { properties.languageMode = languageMode; }, newValue);
|
||||
this.setPropertyFromUI<azdata.EditorProperties, string>((properties, languageMode) => { properties.languageMode = languageMode; }, newValue);
|
||||
}
|
||||
|
||||
public get isAutoResizable(): boolean {
|
||||
return this.getPropertyOrDefault<sqlops.EditorProperties, boolean>((props) => props.isAutoResizable, false);
|
||||
return this.getPropertyOrDefault<azdata.EditorProperties, boolean>((props) => props.isAutoResizable, false);
|
||||
}
|
||||
|
||||
public set isAutoResizable(newValue: boolean) {
|
||||
this.setPropertyFromUI<sqlops.EditorProperties, boolean>((properties, isAutoResizable) => { properties.isAutoResizable = isAutoResizable; }, newValue);
|
||||
this.setPropertyFromUI<azdata.EditorProperties, boolean>((properties, isAutoResizable) => { properties.isAutoResizable = isAutoResizable; }, newValue);
|
||||
}
|
||||
|
||||
public get minimumHeight(): number {
|
||||
return this.getPropertyOrDefault<sqlops.EditorProperties, number>((props) => props.minimumHeight, this._editor.minimumHeight);
|
||||
return this.getPropertyOrDefault<azdata.EditorProperties, number>((props) => props.minimumHeight, this._editor.minimumHeight);
|
||||
}
|
||||
|
||||
public set minimumHeight(newValue: number) {
|
||||
this.setPropertyFromUI<sqlops.EditorProperties, number>((properties, minimumHeight) => { properties.minimumHeight = minimumHeight; }, newValue);
|
||||
this.setPropertyFromUI<azdata.EditorProperties, number>((properties, minimumHeight) => { properties.minimumHeight = minimumHeight; }, newValue);
|
||||
}
|
||||
|
||||
public get editorUri(): string {
|
||||
return this.getPropertyOrDefault<sqlops.EditorProperties, string>((props) => props.editorUri, '');
|
||||
return this.getPropertyOrDefault<azdata.EditorProperties, string>((props) => props.editorUri, '');
|
||||
}
|
||||
|
||||
public set editorUri(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.EditorProperties, string>((properties, editorUri) => { properties.editorUri = editorUri; }, newValue);
|
||||
this.setPropertyFromUI<azdata.EditorProperties, string>((properties, editorUri) => { properties.editorUri = editorUri; }, newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
Component, Input, Inject, ChangeDetectorRef, forwardRef, ViewChild, ElementRef, OnDestroy, AfterViewInit
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { ComponentBase } from 'sql/parts/modelComponents/componentBase';
|
||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
@@ -124,10 +124,10 @@ export default class FileBrowserTreeComponent extends ComponentBase implements I
|
||||
|
||||
// CSS-bound properties
|
||||
public get ownerUri(): string {
|
||||
return this.getPropertyOrDefault<sqlops.FileBrowserTreeProperties, string>((props) => props.ownerUri, '');
|
||||
return this.getPropertyOrDefault<azdata.FileBrowserTreeProperties, string>((props) => props.ownerUri, '');
|
||||
}
|
||||
|
||||
public set ownerUri(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.FileBrowserTreeProperties, string>((props, value) => props.ownerUri = value, newValue);
|
||||
this.setPropertyFromUI<azdata.FileBrowserTreeProperties, string>((props, value) => props.ownerUri = value, newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
} from '@angular/core';
|
||||
|
||||
import { IComponent, IComponentDescriptor, IModelStore } from 'sql/parts/modelComponents/interfaces';
|
||||
import { FlexLayout, FlexItemLayout } from 'sqlops';
|
||||
import { FlexLayout, FlexItemLayout } from 'azdata';
|
||||
|
||||
import { DashboardServiceInterface } from 'sql/parts/dashboard/services/dashboardServiceInterface.service';
|
||||
import { ContainerBase } from 'sql/parts/modelComponents/componentBase';
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
} from '@angular/core';
|
||||
|
||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
import { FormLayout, FormItemLayout } from 'sqlops';
|
||||
import { FormLayout, FormItemLayout } from 'azdata';
|
||||
|
||||
import { DashboardServiceInterface } from 'sql/parts/dashboard/services/dashboardServiceInterface.service';
|
||||
import { ContainerBase } from 'sql/parts/modelComponents/componentBase';
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
} from '@angular/core';
|
||||
|
||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
import { GroupLayout, GroupItemLayout } from 'sqlops';
|
||||
import { GroupLayout, GroupItemLayout } from 'azdata';
|
||||
|
||||
import { DashboardServiceInterface } from 'sql/parts/dashboard/services/dashboardServiceInterface.service';
|
||||
import { ContainerBase } from 'sql/parts/modelComponents/componentBase';
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
OnDestroy, AfterViewInit, ElementRef
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { ComponentBase } from 'sql/parts/modelComponents/componentBase';
|
||||
import { IComponent, IComponentDescriptor, IModelStore } from 'sql/parts/modelComponents/interfaces';
|
||||
@@ -45,11 +45,11 @@ export default class HyperlinkComponent extends ComponentBase implements ICompon
|
||||
}
|
||||
|
||||
public set label(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.HyperlinkComponentProperties, string>((properties, value) => { properties.label = value; }, newValue);
|
||||
this.setPropertyFromUI<azdata.HyperlinkComponentProperties, string>((properties, value) => { properties.label = value; }, newValue);
|
||||
}
|
||||
|
||||
public get label(): string {
|
||||
return this.getPropertyOrDefault<sqlops.HyperlinkComponentProperties, string>((props) => props.label, '');
|
||||
return this.getPropertyOrDefault<azdata.HyperlinkComponentProperties, string>((props) => props.label, '');
|
||||
}
|
||||
|
||||
public getLabel(): string {
|
||||
@@ -57,11 +57,11 @@ export default class HyperlinkComponent extends ComponentBase implements ICompon
|
||||
}
|
||||
|
||||
public set url(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.HyperlinkComponentProperties, string>((properties, value) => { properties.url = value; }, newValue);
|
||||
this.setPropertyFromUI<azdata.HyperlinkComponentProperties, string>((properties, value) => { properties.url = value; }, newValue);
|
||||
}
|
||||
|
||||
public get url(): string {
|
||||
return this.getPropertyOrDefault<sqlops.HyperlinkComponentProperties, string>((props) => props.url, '');
|
||||
return this.getPropertyOrDefault<azdata.HyperlinkComponentProperties, string>((props) => props.url, '');
|
||||
}
|
||||
|
||||
public getUrl(): string {
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
ViewChild, ElementRef, OnDestroy, AfterViewInit
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { ComponentBase } from 'sql/parts/modelComponents/componentBase';
|
||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
@@ -211,82 +211,82 @@ export default class InputBoxComponent extends ComponentBase implements ICompone
|
||||
// CSS-bound properties
|
||||
|
||||
public get value(): string {
|
||||
return this.getPropertyOrDefault<sqlops.InputBoxProperties, string>((props) => props.value, '');
|
||||
return this.getPropertyOrDefault<azdata.InputBoxProperties, string>((props) => props.value, '');
|
||||
}
|
||||
|
||||
public set value(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.InputBoxProperties, string>((props, value) => props.value = value, newValue);
|
||||
this.setPropertyFromUI<azdata.InputBoxProperties, string>((props, value) => props.value = value, newValue);
|
||||
}
|
||||
|
||||
public get ariaLabel(): string {
|
||||
return this.getPropertyOrDefault<sqlops.InputBoxProperties, string>((props) => props.ariaLabel, '');
|
||||
return this.getPropertyOrDefault<azdata.InputBoxProperties, string>((props) => props.ariaLabel, '');
|
||||
}
|
||||
|
||||
public set ariaLabel(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.InputBoxProperties, string>((props, value) => props.ariaLabel = value, newValue);
|
||||
this.setPropertyFromUI<azdata.InputBoxProperties, string>((props, value) => props.ariaLabel = value, newValue);
|
||||
}
|
||||
|
||||
public get placeHolder(): string {
|
||||
return this.getPropertyOrDefault<sqlops.InputBoxProperties, string>((props) => props.placeHolder, '');
|
||||
return this.getPropertyOrDefault<azdata.InputBoxProperties, string>((props) => props.placeHolder, '');
|
||||
}
|
||||
|
||||
public set placeHolder(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.InputBoxProperties, string>((props, value) => props.placeHolder = value, newValue);
|
||||
this.setPropertyFromUI<azdata.InputBoxProperties, string>((props, value) => props.placeHolder = value, newValue);
|
||||
}
|
||||
|
||||
public set columns(newValue: number) {
|
||||
this.setPropertyFromUI<sqlops.InputBoxProperties, number>((props, value) => props.columns = value, newValue);
|
||||
this.setPropertyFromUI<azdata.InputBoxProperties, number>((props, value) => props.columns = value, newValue);
|
||||
}
|
||||
|
||||
public get rows(): number {
|
||||
return this.getPropertyOrDefault<sqlops.InputBoxProperties, number>((props) => props.rows, undefined);
|
||||
return this.getPropertyOrDefault<azdata.InputBoxProperties, number>((props) => props.rows, undefined);
|
||||
}
|
||||
|
||||
public get columns(): number {
|
||||
return this.getPropertyOrDefault<sqlops.InputBoxProperties, number>((props) => props.columns, undefined);
|
||||
return this.getPropertyOrDefault<azdata.InputBoxProperties, number>((props) => props.columns, undefined);
|
||||
}
|
||||
|
||||
public set rows(newValue: number) {
|
||||
this.setPropertyFromUI<sqlops.InputBoxProperties, number>((props, value) => props.rows = value, newValue);
|
||||
this.setPropertyFromUI<azdata.InputBoxProperties, number>((props, value) => props.rows = value, newValue);
|
||||
}
|
||||
|
||||
public get min(): number {
|
||||
return this.getPropertyOrDefault<sqlops.InputBoxProperties, number>((props) => props.min, undefined);
|
||||
return this.getPropertyOrDefault<azdata.InputBoxProperties, number>((props) => props.min, undefined);
|
||||
}
|
||||
|
||||
public set min(newValue: number) {
|
||||
this.setPropertyFromUI<sqlops.InputBoxProperties, number>((props, value) => props.min = value, newValue);
|
||||
this.setPropertyFromUI<azdata.InputBoxProperties, number>((props, value) => props.min = value, newValue);
|
||||
}
|
||||
|
||||
public get max(): number {
|
||||
return this.getPropertyOrDefault<sqlops.InputBoxProperties, number>((props) => props.max, undefined);
|
||||
return this.getPropertyOrDefault<azdata.InputBoxProperties, number>((props) => props.max, undefined);
|
||||
}
|
||||
|
||||
public set max(newValue: number) {
|
||||
this.setPropertyFromUI<sqlops.InputBoxProperties, number>((props, value) => props.max = value, newValue);
|
||||
this.setPropertyFromUI<azdata.InputBoxProperties, number>((props, value) => props.max = value, newValue);
|
||||
}
|
||||
|
||||
public get inputType(): string {
|
||||
return this.getPropertyOrDefault<sqlops.InputBoxProperties, string>((props) => props.inputType, 'text');
|
||||
return this.getPropertyOrDefault<azdata.InputBoxProperties, string>((props) => props.inputType, 'text');
|
||||
}
|
||||
|
||||
public set inputType(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.InputBoxProperties, string>((props, value) => props.inputType = value, newValue);
|
||||
this.setPropertyFromUI<azdata.InputBoxProperties, string>((props, value) => props.inputType = value, newValue);
|
||||
}
|
||||
|
||||
public get multiline(): boolean {
|
||||
return this.getPropertyOrDefault<sqlops.InputBoxProperties, boolean>((props) => props.multiline, false);
|
||||
return this.getPropertyOrDefault<azdata.InputBoxProperties, boolean>((props) => props.multiline, false);
|
||||
}
|
||||
|
||||
public set multiline(newValue: boolean) {
|
||||
this.setPropertyFromUI<sqlops.InputBoxProperties, boolean>((props, value) => props.multiline = value, newValue);
|
||||
this.setPropertyFromUI<azdata.InputBoxProperties, boolean>((props, value) => props.multiline = value, newValue);
|
||||
}
|
||||
|
||||
public get required(): boolean {
|
||||
return this.getPropertyOrDefault<sqlops.InputBoxProperties, boolean>((props) => props.required, false);
|
||||
return this.getPropertyOrDefault<azdata.InputBoxProperties, boolean>((props) => props.required, false);
|
||||
}
|
||||
|
||||
public set required(newValue: boolean) {
|
||||
this.setPropertyFromUI<sqlops.InputBoxProperties, boolean>((props, value) => props.required = value, newValue);
|
||||
this.setPropertyFromUI<azdata.InputBoxProperties, boolean>((props, value) => props.required = value, newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { InjectionToken } from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
ViewChild, ViewChildren, ElementRef, Injector, OnDestroy, QueryList, AfterViewInit
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { ComponentBase } from 'sql/parts/modelComponents/componentBase';
|
||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
@@ -91,18 +91,18 @@ export default class ListBoxComponent extends ComponentBase implements IComponen
|
||||
// CSS-bound properties
|
||||
|
||||
private get values(): string[] {
|
||||
return this.getPropertyOrDefault<sqlops.ListBoxProperties, string[]>((props) => props.values, undefined);
|
||||
return this.getPropertyOrDefault<azdata.ListBoxProperties, string[]>((props) => props.values, undefined);
|
||||
}
|
||||
|
||||
private set values(newValue: string[]) {
|
||||
this.setPropertyFromUI<sqlops.ListBoxProperties, string[]>((props, value) => props.values = value, newValue);
|
||||
this.setPropertyFromUI<azdata.ListBoxProperties, string[]>((props, value) => props.values = value, newValue);
|
||||
}
|
||||
|
||||
private get selectedRow(): number {
|
||||
return this.getPropertyOrDefault<sqlops.ListBoxProperties, number>((props) => props.selectedRow, undefined);
|
||||
return this.getPropertyOrDefault<azdata.ListBoxProperties, number>((props) => props.selectedRow, undefined);
|
||||
}
|
||||
|
||||
private set selectedRow(newValue: number) {
|
||||
this.setPropertyFromUI<sqlops.ListBoxProperties, number>((props, value) => props.selectedRow = value, newValue);
|
||||
this.setPropertyFromUI<azdata.ListBoxProperties, number>((props, value) => props.selectedRow = value, newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
Component, Input, Inject, ChangeDetectorRef, forwardRef, OnDestroy, AfterViewInit, ElementRef
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { ComponentBase } from 'sql/parts/modelComponents/componentBase';
|
||||
import { IComponent, IComponentDescriptor, IModelStore } from 'sql/parts/modelComponents/interfaces';
|
||||
@@ -67,11 +67,11 @@ export default class LoadingComponent extends ComponentBase implements IComponen
|
||||
}
|
||||
|
||||
public get loading(): boolean {
|
||||
return this.getPropertyOrDefault<sqlops.LoadingComponentProperties, boolean>((props) => props.loading, false);
|
||||
return this.getPropertyOrDefault<azdata.LoadingComponentProperties, boolean>((props) => props.loading, false);
|
||||
}
|
||||
|
||||
public set loading(newValue: boolean) {
|
||||
this.setPropertyFromUI<sqlops.LoadingComponentProperties, boolean>((properties, value) => { properties.loading = value; }, newValue);
|
||||
this.setPropertyFromUI<azdata.LoadingComponentProperties, boolean>((properties, value) => { properties.loading = value; }, newValue);
|
||||
this.layout();
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { IEditorModel } from 'vs/platform/editor/common/editor';
|
||||
@@ -55,7 +55,7 @@ export class ModelViewInput extends EditorInput {
|
||||
private _dialogPane: DialogPane;
|
||||
|
||||
constructor(private _title: string, private _model: ModelViewInputModel,
|
||||
private _options: sqlops.ModelViewEditorOptions,
|
||||
private _options: azdata.ModelViewEditorOptions,
|
||||
@IInstantiationService private _instantiationService: IInstantiationService,
|
||||
@IPartService private readonly _partService: IPartService
|
||||
) {
|
||||
@@ -116,7 +116,7 @@ export class ModelViewInput extends EditorInput {
|
||||
return this._dialogPane;
|
||||
}
|
||||
|
||||
public get options(): sqlops.ModelViewEditorOptions {
|
||||
public get options(): azdata.ModelViewEditorOptions {
|
||||
return this._options;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { IModelStore, IComponentDescriptor, IComponent } from './interfaces';
|
||||
import { Extensions, IComponentRegistry } from 'sql/platform/dashboard/common/modelComponentRegistry';
|
||||
import { Deferred } from 'sql/base/common/promise';
|
||||
|
||||
@@ -16,7 +16,7 @@ import { IModelView } from 'sql/platform/model/common/modelViewService';
|
||||
import { ViewBase } from 'sql/parts/modelComponents/viewBase';
|
||||
import { IModelViewService } from 'sql/platform/modelComponents/common/modelViewService';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
@Component({
|
||||
selector: 'modelview-content',
|
||||
@@ -66,13 +66,13 @@ export class ModelViewContent extends ViewBase implements OnInit, IModelView {
|
||||
}
|
||||
|
||||
@memoize
|
||||
public get connection(): sqlops.connection.Connection {
|
||||
public get connection(): azdata.connection.Connection {
|
||||
if (!this._commonService.connectionManagementService || !this._commonService.connectionManagementService.connectionInfo) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
let currentConnection = this._commonService.connectionManagementService.connectionInfo.connectionProfile;
|
||||
let connection: sqlops.connection.Connection = {
|
||||
let connection: azdata.connection.Connection = {
|
||||
providerName: currentConnection.providerName,
|
||||
connectionId: currentConnection.id,
|
||||
options: currentConnection.options
|
||||
@@ -81,7 +81,7 @@ export class ModelViewContent extends ViewBase implements OnInit, IModelView {
|
||||
}
|
||||
|
||||
@memoize
|
||||
public get serverInfo(): sqlops.ServerInfo {
|
||||
public get serverInfo(): azdata.ServerInfo {
|
||||
if (!this._commonService.connectionManagementService || !this._commonService.connectionManagementService.connectionInfo) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
ViewChild, ViewChildren, ElementRef, Injector, OnDestroy, QueryList, AfterViewInit
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
import { ComponentBase } from 'sql/parts/modelComponents/componentBase';
|
||||
@@ -84,19 +84,19 @@ export default class RadioButtonComponent extends ComponentBase implements IComp
|
||||
// CSS-bound properties
|
||||
|
||||
public get checked(): boolean {
|
||||
return this.getPropertyOrDefault<sqlops.RadioButtonProperties, boolean>((props) => props.checked, false);
|
||||
return this.getPropertyOrDefault<azdata.RadioButtonProperties, boolean>((props) => props.checked, false);
|
||||
}
|
||||
|
||||
public set checked(newValue: boolean) {
|
||||
this.setPropertyFromUI<sqlops.RadioButtonProperties, boolean>((properties, value) => { properties.checked = value; }, newValue);
|
||||
this.setPropertyFromUI<azdata.RadioButtonProperties, boolean>((properties, value) => { properties.checked = value; }, newValue);
|
||||
}
|
||||
|
||||
public set value(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.RadioButtonProperties, string>((properties, value) => { properties.value = value; }, newValue);
|
||||
this.setPropertyFromUI<azdata.RadioButtonProperties, string>((properties, value) => { properties.value = value; }, newValue);
|
||||
}
|
||||
|
||||
public get value(): string {
|
||||
return this.getPropertyOrDefault<sqlops.RadioButtonProperties, string>((props) => props.value, '');
|
||||
return this.getPropertyOrDefault<azdata.RadioButtonProperties, string>((props) => props.value, '');
|
||||
}
|
||||
|
||||
public getLabel(): string {
|
||||
@@ -104,18 +104,18 @@ export default class RadioButtonComponent extends ComponentBase implements IComp
|
||||
}
|
||||
|
||||
public get label(): string {
|
||||
return this.getPropertyOrDefault<sqlops.RadioButtonProperties, string>((props) => props.label, '');
|
||||
return this.getPropertyOrDefault<azdata.RadioButtonProperties, string>((props) => props.label, '');
|
||||
}
|
||||
|
||||
public set label(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.RadioButtonProperties, string>((properties, label) => { properties.label = label; }, newValue);
|
||||
this.setPropertyFromUI<azdata.RadioButtonProperties, string>((properties, label) => { properties.label = label; }, newValue);
|
||||
}
|
||||
|
||||
public get name(): string {
|
||||
return this.getPropertyOrDefault<sqlops.RadioButtonProperties, string>((props) => props.name, '');
|
||||
return this.getPropertyOrDefault<azdata.RadioButtonProperties, string>((props) => props.name, '');
|
||||
}
|
||||
|
||||
public set name(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.RadioButtonProperties, string>((properties, label) => { properties.name = label; }, newValue);
|
||||
this.setPropertyFromUI<azdata.RadioButtonProperties, string>((properties, label) => { properties.name = label; }, newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
Component, Input, Inject, ChangeDetectorRef, forwardRef, ViewChild, ElementRef, OnDestroy, AfterViewInit
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { ComponentBase } from 'sql/parts/modelComponents/componentBase';
|
||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
@@ -47,7 +47,7 @@ export default class TableComponent extends ComponentBase implements IComponent,
|
||||
|
||||
}
|
||||
|
||||
transformColumns(columns: string[] | sqlops.TableColumn[]): Slick.Column<any>[] {
|
||||
transformColumns(columns: string[] | azdata.TableColumn[]): Slick.Column<any>[] {
|
||||
let tableColumns: any[] = <any[]>columns;
|
||||
if (tableColumns) {
|
||||
return (<any[]>columns).map(col => {
|
||||
@@ -172,30 +172,30 @@ export default class TableComponent extends ComponentBase implements IComponent,
|
||||
// CSS-bound properties
|
||||
|
||||
public get data(): any[][] {
|
||||
return this.getPropertyOrDefault<sqlops.TableComponentProperties, any[]>((props) => props.data, []);
|
||||
return this.getPropertyOrDefault<azdata.TableComponentProperties, any[]>((props) => props.data, []);
|
||||
}
|
||||
|
||||
public set data(newValue: any[][]) {
|
||||
this.setPropertyFromUI<sqlops.TableComponentProperties, any[][]>((props, value) => props.data = value, newValue);
|
||||
this.setPropertyFromUI<azdata.TableComponentProperties, any[][]>((props, value) => props.data = value, newValue);
|
||||
}
|
||||
|
||||
public get columns(): string[] {
|
||||
return this.getPropertyOrDefault<sqlops.TableComponentProperties, string[]>((props) => props.columns, []);
|
||||
return this.getPropertyOrDefault<azdata.TableComponentProperties, string[]>((props) => props.columns, []);
|
||||
}
|
||||
|
||||
public get fontSize(): number | string {
|
||||
return this.getPropertyOrDefault<sqlops.TableComponentProperties, number | string>((props) => props.fontSize, '');
|
||||
return this.getPropertyOrDefault<azdata.TableComponentProperties, number | string>((props) => props.fontSize, '');
|
||||
}
|
||||
|
||||
public set columns(newValue: string[]) {
|
||||
this.setPropertyFromUI<sqlops.TableComponentProperties, string[]>((props, value) => props.columns = value, newValue);
|
||||
this.setPropertyFromUI<azdata.TableComponentProperties, string[]>((props, value) => props.columns = value, newValue);
|
||||
}
|
||||
|
||||
public get selectedRows(): number[] {
|
||||
return this.getPropertyOrDefault<sqlops.TableComponentProperties, number[]>((props) => props.selectedRows, []);
|
||||
return this.getPropertyOrDefault<azdata.TableComponentProperties, number[]>((props) => props.selectedRows, []);
|
||||
}
|
||||
|
||||
public set selectedRows(newValue: number[]) {
|
||||
this.setPropertyFromUI<sqlops.TableComponentProperties, number[]>((props, value) => props.selectedRows = value, newValue);
|
||||
this.setPropertyFromUI<azdata.TableComponentProperties, number[]>((props, value) => props.selectedRows = value, newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
OnDestroy, AfterViewInit, ElementRef, SecurityContext
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { ComponentBase } from 'sql/parts/modelComponents/componentBase';
|
||||
import { IComponent, IComponentDescriptor, IModelStore } from 'sql/parts/modelComponents/interfaces';
|
||||
@@ -52,15 +52,15 @@ export default class TextComponent extends ComponentBase implements IComponent,
|
||||
}
|
||||
|
||||
public set value(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.TextComponentProperties, string>((properties, value) => { properties.value = value; }, newValue);
|
||||
this.setPropertyFromUI<azdata.TextComponentProperties, string>((properties, value) => { properties.value = value; }, newValue);
|
||||
}
|
||||
|
||||
public get value(): string {
|
||||
return this.getPropertyOrDefault<sqlops.TextComponentProperties, string>((props) => props.value, '');
|
||||
return this.getPropertyOrDefault<azdata.TextComponentProperties, string>((props) => props.value, '');
|
||||
}
|
||||
|
||||
public getValue(): SafeHtml {
|
||||
let links = this.getPropertyOrDefault<sqlops.TextComponentProperties, sqlops.LinkArea[]>((props) => props.links, []);
|
||||
let links = this.getPropertyOrDefault<azdata.TextComponentProperties, azdata.LinkArea[]>((props) => props.links, []);
|
||||
let text = this._domSanitizer.sanitize(SecurityContext.HTML, this.value);
|
||||
if (links.length !== 0) {
|
||||
for (let i: number = 0; i < links.length; i++) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
ViewChild, ElementRef, OnDestroy, AfterViewInit
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { ComponentBase } from 'sql/parts/modelComponents/componentBase';
|
||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
|
||||
@@ -155,10 +155,10 @@ export default class TreeComponent extends ComponentBase implements IComponent,
|
||||
}
|
||||
|
||||
public get withCheckbox(): boolean {
|
||||
return this.getPropertyOrDefault<sqlops.TreeProperties, boolean>((props) => props.withCheckbox, false);
|
||||
return this.getPropertyOrDefault<azdata.TreeProperties, boolean>((props) => props.withCheckbox, false);
|
||||
}
|
||||
|
||||
public set withCheckbox(newValue: boolean) {
|
||||
this.setPropertyFromUI<sqlops.TreeProperties, boolean>((properties, value) => { properties.withCheckbox = value; }, newValue);
|
||||
this.setPropertyFromUI<azdata.TreeProperties, boolean>((properties, value) => { properties.withCheckbox = value; }, newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import { ChangeDetectorRef } from '@angular/core';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import nls = require('vs/nls');
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { IModelStore, IComponentDescriptor, IComponent } from './interfaces';
|
||||
import { IItemConfig, ModelComponentTypes, IComponentShape } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
import { IModelView, IModelViewEventArgs } from 'sql/platform/model/common/modelViewService';
|
||||
@@ -36,8 +36,8 @@ export abstract class ViewBase extends AngularDisposable implements IModelView {
|
||||
|
||||
// Properties needed by the model view code
|
||||
abstract id: string;
|
||||
abstract connection: sqlops.connection.Connection;
|
||||
abstract serverInfo: sqlops.ServerInfo;
|
||||
abstract connection: azdata.connection.Connection;
|
||||
abstract serverInfo: azdata.ServerInfo;
|
||||
private _onEventEmitter = new Emitter<IModelViewEventArgs>();
|
||||
|
||||
initializeModel(rootComponent: IComponentShape, validationCallback: (componentId: string) => Thenable<boolean>): void {
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
ViewChild, ViewChildren, ElementRef, Injector, OnDestroy, QueryList
|
||||
} from '@angular/core';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import { addDisposableListener, EventType } from 'vs/base/browser/dom';
|
||||
import { Parts, IPartService } from 'vs/workbench/services/part/common/partService';
|
||||
@@ -165,27 +165,27 @@ export default class WebViewComponent extends ComponentBase implements IComponen
|
||||
// CSS-bound properties
|
||||
|
||||
public get message(): any {
|
||||
return this.getPropertyOrDefault<sqlops.WebViewProperties, any>((props) => props.message, undefined);
|
||||
return this.getPropertyOrDefault<azdata.WebViewProperties, any>((props) => props.message, undefined);
|
||||
}
|
||||
|
||||
public set message(newValue: any) {
|
||||
this.setPropertyFromUI<sqlops.WebViewProperties, any>((properties, message) => { properties.message = message; }, newValue);
|
||||
this.setPropertyFromUI<azdata.WebViewProperties, any>((properties, message) => { properties.message = message; }, newValue);
|
||||
}
|
||||
|
||||
public get html(): string {
|
||||
return this.getPropertyOrDefault<sqlops.WebViewProperties, string>((props) => props.html, undefined);
|
||||
return this.getPropertyOrDefault<azdata.WebViewProperties, string>((props) => props.html, undefined);
|
||||
}
|
||||
|
||||
public set html(newValue: string) {
|
||||
this.setPropertyFromUI<sqlops.WebViewProperties, string>((properties, html) => { properties.html = html; }, newValue);
|
||||
this.setPropertyFromUI<azdata.WebViewProperties, string>((properties, html) => { properties.html = html; }, newValue);
|
||||
}
|
||||
|
||||
public get options(): vscode.WebviewOptions {
|
||||
return this.getPropertyOrDefault<sqlops.WebViewProperties, vscode.WebviewOptions>((props) => props.options, undefined);
|
||||
return this.getPropertyOrDefault<azdata.WebViewProperties, vscode.WebviewOptions>((props) => props.options, undefined);
|
||||
}
|
||||
|
||||
public get extensionLocation(): UriComponents {
|
||||
return this.getPropertyOrDefault<sqlops.WebViewProperties, UriComponents>((props) => props.extensionLocation, undefined);
|
||||
return this.getPropertyOrDefault<azdata.WebViewProperties, UriComponents>((props) => props.extensionLocation, undefined);
|
||||
}
|
||||
|
||||
private get extensionLocationUri(): URI {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { nb } from 'sqlops';
|
||||
import { nb } from 'azdata';
|
||||
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
|
||||
@@ -6,7 +6,7 @@ import 'vs/css!./code';
|
||||
|
||||
import { OnInit, Component, Input, Inject, ElementRef, ViewChild } from '@angular/core';
|
||||
import { AngularDisposable } from 'sql/base/node/lifecycle';
|
||||
import { nb } from 'sqlops';
|
||||
import { nb } from 'azdata';
|
||||
import { INotebookService } from 'sql/workbench/services/notebook/common/notebookService';
|
||||
import { MimeModel } from 'sql/parts/notebook/outputs/common/mimemodel';
|
||||
import * as outputProcessor from 'sql/parts/notebook/outputs/common/outputProcessor';
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import { nb } from 'sqlops';
|
||||
import { nb } from 'azdata';
|
||||
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import { nb } from 'sqlops';
|
||||
import { nb } from 'azdata';
|
||||
import * as nls from 'vs/nls';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import { nb } from 'sqlops';
|
||||
import { nb } from 'azdata';
|
||||
|
||||
import { CellModel } from './cell';
|
||||
import { IClientSession, IClientSessionOptions, ICellModelOptions, ICellModel, IModelFactory } from './modelInterfaces';
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import { nb } from 'sqlops';
|
||||
import { nb } from 'azdata';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
|
||||
import { JSONObject } from './jsonext';
|
||||
import { nb } from 'sqlops';
|
||||
import { nb } from 'azdata';
|
||||
|
||||
/**
|
||||
* A namespace for nbformat interfaces.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import { nb } from 'sqlops';
|
||||
import { nb } from 'azdata';
|
||||
|
||||
import { localize } from 'vs/nls';
|
||||
import { IDefaultConnection, notebookConstants } from 'sql/parts/notebook/models/modelInterfaces';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import { nb, connection } from 'sqlops';
|
||||
import { nb, connection } from 'azdata';
|
||||
|
||||
import { localize } from 'vs/nls';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
@@ -258,7 +258,7 @@ export class KernelsDropdown extends SelectBox {
|
||||
this.updateKernel(defaultKernel);
|
||||
});
|
||||
if (model.clientSession) {
|
||||
model.clientSession.kernelChanged((changedArgs: sqlops.nb.IKernelChangedArgs) => {
|
||||
model.clientSession.kernelChanged((changedArgs: azdata.nb.IKernelChangedArgs) => {
|
||||
if (changedArgs.newValue) {
|
||||
this.updateKernel(changedArgs.newValue);
|
||||
}
|
||||
@@ -267,7 +267,7 @@ export class KernelsDropdown extends SelectBox {
|
||||
}
|
||||
|
||||
// Update SelectBox values
|
||||
private updateKernel(defaultKernel: sqlops.nb.IKernelSpec) {
|
||||
private updateKernel(defaultKernel: azdata.nb.IKernelSpec) {
|
||||
let specs = this.model.specs;
|
||||
if (specs && specs.kernels) {
|
||||
let index = specs.kernels.findIndex((kernel => kernel.name === defaultKernel.name));
|
||||
|
||||
@@ -12,7 +12,7 @@ import { EditorInput, EditorModel, ConfirmResult } from 'vs/workbench/common/edi
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import * as resources from 'vs/base/common/resources';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { IStandardKernelWithProvider } from 'sql/parts/notebook/notebookUtils';
|
||||
import { INotebookService, INotebookEditor } from 'sql/workbench/services/notebook/common/notebookService';
|
||||
@@ -27,7 +27,7 @@ export class NotebookInputModel extends EditorModel {
|
||||
private readonly _onDidChangeDirty: Emitter<void> = this._register(new Emitter<void>());
|
||||
private _providerId: string;
|
||||
private _standardKernels: IStandardKernelWithProvider[];
|
||||
private _defaultKernel: sqlops.nb.IKernelSpec;
|
||||
private _defaultKernel: azdata.nb.IKernelSpec;
|
||||
constructor(public readonly notebookUri: URI,
|
||||
private readonly handle: number,
|
||||
private _isTrusted: boolean = false,
|
||||
@@ -76,11 +76,11 @@ export class NotebookInputModel extends EditorModel {
|
||||
});
|
||||
}
|
||||
|
||||
public get defaultKernel(): sqlops.nb.IKernelSpec {
|
||||
public get defaultKernel(): azdata.nb.IKernelSpec {
|
||||
return this._defaultKernel;
|
||||
}
|
||||
|
||||
public set defaultKernel(kernel: sqlops.nb.IKernelSpec) {
|
||||
public set defaultKernel(kernel: azdata.nb.IKernelSpec) {
|
||||
this._defaultKernel = kernel;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ export class NotebookInput extends EditorInput {
|
||||
return this._model.standardKernels;
|
||||
}
|
||||
|
||||
public get defaultKernel(): sqlops.nb.IKernelSpec {
|
||||
public get defaultKernel(): azdata.nb.IKernelSpec {
|
||||
return this._model.defaultKernel;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
import * as path from 'path';
|
||||
import { nb } from 'sqlops';
|
||||
import { nb } from 'azdata';
|
||||
import * as os from 'os';
|
||||
import * as pfs from 'vs/base/node/pfs';
|
||||
import { localize } from 'vs/nls';
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import { JSONObject, isPrimitive } from '../../models/jsonext';
|
||||
import { MimeModel } from './mimemodel';
|
||||
import { nbformat } from '../../models/nbformat';
|
||||
import { nb } from 'sqlops';
|
||||
import { nb } from 'azdata';
|
||||
|
||||
/**
|
||||
* A multiline string.
|
||||
|
||||
@@ -13,7 +13,7 @@ import { Deferred } from 'sql/base/common/promise';
|
||||
import { IObjectExplorerService } from 'sql/workbench/services/objectExplorer/common/objectExplorerService';
|
||||
import { IConnectionDialogService } from 'sql/workbench/services/connection/common/connectionDialogService';
|
||||
|
||||
import { IConnectionProfile } from 'sqlops';
|
||||
import { IConnectionProfile } from 'azdata';
|
||||
|
||||
import { TreeItemCollapsibleState } from 'vs/workbench/common/views';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
import { ConnectionProfile } from 'sql/platform/connection/common/connectionProfile';
|
||||
import { NodeType, SqlThemeIcon } from 'sql/parts/objectExplorer/common/nodeType';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import * as UUID from 'vs/base/common/uuid';
|
||||
|
||||
@@ -87,14 +87,14 @@ export class TreeNode {
|
||||
|
||||
public connection: ConnectionProfile;
|
||||
|
||||
public session: sqlops.ObjectExplorerSession;
|
||||
public session: azdata.ObjectExplorerSession;
|
||||
|
||||
public metadata: sqlops.ObjectMetadata;
|
||||
public metadata: azdata.ObjectMetadata;
|
||||
|
||||
public iconType: string | SqlThemeIcon;
|
||||
|
||||
constructor(nodeTypeId: string, label: string, isAlwaysLeaf: boolean, nodePath: string,
|
||||
nodeSubType: string, nodeStatus: string, parent: TreeNode, metadata: sqlops.ObjectMetadata,
|
||||
nodeSubType: string, nodeStatus: string, parent: TreeNode, metadata: azdata.ObjectMetadata,
|
||||
iconType: string | SqlThemeIcon,
|
||||
private _objectExplorerCallbacks: ObjectExplorerCallbacks) {
|
||||
this.nodeTypeId = nodeTypeId;
|
||||
@@ -131,7 +131,7 @@ export class TreeNode {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
public getSession(): sqlops.ObjectExplorerSession {
|
||||
public getSession(): azdata.ObjectExplorerSession {
|
||||
var currentNode: TreeNode = this;
|
||||
while (!currentNode.session && currentNode.parent) {
|
||||
currentNode = currentNode.parent;
|
||||
@@ -146,8 +146,8 @@ export class TreeNode {
|
||||
return false;
|
||||
}
|
||||
|
||||
public toNodeInfo(): sqlops.NodeInfo {
|
||||
return <sqlops.NodeInfo>{
|
||||
public toNodeInfo(): azdata.NodeInfo {
|
||||
return <azdata.NodeInfo>{
|
||||
nodePath: this.nodePath,
|
||||
nodeType: this.nodeTypeId,
|
||||
nodeSubType: this.nodeSubType,
|
||||
|
||||
@@ -11,7 +11,7 @@ import { ITree } from 'vs/base/parts/tree/browser/tree';
|
||||
import { ExecuteCommandAction } from 'vs/platform/actions/common/actions';
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { IConnectionManagementService, IConnectionCompletionOptions } from 'sql/platform/connection/common/connectionManagement';
|
||||
import { TreeNode } from 'sql/parts/objectExplorer/common/treeNode';
|
||||
import {
|
||||
@@ -32,9 +32,9 @@ import { ConnectionProfile } from 'sql/platform/connection/common/connectionProf
|
||||
import { IErrorMessageService } from 'sql/platform/errorMessage/common/errorMessageService';
|
||||
|
||||
|
||||
export class ObjectExplorerActionsContext implements sqlops.ObjectExplorerContext {
|
||||
public connectionProfile: sqlops.IConnectionProfile;
|
||||
public nodeInfo: sqlops.NodeInfo;
|
||||
export class ObjectExplorerActionsContext implements azdata.ObjectExplorerContext {
|
||||
public connectionProfile: azdata.IConnectionProfile;
|
||||
public nodeInfo: azdata.NodeInfo;
|
||||
public isConnectionNode: boolean = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
import { RawContextKey, IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IConnectionProfile } from 'sqlops';
|
||||
import { IConnectionProfile } from 'azdata';
|
||||
import { TreeNode } from 'sql/parts/objectExplorer/common/treeNode';
|
||||
|
||||
export class TreeNodeContextKey implements IContextKey<TreeNode> {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { IProfilerSession, IProfilerService, ProfilerSessionID, IProfilerViewTem
|
||||
import { ProfilerState } from './profilerState';
|
||||
import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import * as nls from 'vs/nls';
|
||||
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
@@ -199,7 +199,7 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
|
||||
return this._filter;
|
||||
}
|
||||
|
||||
public onSessionStopped(notification: sqlops.ProfilerSessionStoppedParams) {
|
||||
public onSessionStopped(notification: azdata.ProfilerSessionStoppedParams) {
|
||||
this._notificationService.error(nls.localize("profiler.sessionStopped", "XEvent Profiler Session stopped unexpectedly on the server {0}.", this.connection.serverName));
|
||||
|
||||
this.state.change({
|
||||
@@ -209,7 +209,7 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
|
||||
});
|
||||
}
|
||||
|
||||
public onProfilerSessionCreated(params: sqlops.ProfilerSessionCreatedParams) {
|
||||
public onProfilerSessionCreated(params: azdata.ProfilerSessionCreatedParams) {
|
||||
if (types.isUndefinedOrNull(params.sessionName) || types.isUndefinedOrNull(params.templateName)) {
|
||||
this._notificationService.error(nls.localize("profiler.sessionCreationError", "Error while starting new session"));
|
||||
} else {
|
||||
@@ -239,14 +239,14 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
|
||||
this.state.change(state);
|
||||
}
|
||||
|
||||
public onMoreRows(eventMessage: sqlops.ProfilerSessionEvents) {
|
||||
public onMoreRows(eventMessage: azdata.ProfilerSessionEvents) {
|
||||
if (eventMessage.eventsLost) {
|
||||
this._notificationService.warn(nls.localize("profiler.eventsLost", "The XEvent Profiler session for {0} has lost events.", this.connection.serverName));
|
||||
}
|
||||
|
||||
let newEvents = [];
|
||||
for (let i: number = 0; i < eventMessage.events.length && i < 500; ++i) {
|
||||
let e: sqlops.ProfilerEvent = eventMessage.events[i];
|
||||
let e: azdata.ProfilerEvent = eventMessage.events[i];
|
||||
let data = {};
|
||||
data['EventClass'] = e.name;
|
||||
data['StartTime'] = e.timestamp;
|
||||
|
||||
@@ -20,7 +20,7 @@ import nls = require('vs/nls');
|
||||
import { IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';
|
||||
import * as WorkbenchUtils from 'sql/workbench/common/sqlWorkbenchUtils';
|
||||
|
||||
import { DidChangeLanguageFlavorParams } from 'sqlops';
|
||||
import { DidChangeLanguageFlavorParams } from 'azdata';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
import { EditorServiceImpl } from 'vs/workbench/browser/parts/editor/editor';
|
||||
|
||||
@@ -18,7 +18,7 @@ import { QueryResultsInput } from 'sql/parts/query/common/queryResultsInput';
|
||||
import { IQueryModelService } from 'sql/platform/query/common/queryModel';
|
||||
import { IQueryEditorService } from 'sql/workbench/services/queryEditor/common/queryEditorService';
|
||||
|
||||
import { ISelectionData, ExecutionPlanOptions } from 'sqlops';
|
||||
import { ISelectionData, ExecutionPlanOptions } from 'azdata';
|
||||
|
||||
const MAX_SIZE = 13;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import { ITableStyles, ITableMouseEvent } from 'sql/base/browser/ui/table/interf
|
||||
import { warn } from 'sql/base/common/log';
|
||||
import { $ } from 'sql/base/browser/builder';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
@@ -187,7 +187,7 @@ export class GridPanel extends ViewletPanel {
|
||||
}
|
||||
this.reset();
|
||||
}));
|
||||
this.addResultSet(this.runner.batchSets.reduce<sqlops.ResultSetSummary[]>((p, e) => {
|
||||
this.addResultSet(this.runner.batchSets.reduce<azdata.ResultSetSummary[]>((p, e) => {
|
||||
if (this.configurationService.getValue<boolean>('sql.results.streaming')) {
|
||||
p = p.concat(e.resultSetSummaries);
|
||||
} else {
|
||||
@@ -204,8 +204,8 @@ export class GridPanel extends ViewletPanel {
|
||||
}
|
||||
}
|
||||
|
||||
private onResultSet(resultSet: sqlops.ResultSetSummary | sqlops.ResultSetSummary[]) {
|
||||
let resultsToAdd: sqlops.ResultSetSummary[];
|
||||
private onResultSet(resultSet: azdata.ResultSetSummary | azdata.ResultSetSummary[]) {
|
||||
let resultsToAdd: azdata.ResultSetSummary[];
|
||||
if (!Array.isArray(resultSet)) {
|
||||
resultsToAdd = [resultSet];
|
||||
} else {
|
||||
@@ -237,8 +237,8 @@ export class GridPanel extends ViewletPanel {
|
||||
}
|
||||
}
|
||||
|
||||
private updateResultSet(resultSet: sqlops.ResultSetSummary | sqlops.ResultSetSummary[]) {
|
||||
let resultsToUpdate: sqlops.ResultSetSummary[];
|
||||
private updateResultSet(resultSet: azdata.ResultSetSummary | azdata.ResultSetSummary[]) {
|
||||
let resultsToUpdate: azdata.ResultSetSummary[];
|
||||
if (!Array.isArray(resultSet)) {
|
||||
resultsToUpdate = [resultSet];
|
||||
} else {
|
||||
@@ -274,7 +274,7 @@ export class GridPanel extends ViewletPanel {
|
||||
}
|
||||
}
|
||||
|
||||
private addResultSet(resultSet: sqlops.ResultSetSummary[]) {
|
||||
private addResultSet(resultSet: azdata.ResultSetSummary[]) {
|
||||
let tables: GridTable<any>[] = [];
|
||||
|
||||
for (let set of resultSet) {
|
||||
@@ -406,7 +406,7 @@ class GridTable<T> extends Disposable implements IView {
|
||||
private scrolled = false;
|
||||
private visible = false;
|
||||
|
||||
public get resultSet(): sqlops.ResultSetSummary {
|
||||
public get resultSet(): azdata.ResultSetSummary {
|
||||
return this._resultSet;
|
||||
}
|
||||
|
||||
@@ -417,7 +417,7 @@ class GridTable<T> extends Disposable implements IView {
|
||||
|
||||
constructor(
|
||||
private runner: QueryRunner,
|
||||
private _resultSet: sqlops.ResultSetSummary,
|
||||
private _resultSet: azdata.ResultSetSummary,
|
||||
state: GridTableState,
|
||||
@IContextMenuService private contextMenuService: IContextMenuService,
|
||||
@IInstantiationService private instantiationService: IInstantiationService,
|
||||
@@ -647,7 +647,7 @@ class GridTable<T> extends Disposable implements IView {
|
||||
}
|
||||
}
|
||||
|
||||
public updateResult(resultSet: sqlops.ResultSetSummary) {
|
||||
public updateResult(resultSet: azdata.ResultSetSummary) {
|
||||
this._resultSet = resultSet;
|
||||
if (this.table && this.visible) {
|
||||
this.dataProvider.length = resultSet.rowCount;
|
||||
|
||||
@@ -10,7 +10,7 @@ import QueryRunner from 'sql/platform/query/common/queryRunner';
|
||||
import { QueryInput } from 'sql/parts/query/common/queryInput';
|
||||
import { $ } from 'sql/base/browser/builder';
|
||||
|
||||
import { IResultMessage, ISelectionData } from 'sqlops';
|
||||
import { IResultMessage, ISelectionData } from 'azdata';
|
||||
|
||||
import { ViewletPanel, IViewletPanelOptions } from 'vs/workbench/browser/parts/views/panelViewlet';
|
||||
import { IDataSource, ITree, IRenderer, ContextMenuEvent } from 'vs/base/parts/tree/browser/tree';
|
||||
|
||||
@@ -27,7 +27,7 @@ import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/c
|
||||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IActionItem } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import { ISelectionData } from 'sqlops';
|
||||
import { ISelectionData } from 'azdata';
|
||||
import { IEditorGroup } from 'vs/workbench/services/group/common/editorGroupsService';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IRange } from 'vs/editor/common/core/range';
|
||||
|
||||
@@ -10,7 +10,7 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { IQueryManagementService } from 'sql/platform/query/common/queryManagement';
|
||||
import { IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';
|
||||
@@ -341,7 +341,7 @@ export class RunQueryShortcutAction extends Action {
|
||||
return TPromise.as('');
|
||||
}
|
||||
|
||||
private isProcWithSingleArgument(result: sqlops.SimpleExecuteResult): number {
|
||||
private isProcWithSingleArgument(result: azdata.SimpleExecuteResult): number {
|
||||
let columnTypeOrdinal = this.getColumnIndex(result.columnInfo, 'COLUMN_TYPE');
|
||||
let dataTypeOrdinal = this.getColumnIndex(result.columnInfo, 'DATA_TYPE');
|
||||
if (columnTypeOrdinal && dataTypeOrdinal) {
|
||||
@@ -375,7 +375,7 @@ export class RunQueryShortcutAction extends Action {
|
||||
return -1; // Couldn't process so return default value
|
||||
}
|
||||
|
||||
private getColumnIndex(columnInfo: sqlops.IDbColumn[], columnName: string): number {
|
||||
private getColumnIndex(columnInfo: azdata.IDbColumn[], columnName: string): number {
|
||||
return columnInfo ? columnInfo.findIndex(c => c.columnName === columnName) : undefined;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import { IContextViewService } from 'vs/platform/contextview/browser/contextView
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { attachEditableDropdownStyler, attachSelectBoxStyler } from 'sql/platform/theme/common/styler';
|
||||
|
||||
import { ISelectionData } from 'sqlops';
|
||||
import { ISelectionData } from 'azdata';
|
||||
import {
|
||||
IConnectionManagementService,
|
||||
IConnectionParams,
|
||||
|
||||
@@ -19,7 +19,7 @@ import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { DropdownList } from 'sql/base/browser/ui/dropdownList/dropdownList';
|
||||
import { attachDropdownStyler } from 'sql/platform/theme/common/styler';
|
||||
import { AddAccountAction, RefreshAccountAction } from 'sql/parts/accountManagement/common/accountActions';
|
||||
@@ -29,7 +29,7 @@ import { AccountPickerViewModel } from 'sql/platform/accountManagement/common/ac
|
||||
export class AccountPicker extends Disposable {
|
||||
public static ACCOUNTPICKERLIST_HEIGHT = 47;
|
||||
public viewModel: AccountPickerViewModel;
|
||||
private _accountList: List<sqlops.Account>;
|
||||
private _accountList: List<azdata.Account>;
|
||||
private _rootElement: HTMLElement;
|
||||
private _refreshContainer: HTMLElement;
|
||||
private _listContainer: HTMLElement;
|
||||
@@ -46,8 +46,8 @@ export class AccountPicker extends Disposable {
|
||||
private _addAccountStartEmitter: Emitter<void>;
|
||||
public get addAccountStartEvent(): Event<void> { return this._addAccountStartEmitter.event; }
|
||||
|
||||
private _onAccountSelectionChangeEvent: Emitter<sqlops.Account>;
|
||||
public get onAccountSelectionChangeEvent(): Event<sqlops.Account> { return this._onAccountSelectionChangeEvent.event; }
|
||||
private _onAccountSelectionChangeEvent: Emitter<azdata.Account>;
|
||||
public get onAccountSelectionChangeEvent(): Event<azdata.Account> { return this._onAccountSelectionChangeEvent.event; }
|
||||
|
||||
constructor(
|
||||
private _providerId: string,
|
||||
@@ -61,7 +61,7 @@ export class AccountPicker extends Disposable {
|
||||
this._addAccountCompleteEmitter = new Emitter<void>();
|
||||
this._addAccountErrorEmitter = new Emitter<string>();
|
||||
this._addAccountStartEmitter = new Emitter<void>();
|
||||
this._onAccountSelectionChangeEvent = new Emitter<sqlops.Account>();
|
||||
this._onAccountSelectionChangeEvent = new Emitter<azdata.Account>();
|
||||
|
||||
// Create the view model, wire up the events, and initialize with baseline data
|
||||
this.viewModel = this._instantiationService.createInstance(AccountPickerViewModel, this._providerId);
|
||||
@@ -89,7 +89,7 @@ export class AccountPicker extends Disposable {
|
||||
let delegate = new AccountListDelegate(AccountPicker.ACCOUNTPICKERLIST_HEIGHT);
|
||||
let accountRenderer = new AccountPickerListRenderer();
|
||||
this._listContainer = DOM.$('div.account-list-container');
|
||||
this._accountList = new List<sqlops.Account>(this._listContainer, delegate, [accountRenderer]);
|
||||
this._accountList = new List<azdata.Account>(this._listContainer, delegate, [accountRenderer]);
|
||||
this._register(attachListStyler(this._accountList, this._themeService));
|
||||
|
||||
this._rootElement = DOM.$('div.account-picker-container');
|
||||
@@ -108,7 +108,7 @@ export class AccountPicker extends Disposable {
|
||||
|
||||
this._dropdown = this._register(new DropdownList(this._rootElement, option, this._listContainer, this._accountList, this._themeService, addAccountAction));
|
||||
this._register(attachDropdownStyler(this._dropdown, this._themeService));
|
||||
this._register(this._accountList.onSelectionChange((e: IListEvent<sqlops.Account>) => {
|
||||
this._register(this._accountList.onSelectionChange((e: IListEvent<azdata.Account>) => {
|
||||
if (e.elements.length === 1) {
|
||||
this._dropdown.renderLabel();
|
||||
this.onAccountSelectionChange(e.elements[0]);
|
||||
@@ -134,7 +134,7 @@ export class AccountPicker extends Disposable {
|
||||
|
||||
// Load the initial contents of the view model
|
||||
this.viewModel.initialize()
|
||||
.then((accounts: sqlops.Account[]) => {
|
||||
.then((accounts: azdata.Account[]) => {
|
||||
this.updateAccountList(accounts);
|
||||
});
|
||||
}
|
||||
@@ -147,7 +147,7 @@ export class AccountPicker extends Disposable {
|
||||
}
|
||||
|
||||
// PRIVATE HELPERS /////////////////////////////////////////////////////
|
||||
private onAccountSelectionChange(account: sqlops.Account) {
|
||||
private onAccountSelectionChange(account: azdata.Account) {
|
||||
this.viewModel.selectedAccount = account;
|
||||
if (account && account.isStale) {
|
||||
this._refreshAccountAction.account = account;
|
||||
@@ -194,7 +194,7 @@ export class AccountPicker extends Disposable {
|
||||
return null;
|
||||
}
|
||||
|
||||
private updateAccountList(accounts: sqlops.Account[]): void {
|
||||
private updateAccountList(accounts: azdata.Account[]): void {
|
||||
// keep the selection to the current one
|
||||
let selectedElements = this._accountList.getSelectedElements();
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
'use strict';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { IAccountPickerService } from 'sql/platform/accountManagement/common/accountPicker';
|
||||
import { AccountPicker } from 'sql/platform/accountManagement/browser/accountPicker';
|
||||
@@ -26,8 +26,8 @@ export class AccountPickerService implements IAccountPickerService {
|
||||
private _addAccountStartEmitter: Emitter<void>;
|
||||
public get addAccountStartEvent(): Event<void> { return this._addAccountStartEmitter.event; }
|
||||
|
||||
private _onAccountSelectionChangeEvent: Emitter<sqlops.Account>;
|
||||
public get onAccountSelectionChangeEvent(): Event<sqlops.Account> { return this._onAccountSelectionChangeEvent.event; }
|
||||
private _onAccountSelectionChangeEvent: Emitter<azdata.Account>;
|
||||
public get onAccountSelectionChangeEvent(): Event<azdata.Account> { return this._onAccountSelectionChangeEvent.event; }
|
||||
|
||||
constructor(
|
||||
@IInstantiationService private _instantiationService: IInstantiationService
|
||||
@@ -36,13 +36,13 @@ export class AccountPickerService implements IAccountPickerService {
|
||||
this._addAccountCompleteEmitter = new Emitter<void>();
|
||||
this._addAccountErrorEmitter = new Emitter<string>();
|
||||
this._addAccountStartEmitter = new Emitter<void>();
|
||||
this._onAccountSelectionChangeEvent = new Emitter<sqlops.Account>();
|
||||
this._onAccountSelectionChangeEvent = new Emitter<azdata.Account>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get selected account
|
||||
*/
|
||||
public get selectedAccount(): sqlops.Account {
|
||||
public get selectedAccount(): azdata.Account {
|
||||
return this._accountPicker.viewModel.selectedAccount;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
export const IAccountPickerService = createDecorator<IAccountPickerService>('AccountPickerService');
|
||||
export interface IAccountPickerService {
|
||||
@@ -17,6 +17,6 @@ export interface IAccountPickerService {
|
||||
addAccountCompleteEvent: Event<void>;
|
||||
addAccountErrorEvent: Event<string>;
|
||||
addAccountStartEvent: Event<void>;
|
||||
onAccountSelectionChangeEvent: Event<sqlops.Account>;
|
||||
selectedAccount: sqlops.Account;
|
||||
onAccountSelectionChangeEvent: Event<azdata.Account>;
|
||||
selectedAccount: azdata.Account;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
import { IAccountManagementService } from 'sql/platform/accountManagement/common/interfaces';
|
||||
@@ -18,7 +18,7 @@ export class AccountPickerViewModel {
|
||||
private _updateAccountListEmitter: Emitter<UpdateAccountListEventParams>;
|
||||
public get updateAccountListEvent(): Event<UpdateAccountListEventParams> { return this._updateAccountListEmitter.event; }
|
||||
|
||||
public selectedAccount: sqlops.Account;
|
||||
public selectedAccount: azdata.Account;
|
||||
|
||||
constructor(
|
||||
private _providerId: string,
|
||||
@@ -38,7 +38,7 @@ export class AccountPickerViewModel {
|
||||
* Loads an initial list of accounts from the account management service
|
||||
* @return {Thenable<Account[]>} Promise to return the list of accounts
|
||||
*/
|
||||
public initialize(): Thenable<sqlops.Account[]> {
|
||||
public initialize(): Thenable<azdata.Account[]> {
|
||||
// Load a baseline of the accounts for the provider
|
||||
return this._accountManagementService.getAccountsForProvider(this._providerId)
|
||||
.then(null, () => {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { AccountAdditionResult } from 'sql/platform/accountManagement/common/eventTypes';
|
||||
import { IAccountStore } from 'sql/platform/accountManagement/common/interfaces';
|
||||
|
||||
@@ -19,7 +19,7 @@ export default class AccountStore implements IAccountStore {
|
||||
constructor(private _memento: object) { }
|
||||
|
||||
// PUBLIC METHODS //////////////////////////////////////////////////////
|
||||
public addOrUpdate(newAccount: sqlops.Account): Thenable<AccountAdditionResult> {
|
||||
public addOrUpdate(newAccount: azdata.Account): Thenable<AccountAdditionResult> {
|
||||
let self = this;
|
||||
|
||||
return this.doOperation(() => {
|
||||
@@ -36,7 +36,7 @@ export default class AccountStore implements IAccountStore {
|
||||
});
|
||||
}
|
||||
|
||||
public getAccountsByProvider(providerId: string): Thenable<sqlops.Account[]> {
|
||||
public getAccountsByProvider(providerId: string): Thenable<azdata.Account[]> {
|
||||
let self = this;
|
||||
|
||||
return this.doOperation(() => {
|
||||
@@ -45,7 +45,7 @@ export default class AccountStore implements IAccountStore {
|
||||
});
|
||||
}
|
||||
|
||||
public getAllAccounts(): Thenable<sqlops.Account[]> {
|
||||
public getAllAccounts(): Thenable<azdata.Account[]> {
|
||||
let self = this;
|
||||
|
||||
return this.doOperation(() => {
|
||||
@@ -53,7 +53,7 @@ export default class AccountStore implements IAccountStore {
|
||||
});
|
||||
}
|
||||
|
||||
public remove(key: sqlops.AccountKey): Thenable<boolean> {
|
||||
public remove(key: azdata.AccountKey): Thenable<boolean> {
|
||||
let self = this;
|
||||
|
||||
return this.doOperation(() => {
|
||||
@@ -64,7 +64,7 @@ export default class AccountStore implements IAccountStore {
|
||||
});
|
||||
}
|
||||
|
||||
public update(key: sqlops.AccountKey, updateOperation: (account: sqlops.Account) => void): Thenable<boolean> {
|
||||
public update(key: azdata.AccountKey, updateOperation: (account: azdata.Account) => void): Thenable<boolean> {
|
||||
let self = this;
|
||||
|
||||
return this.doOperation(() => {
|
||||
@@ -76,12 +76,12 @@ export default class AccountStore implements IAccountStore {
|
||||
}
|
||||
|
||||
// PRIVATE METHODS /////////////////////////////////////////////////////
|
||||
private static findAccountByKey(key1: sqlops.AccountKey, key2: sqlops.AccountKey): boolean {
|
||||
private static findAccountByKey(key1: azdata.AccountKey, key2: azdata.AccountKey): boolean {
|
||||
// Provider ID and Account ID must match
|
||||
return key1.providerId === key2.providerId && key1.accountId === key2.accountId;
|
||||
}
|
||||
|
||||
private static mergeAccounts(source: sqlops.Account, target: sqlops.Account): void {
|
||||
private static mergeAccounts(source: azdata.Account, target: azdata.Account): void {
|
||||
// Take any display info changes
|
||||
target.displayInfo = source.displayInfo;
|
||||
|
||||
@@ -109,7 +109,7 @@ export default class AccountStore implements IAccountStore {
|
||||
return <Promise<T>>this._activeOperation;
|
||||
}
|
||||
|
||||
private addToAccountList(accounts: sqlops.Account[], accountToAdd: sqlops.Account): AccountListOperationResult {
|
||||
private addToAccountList(accounts: azdata.Account[], accountToAdd: azdata.Account): AccountListOperationResult {
|
||||
// Check if the entry already exists
|
||||
let match = accounts.findIndex(account => AccountStore.findAccountByKey(account.key, accountToAdd.key));
|
||||
if (match >= 0) {
|
||||
@@ -134,7 +134,7 @@ export default class AccountStore implements IAccountStore {
|
||||
};
|
||||
}
|
||||
|
||||
private removeFromAccountList(accounts: sqlops.Account[], accountToRemove: sqlops.AccountKey): AccountListOperationResult {
|
||||
private removeFromAccountList(accounts: azdata.Account[], accountToRemove: azdata.AccountKey): AccountListOperationResult {
|
||||
// Check if the entry exists
|
||||
let match = accounts.findIndex(account => AccountStore.findAccountByKey(account.key, accountToRemove));
|
||||
if (match >= 0) {
|
||||
@@ -151,7 +151,7 @@ export default class AccountStore implements IAccountStore {
|
||||
};
|
||||
}
|
||||
|
||||
private updateAccountList(accounts: sqlops.Account[], accountToUpdate: sqlops.AccountKey, updateOperation: (account: sqlops.Account) => void): AccountListOperationResult {
|
||||
private updateAccountList(accounts: azdata.Account[], accountToUpdate: azdata.AccountKey, updateOperation: (account: azdata.Account) => void): AccountListOperationResult {
|
||||
// Check if the entry exists
|
||||
let match = accounts.findIndex(account => AccountStore.findAccountByKey(account.key, accountToUpdate));
|
||||
if (match < 0) {
|
||||
@@ -178,7 +178,7 @@ export default class AccountStore implements IAccountStore {
|
||||
}
|
||||
|
||||
// MEMENTO IO METHODS //////////////////////////////////////////////////
|
||||
private readFromMemento(): Thenable<sqlops.Account[]> {
|
||||
private readFromMemento(): Thenable<azdata.Account[]> {
|
||||
// Initialize the account list if it isn't already
|
||||
let accounts = this._memento[AccountStore.MEMENTO_KEY];
|
||||
if (!accounts) {
|
||||
@@ -191,7 +191,7 @@ export default class AccountStore implements IAccountStore {
|
||||
return Promise.resolve(accounts);
|
||||
}
|
||||
|
||||
private writeToMemento(accounts: sqlops.Account[]): Thenable<void> {
|
||||
private writeToMemento(accounts: azdata.Account[]): Thenable<void> {
|
||||
// Store a shallow copy of the account list to disconnect the memento list from the active list
|
||||
this._memento[AccountStore.MEMENTO_KEY] = JSON.parse(JSON.stringify(accounts));
|
||||
return Promise.resolve();
|
||||
@@ -200,5 +200,5 @@ export default class AccountStore implements IAccountStore {
|
||||
|
||||
interface AccountListOperationResult extends AccountAdditionResult {
|
||||
accountRemoved: boolean;
|
||||
updatedAccounts: sqlops.Account[];
|
||||
updatedAccounts: azdata.Account[];
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
/**
|
||||
* Result from calling add/update on the account store
|
||||
@@ -24,7 +24,7 @@ export interface AccountAdditionResult {
|
||||
/**
|
||||
* The account that was added/updated (with any updates applied)
|
||||
*/
|
||||
changedAccount: sqlops.Account;
|
||||
changedAccount: azdata.Account;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,12 +34,12 @@ export interface AccountProviderAddedEventParams {
|
||||
/**
|
||||
* The provider that was registered
|
||||
*/
|
||||
addedProvider: sqlops.AccountProviderMetadata;
|
||||
addedProvider: azdata.AccountProviderMetadata;
|
||||
|
||||
/**
|
||||
* The accounts that were rehydrated with the provider
|
||||
*/
|
||||
initialAccounts: sqlops.Account[];
|
||||
initialAccounts: azdata.Account[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -54,5 +54,5 @@ export interface UpdateAccountListEventParams {
|
||||
/**
|
||||
* Updated list of accounts, sorted appropriately
|
||||
*/
|
||||
accountList: sqlops.Account[];
|
||||
accountList: azdata.Account[];
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { AccountAdditionResult, AccountProviderAddedEventParams, UpdateAccountListEventParams } from 'sql/platform/accountManagement/common/eventTypes';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
@@ -18,13 +18,13 @@ export interface IAccountManagementService {
|
||||
_serviceBrand: any;
|
||||
|
||||
// ACCOUNT MANAGEMENT METHODS //////////////////////////////////////////
|
||||
accountUpdated(account: sqlops.Account): Thenable<void>;
|
||||
accountUpdated(account: azdata.Account): Thenable<void>;
|
||||
addAccount(providerId: string): Thenable<void>;
|
||||
getAccountProviderMetadata(): Thenable<sqlops.AccountProviderMetadata[]>;
|
||||
getAccountsForProvider(providerId: string): Thenable<sqlops.Account[]>;
|
||||
getSecurityToken(account: sqlops.Account, resource: sqlops.AzureResource): Thenable<{}>;
|
||||
removeAccount(accountKey: sqlops.AccountKey): Thenable<boolean>;
|
||||
refreshAccount(account: sqlops.Account): Thenable<sqlops.Account>;
|
||||
getAccountProviderMetadata(): Thenable<azdata.AccountProviderMetadata[]>;
|
||||
getAccountsForProvider(providerId: string): Thenable<azdata.Account[]>;
|
||||
getSecurityToken(account: azdata.Account, resource: azdata.AzureResource): Thenable<{}>;
|
||||
removeAccount(accountKey: azdata.AccountKey): Thenable<boolean>;
|
||||
refreshAccount(account: azdata.Account): Thenable<azdata.Account>;
|
||||
|
||||
// UI METHODS //////////////////////////////////////////////////////////
|
||||
openAccountListDialog(): Thenable<void>;
|
||||
@@ -34,17 +34,17 @@ export interface IAccountManagementService {
|
||||
copyUserCodeAndOpenBrowser(userCode: string, uri: string): void;
|
||||
|
||||
// SERVICE MANAGEMENT METHODS /////////////////////////////////////////
|
||||
registerProvider(providerMetadata: sqlops.AccountProviderMetadata, provider: sqlops.AccountProvider): void;
|
||||
registerProvider(providerMetadata: azdata.AccountProviderMetadata, provider: azdata.AccountProvider): void;
|
||||
shutdown(): void;
|
||||
unregisterProvider(providerMetadata: sqlops.AccountProviderMetadata): void;
|
||||
unregisterProvider(providerMetadata: azdata.AccountProviderMetadata): void;
|
||||
|
||||
// EVENTING ////////////////////////////////////////////////////////////
|
||||
readonly addAccountProviderEvent: Event<AccountProviderAddedEventParams>;
|
||||
readonly removeAccountProviderEvent: Event<sqlops.AccountProviderMetadata>;
|
||||
readonly removeAccountProviderEvent: Event<azdata.AccountProviderMetadata>;
|
||||
readonly updateAccountListEvent: Event<UpdateAccountListEventParams>;
|
||||
}
|
||||
|
||||
// Enum matching the AzureResource enum from sqlops.d.ts
|
||||
// Enum matching the AzureResource enum from azdata.d.ts
|
||||
export enum AzureResource {
|
||||
ResourceManagement = 0,
|
||||
Sql = 1
|
||||
@@ -56,20 +56,20 @@ export interface IAccountStore {
|
||||
* @param {Account} account Account to add/update
|
||||
* @return {Thenable<AccountAdditionResult>} Results of the add/update operation
|
||||
*/
|
||||
addOrUpdate(account: sqlops.Account): Thenable<AccountAdditionResult>;
|
||||
addOrUpdate(account: azdata.Account): Thenable<AccountAdditionResult>;
|
||||
|
||||
/**
|
||||
* Retrieves all accounts, filtered by provider ID
|
||||
* @param {string} providerId ID of the provider to filter by
|
||||
* @return {Thenable<Account[]>} Promise to return all accounts that belong to the provided provider
|
||||
*/
|
||||
getAccountsByProvider(providerId: string): Thenable<sqlops.Account[]>;
|
||||
getAccountsByProvider(providerId: string): Thenable<azdata.Account[]>;
|
||||
|
||||
/**
|
||||
* Retrieves all accounts in the store. Returns empty array if store is not initialized
|
||||
* @return {Thenable<Account[]>} Promise to return all accounts
|
||||
*/
|
||||
getAllAccounts(): Thenable<sqlops.Account[]>;
|
||||
getAllAccounts(): Thenable<azdata.Account[]>;
|
||||
|
||||
/**
|
||||
* Removes an account.
|
||||
@@ -78,7 +78,7 @@ export interface IAccountStore {
|
||||
* @param key - The key of an account.
|
||||
* @returns True if the account was removed, false if the account doesn't exist
|
||||
*/
|
||||
remove(key: sqlops.AccountKey): Thenable<boolean>;
|
||||
remove(key: azdata.AccountKey): Thenable<boolean>;
|
||||
|
||||
/**
|
||||
* Updates the custom properties stored with an account.
|
||||
@@ -88,5 +88,5 @@ export interface IAccountStore {
|
||||
* @param updateOperation - Operation to perform on the matching account
|
||||
* @returns True if the account was modified, false if the account doesn't exist
|
||||
*/
|
||||
update(key: sqlops.AccountKey, updateOperation: (account: sqlops.Account) => void): Thenable<boolean>;
|
||||
update(key: azdata.AccountKey, updateOperation: (account: azdata.Account) => void): Thenable<boolean>;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
export enum TaskExecutionMode {
|
||||
execute = 0,
|
||||
@@ -21,15 +21,15 @@ export const IBackupService = createDecorator<IBackupService>(SERVICE_ID);
|
||||
export interface IBackupService {
|
||||
_serviceBrand: any;
|
||||
|
||||
getBackupConfigInfo(connectionUri: string): Thenable<sqlops.BackupConfigInfo>;
|
||||
getBackupConfigInfo(connectionUri: string): Thenable<azdata.BackupConfigInfo>;
|
||||
|
||||
/**
|
||||
* Backup a data source using the provided connection
|
||||
*/
|
||||
backup(connectionUri: string, backupInfo: { [key: string]: any }, taskExecutionMode: sqlops.TaskExecutionMode): Thenable<sqlops.BackupResponse>;
|
||||
backup(connectionUri: string, backupInfo: { [key: string]: any }, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.BackupResponse>;
|
||||
|
||||
/**
|
||||
* Register a disaster recovery provider
|
||||
*/
|
||||
registerProvider(providerId: string, provider: sqlops.BackupProvider): void;
|
||||
registerProvider(providerId: string, provider: azdata.BackupProvider): void;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
import { IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import * as Constants from 'sql/common/constants';
|
||||
import * as TelemetryKeys from 'sql/common/telemetryKeys';
|
||||
import * as TelemetryUtils from 'sql/common/telemetryUtilities';
|
||||
@@ -15,7 +15,7 @@ import { IBackupService, TaskExecutionMode } from 'sql/platform/backup/common/ba
|
||||
export class BackupService implements IBackupService {
|
||||
|
||||
public _serviceBrand: any;
|
||||
private _providers: { [handle: string]: sqlops.BackupProvider; } = Object.create(null);
|
||||
private _providers: { [handle: string]: azdata.BackupProvider; } = Object.create(null);
|
||||
|
||||
constructor(
|
||||
@IConnectionManagementService private _connectionService: IConnectionManagementService,
|
||||
@@ -26,7 +26,7 @@ export class BackupService implements IBackupService {
|
||||
/**
|
||||
* Get database metadata needed to populate backup UI
|
||||
*/
|
||||
public getBackupConfigInfo(connectionUri: string): Thenable<sqlops.BackupConfigInfo> {
|
||||
public getBackupConfigInfo(connectionUri: string): Thenable<azdata.BackupConfigInfo> {
|
||||
let providerId: string = this._connectionService.getProviderIdFromUri(connectionUri);
|
||||
if (providerId) {
|
||||
let provider = this._providers[providerId];
|
||||
@@ -40,8 +40,8 @@ export class BackupService implements IBackupService {
|
||||
/**
|
||||
* Backup a data source using the provided connection
|
||||
*/
|
||||
public backup(connectionUri: string, backupInfo: { [key: string]: any }, taskExecutionMode: TaskExecutionMode): Thenable<sqlops.BackupResponse> {
|
||||
return new Promise<sqlops.BackupResponse>((resolve, reject) => {
|
||||
public backup(connectionUri: string, backupInfo: { [key: string]: any }, taskExecutionMode: TaskExecutionMode): Thenable<azdata.BackupResponse> {
|
||||
return new Promise<azdata.BackupResponse>((resolve, reject) => {
|
||||
let providerResult = this.getProvider(connectionUri);
|
||||
if (providerResult) {
|
||||
TelemetryUtils.addTelemetry(this._telemetryService, TelemetryKeys.BackupCreated, { provider: providerResult.providerName });
|
||||
@@ -56,7 +56,7 @@ export class BackupService implements IBackupService {
|
||||
});
|
||||
}
|
||||
|
||||
private getProvider(connectionUri: string): { provider: sqlops.BackupProvider, providerName: string } {
|
||||
private getProvider(connectionUri: string): { provider: azdata.BackupProvider, providerName: string } {
|
||||
let providerId: string = this._connectionService.getProviderIdFromUri(connectionUri);
|
||||
if (providerId) {
|
||||
return { provider: this._providers[providerId], providerName: providerId };
|
||||
@@ -68,7 +68,7 @@ export class BackupService implements IBackupService {
|
||||
/**
|
||||
* Register a disaster recovery provider
|
||||
*/
|
||||
public registerProvider(providerId: string, provider: sqlops.BackupProvider): void {
|
||||
public registerProvider(providerId: string, provider: azdata.BackupProvider): void {
|
||||
this._providers[providerId] = provider;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import * as Constants from 'sql/common/constants';
|
||||
import { ConnectionProviderProperties, IConnectionProviderRegistry, Extensions as ConnectionExtensions } from 'sql/workbench/parts/connection/common/connectionProviderExtension';
|
||||
import { toObject } from 'sql/base/common/map';
|
||||
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IAction } from 'vs/base/common/actions';
|
||||
@@ -24,7 +24,7 @@ import { IExtensionService } from 'vs/workbench/services/extensions/common/exten
|
||||
import { getIdFromLocalExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
||||
|
||||
export const SERVICE_ID = 'capabilitiesService';
|
||||
export const HOST_NAME = 'sqlops';
|
||||
export const HOST_NAME = 'azdata';
|
||||
export const HOST_VERSION = '1.0';
|
||||
|
||||
const connectionRegistry = Registry.as<IConnectionProviderRegistry>(ConnectionExtensions.ConnectionProviderContributions);
|
||||
@@ -63,12 +63,12 @@ export interface ICapabilitiesService {
|
||||
/**
|
||||
* get the old version of provider information
|
||||
*/
|
||||
getLegacyCapabilities(provider: string): sqlops.DataProtocolServerCapabilities;
|
||||
getLegacyCapabilities(provider: string): azdata.DataProtocolServerCapabilities;
|
||||
|
||||
/**
|
||||
* Register a capabilities provider
|
||||
*/
|
||||
registerProvider(provider: sqlops.CapabilitiesProvider): void;
|
||||
registerProvider(provider: azdata.CapabilitiesProvider): void;
|
||||
|
||||
/**
|
||||
* Returns true if the feature is available for given connection
|
||||
@@ -97,7 +97,7 @@ export class CapabilitiesService extends Disposable implements ICapabilitiesServ
|
||||
private _momento: Memento;
|
||||
private _providers = new Map<string, ProviderFeatures>();
|
||||
private _featureUpdateEvents = new Map<string, Emitter<ProviderFeatures>>();
|
||||
private _legacyProviders = new Map<string, sqlops.DataProtocolServerCapabilities>();
|
||||
private _legacyProviders = new Map<string, azdata.DataProtocolServerCapabilities>();
|
||||
|
||||
private _onCapabilitiesRegistered = this._register(new Emitter<ProviderFeatures>());
|
||||
public readonly onCapabilitiesRegistered = this._onCapabilitiesRegistered.event;
|
||||
@@ -184,7 +184,7 @@ export class CapabilitiesService extends Disposable implements ICapabilitiesServ
|
||||
return this._providers.get(provider);
|
||||
}
|
||||
|
||||
public getLegacyCapabilities(provider: string): sqlops.DataProtocolServerCapabilities {
|
||||
public getLegacyCapabilities(provider: string): azdata.DataProtocolServerCapabilities {
|
||||
return this._legacyProviders.get(provider);
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ export class CapabilitiesService extends Disposable implements ICapabilitiesServ
|
||||
* Register the capabilities provider and query the provider for its capabilities
|
||||
* @param provider
|
||||
*/
|
||||
public registerProvider(provider: sqlops.CapabilitiesProvider): void {
|
||||
public registerProvider(provider: azdata.CapabilitiesProvider): void {
|
||||
// request the capabilities from server
|
||||
provider.getServerCapabilities(clientCapabilities).then(serverCapabilities => {
|
||||
this._legacyProviders.set(serverCapabilities.providerName, serverCapabilities);
|
||||
|
||||
@@ -14,7 +14,7 @@ import { IWorkspaceConfigurationService } from 'vs/workbench/services/configurat
|
||||
import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
|
||||
import { ConnectionProfile } from './connectionProfile';
|
||||
import { ICapabilitiesService } from 'sql/platform/capabilities/common/capabilitiesService';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import * as nls from 'vs/nls';
|
||||
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
@@ -451,7 +451,7 @@ export class ConnectionConfig implements IConnectionConfig {
|
||||
*/
|
||||
private getConfiguration(key: string): any {
|
||||
let configs: any;
|
||||
configs = this._workspaceConfigurationService.inspect<IConnectionProfileStore[] | IConnectionProfileGroup[] | sqlops.DataProtocolServerCapabilities[]>(key);
|
||||
configs = this._workspaceConfigurationService.inspect<IConnectionProfileStore[] | IConnectionProfileGroup[] | azdata.DataProtocolServerCapabilities[]>(key);
|
||||
return configs;
|
||||
}
|
||||
|
||||
@@ -462,7 +462,7 @@ export class ConnectionConfig implements IConnectionConfig {
|
||||
*/
|
||||
private writeConfiguration(
|
||||
key: string,
|
||||
profiles: IConnectionProfileStore[] | IConnectionProfileGroup[] | sqlops.DataProtocolServerCapabilities[],
|
||||
profiles: IConnectionProfileStore[] | IConnectionProfileGroup[] | azdata.DataProtocolServerCapabilities[],
|
||||
target: ConfigurationTarget = ConfigurationTarget.USER): Promise<void> {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
let configValue: IConfigurationValue = {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { IConnectionProfileGroup, ConnectionProfileGroup } from 'sql/platform/connection/common/connectionProfileGroup';
|
||||
import { ConnectionProfile } from 'sql/platform/connection/common/connectionProfile';
|
||||
import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
|
||||
@@ -76,7 +76,7 @@ export interface IConnectionManagementService {
|
||||
onConnect: Event<IConnectionParams>;
|
||||
onDisconnect: Event<IConnectionParams>;
|
||||
onConnectionChanged: Event<IConnectionParams>;
|
||||
onLanguageFlavorChanged: Event<sqlops.DidChangeLanguageFlavorParams>;
|
||||
onLanguageFlavorChanged: Event<azdata.DidChangeLanguageFlavorParams>;
|
||||
|
||||
/**
|
||||
* Opens the connection dialog to create new connection
|
||||
@@ -119,11 +119,11 @@ export interface IConnectionManagementService {
|
||||
/**
|
||||
* Adds the successful connection to MRU and send the connection error back to the connection handler for failed connections
|
||||
*/
|
||||
onConnectionComplete(handle: number, connectionInfoSummary: sqlops.ConnectionInfoSummary): void;
|
||||
onConnectionComplete(handle: number, connectionInfoSummary: azdata.ConnectionInfoSummary): void;
|
||||
|
||||
onIntelliSenseCacheComplete(handle: number, connectionUri: string): void;
|
||||
|
||||
onConnectionChangedNotification(handle: number, changedConnInfo: sqlops.ChangedConnectionInfo);
|
||||
onConnectionChangedNotification(handle: number, changedConnInfo: azdata.ChangedConnectionInfo);
|
||||
|
||||
getConnectionGroups(providers?: string[]): ConnectionProfileGroup[];
|
||||
|
||||
@@ -145,7 +145,7 @@ export interface IConnectionManagementService {
|
||||
|
||||
deleteConnectionGroup(group: ConnectionProfileGroup): Promise<boolean>;
|
||||
|
||||
getAdvancedProperties(): sqlops.ConnectionOption[];
|
||||
getAdvancedProperties(): azdata.ConnectionOption[];
|
||||
|
||||
getConnectionUri(connectionProfile: IConnectionProfile): string;
|
||||
|
||||
@@ -177,12 +177,12 @@ export interface IConnectionManagementService {
|
||||
|
||||
addSavedPassword(connectionProfile: IConnectionProfile): Promise<IConnectionProfile>;
|
||||
|
||||
listDatabases(connectionUri: string): Thenable<sqlops.ListDatabasesResult>;
|
||||
listDatabases(connectionUri: string): Thenable<azdata.ListDatabasesResult>;
|
||||
|
||||
/**
|
||||
* Register a connection provider
|
||||
*/
|
||||
registerProvider(providerId: string, provider: sqlops.ConnectionProvider): void;
|
||||
registerProvider(providerId: string, provider: azdata.ConnectionProvider): void;
|
||||
|
||||
editGroup(group: ConnectionProfileGroup): Promise<void>;
|
||||
|
||||
@@ -261,7 +261,7 @@ export interface IConnectionManagementService {
|
||||
* @param {string} profileId The id of the connection profile to get the password for
|
||||
* @returns ServerInfo
|
||||
*/
|
||||
getServerInfo(profileId: string): sqlops.ServerInfo;
|
||||
getServerInfo(profileId: string): azdata.ServerInfo;
|
||||
|
||||
/**
|
||||
* Get the connection string for the provided connection ID
|
||||
@@ -271,7 +271,7 @@ export interface IConnectionManagementService {
|
||||
/**
|
||||
* Serialize connection string with optional provider
|
||||
*/
|
||||
buildConnectionInfo(connectionString: string, provider?: string): Thenable<sqlops.ConnectionInfo>;
|
||||
buildConnectionInfo(connectionString: string, provider?: string): Thenable<azdata.ConnectionInfo>;
|
||||
|
||||
providerRegistered(providerId: string): boolean;
|
||||
/**
|
||||
@@ -292,7 +292,7 @@ export interface INewConnectionParams {
|
||||
connectionType: ConnectionType;
|
||||
input?: IConnectableInput;
|
||||
runQueryOnCompletion?: RunQueryOnConnectionMode;
|
||||
querySelection?: sqlops.ISelectionData;
|
||||
querySelection?: azdata.ISelectionData;
|
||||
showDashboard?: boolean;
|
||||
providers?: string[];
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
import { ConnectionProfile } from 'sql/platform/connection/common/connectionProfile';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as azdata from 'azdata';
|
||||
import { StopWatch } from 'vs/base/common/stopwatch';
|
||||
|
||||
/**
|
||||
@@ -64,7 +64,7 @@ export class ConnectionManagementInfo {
|
||||
/**
|
||||
* Information about the connected server.
|
||||
*/
|
||||
serverInfo: sqlops.ServerInfo;
|
||||
serverInfo: azdata.ServerInfo;
|
||||
|
||||
/**
|
||||
* Owner uri assigned to the connection
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user