mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Fix several regressions in master (#613)
* Fix service option type enum * Fix broken Explain button and Actual plan command
This commit is contained in:
@@ -4,7 +4,7 @@ import * as types from './types';
|
|||||||
|
|
||||||
export interface Ic2p {
|
export interface Ic2p {
|
||||||
asConnectionParams(connectionUri: string, connectionInfo: data.ConnectionInfo): proto.ConnectParams;
|
asConnectionParams(connectionUri: string, connectionInfo: data.ConnectionInfo): proto.ConnectParams;
|
||||||
asExecutionPlanOptions(planOptions: data.ExecutionPlanOptions): data.ExecutionPlanOptions;
|
asExecutionPlanOptions(planOptions: data.ExecutionPlanOptions): types.ExecutionPlanOptions;
|
||||||
asScriptingParams(connectionUri: string, operation: data.ScriptOperation, metadata: data.ObjectMetadata, paramDetails: data.ScriptingParamDetails): types.ScriptingParams;
|
asScriptingParams(connectionUri: string, operation: data.ScriptOperation, metadata: data.ObjectMetadata, paramDetails: data.ScriptingParamDetails): types.ScriptingParams;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -17,10 +17,10 @@ function asConnectionParams(ownerUri: string, connInfo: data.ConnectionInfo): pr
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function asExecutionPlanOptions(planOptions: data.ExecutionPlanOptions): data.ExecutionPlanOptions {
|
function asExecutionPlanOptions(planOptions: data.ExecutionPlanOptions): types.ExecutionPlanOptions {
|
||||||
return {
|
return {
|
||||||
displayEstimatedQueryPlan: planOptions ? planOptions.displayEstimatedQueryPlan : undefined,
|
includeEstimatedExecutionPlanXml: planOptions ? planOptions.displayEstimatedQueryPlan : undefined,
|
||||||
displayActualQueryPlan: planOptions ? planOptions.displayActualQueryPlan : undefined
|
includeActualExecutionPlanXml: planOptions ? planOptions.displayActualQueryPlan : undefined
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class CapabilitiesFeature extends SqlOpsFeature<undefined> {
|
|||||||
|
|
||||||
let getServerCapabilities = (cap: data.DataProtocolClientCapabilities): Thenable<data.DataProtocolServerCapabilities> => {
|
let getServerCapabilities = (cap: data.DataProtocolClientCapabilities): Thenable<data.DataProtocolServerCapabilities> => {
|
||||||
return client.sendRequest(protocol.CapabiltiesDiscoveryRequest.type, cap).then(
|
return client.sendRequest(protocol.CapabiltiesDiscoveryRequest.type, cap).then(
|
||||||
r => r.capabilities,
|
client.sqlp2c.asServerCapabilities,
|
||||||
e => {
|
e => {
|
||||||
client.logFailedRequest(protocol.CapabiltiesDiscoveryRequest.type, e);
|
client.logFailedRequest(protocol.CapabiltiesDiscoveryRequest.type, e);
|
||||||
return Promise.resolve(undefined);
|
return Promise.resolve(undefined);
|
||||||
@@ -310,7 +310,7 @@ class QueryFeature extends SqlOpsFeature<undefined> {
|
|||||||
protected registerProvider(options: undefined): Disposable {
|
protected registerProvider(options: undefined): Disposable {
|
||||||
const client = this._client;
|
const client = this._client;
|
||||||
let runQuery = (ownerUri: string, querySelection: data.ISelectionData, executionPlanOptions?: data.ExecutionPlanOptions): Thenable<void> => {
|
let runQuery = (ownerUri: string, querySelection: data.ISelectionData, executionPlanOptions?: data.ExecutionPlanOptions): Thenable<void> => {
|
||||||
let params: data.QueryExecuteParams = {
|
let params: types.QueryExecuteParams = {
|
||||||
ownerUri,
|
ownerUri,
|
||||||
querySelection,
|
querySelection,
|
||||||
executionPlanOptions: client.sqlc2p.asExecutionPlanOptions(executionPlanOptions)
|
executionPlanOptions: client.sqlc2p.asExecutionPlanOptions(executionPlanOptions)
|
||||||
|
|||||||
@@ -335,7 +335,7 @@ export namespace QueryExecuteMessageNotification {
|
|||||||
|
|
||||||
// ------------------------------- < Query Execution Request > ------------------------------------
|
// ------------------------------- < Query Execution Request > ------------------------------------
|
||||||
export namespace QueryExecuteRequest {
|
export namespace QueryExecuteRequest {
|
||||||
export const type = new RequestType<data.QueryExecuteParams, QueryExecuteResult, void, void>('query/executeDocumentSelection');
|
export const type = new RequestType<types.QueryExecuteParams, QueryExecuteResult, void, void>('query/executeDocumentSelection');
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface QueryExecuteResult { }
|
export interface QueryExecuteResult { }
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ import * as types from './types';
|
|||||||
|
|
||||||
export interface Ip2c {
|
export interface Ip2c {
|
||||||
asProviderMetadata(params: types.MetadataQueryResult): data.ProviderMetadata;
|
asProviderMetadata(params: types.MetadataQueryResult): data.ProviderMetadata;
|
||||||
|
|
||||||
|
asServerCapabilities(result: types.CapabiltiesDiscoveryResult): data.DataProtocolServerCapabilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
function asProviderMetadata(params: types.MetadataQueryResult): data.ProviderMetadata {
|
function asProviderMetadata(params: types.MetadataQueryResult): data.ProviderMetadata {
|
||||||
@@ -45,6 +47,152 @@ function asProviderMetadata(params: types.MetadataQueryResult): data.ProviderMet
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export const p2c: Ip2c = {
|
function asServiceOptionType(val: string): data.ServiceOptionType {
|
||||||
asProviderMetadata
|
if (val === 'string') {
|
||||||
|
return data.ServiceOptionType.string;
|
||||||
|
} else if (val === 'multistring') {
|
||||||
|
return data.ServiceOptionType.multistring;
|
||||||
|
} else if (val === 'password') {
|
||||||
|
return data.ServiceOptionType.password;
|
||||||
|
} else if (val === 'number') {
|
||||||
|
return data.ServiceOptionType.number;
|
||||||
|
} else if (val === 'boolean') {
|
||||||
|
return data.ServiceOptionType.boolean;
|
||||||
|
} else if (val === 'category') {
|
||||||
|
return data.ServiceOptionType.category;
|
||||||
|
} else if (val === 'object') {
|
||||||
|
return data.ServiceOptionType.object;
|
||||||
|
}
|
||||||
|
|
||||||
|
// assume string for unknown value types
|
||||||
|
return data.ServiceOptionType.string;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function buildServiceOption(srcOption: types.ServiceOption): data.ServiceOption {
|
||||||
|
return {
|
||||||
|
name: srcOption.name,
|
||||||
|
displayName: srcOption.displayName ? srcOption.displayName : srcOption.name,
|
||||||
|
description: srcOption.description,
|
||||||
|
groupName: srcOption.groupName,
|
||||||
|
defaultValue: srcOption.defaultValue,
|
||||||
|
categoryValues: srcOption.categoryValues,
|
||||||
|
isRequired: srcOption.isRequired,
|
||||||
|
isArray: srcOption.isArray,
|
||||||
|
objectType: srcOption.objectType,
|
||||||
|
valueType: asServiceOptionType(srcOption.valueType),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function asServerCapabilities(result: types.CapabiltiesDiscoveryResult): data.DataProtocolServerCapabilities {
|
||||||
|
let capabilities: data.DataProtocolServerCapabilities = {
|
||||||
|
protocolVersion: result.capabilities.protocolVersion,
|
||||||
|
providerName: result.capabilities.providerName,
|
||||||
|
providerDisplayName: result.capabilities.providerDisplayName,
|
||||||
|
connectionProvider: undefined,
|
||||||
|
adminServicesProvider: undefined,
|
||||||
|
features: []
|
||||||
|
};
|
||||||
|
|
||||||
|
if (result.capabilities.adminServicesProvider) {
|
||||||
|
capabilities.adminServicesProvider = <data.AdminServicesOptions>{
|
||||||
|
databaseInfoOptions: new Array<data.ServiceOption>(),
|
||||||
|
databaseFileInfoOptions: new Array<data.ServiceOption>(),
|
||||||
|
fileGroupInfoOptions: new Array<data.ServiceOption>()
|
||||||
|
};
|
||||||
|
|
||||||
|
if (result.capabilities.adminServicesProvider.databaseInfoOptions
|
||||||
|
&& result.capabilities.adminServicesProvider.databaseInfoOptions.length > 0) {
|
||||||
|
for (let i = 0; i < result.capabilities.adminServicesProvider.databaseInfoOptions.length; ++i) {
|
||||||
|
let srcOption: any = result.capabilities.adminServicesProvider.databaseInfoOptions[i];
|
||||||
|
let descOption: data.ServiceOption = buildServiceOption(srcOption);
|
||||||
|
capabilities.adminServicesProvider.databaseInfoOptions.push(descOption);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.capabilities.adminServicesProvider.databaseFileInfoOptions
|
||||||
|
&& result.capabilities.adminServicesProvider.databaseFileInfoOptions.length > 0) {
|
||||||
|
for (let i = 0; i < result.capabilities.adminServicesProvider.databaseFileInfoOptions.length; ++i) {
|
||||||
|
//let srcOption: types.ServiceOption = result.capabilities.adminServicesProvider.databaseFileInfoOptions[i];
|
||||||
|
let srcOption: any = result.capabilities.adminServicesProvider.databaseFileInfoOptions[i];
|
||||||
|
let descOption: data.ServiceOption = buildServiceOption(srcOption);
|
||||||
|
capabilities.adminServicesProvider.databaseFileInfoOptions.push(descOption);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.capabilities.adminServicesProvider.fileGroupInfoOptions
|
||||||
|
&& result.capabilities.adminServicesProvider.fileGroupInfoOptions.length > 0) {
|
||||||
|
for (let i = 0; i < result.capabilities.adminServicesProvider.fileGroupInfoOptions.length; ++i) {
|
||||||
|
//let srcOption: types.ServiceOption = result.capabilities.adminServicesProvider.fileGroupInfoOptions[i];
|
||||||
|
let srcOption: any = result.capabilities.adminServicesProvider.fileGroupInfoOptions[i];
|
||||||
|
let descOption: data.ServiceOption = buildServiceOption(srcOption);
|
||||||
|
capabilities.adminServicesProvider.fileGroupInfoOptions.push(descOption);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.capabilities.connectionProvider
|
||||||
|
&& result.capabilities.connectionProvider.options
|
||||||
|
&& result.capabilities.connectionProvider.options.length > 0) {
|
||||||
|
capabilities.connectionProvider = <data.ConnectionProviderOptions>{
|
||||||
|
options: new Array<data.ConnectionOption>()
|
||||||
|
};
|
||||||
|
for (let i = 0; i < result.capabilities.connectionProvider.options.length; ++i) {
|
||||||
|
let srcOption: any = result.capabilities.connectionProvider.options[i];
|
||||||
|
let descOption: data.ConnectionOption = {
|
||||||
|
name: srcOption.name,
|
||||||
|
displayName: srcOption.displayName ? srcOption.displayName : srcOption.name,
|
||||||
|
description: srcOption.description,
|
||||||
|
groupName: srcOption.groupName,
|
||||||
|
defaultValue: srcOption.defaultValue,
|
||||||
|
categoryValues: srcOption.categoryValues,
|
||||||
|
isIdentity: srcOption.isIdentity,
|
||||||
|
isRequired: srcOption.isRequired,
|
||||||
|
valueType: asServiceOptionType(srcOption.valueType),
|
||||||
|
specialValueType: undefined
|
||||||
|
};
|
||||||
|
|
||||||
|
if (srcOption.specialValueType === 'serverName') {
|
||||||
|
descOption.specialValueType = data.ConnectionOptionSpecialType.serverName;
|
||||||
|
} else if (srcOption.specialValueType === 'databaseName') {
|
||||||
|
descOption.specialValueType = data.ConnectionOptionSpecialType.databaseName;
|
||||||
|
} else if (srcOption.specialValueType === 'authType') {
|
||||||
|
descOption.specialValueType = data.ConnectionOptionSpecialType.authType;
|
||||||
|
} else if (srcOption.specialValueType === 'userName') {
|
||||||
|
descOption.specialValueType = data.ConnectionOptionSpecialType.userName;
|
||||||
|
} else if (srcOption.specialValueType === 'password') {
|
||||||
|
descOption.specialValueType = data.ConnectionOptionSpecialType.password;
|
||||||
|
} else if (srcOption.specialValueType === 'appName') {
|
||||||
|
descOption.specialValueType = data.ConnectionOptionSpecialType.appName;
|
||||||
|
}
|
||||||
|
|
||||||
|
capabilities.connectionProvider.options.push(descOption);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.capabilities.features
|
||||||
|
&& result.capabilities.features.length > 0) {
|
||||||
|
result.capabilities.features.forEach(feature => {
|
||||||
|
let descFeature: data.FeatureMetadataProvider = {
|
||||||
|
enabled: feature.enabled,
|
||||||
|
featureName: feature.featureName,
|
||||||
|
optionsMetadata: []
|
||||||
|
};
|
||||||
|
capabilities.features.push(descFeature);
|
||||||
|
if (feature.optionsMetadata) {
|
||||||
|
feature.optionsMetadata.forEach(srcOption => {
|
||||||
|
descFeature.optionsMetadata.push(buildServiceOption(<any>srcOption));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return capabilities;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const p2c: Ip2c = {
|
||||||
|
asProviderMetadata,
|
||||||
|
asServerCapabilities
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -509,6 +509,17 @@ export interface IResultMessage {
|
|||||||
message: string;
|
message: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ExecutionPlanOptions {
|
||||||
|
includeEstimatedExecutionPlanXml?: boolean;
|
||||||
|
includeActualExecutionPlanXml?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface QueryExecuteParams {
|
||||||
|
ownerUri: string;
|
||||||
|
querySelection: data.ISelectionData;
|
||||||
|
executionPlanOptions?: ExecutionPlanOptions;
|
||||||
|
}
|
||||||
|
|
||||||
export enum EditRowState {
|
export enum EditRowState {
|
||||||
clean = 0,
|
clean = 0,
|
||||||
dirtyInsert = 1,
|
dirtyInsert = 1,
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
"reflect-metadata": "^0.1.8",
|
"reflect-metadata": "^0.1.8",
|
||||||
"rxjs": "5.4.0",
|
"rxjs": "5.4.0",
|
||||||
"semver": "4.3.6",
|
"semver": "4.3.6",
|
||||||
"slickgrid": "github:anthonydresser/SlickGrid#2.3.12",
|
"slickgrid": "github:anthonydresser/SlickGrid#2.3.7",
|
||||||
"spdlog": "0.3.7",
|
"spdlog": "0.3.7",
|
||||||
"svg.js": "^2.2.5",
|
"svg.js": "^2.2.5",
|
||||||
"systemjs": "0.19.40",
|
"systemjs": "0.19.40",
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { InputBox } from 'sql/base/browser/ui/inputBox/inputBox';
|
|||||||
import * as types from 'vs/base/common/types';
|
import * as types from 'vs/base/common/types';
|
||||||
import data = require('data');
|
import data = require('data');
|
||||||
import { localize } from 'vs/nls';
|
import { localize } from 'vs/nls';
|
||||||
import { ServiceOptionType, ServiceOptionTypeNames } from 'sql/workbench/api/common/sqlExtHostTypes';
|
import { ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||||
|
|
||||||
export interface IOptionElement {
|
export interface IOptionElement {
|
||||||
optionWidget: any;
|
optionWidget: any;
|
||||||
@@ -31,8 +31,7 @@ export function createOptionElement(option: data.ServiceOption, rowContainer: Bu
|
|||||||
let missingErrorMessage = localize('missingRequireField', ' is required.');
|
let missingErrorMessage = localize('missingRequireField', ' is required.');
|
||||||
let invalidInputMessage = localize('invalidInput', 'Invalid input. Numeric value expected.');
|
let invalidInputMessage = localize('invalidInput', 'Invalid input. Numeric value expected.');
|
||||||
|
|
||||||
let typeName: string = option.valueType.toString();
|
if (option.valueType === ServiceOptionType.number) {
|
||||||
if (typeName === ServiceOptionTypeNames.number) {
|
|
||||||
optionWidget = new InputBox(rowContainer.getHTMLElement(), contextViewService, {
|
optionWidget = new InputBox(rowContainer.getHTMLElement(), contextViewService, {
|
||||||
validationOptions: {
|
validationOptions: {
|
||||||
validation: (value: string) => {
|
validation: (value: string) => {
|
||||||
@@ -48,11 +47,11 @@ export function createOptionElement(option: data.ServiceOption, rowContainer: Bu
|
|||||||
});
|
});
|
||||||
optionWidget.value = optionValue;
|
optionWidget.value = optionValue;
|
||||||
inputElement = this.findElement(rowContainer, 'input');
|
inputElement = this.findElement(rowContainer, 'input');
|
||||||
} else if (typeName === ServiceOptionTypeNames.category || typeName === ServiceOptionTypeNames.boolean) {
|
} else if (option.valueType === ServiceOptionType.category || option.valueType === ServiceOptionType.boolean) {
|
||||||
optionWidget = new SelectBox(possibleInputs, optionValue.toString());
|
optionWidget = new SelectBox(possibleInputs, optionValue.toString());
|
||||||
DialogHelper.appendInputSelectBox(rowContainer, optionWidget);
|
DialogHelper.appendInputSelectBox(rowContainer, optionWidget);
|
||||||
inputElement = this.findElement(rowContainer, 'select-box');
|
inputElement = this.findElement(rowContainer, 'select-box');
|
||||||
} else if (typeName === ServiceOptionTypeNames.string || typeName === ServiceOptionTypeNames.password) {
|
} else if (option.valueType === ServiceOptionType.string || option.valueType === ServiceOptionType.password) {
|
||||||
optionWidget = new InputBox(rowContainer.getHTMLElement(), contextViewService, {
|
optionWidget = new InputBox(rowContainer.getHTMLElement(), contextViewService, {
|
||||||
validationOptions: {
|
validationOptions: {
|
||||||
validation: (value: string) => (!value && option.isRequired) ? ({ type: MessageType.ERROR, content: option.displayName + missingErrorMessage }) : null
|
validation: (value: string) => (!value && option.isRequired) ? ({ type: MessageType.ERROR, content: option.displayName + missingErrorMessage }) : null
|
||||||
@@ -70,11 +69,10 @@ export function createOptionElement(option: data.ServiceOption, rowContainer: Bu
|
|||||||
|
|
||||||
export function getOptionValueAndCategoryValues(option: data.ServiceOption, options: { [optionName: string]: any }, possibleInputs: string[]): any {
|
export function getOptionValueAndCategoryValues(option: data.ServiceOption, options: { [optionName: string]: any }, possibleInputs: string[]): any {
|
||||||
|
|
||||||
let valueTypeName:string = option.valueType.toString();
|
|
||||||
var optionValue = option.defaultValue;
|
var optionValue = option.defaultValue;
|
||||||
if (options[option.name]) {
|
if (options[option.name]) {
|
||||||
// if the value type is boolean, the option value can be either boolean or string
|
// if the value type is boolean, the option value can be either boolean or string
|
||||||
if (valueTypeName === ServiceOptionTypeNames.boolean) {
|
if (option.valueType === ServiceOptionType.boolean) {
|
||||||
if (options[option.name] === true || options[option.name] === this.trueInputValue) {
|
if (options[option.name] === true || options[option.name] === this.trueInputValue) {
|
||||||
optionValue = this.trueInputValue;
|
optionValue = this.trueInputValue;
|
||||||
} else {
|
} else {
|
||||||
@@ -85,13 +83,13 @@ export function getOptionValueAndCategoryValues(option: data.ServiceOption, opti
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (valueTypeName === ServiceOptionTypeNames.boolean || valueTypeName === ServiceOptionTypeNames.category) {
|
if (option.valueType === ServiceOptionType.boolean || option.valueType === ServiceOptionType.category) {
|
||||||
// If the option is not required, the empty string should be add at the top of possible choices
|
// If the option is not required, the empty string should be add at the top of possible choices
|
||||||
if (!option.isRequired) {
|
if (!option.isRequired) {
|
||||||
possibleInputs.push('');
|
possibleInputs.push('');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (valueTypeName === ServiceOptionTypeNames.boolean) {
|
if (option.valueType === ServiceOptionType.boolean) {
|
||||||
possibleInputs.push(this.trueInputValue, this.falseInputValue);
|
possibleInputs.push(this.trueInputValue, this.falseInputValue);
|
||||||
} else {
|
} else {
|
||||||
option.categoryValues.map(c => possibleInputs.push(c.name));
|
option.categoryValues.map(c => possibleInputs.push(c.name));
|
||||||
@@ -111,9 +109,9 @@ export function validateInputs(optionsMap: { [optionName: string]: IOptionElemen
|
|||||||
for (var optionName in optionsMap) {
|
for (var optionName in optionsMap) {
|
||||||
var optionElement: IOptionElement = optionsMap[optionName];
|
var optionElement: IOptionElement = optionsMap[optionName];
|
||||||
var widget = optionElement.optionWidget;
|
var widget = optionElement.optionWidget;
|
||||||
var isInputBox = (optionElement.option.valueType.toString() === ServiceOptionTypeNames.string ||
|
var isInputBox = (optionElement.option.valueType === ServiceOptionType.string ||
|
||||||
optionElement.option.valueType.toString() === ServiceOptionTypeNames.password ||
|
optionElement.option.valueType === ServiceOptionType.password ||
|
||||||
optionElement.option.valueType.toString() === ServiceOptionTypeNames.number);
|
optionElement.option.valueType === ServiceOptionType.number);
|
||||||
|
|
||||||
if (isInputBox) {
|
if (isInputBox) {
|
||||||
if (!widget.validate()) {
|
if (!widget.validate()) {
|
||||||
|
|||||||
6
src/sql/data.d.ts
vendored
6
src/sql/data.d.ts
vendored
@@ -661,12 +661,6 @@ declare module 'data' {
|
|||||||
ownerUri: string;
|
ownerUri: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface QueryExecuteParams {
|
|
||||||
ownerUri: string;
|
|
||||||
querySelection: ISelectionData;
|
|
||||||
executionPlanOptions?: ExecutionPlanOptions;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface QueryExecuteSubsetParams {
|
export interface QueryExecuteSubsetParams {
|
||||||
ownerUri: string;
|
ownerUri: string;
|
||||||
batchIndex: number;
|
batchIndex: number;
|
||||||
|
|||||||
@@ -68,10 +68,9 @@ export class ConnectionConfig implements IConnectionConfig {
|
|||||||
allGroups = allGroups.concat(userGroups);
|
allGroups = allGroups.concat(userGroups);
|
||||||
}
|
}
|
||||||
allGroups = allGroups.map(g => {
|
allGroups = allGroups.map(g => {
|
||||||
// @SQLTODO
|
if (g.parentId === '' || !g.parentId) {
|
||||||
// if (g.parentId === '' || !g.parentId) {
|
g.parentId = undefined;
|
||||||
// g.parentId = undefined;
|
}
|
||||||
// }
|
|
||||||
return g;
|
return g;
|
||||||
});
|
});
|
||||||
return allGroups;
|
return allGroups;
|
||||||
|
|||||||
@@ -15,17 +15,6 @@ export enum ServiceOptionType {
|
|||||||
object = 6
|
object = 6
|
||||||
}
|
}
|
||||||
|
|
||||||
// SQL added extension host types
|
|
||||||
export enum ServiceOptionTypeNames {
|
|
||||||
string = 'string',
|
|
||||||
multistring = 'multistring',
|
|
||||||
password = 'password',
|
|
||||||
number = 'number',
|
|
||||||
category = 'category',
|
|
||||||
boolean = 'boolean',
|
|
||||||
object = 'object'
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum ConnectionOptionSpecialType {
|
export enum ConnectionOptionSpecialType {
|
||||||
serverName = 'serverName',
|
serverName = 'serverName',
|
||||||
databaseName = 'databaseName',
|
databaseName = 'databaseName',
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import data = require('data');
|
|||||||
import { Builder, $ } from 'vs/base/browser/builder';
|
import { Builder, $ } from 'vs/base/browser/builder';
|
||||||
import * as TypeMoq from 'typemoq';
|
import * as TypeMoq from 'typemoq';
|
||||||
import * as assert from 'assert';
|
import * as assert from 'assert';
|
||||||
import { ServiceOptionType, ServiceOptionTypeNames } from 'sql/workbench/api/common/sqlExtHostTypes';
|
import { ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||||
|
|
||||||
suite('Advanced options helper tests', () => {
|
suite('Advanced options helper tests', () => {
|
||||||
var possibleInputs: string[];
|
var possibleInputs: string[];
|
||||||
@@ -41,7 +41,7 @@ suite('Advanced options helper tests', () => {
|
|||||||
],
|
],
|
||||||
defaultValue: null,
|
defaultValue: null,
|
||||||
isRequired: false,
|
isRequired: false,
|
||||||
valueType: <any>ServiceOptionTypeNames.category,
|
valueType: ServiceOptionType.category,
|
||||||
objectType: undefined,
|
objectType: undefined,
|
||||||
isArray: undefined
|
isArray: undefined
|
||||||
};
|
};
|
||||||
@@ -54,7 +54,7 @@ suite('Advanced options helper tests', () => {
|
|||||||
categoryValues: null,
|
categoryValues: null,
|
||||||
defaultValue: null,
|
defaultValue: null,
|
||||||
isRequired: false,
|
isRequired: false,
|
||||||
valueType: <any>ServiceOptionTypeNames.boolean,
|
valueType: ServiceOptionType.boolean,
|
||||||
objectType: undefined,
|
objectType: undefined,
|
||||||
isArray: undefined
|
isArray: undefined
|
||||||
};
|
};
|
||||||
@@ -67,7 +67,7 @@ suite('Advanced options helper tests', () => {
|
|||||||
categoryValues: null,
|
categoryValues: null,
|
||||||
defaultValue: '15',
|
defaultValue: '15',
|
||||||
isRequired: false,
|
isRequired: false,
|
||||||
valueType: <any>ServiceOptionTypeNames.number,
|
valueType: ServiceOptionType.number,
|
||||||
objectType: undefined,
|
objectType: undefined,
|
||||||
isArray: undefined
|
isArray: undefined
|
||||||
};
|
};
|
||||||
@@ -80,7 +80,7 @@ suite('Advanced options helper tests', () => {
|
|||||||
categoryValues: null,
|
categoryValues: null,
|
||||||
defaultValue: null,
|
defaultValue: null,
|
||||||
isRequired: false,
|
isRequired: false,
|
||||||
valueType: <any>ServiceOptionTypeNames.string,
|
valueType: ServiceOptionType.string,
|
||||||
objectType: undefined,
|
objectType: undefined,
|
||||||
isArray: undefined
|
isArray: undefined
|
||||||
};
|
};
|
||||||
@@ -93,7 +93,7 @@ suite('Advanced options helper tests', () => {
|
|||||||
categoryValues: null,
|
categoryValues: null,
|
||||||
defaultValue: null,
|
defaultValue: null,
|
||||||
isRequired: false,
|
isRequired: false,
|
||||||
valueType: <any>ServiceOptionTypeNames.string,
|
valueType: ServiceOptionType.string,
|
||||||
objectType: undefined,
|
objectType: undefined,
|
||||||
isArray: undefined
|
isArray: undefined
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5173,9 +5173,9 @@ slice-ansi@0.0.4:
|
|||||||
version "0.0.4"
|
version "0.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35"
|
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35"
|
||||||
|
|
||||||
"slickgrid@github:anthonydresser/SlickGrid#2.3.12":
|
"slickgrid@github:anthonydresser/SlickGrid#2.3.7":
|
||||||
version "2.3.12"
|
version "2.3.4"
|
||||||
resolved "https://codeload.github.com/anthonydresser/SlickGrid/tar.gz/5610e05166cd7068dcf196498ae20054382b1684"
|
resolved "https://codeload.github.com/anthonydresser/SlickGrid/tar.gz/fa7911c34b5449f9ce1e7148480fbc24fd20743a"
|
||||||
dependencies:
|
dependencies:
|
||||||
jquery ">=1.8.0"
|
jquery ">=1.8.0"
|
||||||
jquery-ui ">=1.8.0"
|
jquery-ui ">=1.8.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user