mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 11:01:37 -05:00
Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2acd37a1b1 | ||
|
|
85786b48c3 | ||
|
|
acd6257bae | ||
|
|
f007d707b6 | ||
|
|
b118b4bc7a | ||
|
|
f3edece70b | ||
|
|
4de376c357 | ||
|
|
0753b63ad0 | ||
|
|
0523190fbb | ||
|
|
de994972db | ||
|
|
3b06473c49 | ||
|
|
bb75143282 | ||
|
|
3857f11dc9 | ||
|
|
0918d93a18 | ||
|
|
25d96d041e | ||
|
|
0dc88501cf | ||
|
|
bac7eccbaf | ||
|
|
585d609ebb | ||
|
|
168385b6f1 | ||
|
|
eb4612100d | ||
|
|
d89ce8f9ec | ||
|
|
d84dd31491 | ||
|
|
b6632547a2 | ||
|
|
79669f073c | ||
|
|
e078e3bc48 | ||
|
|
72d035be98 |
@@ -114,14 +114,14 @@ steps:
|
||||
APP_NAME="`ls $APP_ROOT | head -n 1`"
|
||||
yarn smoketest --build "$APP_ROOT/$APP_NAME" --screenshots "$(build.artifactstagingdirectory)/smokeshots"
|
||||
displayName: Run smoke tests (Electron)
|
||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/azuredatastudio-reh-web-darwin" \
|
||||
yarn smoketest --web --headless --screenshots "$(build.artifactstagingdirectory)/smokeshots"
|
||||
displayName: Run smoke tests (Browser)
|
||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||
# - script: |
|
||||
# set -e
|
||||
# VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/azuredatastudio-reh-web-darwin" \
|
||||
# yarn smoketest --web --headless --screenshots "$(build.artifactstagingdirectory)/smokeshots"
|
||||
# displayName: Run smoke tests (Browser)
|
||||
# condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
@@ -16,12 +16,10 @@ steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "10.15.1"
|
||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
||||
|
||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
||||
inputs:
|
||||
versionSpec: "1.x"
|
||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
displayName: 'Azure Key Vault: Get Secrets'
|
||||
@@ -56,26 +54,25 @@ steps:
|
||||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
|
||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
|
||||
vstsFeed: 'BuildCache'
|
||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
|
||||
displayName: Install dependencies
|
||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'), ne(variables['CacheRestored'], 'true'))
|
||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
||||
|
||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
||||
inputs:
|
||||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
|
||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
|
||||
vstsFeed: 'BuildCache'
|
||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'), ne(variables['CacheRestored'], 'true'))
|
||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
yarn postinstall
|
||||
displayName: Run postinstall scripts
|
||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'), eq(variables['CacheRestored'], 'true'))
|
||||
condition: and(succeeded(), eq(variables['CacheRestored'], 'true'))
|
||||
|
||||
# Mixin must run before optimize, because the CSS loader will
|
||||
# inline small SVGs
|
||||
@@ -113,7 +110,6 @@ steps:
|
||||
|
||||
node build/azure-pipelines/common/copyArtifacts.js
|
||||
displayName: Write Version Information
|
||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish Artifact: drop'
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { WorkspaceConfiguration, ConfigurationTarget } from 'vscode';
|
||||
import { Account } from 'azdata';
|
||||
|
||||
import { azureResource } from '../azure-resource';
|
||||
@@ -53,25 +52,8 @@ export class AzureResourceSubscriptionFilterService implements IAzureResourceSub
|
||||
for (const accountId in selectedSubscriptionsCache) {
|
||||
filters.push(...selectedSubscriptionsCache[accountId].map((subcription) => `${accountId}/${subcription.id}/${subcription.name}`));
|
||||
}
|
||||
|
||||
const resourceFilterConfig = this._config.inspect<string[]>(AzureResourceSubscriptionFilterService.filterConfigName);
|
||||
let configTarget = ConfigurationTarget.Global;
|
||||
if (resourceFilterConfig) {
|
||||
if (resourceFilterConfig.workspaceFolderValue) {
|
||||
configTarget = ConfigurationTarget.WorkspaceFolder;
|
||||
} else if (resourceFilterConfig.workspaceValue) {
|
||||
configTarget = ConfigurationTarget.Workspace;
|
||||
} else if (resourceFilterConfig.globalValue) {
|
||||
configTarget = ConfigurationTarget.Global;
|
||||
}
|
||||
}
|
||||
|
||||
await this._config.update(AzureResourceSubscriptionFilterService.filterConfigName, filters, configTarget);
|
||||
}
|
||||
|
||||
private _config: WorkspaceConfiguration = undefined;
|
||||
private _cacheService: IAzureResourceCacheService = undefined;
|
||||
private _cacheKey: string = undefined;
|
||||
|
||||
private static readonly filterConfigName = 'azure.resource.config.filter';
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
import { ExtensionContext, workspace, window, Disposable, commands, OutputChannel } from 'vscode'; // {{SQL CARBON EDIT}} - remove unused imports
|
||||
import { ExtensionContext, workspace, window, Disposable, commands, OutputChannel, Uri } from 'vscode';
|
||||
import { findGit, Git, IGit } from './git';
|
||||
import { Model } from './model';
|
||||
import { CommandCenter } from './commands';
|
||||
@@ -78,7 +78,7 @@ async function createModel(context: ExtensionContext, outputChannel: OutputChann
|
||||
new GitTimelineProvider(model)
|
||||
);
|
||||
|
||||
await checkGitVersion(info);
|
||||
// await checkGitVersion(info); {{SQL CARBON EDIT}} Don't check git version
|
||||
|
||||
return model;
|
||||
}
|
||||
@@ -180,13 +180,8 @@ export async function activate(context: ExtensionContext): Promise<GitExtension>
|
||||
return result;
|
||||
}
|
||||
|
||||
async function checkGitVersion(_info: IGit): Promise<void> { // {{SQL CARBON EDIT}} - Rename info to _info to prevent error due to unused variable
|
||||
return; /* {{SQL CARBON EDIT}} return immediately
|
||||
|
||||
/*const config = workspace.getConfiguration('git');
|
||||
const shouldIgnore = config.get<boolean>('ignoreLegacyWarning') === true;
|
||||
|
||||
|
||||
// @ts-expect-error
|
||||
async function checkGitVersion(info: IGit): Promise<void> {
|
||||
const config = workspace.getConfiguration('git');
|
||||
const shouldIgnore = config.get<boolean>('ignoreLegacyWarning') === true;
|
||||
|
||||
@@ -211,5 +206,5 @@ async function checkGitVersion(_info: IGit): Promise<void> { // {{SQL CARBON EDI
|
||||
commands.executeCommand('vscode.open', Uri.parse('https://git-scm.com/'));
|
||||
} else if (choice === neverShowAgain) {
|
||||
await config.update('ignoreLegacyWarning', true, true);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,13 +28,11 @@
|
||||
"devDependencies": {
|
||||
"@types/chai": "3.4.34",
|
||||
"@types/node": "^10.14.8",
|
||||
"azure-keyvault": "^3.0.4",
|
||||
"chai": "3.5.0",
|
||||
"mocha-junit-reporter": "^1.17.0",
|
||||
"mocha-multi-reporters": "^1.1.7",
|
||||
"ms-rest-azure": "^2.6.0",
|
||||
"vscode": "1.1.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"azure-keyvault": "^3.0.4",
|
||||
"ms-rest-azure": "^2.6.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -478,17 +478,7 @@
|
||||
{
|
||||
"displayName": "%databasesListProperties.name%",
|
||||
"value": "name",
|
||||
"widthWeight": 60
|
||||
},
|
||||
{
|
||||
"displayName": "%databasesListProperties.status%",
|
||||
"value": "state",
|
||||
"widthWeight": 20
|
||||
},
|
||||
{
|
||||
"displayName": "%databasesListProperties.size%",
|
||||
"value": "sizeInMB",
|
||||
"widthWeight": 20
|
||||
"widthWeight": 100
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1099,7 +1089,7 @@
|
||||
"figures": "^2.0.0",
|
||||
"find-remove": "1.2.1",
|
||||
"request": "^2.88.0",
|
||||
"request-promise": "^4.2.2",
|
||||
"request-light": "^0.3.0",
|
||||
"service-downloader": "0.2.1",
|
||||
"stream-meter": "^1.0.4",
|
||||
"through2": "^3.0.1",
|
||||
@@ -1113,7 +1103,6 @@
|
||||
"@types/chai": "^4.2.11",
|
||||
"@types/mocha": "^7.0.2",
|
||||
"@types/request": "^2.48.2",
|
||||
"@types/request-promise": "^4.1.44",
|
||||
"@types/stream-meter": "^0.0.22",
|
||||
"@types/through2": "^2.0.34",
|
||||
"chai": "^4.2.0",
|
||||
|
||||
@@ -37,15 +37,14 @@ export class SparkJobSubmissionModel {
|
||||
constructor(
|
||||
private readonly _sqlClusterConnection: SqlClusterConnection,
|
||||
private readonly _dialog: azdata.window.Dialog,
|
||||
private readonly _appContext: AppContext,
|
||||
requestService?: typeof import('request-promise')) {
|
||||
private readonly _appContext: AppContext) {
|
||||
|
||||
if (!this._sqlClusterConnection || !this._dialog || !this._appContext) {
|
||||
throw new Error(localize('sparkJobSubmission.SparkJobSubmissionModelInitializeError',
|
||||
"Parameters for SparkJobSubmissionModel is illegal"));
|
||||
}
|
||||
|
||||
this._dialogService = new SparkJobSubmissionService(requestService);
|
||||
this._dialogService = new SparkJobSubmissionService();
|
||||
this._guidForClusterFolder = utils.generateGuid();
|
||||
}
|
||||
|
||||
|
||||
@@ -10,21 +10,9 @@ import * as constants from '../../../constants';
|
||||
import { SqlClusterConnection } from '../../../objectExplorerNodeProvider/connection';
|
||||
import * as utils from '../../../utils';
|
||||
import * as auth from '../../../util/auth';
|
||||
import { Options } from 'request-promise';
|
||||
import * as request from 'request-light';
|
||||
|
||||
export class SparkJobSubmissionService {
|
||||
private _requestPromise: typeof import('request-promise');
|
||||
|
||||
constructor(
|
||||
requestService?: typeof import('request-promise')) {
|
||||
if (requestService) {
|
||||
// this is to fake the request service for test.
|
||||
this._requestPromise = requestService;
|
||||
} else {
|
||||
this._requestPromise = require('request-promise');
|
||||
}
|
||||
}
|
||||
|
||||
public async submitBatchJob(submissionArgs: SparkJobSubmissionInput): Promise<string> {
|
||||
try {
|
||||
let livyUrl: string = `https://${submissionArgs.host}:${submissionArgs.port}${submissionArgs.livyPath}/`;
|
||||
@@ -32,12 +20,11 @@ export class SparkJobSubmissionService {
|
||||
// Get correct authentication headers
|
||||
let headers = await this.getAuthenticationHeaders(submissionArgs);
|
||||
|
||||
let options: Options = {
|
||||
uri: livyUrl,
|
||||
method: 'POST',
|
||||
json: true,
|
||||
rejectUnauthorized: !auth.getIgnoreSslVerificationConfigSetting(),
|
||||
body: {
|
||||
let options: request.XHROptions = {
|
||||
url: livyUrl,
|
||||
type: 'POST',
|
||||
strictSSL: !auth.getIgnoreSslVerificationConfigSetting(),
|
||||
data: {
|
||||
file: submissionArgs.sparkFile,
|
||||
proxyUser: submissionArgs.user,
|
||||
className: submissionArgs.mainClass,
|
||||
@@ -51,7 +38,7 @@ export class SparkJobSubmissionService {
|
||||
if (submissionArgs.jobArguments && submissionArgs.jobArguments.trim()) {
|
||||
let argsList = submissionArgs.jobArguments.split(' ');
|
||||
if (argsList.length > 0) {
|
||||
options.body['args'] = argsList;
|
||||
options.data['args'] = argsList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +46,7 @@ export class SparkJobSubmissionService {
|
||||
if (submissionArgs.jarFileList && submissionArgs.jarFileList.trim()) {
|
||||
let jarList = submissionArgs.jarFileList.split(';');
|
||||
if (jarList.length > 0) {
|
||||
options.body['jars'] = jarList;
|
||||
options.data['jars'] = jarList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +54,7 @@ export class SparkJobSubmissionService {
|
||||
if (submissionArgs.pyFileList && submissionArgs.pyFileList.trim()) {
|
||||
let pyList = submissionArgs.pyFileList.split(';');
|
||||
if (pyList.length > 0) {
|
||||
options.body['pyFiles'] = pyList;
|
||||
options.data['pyFiles'] = pyList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,11 +62,17 @@ export class SparkJobSubmissionService {
|
||||
if (submissionArgs.otherFileList && submissionArgs.otherFileList.trim()) {
|
||||
let otherList = submissionArgs.otherFileList.split(';');
|
||||
if (otherList.length > 0) {
|
||||
options.body['files'] = otherList;
|
||||
options.data['files'] = otherList;
|
||||
}
|
||||
}
|
||||
|
||||
const response = await this._requestPromise(options);
|
||||
options.data = JSON.stringify(options.data);
|
||||
|
||||
// Note this is currently required to be called each time since request-light is overwriting
|
||||
// the setting passed in through the options. If/when that gets fixed this can be removed
|
||||
request.configure(null, !auth.getIgnoreSslVerificationConfigSetting());
|
||||
|
||||
const response = JSON.parse((await request.xhr(options)).responseText);
|
||||
if (response && utils.isValidNumber(response.id)) {
|
||||
return response.id;
|
||||
}
|
||||
@@ -108,16 +101,19 @@ export class SparkJobSubmissionService {
|
||||
let livyUrl = `https://${submissionArgs.host}:${submissionArgs.port}${submissionArgs.livyPath}/${livyBatchId}/log`;
|
||||
let headers = await this.getAuthenticationHeaders(submissionArgs);
|
||||
|
||||
let options = {
|
||||
uri: livyUrl,
|
||||
method: 'GET',
|
||||
json: true,
|
||||
rejectUnauthorized: !auth.getIgnoreSslVerificationConfigSetting(),
|
||||
let options: request.XHROptions = {
|
||||
url: livyUrl,
|
||||
type: 'GET',
|
||||
strictSSL: !auth.getIgnoreSslVerificationConfigSetting(),
|
||||
// authentication headers
|
||||
headers: headers
|
||||
};
|
||||
|
||||
const response = await this._requestPromise(options);
|
||||
// Note this is currently required to be called each time since request-light is overwriting
|
||||
// the setting passed in through the options. If/when that gets fixed this can be removed
|
||||
request.configure(null, !auth.getIgnoreSslVerificationConfigSetting());
|
||||
|
||||
const response = JSON.parse((await request.xhr(options)).responseText);
|
||||
if (response && response.log) {
|
||||
return this.extractYarnAppIdFromLog(response.log);
|
||||
}
|
||||
|
||||
@@ -2,11 +2,6 @@
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@types/bluebird@*":
|
||||
version "3.5.30"
|
||||
resolved "https://registry.yarnpkg.com/@types/bluebird/-/bluebird-3.5.30.tgz#ee034a0eeea8b84ed868b1aa60d690b08a6cfbc5"
|
||||
integrity sha512-8LhzvcjIoqoi1TghEkRMkbbmM+jhHnBokPGkJWjclMK+Ks0MxEBow3/p2/iFTZ+OIbJHQDSfpgdZEb+af3gfVw==
|
||||
|
||||
"@types/bytes@^3.0.0":
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/bytes/-/bytes-3.1.0.tgz#835a3e4aea3b4d7604aca216a78de372bff3ecc3"
|
||||
@@ -32,15 +27,7 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.11.1.tgz#49a2a83df9d26daacead30d0ccc8762b128d53c7"
|
||||
integrity sha512-eWQGP3qtxwL8FGneRrC5DwrJLGN4/dH1clNTuLfN81HCrxVtxRjygDTUoZJ5ASlDEeo0ppYFQjQIlXhtXpOn6g==
|
||||
|
||||
"@types/request-promise@^4.1.44":
|
||||
version "4.1.46"
|
||||
resolved "https://registry.yarnpkg.com/@types/request-promise/-/request-promise-4.1.46.tgz#37df6efae984316dfbfbbe8fcda37f3ba52822f2"
|
||||
integrity sha512-3Thpj2Va5m0ji3spaCk8YKrjkZyZc6RqUVOphA0n/Xet66AW/AiOAs5vfXhQIL5NmkaO7Jnun7Nl9NEjJ2zBaw==
|
||||
dependencies:
|
||||
"@types/bluebird" "*"
|
||||
"@types/request" "*"
|
||||
|
||||
"@types/request@*", "@types/request@^2.48.2":
|
||||
"@types/request@^2.48.2":
|
||||
version "2.48.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/request/-/request-2.48.4.tgz#df3d43d7b9ed3550feaa1286c6eabf0738e6cf7e"
|
||||
integrity sha512-W1t1MTKYR8PxICH+A4HgEIPuAC3sbljoEVfyZbeFJJDbr30guDspJri2XOaM2E+Un7ZjrihaDi7cf6fPa2tbgw==
|
||||
@@ -257,11 +244,6 @@ binary-extensions@^2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c"
|
||||
integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==
|
||||
|
||||
bluebird@^3.5.0:
|
||||
version "3.7.2"
|
||||
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
|
||||
integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
|
||||
|
||||
brace-expansion@^1.1.7:
|
||||
version "1.1.11"
|
||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
||||
@@ -893,7 +875,7 @@ http-signature@~1.2.0:
|
||||
jsprim "^1.2.2"
|
||||
sshpk "^1.7.0"
|
||||
|
||||
https-proxy-agent@^2.2.3:
|
||||
https-proxy-agent@^2.2.3, https-proxy-agent@^2.2.4:
|
||||
version "2.2.4"
|
||||
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b"
|
||||
integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==
|
||||
@@ -1493,22 +1475,14 @@ remap-istanbul@^0.11.1:
|
||||
source-map "^0.6.1"
|
||||
through2 "2.0.1"
|
||||
|
||||
request-promise-core@1.1.3:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.3.tgz#e9a3c081b51380dfea677336061fea879a829ee9"
|
||||
integrity sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ==
|
||||
request-light@^0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/request-light/-/request-light-0.3.0.tgz#04daa783e7f0a70392328dda4b546f3e27845f2d"
|
||||
integrity sha512-xlVlZVT0ZvCT+c3zm3SjeFCzchoQxsUUmx5fkal0I6RIDJK+lmb1UYyKJ7WM4dTfnzHP4ElWwAf8Dli8c0/tVA==
|
||||
dependencies:
|
||||
lodash "^4.17.15"
|
||||
|
||||
request-promise@^4.2.2:
|
||||
version "4.2.5"
|
||||
resolved "https://registry.yarnpkg.com/request-promise/-/request-promise-4.2.5.tgz#186222c59ae512f3497dfe4d75a9c8461bd0053c"
|
||||
integrity sha512-ZgnepCykFdmpq86fKGwqntyTiUrHycALuGggpyCZwMvGaZWgxW6yagT0FHkgo5LzYvOaCNvxYwWYIjevSH1EDg==
|
||||
dependencies:
|
||||
bluebird "^3.5.0"
|
||||
request-promise-core "1.1.3"
|
||||
stealthy-require "^1.1.1"
|
||||
tough-cookie "^2.3.3"
|
||||
http-proxy-agent "^2.1.0"
|
||||
https-proxy-agent "^2.2.4"
|
||||
vscode-nls "^4.1.1"
|
||||
|
||||
request@^2.88.0:
|
||||
version "2.88.2"
|
||||
@@ -1642,11 +1616,6 @@ sshpk@^1.7.0:
|
||||
safer-buffer "^2.0.2"
|
||||
tweetnacl "~0.14.0"
|
||||
|
||||
stealthy-require@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b"
|
||||
integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=
|
||||
|
||||
stream-meter@^1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/stream-meter/-/stream-meter-1.0.4.tgz#52af95aa5ea760a2491716704dbff90f73afdd1d"
|
||||
@@ -1812,14 +1781,6 @@ to-regex-range@^5.0.1:
|
||||
dependencies:
|
||||
is-number "^7.0.0"
|
||||
|
||||
tough-cookie@^2.3.3, tough-cookie@~2.5.0:
|
||||
version "2.5.0"
|
||||
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2"
|
||||
integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==
|
||||
dependencies:
|
||||
psl "^1.1.28"
|
||||
punycode "^2.1.1"
|
||||
|
||||
tough-cookie@^3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-3.0.1.tgz#9df4f57e739c26930a018184887f4adb7dca73b2"
|
||||
@@ -1829,6 +1790,14 @@ tough-cookie@^3.0.1:
|
||||
psl "^1.1.28"
|
||||
punycode "^2.1.1"
|
||||
|
||||
tough-cookie@~2.5.0:
|
||||
version "2.5.0"
|
||||
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2"
|
||||
integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==
|
||||
dependencies:
|
||||
psl "^1.1.28"
|
||||
punycode "^2.1.1"
|
||||
|
||||
tunnel-agent@^0.6.0:
|
||||
version "0.6.0"
|
||||
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
|
||||
@@ -1928,7 +1897,7 @@ vscode-languageserver-types@3.14.0:
|
||||
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.14.0.tgz#d3b5952246d30e5241592b6dde8280e03942e743"
|
||||
integrity sha512-lTmS6AlAlMHOvPQemVwo3CezxBp0sNB95KNPkqp3Nxd5VFEnuG1ByM0zlRWos0zjO3ZWtkvhal0COgiV1xIA4A==
|
||||
|
||||
vscode-nls@^4.0.0:
|
||||
vscode-nls@^4.0.0, vscode-nls@^4.1.1:
|
||||
version "4.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.2.tgz#ca8bf8bb82a0987b32801f9fddfdd2fb9fd3c167"
|
||||
integrity sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw==
|
||||
|
||||
@@ -114,6 +114,7 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider<BookTreeIte
|
||||
}
|
||||
|
||||
if (showPreview) {
|
||||
this._bookViewer.reveal(this.currentBook.bookItems[0], { expand: vscode.TreeItemCollapsibleState.Expanded, focus: true, select: true });
|
||||
await this.showPreviewFile(urlToOpen);
|
||||
}
|
||||
|
||||
|
||||
@@ -134,6 +134,7 @@ export class ConfigurePathPage extends BasePage {
|
||||
checked: !useExistingPython
|
||||
}).component();
|
||||
this.newInstallButton.onDidClick(() => {
|
||||
this.existingInstallButton.checked = false;
|
||||
this.updatePythonPathsDropdown(false)
|
||||
.catch(err => {
|
||||
this.instance.showErrorMessage(utils.getErrorMessage(err));
|
||||
@@ -147,6 +148,7 @@ export class ConfigurePathPage extends BasePage {
|
||||
checked: useExistingPython
|
||||
}).component();
|
||||
this.existingInstallButton.onDidClick(() => {
|
||||
this.newInstallButton.checked = false;
|
||||
this.updatePythonPathsDropdown(true)
|
||||
.catch(err => {
|
||||
this.instance.showErrorMessage(utils.getErrorMessage(err));
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
|
||||
"Once accepted there, we are happy to receive an update request."
|
||||
],
|
||||
"version": "https://github.com/Microsoft/vscode-mssql/commit/a542fe96780e6b274adb281810d419a512fb5bb4",
|
||||
"version": "https://github.com/Microsoft/vscode-mssql/commit/a79741f76fd33bd137a8c28172c9750b978309b6",
|
||||
"name": "SQL",
|
||||
"scopeName": "source.sql",
|
||||
"patterns": [
|
||||
@@ -404,7 +404,7 @@
|
||||
}
|
||||
},
|
||||
"comment": "this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.",
|
||||
"match": "(N)?(')(?:[^'\\\\]|\\\\.)*(')",
|
||||
"match": "(N)?(')[^']*(')",
|
||||
"name": "string.quoted.single.sql"
|
||||
},
|
||||
{
|
||||
@@ -437,7 +437,7 @@
|
||||
}
|
||||
},
|
||||
"comment": "this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.",
|
||||
"match": "(`)(?:[^`\\\\]|\\\\.)*(`)",
|
||||
"match": "(`)[^`\\\\]*(`)",
|
||||
"name": "string.quoted.other.backtick.sql"
|
||||
},
|
||||
{
|
||||
@@ -470,7 +470,7 @@
|
||||
}
|
||||
},
|
||||
"comment": "this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.",
|
||||
"match": "(\")(?:[^\"#\\\\]|\\\\.)*(\")",
|
||||
"match": "(\")[^\"#]*(\")",
|
||||
"name": "string.quoted.double.sql"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "azuredatastudio",
|
||||
"version": "1.18.0",
|
||||
"distro": "1a99144c4c1f884810b37cdc9be608372e99d168",
|
||||
"distro": "a04ebf32a5868f2bc7a4eed0716a42564d2a7896",
|
||||
"author": {
|
||||
"name": "Microsoft Corporation"
|
||||
},
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
"builtInExtensions": [
|
||||
{
|
||||
"name": "Microsoft.sqlservernotebook",
|
||||
"version": "0.3.6",
|
||||
"version": "0.3.7",
|
||||
"repo": "https://github.com/Microsoft/azuredatastudio"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -328,6 +328,7 @@ export interface INewConnectionParams {
|
||||
showDashboard?: boolean;
|
||||
providers?: string[];
|
||||
isEditConnection?: boolean;
|
||||
oldProfileId?: string; // used for edit connection
|
||||
}
|
||||
|
||||
export interface IConnectableInput {
|
||||
|
||||
@@ -324,6 +324,8 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
if (this.uriTransformer) {
|
||||
batchInfo.ownerUri = URI.from(this.uriTransformer.transformOutgoing(URI.parse(batchInfo.ownerUri))).toString(true);
|
||||
}
|
||||
this.messageRunner.cancel(); // clear batch messages before saying we completed the batch
|
||||
this.sendMessages();
|
||||
this._proxy.$onBatchComplete(handle, batchInfo);
|
||||
}
|
||||
$onResultSetAvailable(handle: number, resultSetInfo: azdata.QueryExecuteResultSetNotificationParams): void {
|
||||
|
||||
@@ -14,6 +14,8 @@ import * as azdata from 'azdata';
|
||||
import { SafeHtml, DomSanitizer } from '@angular/platform-browser';
|
||||
import { TitledComponent } from 'sql/workbench/browser/modelComponents/titledComponent';
|
||||
import { IComponentDescriptor, IComponent, IModelStore } from 'sql/platform/dashboard/browser/interfaces';
|
||||
import { registerThemingParticipant, IColorTheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
|
||||
import { textLinkForeground, textLinkActiveForeground } from 'vs/platform/theme/common/colorRegistry';
|
||||
|
||||
@Component({
|
||||
selector: 'modelview-text',
|
||||
@@ -99,3 +101,24 @@ export default class TextComponent extends TitledComponent implements IComponent
|
||||
return this.requiredIndicator || !!this.description;
|
||||
}
|
||||
}
|
||||
|
||||
registerThemingParticipant((theme: IColorTheme, collector: ICssStyleCollector) => {
|
||||
const linkForeground = theme.getColor(textLinkForeground);
|
||||
if (linkForeground) {
|
||||
collector.addRule(`
|
||||
a.modelview-text-link:link,
|
||||
a.modelview-text-link:visited {
|
||||
color: ${linkForeground};
|
||||
}
|
||||
`);
|
||||
}
|
||||
|
||||
const activeForeground = theme.getColor(textLinkActiveForeground);
|
||||
if (activeForeground) {
|
||||
collector.addRule(`
|
||||
a.modelview-text-link:hover {
|
||||
color: ${activeForeground};
|
||||
}
|
||||
`);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -534,7 +534,7 @@ export class TreeView extends Disposable implements ITreeView {
|
||||
}
|
||||
},
|
||||
|
||||
getActionsContext: () => (<TreeViewItemHandleArg>{ $treeViewId: this.id, $treeItemHandle: node.handle }),
|
||||
getActionsContext: () => (<TreeViewItemHandleArg>{ $treeViewId: this.id, $treeItemHandle: node.handle, $treeItem: node }),
|
||||
|
||||
actionRunner
|
||||
});
|
||||
@@ -860,11 +860,10 @@ class TreeRenderer extends Disposable implements ITreeRenderer<ITreeItem, FuzzyS
|
||||
templateData.icon.title = title ? title : '';
|
||||
|
||||
if (iconUrl || sqlIcon) {
|
||||
templateData.icon.className = 'custom-view-tree-node-item-icon';
|
||||
DOM.toggleClass(templateData.icon, sqlIcon, !!sqlIcon); // tracked change
|
||||
DOM.toggleClass(templateData.icon, 'icon', !!sqlIcon);
|
||||
templateData.icon.className = 'custom-view-tree-node-item-icon';
|
||||
templateData.icon.style.backgroundImage = iconUrl ? DOM.asCSSUrl(iconUrl) : '';
|
||||
|
||||
} else {
|
||||
let iconClass: string | undefined;
|
||||
if (node.themeIcon && !this.isFileKindThemeIcon(node.themeIcon)) {
|
||||
|
||||
@@ -34,7 +34,7 @@ const targetDatabaseEngineEditionMap = {
|
||||
5: 'SqlAzureDatabaseEdition',
|
||||
6: 'SqlDatawarehouseEdition',
|
||||
7: 'SqlServerStretchEdition',
|
||||
11: 'SqlServerSqlOnDemandEdition',
|
||||
11: 'SqlServerOnDemandEdition',
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -132,6 +132,7 @@ export class DashboardWidgetWrapper extends AngularDisposable implements OnInit
|
||||
}
|
||||
|
||||
if (this._actions && this.toggleMore) {
|
||||
this._actionbar.context = { target: this._actionbarRef.nativeElement };
|
||||
this._actionbar.push(this.instantiationService.createInstance(ToggleMoreWidgetAction, this._actions as Array<IAction>, this._component.actionsContext), { icon: true, label: false });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,10 @@ import { ChangeDetectorRef, Component, ElementRef, forwardRef, Inject, OnInit, V
|
||||
import { Router } from '@angular/router';
|
||||
import { DatabaseInfo } from 'azdata';
|
||||
import { subscriptionToDisposable } from 'sql/base/browser/lifecycle';
|
||||
import { ICapabilitiesService } from 'sql/platform/capabilities/common/capabilitiesService';
|
||||
import { IConnectionManagementService } from 'sql/platform/connection/common/connectionManagement';
|
||||
import { ConnectionProfile } from 'sql/platform/connection/common/connectionProfile';
|
||||
import { DatabaseEngineEdition } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
import { DashboardWidget, IDashboardWidget, WidgetConfig, WIDGET_CONFIG } from 'sql/workbench/contrib/dashboard/browser/core/dashboardWidget';
|
||||
import { ConnectionProfilePropertyName, ExplorerTable } from 'sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerTable';
|
||||
import { NameProperty } from 'sql/workbench/contrib/dashboard/browser/widgets/explorer/explorerView';
|
||||
@@ -51,6 +55,8 @@ export class ExplorerWidget extends DashboardWidget implements IDashboardWidget,
|
||||
@Inject(IMenuService) private readonly menuService: IMenuService,
|
||||
@Inject(IContextKeyService) private readonly contextKeyService: IContextKeyService,
|
||||
@Inject(IEditorProgressService) private readonly progressService: IEditorProgressService,
|
||||
@Inject(IConnectionManagementService) private readonly connectionManagementService: IConnectionManagementService,
|
||||
@Inject(ICapabilitiesService) private readonly capabilitiesService: ICapabilitiesService,
|
||||
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef
|
||||
) {
|
||||
super(changeRef);
|
||||
@@ -95,7 +101,6 @@ export class ExplorerWidget extends DashboardWidget implements IDashboardWidget,
|
||||
this._register(subscriptionToDisposable(this._bootstrap.metadataService.metadata.subscribe(
|
||||
data => {
|
||||
if (data) {
|
||||
|
||||
const objectData = ObjectMetadataWrapper.createFromObjectMetadata(data.objectMetadata);
|
||||
objectData.sort(ObjectMetadataWrapper.sort);
|
||||
this.updateTable(objectData);
|
||||
@@ -106,34 +111,55 @@ export class ExplorerWidget extends DashboardWidget implements IDashboardWidget,
|
||||
}
|
||||
)));
|
||||
} else {
|
||||
this._register(subscriptionToDisposable(this._bootstrap.metadataService.databases.subscribe(
|
||||
data => {
|
||||
// Handle the case where there is no metadata service
|
||||
data = data || [];
|
||||
if (isStringArray(data)) {
|
||||
data = data.map(item => {
|
||||
const dbInfo: DatabaseInfo = { options: {} };
|
||||
dbInfo.options[NameProperty] = item;
|
||||
return dbInfo;
|
||||
});
|
||||
// TODO: remove this ADS side workaround for SQL On-Demand and handle it in SQL Tools Service
|
||||
if (this._bootstrap.connectionManagementService.connectionInfo.serverInfo.engineEditionId === DatabaseEngineEdition.SqlOnDemand) {
|
||||
this.connectionManagementService.listDatabases(this._bootstrap.connectionManagementService.connectionInfo.ownerUri).then(
|
||||
result => {
|
||||
// Sort the databases: system databases first and then the sorted list of other databases
|
||||
const sysDatabases = ['master', 'model', 'msdb', 'tempdb'];
|
||||
const databaseNames = result.databaseNames.filter(db => sysDatabases.indexOf(db) !== -1).
|
||||
concat(result.databaseNames.filter(db => sysDatabases.indexOf(db) === -1).sort());
|
||||
this.handleServerContextResults(databaseNames);
|
||||
},
|
||||
error => {
|
||||
this.showErrorMessage(nls.localize('dashboard.explorer.databaseError', "Unable to load databases"));
|
||||
}
|
||||
|
||||
const currentProfile = this._bootstrap.connectionManagementService.connectionInfo.connectionProfile;
|
||||
this.updateTable(data.map(d => {
|
||||
const item = assign({}, d.options);
|
||||
const profile = currentProfile.toIConnectionProfile();
|
||||
profile.databaseName = d.options[NameProperty];
|
||||
item[ConnectionProfilePropertyName] = profile;
|
||||
return item;
|
||||
}));
|
||||
},
|
||||
error => {
|
||||
this.showErrorMessage(nls.localize('dashboard.explorer.databaseError', "Unable to load databases"));
|
||||
}
|
||||
)));
|
||||
);
|
||||
}
|
||||
else {
|
||||
this._register(subscriptionToDisposable(this._bootstrap.metadataService.databases.subscribe(
|
||||
data => {
|
||||
this.handleServerContextResults(data);
|
||||
},
|
||||
error => {
|
||||
this.showErrorMessage(nls.localize('dashboard.explorer.databaseError', "Unable to load databases"));
|
||||
}
|
||||
)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private handleServerContextResults(data: string[] | DatabaseInfo[]): void {
|
||||
// Handle the case where there is no metadata service
|
||||
data = data || [];
|
||||
if (isStringArray(data)) {
|
||||
data = data.map(item => {
|
||||
const dbInfo: DatabaseInfo = { options: {} };
|
||||
dbInfo.options[NameProperty] = item;
|
||||
return dbInfo;
|
||||
});
|
||||
}
|
||||
|
||||
const currentProfile = this._bootstrap.connectionManagementService.connectionInfo.connectionProfile;
|
||||
this.updateTable(data.map(d => {
|
||||
const item = assign({}, d.options);
|
||||
const profile = new ConnectionProfile(this.capabilitiesService, currentProfile);
|
||||
profile.databaseName = d.options[NameProperty];
|
||||
item[ConnectionProfilePropertyName] = profile;
|
||||
return item;
|
||||
}));
|
||||
}
|
||||
|
||||
private updateTable(data: Slick.SlickData[]) {
|
||||
this._table.setData(data);
|
||||
this.setLoadingStatus(false);
|
||||
|
||||
@@ -17,3 +17,13 @@ explorer-widget .list-row {
|
||||
.explorer-widget .slick-cell {
|
||||
border-right-style: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* The widget could be put into container with class name "grid" and inherit colors unexpectedly,
|
||||
* using this selector to force the cell to use the colors from parent elements
|
||||
*/
|
||||
.grid .explorer-widget .slick-cell {
|
||||
color: inherit;
|
||||
background-color: inherit;
|
||||
border-color: inherit;
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ export class NotebookEditorModel extends EditorModel {
|
||||
private _notebookTextFileModel: NotebookTextFileModel;
|
||||
private readonly _onDidChangeDirty: Emitter<void> = this._register(new Emitter<void>());
|
||||
private _lastEditFullReplacement: boolean;
|
||||
private _isFirstKernelChange: boolean = true;
|
||||
constructor(public readonly notebookUri: URI,
|
||||
private textEditorModel: ITextFileEditorModel | IUntitledTextEditorModel | ResourceEditorModel,
|
||||
@INotebookService private notebookService: INotebookService,
|
||||
@@ -110,6 +111,10 @@ export class NotebookEditorModel extends EditorModel {
|
||||
}
|
||||
|
||||
public updateModel(contentChange?: NotebookContentChange, type?: NotebookChangeType): void {
|
||||
if (type === NotebookChangeType.KernelChanged && this._isFirstKernelChange) {
|
||||
this._isFirstKernelChange = false;
|
||||
return;
|
||||
}
|
||||
this._lastEditFullReplacement = false;
|
||||
if (contentChange && contentChange.changeType === NotebookChangeType.Saved) {
|
||||
// We send the saved events out, so ignore. Otherwise we double-count this as a change
|
||||
|
||||
@@ -238,10 +238,10 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
||||
private async doLoad(): Promise<void> {
|
||||
try {
|
||||
await this.createModelAndLoadContents();
|
||||
await this.setNotebookManager();
|
||||
await this.loadModel();
|
||||
this._modelReadyDeferred.resolve(this._model);
|
||||
this.notebookService.addNotebookEditor(this);
|
||||
await this.setNotebookManager();
|
||||
await this.loadModel();
|
||||
} catch (error) {
|
||||
if (error) {
|
||||
// Offer to create a file from the error if we have a file not found and the name is valid
|
||||
|
||||
@@ -210,7 +210,7 @@ export class MessagePanel extends Disposable {
|
||||
const errorColor = theme.getColor(resultsErrorColor);
|
||||
const content: string[] = [];
|
||||
if (errorColor) {
|
||||
content.push(`.message-tree .monaco-tree-rows .error-message { color: ${errorColor}; }`);
|
||||
content.push(`.message-tree .monaco-list-rows .error-message { color: ${errorColor}; }`);
|
||||
}
|
||||
|
||||
const newStyles = content.join('\n');
|
||||
|
||||
@@ -26,7 +26,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
id: commands.SCRIPT_AS_CREATE_COMMAND_ID,
|
||||
title: localize('scriptAsCreate', "Script as Create")
|
||||
},
|
||||
when: ContextKeyExpr.and(MssqlNodeContext.CanScriptAsCreateOrDelete, MssqlNodeContext.EngineEdition.notEqualsTo(DatabaseEngineEdition.SqlOnDemand.toString()))
|
||||
when: MssqlNodeContext.CanScriptAsCreateOrDelete
|
||||
});
|
||||
|
||||
// Script as Delete
|
||||
@@ -115,10 +115,10 @@ MenuRegistry.appendMenuItem(MenuId.ObjectExplorerItemContext, {
|
||||
title: localize('scriptCreate', "Script as Create")
|
||||
},
|
||||
when: ContextKeyExpr.or(
|
||||
ContextKeyExpr.and(TreeNodeContextKey.NodeType.isEqualTo('Table'), MssqlNodeContext.EngineEdition.notEqualsTo(DatabaseEngineEdition.SqlOnDemand.toString())),
|
||||
ContextKeyExpr.and(TreeNodeContextKey.NodeType.isEqualTo('View'), MssqlNodeContext.EngineEdition.notEqualsTo(DatabaseEngineEdition.SqlOnDemand.toString())),
|
||||
ContextKeyExpr.and(TreeNodeContextKey.NodeType.isEqualTo('Schema'), MssqlNodeContext.EngineEdition.notEqualsTo(DatabaseEngineEdition.SqlOnDemand.toString())),
|
||||
ContextKeyExpr.and(TreeNodeContextKey.NodeType.isEqualTo('User'), MssqlNodeContext.EngineEdition.notEqualsTo(DatabaseEngineEdition.SqlOnDemand.toString())),
|
||||
TreeNodeContextKey.NodeType.isEqualTo('Table'),
|
||||
TreeNodeContextKey.NodeType.isEqualTo('View'),
|
||||
TreeNodeContextKey.NodeType.isEqualTo('Schema'),
|
||||
TreeNodeContextKey.NodeType.isEqualTo('User'),
|
||||
TreeNodeContextKey.NodeType.isEqualTo('UserDefinedTableType'),
|
||||
TreeNodeContextKey.NodeType.isEqualTo('StoredProcedure'),
|
||||
TreeNodeContextKey.NodeType.isEqualTo('AggregateFunction'),
|
||||
@@ -296,7 +296,6 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerWidgetContext, {
|
||||
id: commands.ExplorerScriptCreateAction.ID,
|
||||
title: commands.ExplorerScriptCreateAction.LABEL
|
||||
},
|
||||
when: MssqlNodeContext.EngineEdition.notEqualsTo(DatabaseEngineEdition.SqlOnDemand.toString()),
|
||||
order: 2
|
||||
});
|
||||
//#endregion
|
||||
|
||||
@@ -166,6 +166,10 @@ export class ConnectionDialogService implements IConnectionDialogService {
|
||||
}
|
||||
profile = result.connection;
|
||||
|
||||
if (params.oldProfileId && params.isEditConnection) {
|
||||
profile.id = params.oldProfileId;
|
||||
}
|
||||
|
||||
profile.serverName = trim(profile.serverName);
|
||||
|
||||
// append the port to the server name for SQL Server connections
|
||||
|
||||
@@ -235,7 +235,8 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
||||
}
|
||||
let params = {
|
||||
connectionType: ConnectionType.default,
|
||||
isEditConnection: true
|
||||
isEditConnection: true,
|
||||
oldProfileId: model.id
|
||||
};
|
||||
|
||||
try {
|
||||
|
||||
@@ -658,7 +658,6 @@ abstract class ResourceNavigator<T> extends Disposable {
|
||||
onDidChangeFocus: Event<{ browserEvent?: UIEvent }>,
|
||||
onDidChangeSelection: Event<{ browserEvent?: UIEvent }>,
|
||||
onDidOpen: Event<{ browserEvent?: UIEvent }>,
|
||||
readonly openOnSingleClick?: boolean
|
||||
},
|
||||
options?: IResourceNavigatorOptions
|
||||
) {
|
||||
@@ -712,7 +711,7 @@ abstract class ResourceNavigator<T> extends Disposable {
|
||||
!!(<SelectionKeyboardEvent>browserEvent).preserveFocus :
|
||||
!isDoubleClick;
|
||||
|
||||
if (this.treeOrList.openOnSingleClick || isDoubleClick || isKeyboardEvent) {
|
||||
if (this.options.openOnSingleClick || isDoubleClick || isKeyboardEvent) {
|
||||
const sideBySide = browserEvent instanceof MouseEvent && (browserEvent.ctrlKey || browserEvent.metaKey || browserEvent.altKey);
|
||||
this.open(preserveFocus, isDoubleClick || isMiddleClick, sideBySide, browserEvent);
|
||||
}
|
||||
@@ -739,8 +738,8 @@ export class ListResourceNavigator<T> extends ResourceNavigator<number> {
|
||||
}
|
||||
|
||||
export class TreeResourceNavigator<T, TFilterData> extends ResourceNavigator<T> {
|
||||
constructor(tree: WorkbenchObjectTree<T, TFilterData> | WorkbenchCompressibleObjectTree<T, TFilterData> | WorkbenchDataTree<any, T, TFilterData> | WorkbenchAsyncDataTree<any, T, TFilterData> | WorkbenchCompressibleAsyncDataTree<any, T, TFilterData>, options: IResourceNavigatorOptions = {}) {
|
||||
super(tree, options);
|
||||
constructor(tree: WorkbenchObjectTree<T, TFilterData> | WorkbenchCompressibleObjectTree<T, TFilterData> | WorkbenchDataTree<any, T, TFilterData> | WorkbenchAsyncDataTree<any, T, TFilterData> | WorkbenchCompressibleAsyncDataTree<any, T, TFilterData>, options?: IResourceNavigatorOptions) {
|
||||
super(tree, { openOnSingleClick: tree.openOnSingleClick, ...(options || {}) });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ export class MainThreadTextEditors implements MainThreadTextEditorsShape {
|
||||
// preserve pre 1.38 behaviour to not make group active when preserveFocus: true
|
||||
// but make sure to restore the editor to fix https://github.com/microsoft/vscode/issues/79633
|
||||
activation: options.preserveFocus ? EditorActivation.RESTORE : undefined,
|
||||
ignoreOverrides: true
|
||||
ignoreOverrides: uri?.fsPath?.toLowerCase().endsWith('ipynb') || uri?.fsPath?.toLowerCase().endsWith('sql') ? false : true // {{SQL CARBON EDIT}}
|
||||
};
|
||||
|
||||
const input: IResourceEditorInput = {
|
||||
|
||||
@@ -84,6 +84,7 @@ export class ExtensionRecommendationsService extends Disposable implements IExte
|
||||
this.dynamicWorkspaceRecommendations = instantiationService.createInstance(DynamicWorkspaceRecommendations, isExtensionAllowedToBeRecommended);
|
||||
this.keymapRecommendations = instantiationService.createInstance(KeymapRecommendations, isExtensionAllowedToBeRecommended);
|
||||
this.staticRecommendations = instantiationService.createInstance(StaticRecommendations, isExtensionAllowedToBeRecommended); // {{SQL CARBON EDIT}} add ours
|
||||
this.scenarioRecommendations = instantiationService.createInstance(ScenarioRecommendations, isExtensionAllowedToBeRecommended); // {{SQL CARBON EDIT}} add ours
|
||||
|
||||
if (!this.isEnabled()) {
|
||||
this.sessionSeed = 0;
|
||||
@@ -99,6 +100,7 @@ export class ExtensionRecommendationsService extends Disposable implements IExte
|
||||
this.experimentalRecommendations.activate();
|
||||
this.keymapRecommendations.activate();
|
||||
this.staticRecommendations.activate(); // {{SQL CARBON EDIT}} add ours
|
||||
this.scenarioRecommendations.activate(); // {{SQL CARBON EDIT}} add ours
|
||||
if (!this.configurationService.getValue<boolean>(ShowRecommendationsOnlyOnDemandKey)) {
|
||||
lifecycleService.when(LifecyclePhase.Eventually).then(() => this.activateProactiveRecommendations());
|
||||
}
|
||||
|
||||
@@ -3043,7 +3043,7 @@ export class InstallVSIXAction extends Action {
|
||||
return;
|
||||
}
|
||||
const requireReload = !(extension.local && this.extensionService.canAddExtension(toExtensionDescription(extension.local)));
|
||||
const message = requireReload ? localize('InstallVSIXAction.successReload', "Please reload Visual Studio Code to complete installing the extension {0}.", extension.displayName || extension.name)
|
||||
const message = requireReload ? localize('InstallVSIXAction.successReload', "Please reload Azure Data Studio to complete installing the extension {0}.", extension.displayName || extension.name) // {{SQL CARBON EDIT}}
|
||||
: localize('InstallVSIXAction.success', "Completed installing the extension {0}.", extension.displayName || extension.name);
|
||||
const actions = requireReload ? [{
|
||||
label: localize('InstallVSIXAction.reloadNow', "Reload Now"),
|
||||
|
||||
@@ -230,55 +230,61 @@ export class FileBasedRecommendations extends ExtensionRecommendations {
|
||||
}
|
||||
|
||||
private async promptRecommendedExtensionForFileExtension(fileExtension: string, installed: ILocalExtension[]): Promise<void> {
|
||||
const fileExtensionSuggestionIgnoreList = <string[]>JSON.parse(this.storageService.get('extensionsAssistant/fileExtensionsSuggestionIgnore', StorageScope.GLOBAL, '[]'));
|
||||
if (fileExtensionSuggestionIgnoreList.indexOf(fileExtension) > -1) {
|
||||
// {{SQL CARBON EDIT}} - Turn off file extension-based extensions until we have a scenario that requires this. The queryGallery isn't working correctly in ADS now.
|
||||
let enableRecommendation: boolean = false;
|
||||
if (!enableRecommendation) {
|
||||
return;
|
||||
}
|
||||
|
||||
const text = `ext:${fileExtension}`;
|
||||
const pager = await this.extensionsWorkbenchService.queryGallery({ text, pageSize: 100 }, CancellationToken.None);
|
||||
if (pager.firstPage.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const installedExtensionsIds = installed.reduce((result, i) => { result.add(i.identifier.id.toLowerCase()); return result; }, new Set<string>());
|
||||
if (pager.firstPage.some(e => installedExtensionsIds.has(e.identifier.id.toLowerCase()))) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.notificationService.prompt(
|
||||
Severity.Info,
|
||||
localize('showLanguageExtensions', "The Marketplace has extensions that can help with '.{0}' files", fileExtension),
|
||||
[{
|
||||
label: searchMarketplace,
|
||||
run: () => {
|
||||
this.telemetryService.publicLog2<{ userReaction: string, fileExtension: string }, FileExtensionSuggestionClassification>('fileExtensionSuggestion:popup', { userReaction: 'ok', fileExtension });
|
||||
this.viewletService.openViewlet('workbench.view.extensions', true)
|
||||
.then(viewlet => viewlet?.getViewPaneContainer() as IExtensionsViewPaneContainer)
|
||||
.then(viewlet => {
|
||||
viewlet.search(`ext:${fileExtension}`);
|
||||
viewlet.focus();
|
||||
});
|
||||
}
|
||||
}, {
|
||||
label: localize('dontShowAgainExtension', "Don't Show Again for '.{0}' files", fileExtension),
|
||||
run: () => {
|
||||
fileExtensionSuggestionIgnoreList.push(fileExtension);
|
||||
this.storageService.store(
|
||||
'extensionsAssistant/fileExtensionsSuggestionIgnore',
|
||||
JSON.stringify(fileExtensionSuggestionIgnoreList),
|
||||
StorageScope.GLOBAL
|
||||
);
|
||||
this.telemetryService.publicLog2<{ userReaction: string, fileExtension: string }, FileExtensionSuggestionClassification>('fileExtensionSuggestion:popup', { userReaction: 'neverShowAgain', fileExtension });
|
||||
}
|
||||
}],
|
||||
{
|
||||
sticky: true,
|
||||
onCancel: () => {
|
||||
this.telemetryService.publicLog2<{ userReaction: string, fileExtension: string }, FileExtensionSuggestionClassification>('fileExtensionSuggestion:popup', { userReaction: 'cancelled', fileExtension });
|
||||
}
|
||||
} else {
|
||||
const fileExtensionSuggestionIgnoreList = <string[]>JSON.parse(this.storageService.get('extensionsAssistant/fileExtensionsSuggestionIgnore', StorageScope.GLOBAL, '[]'));
|
||||
if (fileExtensionSuggestionIgnoreList.indexOf(fileExtension) > -1) {
|
||||
return;
|
||||
}
|
||||
);
|
||||
|
||||
const text = `ext:${fileExtension}`;
|
||||
const pager = await this.extensionsWorkbenchService.queryGallery({ text, pageSize: 100 }, CancellationToken.None);
|
||||
if (pager.firstPage.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const installedExtensionsIds = installed.reduce((result, i) => { result.add(i.identifier.id.toLowerCase()); return result; }, new Set<string>());
|
||||
if (pager.firstPage.some(e => installedExtensionsIds.has(e.identifier.id.toLowerCase()))) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.notificationService.prompt(
|
||||
Severity.Info,
|
||||
localize('showLanguageExtensions', "The Marketplace has extensions that can help with '.{0}' files", fileExtension),
|
||||
[{
|
||||
label: searchMarketplace,
|
||||
run: () => {
|
||||
this.telemetryService.publicLog2<{ userReaction: string, fileExtension: string }, FileExtensionSuggestionClassification>('fileExtensionSuggestion:popup', { userReaction: 'ok', fileExtension });
|
||||
this.viewletService.openViewlet('workbench.view.extensions', true)
|
||||
.then(viewlet => viewlet?.getViewPaneContainer() as IExtensionsViewPaneContainer)
|
||||
.then(viewlet => {
|
||||
viewlet.search(`ext:${fileExtension}`);
|
||||
viewlet.focus();
|
||||
});
|
||||
}
|
||||
}, {
|
||||
label: localize('dontShowAgainExtension', "Don't Show Again for '.{0}' files", fileExtension),
|
||||
run: () => {
|
||||
fileExtensionSuggestionIgnoreList.push(fileExtension);
|
||||
this.storageService.store(
|
||||
'extensionsAssistant/fileExtensionsSuggestionIgnore',
|
||||
JSON.stringify(fileExtensionSuggestionIgnoreList),
|
||||
StorageScope.GLOBAL
|
||||
);
|
||||
this.telemetryService.publicLog2<{ userReaction: string, fileExtension: string }, FileExtensionSuggestionClassification>('fileExtensionSuggestion:popup', { userReaction: 'neverShowAgain', fileExtension });
|
||||
}
|
||||
}],
|
||||
{
|
||||
sticky: true,
|
||||
onCancel: () => {
|
||||
this.telemetryService.publicLog2<{ userReaction: string, fileExtension: string }, FileExtensionSuggestionClassification>('fileExtensionSuggestion:popup', { userReaction: 'cancelled', fileExtension });
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private filterInstalled(recommendationsToSuggest: string[], installed: ILocalExtension[]): string[] {
|
||||
|
||||
Reference in New Issue
Block a user