More layering movement (#24023)

* finish layering

* undo eslint changes

* undo

* restore -> backup

* fix paths

* Skip commandLine layers check

* fix path

* fix tsec path
This commit is contained in:
Charles Gagnon
2023-07-31 10:17:43 -07:00
committed by GitHub
parent 9043998bfd
commit 5b70fd1afe
72 changed files with 178 additions and 190 deletions

View File

@@ -127,13 +127,13 @@ export default () => `
<div class="flex flex-container-video">
<div class="videos-container-video">
<a href="https://www.youtube.com/watch?v=Orv7fptVoUA" class="video overview ads-welcome-page-link">
<img src="${require.toUrl('./../../media/video_overview.png')}" class="video-overview" id="video-overview" />
<img src="${require.toUrl('./../media/video_overview.png')}" class="video-overview" id="video-overview" />
<h4>${escape(localize('welcomePage.videoDescriptionOverview', "Overview of Azure Data Studio"))}</h4>
</a>
</div>
<div class="videos-container-video">
<a href="https://www.youtube.com/watch?v=Nt4kIHQ0IOc" class="video overview ads-welcome-page-link">
<img src="${require.toUrl('./../../media/video_introduction.png')}" class="video-introduction" id="video-introduction" />
<img src="${require.toUrl('./../media/video_introduction.png')}" class="video-introduction" id="video-introduction" />
<h4>${escape(localize('welcomePage.videoDescriptionIntroduction', "Introduction to Azure Data Studio Notebooks | Data Exposed"))}</h4>
</a>
</div>

View File

@@ -3,7 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { AbstractEnablePreviewFeatures } from 'sql/workbench/contrib/welcome/gettingStarted/browser/abstractEnablePreviewFeatures';
import { AbstractEnablePreviewFeatures } from 'sql/workbench/contrib/welcome/browser/abstractEnablePreviewFeatures';
import { IStorageService } from 'vs/platform/storage/common/storage';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { IHostService } from 'vs/workbench/services/host/browser/host';

View File

@@ -6,7 +6,7 @@
import { Registry } from 'vs/platform/registry/common/platform';
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';
import { BrowserEnablePreviewFeatures } from 'sql/workbench/contrib/welcome/gettingStarted/browser/enablePreviewFeatures';
import { BrowserEnablePreviewFeatures } from 'sql/workbench/contrib/welcome/browser/enablePreviewFeatures';
Registry
.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench)

View File

@@ -6,7 +6,7 @@
import { localize } from 'vs/nls';
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
import { Registry } from 'vs/platform/registry/common/platform';
import { WelcomePageContribution, WelcomePageAction, WelcomeInputSerializer } from 'sql/workbench/contrib/welcome/page/browser/welcomePage';
import { WelcomePageContribution, WelcomePageAction, WelcomeInputSerializer } from 'sql/workbench/contrib/welcome/browser/welcomePage';
import { MenuId, MenuRegistry, registerAction2 } from 'vs/platform/actions/common/actions';
import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry';
import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';

View File

@@ -405,9 +405,9 @@
height: 12px;
margin-left: 6px;
margin-top: 3px;
-webkit-mask: url(../../media/info.svg) no-repeat;
-webkit-mask: url(../media/info.svg) no-repeat;
-webkit-mask-size: 12px 12px;
mask: url(../../media/info.svg) no-repeat;
mask: url(../media/info.svg) no-repeat;
mask-size: 12px 12px
}
@@ -455,9 +455,9 @@
display: inline-block;
width: 11px;
margin-left: 4px;
-webkit-mask: url(../../media/link_icon.svg) no-repeat;
-webkit-mask: url(../media/link_icon.svg) no-repeat;
-webkit-mask-size: 11px 11px;
mask: url(../../media/link_icon.svg) no-repeat;
mask: url(../media/link_icon.svg) no-repeat;
mask-size: 11px 11px;
height: 11px;
}
@@ -610,7 +610,7 @@
.ads-homepage-section.hero {
background-size: 1128px 467px;
background-repeat: no-repeat;
background-image: url(../../media/homeBanner_icon.svg);
background-image: url(../media/homeBanner_icon.svg);
padding: 0 16px 40px;
}
@@ -636,7 +636,7 @@
.hc-black .ads-homepage-section.hero, .vs-dark .ads-homepage-section.hero {
background-size: 1128px 467px;
background-image: url(../../media/homeBanner_icon_dark.svg);
background-image: url(../media/homeBanner_icon_dark.svg);
background-repeat: no-repeat
}
@@ -703,7 +703,7 @@
.ads-homepage .header-top-nav .icon {
min-width: 92px;
min-height: 92px;
background-image: url(../../media/dataStudioIcon.svg);
background-image: url(../media/dataStudioIcon.svg);
background-size: contain;
margin-right: 20px;
background-repeat: no-repeat
@@ -805,25 +805,25 @@
}
.ads-homepage .header-bottom-nav-tile .icon.connection {
background-image: url(../../media/createConnectionIcon.svg);
background-image: url(../media/createConnectionIcon.svg);
background-size: contain;
background-repeat: no-repeat
}
.ads-homepage .header-bottom-nav-tile .icon.query {
background-image: url(../../media/databaseIcon.svg);
background-image: url(../media/databaseIcon.svg);
background-size: contain;
background-repeat: no-repeat
}
.ads-homepage .header-bottom-nav-tile .icon.notebook {
background-image: url(../../media/notebookIcon.svg);
background-image: url(../media/notebookIcon.svg);
background-size: contain;
background-repeat: no-repeat
}
.ads-homepage .header-bottom-nav-tile .icon.server {
background-image: url(../../media/serverIcon.svg);
background-image: url(../media/serverIcon.svg);
background-size: contain;
background-repeat: no-repeat
}
@@ -923,36 +923,36 @@
}
.ads-homepage .ads-homepage-section .history .list li:not(.moreRecent) i, .ads-homepage .ads-homepage-section .pinned .list li i, .ads-homepage .icon-document {
-webkit-mask: url(../../media/icon_file_document.svg) no-repeat;
-webkit-mask: url(../media/icon_file_document.svg) no-repeat;
-webkit-mask-size: 13px 16px;
mask: url(../../media/icon_file_document.svg) no-repeat;
mask: url(../media/icon_file_document.svg) no-repeat;
mask-size: 13px 16px;
height: 16px;
width: 16px
}
.ads-homepage .ads-homepage-section .history .list li:not(.moreRecent) i[title$=".ipynb"], .ads-homepage .ads-homepage-section .pinned .list li:not(.moreRecent) i[title$=".ipynb"] {
-webkit-mask: url(../../media/icon_file_ipynb.svg) no-repeat;
-webkit-mask: url(../media/icon_file_ipynb.svg) no-repeat;
-webkit-mask-size: 13px 16px;
mask: url(../../media/icon_file_ipynb.svg) no-repeat;
mask: url(../media/icon_file_ipynb.svg) no-repeat;
mask-size: 13px 16px;
height: 16px;
width: 16px
}
.ads-homepage .ads-homepage-section .history .list li:not(.moreRecent) i[title$=".sql"], .ads-homepage .ads-homepage-section .pinned .list li:not(.moreRecent) i[title$=".sql"] {
-webkit-mask: url(../../media/icon_file_sql.svg) no-repeat;
-webkit-mask: url(../media/icon_file_sql.svg) no-repeat;
-webkit-mask-size: 13px 16px;
mask: url(../../media/icon_file_sql.svg) no-repeat;
mask: url(../media/icon_file_sql.svg) no-repeat;
mask-size: 13px 16px;
height: 16px;
width: 16px
}
.ads-homepage .ads-homepage-section .history .list li:not(.moreRecent) i[title$=".csv"], .ads-homepage .ads-homepage-section .pinned .list li:not(.moreRecent) a[title$=".csv"] {
-webkit-mask: url(../../media/icon_file_csv.svg) no-repeat;
-webkit-mask: url(../media/icon_file_csv.svg) no-repeat;
-webkit-mask-size: 13px 16px;
mask: url(../../media/icon_file_csv.svg) no-repeat;
mask: url(../media/icon_file_csv.svg) no-repeat;
mask-size: 13px 16px;
height: 16px;
width: 16px
@@ -1060,7 +1060,7 @@
}
.ads-homepage .extension-pack-description {
background: url(../../media/extension_pack_img.svg);
background: url(../media/extension_pack_img.svg);
background-position: center;
position: relative;
background-size: cover;
@@ -1257,7 +1257,7 @@
.file-icons-enabled .show-file-icons .az-data-welcome-page-name-file-icon.file-icon::before {
content: " ";
background-image: url('../../../../../../vs/workbench/browser/media/code-icon.svg');
background-image: url('../../../../../vs/workbench/browser/media/code-icon.svg');
}
.monaco-workbench .part.editor>.content .welcomePage .linux-only, .monaco-workbench .part.editor>.content .welcomePage .mac-only, .monaco-workbench .part.editor>.content .welcomePage .windows-only {

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./welcomePage';
import 'sql/workbench/contrib/welcome/page/browser/az_data_welcome_page';
import 'sql/workbench/contrib/welcome/browser/az_data_welcome_page';
import { URI } from 'vs/base/common/uri';
import { ICommandService } from 'vs/platform/commands/common/commands';
import * as arrays from 'vs/base/common/arrays';
@@ -41,7 +41,7 @@ import { IHostService } from 'vs/workbench/services/host/browser/host';
import { IProductService } from 'vs/platform/product/common/productService';
import { joinPath } from 'vs/base/common/resources';
import { clearNode } from 'vs/base/browser/dom';
import { GuidedTour } from 'sql/workbench/contrib/welcome/page/browser/gettingStartedTour';
import { GuidedTour } from 'sql/workbench/contrib/welcome/browser/gettingStartedTour';
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import { Button } from 'sql/base/browser/ui/button/button';
@@ -191,16 +191,16 @@ const extensionPacks: ExtensionSuggestion[] = [
];
const extensionPackExtensions: ExtensionPackExtensions[] = [
{ name: localize('welcomePage.sqlServerAgent', "SQL Server Agent"), icon: require.toUrl('./../../media/agentExtensionIcon.png'), link: `command:azdata.extension.open?{"id":"microsoft.agent"}` },
{ name: localize('welcomePage.sqlServerProfiler', "SQL Server Profiler"), icon: require.toUrl('./../../media/defaultExtensionIcon.svg'), link: `command:azdata.extension.open?{"id":"microsoft.profiler"}` },
{ name: localize('welcomePage.sqlServerImport', "SQL Server Import"), icon: require.toUrl('./../../media/defaultExtensionIcon.svg'), link: `command:azdata.extension.open?{"id":"microsoft.import"}` },
{ name: localize('welcomePage.sqlServerDacpac', "SQL Server Dacpac"), icon: require.toUrl('./../../media/defaultExtensionIcon.svg'), link: `command:azdata.extension.open?{"id":"microsoft.dacpac"}` }
{ name: localize('welcomePage.sqlServerAgent', "SQL Server Agent"), icon: require.toUrl('./../media/agentExtensionIcon.png'), link: `command:azdata.extension.open?{"id":"microsoft.agent"}` },
{ name: localize('welcomePage.sqlServerProfiler', "SQL Server Profiler"), icon: require.toUrl('./../media/defaultExtensionIcon.svg'), link: `command:azdata.extension.open?{"id":"microsoft.profiler"}` },
{ name: localize('welcomePage.sqlServerImport', "SQL Server Import"), icon: require.toUrl('./../media/defaultExtensionIcon.svg'), link: `command:azdata.extension.open?{"id":"microsoft.import"}` },
{ name: localize('welcomePage.sqlServerDacpac', "SQL Server Dacpac"), icon: require.toUrl('./../media/defaultExtensionIcon.svg'), link: `command:azdata.extension.open?{"id":"microsoft.dacpac"}` }
];
const extensions: ExtensionSuggestion[] = [
{ name: localize('welcomePage.powershell', "Powershell"), id: 'microsoft.powershell', description: localize('welcomePage.powershellDescription', "Write and execute PowerShell scripts using Azure Data Studio's rich query editor"), icon: require.toUrl('./../../media/icon_powershell.png'), link: `command:azdata.extension.open?{"id":"microsoft.powershell"}` },
{ name: localize('welcomePage.dataVirtualization', "Data Virtualization"), id: 'microsoft.datavirtualization', description: localize('welcomePage.dataVirtualizationDescription', "Virtualize data with SQL Server 2019 and create external tables using interactive wizards"), icon: require.toUrl('./../../media/defaultExtensionIcon.svg'), link: `command:azdata.extension.open?{"id":"microsoft.datavirtualization"}` },
{ name: localize('welcomePage.PostgreSQL', "PostgreSQL"), id: 'microsoft.azuredatastudio-postgresql', description: localize('welcomePage.PostgreSQLDescription', "Connect, query, and manage Postgres databases with Azure Data Studio"), icon: require.toUrl('./../../media/icon_postgre_sql.png'), link: `command:azdata.extension.open?{"id":"microsoft.azuredatastudio-postgresql"}` },
{ name: localize('welcomePage.powershell', "Powershell"), id: 'microsoft.powershell', description: localize('welcomePage.powershellDescription', "Write and execute PowerShell scripts using Azure Data Studio's rich query editor"), icon: require.toUrl('./../media/icon_powershell.png'), link: `command:azdata.extension.open?{"id":"microsoft.powershell"}` },
{ name: localize('welcomePage.dataVirtualization', "Data Virtualization"), id: 'microsoft.datavirtualization', description: localize('welcomePage.dataVirtualizationDescription', "Virtualize data with SQL Server 2019 and create external tables using interactive wizards"), icon: require.toUrl('./../media/defaultExtensionIcon.svg'), link: `command:azdata.extension.open?{"id":"microsoft.datavirtualization"}` },
{ name: localize('welcomePage.PostgreSQL', "PostgreSQL"), id: 'microsoft.azuredatastudio-postgresql', description: localize('welcomePage.PostgreSQLDescription', "Connect, query, and manage Postgres databases with Azure Data Studio"), icon: require.toUrl('./../media/icon_postgre_sql.png'), link: `command:azdata.extension.open?{"id":"microsoft.azuredatastudio-postgresql"}` },
];
const extensionPackStrings = {
@@ -262,7 +262,7 @@ class WelcomePage extends Disposable {
const resource = URI.parse(require.toUrl('./az_data_welcome_page'))
.with({
scheme: Schemas.walkThrough,
query: JSON.stringify({ moduleId: 'sql/workbench/contrib/welcome/page/browser/az_data_welcome_page' })
query: JSON.stringify({ moduleId: 'sql/workbench/contrib/welcome/browser/az_data_welcome_page' })
});
this.editorInput = this.instantiationService.createInstance(WalkThroughInput, {
typeId: welcomeInputTypeId,

View File

@@ -1,7 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// Link is regularly updated with new information from release.
export const NOTIFY_READMORE_LINK = 'https://aka.ms/azuredatastudio-connection';

View File

@@ -3,7 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { AbstractEnablePreviewFeatures } from 'sql/workbench/contrib/welcome/gettingStarted/browser/abstractEnablePreviewFeatures';
import { AbstractEnablePreviewFeatures } from 'sql/workbench/contrib/welcome/browser/abstractEnablePreviewFeatures';
import { IStorageService } from 'vs/platform/storage/common/storage';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { IHostService } from 'vs/workbench/services/host/browser/host';

View File

@@ -6,8 +6,8 @@
import { Registry } from 'vs/platform/registry/common/platform';
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';
import { NativeEnablePreviewFeatures } from 'sql/workbench/contrib/welcome/gettingStarted/electron-browser/enablePreviewFeatures';
import { ShowGettingStartedAction } from 'sql/workbench/contrib/welcome/gettingStarted/electron-browser/gettingStarted';
import { NativeEnablePreviewFeatures } from 'sql/workbench/contrib/welcome/electron-sandbox/enablePreviewFeatures';
import { ShowGettingStartedAction } from 'sql/workbench/contrib/welcome/electron-sandbox/gettingStarted';
import { registerAction2 } from 'vs/platform/actions/common/actions';
Registry

View File

@@ -1,10 +0,0 @@
<svg width="65" height="65" viewBox="0 0 65 65" fill="none" xmlns="http://www.w3.org/2000/svg">
<path opacity="0.2" d="M51.4626 50.948L34.9701 42.2208L12.7969 55.7359L28.8007 64.7662L51.4626 50.948Z" fill="#1F1D21"/>
<path d="M28.2509 23.3723L28.6174 63.0087L13.1634 54.4026L12.7969 14.7662L28.2509 23.3723Z" fill="#137AD1"/>
<path d="M28.251 23.3723L51.5848 9.37229V49.0693L28.6175 63.0087L28.251 23.3723Z" fill="#1D4A79"/>
<path d="M12.7969 14.7662L35.7642 0.76622L51.5848 9.37228L28.2509 23.3723L12.7969 14.7662Z" fill="#2195DC"/>
<path d="M22.7534 26.1602V27.6147L15.9121 23.7965V22.342L22.7534 26.1602Z" fill="#CDCDD0"/>
<path d="M24.5248 27.1905V28.5844L23.3643 27.9177V26.5238L24.5248 27.1905Z" fill="#EBEBEB"/>
<path d="M22.8145 29.0693V30.4632L15.9731 26.645V25.2511L22.8145 29.0693Z" fill="#CDCDD0"/>
<path d="M24.5248 30.039L24.5859 31.4935L23.4253 30.8268L23.3643 29.3723L24.5248 30.039Z" fill="#EBEBEB"/>
</svg>

Before

Width:  |  Height:  |  Size: 925 B

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 500 B

After

Width:  |  Height:  |  Size: 500 B

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

View File

@@ -1,11 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Registry } from 'vs/platform/registry/common/platform';
import { BrowserTelemetryOptOut } from 'sql/workbench/contrib/welcome/telemetryOptOut/browser/telemetryOptOut';
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';
Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench).registerWorkbenchContribution(BrowserTelemetryOptOut, LifecyclePhase.Eventually);

View File

@@ -1,93 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
import { ITelemetryService, TelemetryLevel } from 'vs/platform/telemetry/common/telemetry';
import { IOpenerService } from 'vs/platform/opener/common/opener';
import { INotificationService, Severity } from 'vs/platform/notification/common/notification';
import { URI } from 'vs/base/common/uri';
import { localize } from 'vs/nls';
import { IProductService } from 'vs/platform/product/common/productService';
import { IHostService } from 'vs/workbench/services/host/browser/host';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { onUnexpectedError } from 'vs/base/common/errors';
export abstract class AbstractTelemetryOptOut implements IWorkbenchContribution {
private static readonly TELEMETRY_OPT_OUT_SHOWN = 'workbench.telemetryOptOutShown';
private privacyUrl: string | undefined;
constructor(
@IStorageService private readonly storageService: IStorageService,
@IOpenerService private readonly openerService: IOpenerService,
@INotificationService private readonly notificationService: INotificationService,
@IHostService private readonly hostService: IHostService,
@ITelemetryService private readonly telemetryService: ITelemetryService,
@IProductService private readonly productService: IProductService,
@IEnvironmentService private readonly environmentService: IEnvironmentService
) {
}
protected async handleTelemetryOptOut(): Promise<void> {
if (this.productService.telemetryOptOutUrl &&
!this.storageService.get(AbstractTelemetryOptOut.TELEMETRY_OPT_OUT_SHOWN, StorageScope.APPLICATION) &&
!this.environmentService.disableTelemetry) {
const [count] = await Promise.all([this.getWindowCount()]);
if (!this.hostService.hasFocus && count > 1) {
return; // return early if meanwhile another window opened (we only show the opt-out once)
}
this.storageService.store(AbstractTelemetryOptOut.TELEMETRY_OPT_OUT_SHOWN, true, StorageScope.APPLICATION, StorageTarget.USER);
this.privacyUrl = this.productService.privacyStatementUrl || this.productService.telemetryOptOutUrl;
const telemetryOptOutUrl = this.productService.telemetryOptOutUrl;
if (telemetryOptOutUrl) {
this.showTelemetryOptOut(telemetryOptOutUrl);
}
}
}
private showTelemetryOptOut(telemetryOptOutUrl: string): void {
const optOutNotice = localize('telemetryOptOut.optOutNotice', "Help improve Azure Data Studio by allowing Microsoft to collect usage data. Read our [privacy statement]({0}) and learn how to [opt out]({1}).", this.privacyUrl, this.productService.telemetryOptOutUrl);
const optInNotice = localize('telemetryOptOut.optInNotice', "Help improve Azure Data Studio by allowing Microsoft to collect usage data. Read our [privacy statement]({0}) and learn how to [opt in]({1}).", this.privacyUrl, this.productService.telemetryOptOutUrl);
this.notificationService.prompt(
Severity.Info,
this.telemetryService.telemetryLevel !== TelemetryLevel.NONE ? optOutNotice : optInNotice,
[{
label: localize('telemetryOptOut.readMore', "Read More"),
run: () => this.openerService.open(URI.parse(telemetryOptOutUrl))
}],
{ sticky: true }
);
}
protected abstract getWindowCount(): Promise<number>;
}
export class BrowserTelemetryOptOut extends AbstractTelemetryOptOut {
constructor(
@IStorageService storageService: IStorageService,
@IOpenerService openerService: IOpenerService,
@INotificationService notificationService: INotificationService,
@IHostService hostService: IHostService,
@ITelemetryService telemetryService: ITelemetryService,
@IProductService productService: IProductService,
@IEnvironmentService environmentService: IEnvironmentService
) {
super(storageService, openerService, notificationService, hostService, telemetryService, productService, environmentService);
this.handleTelemetryOptOut().catch(onUnexpectedError);
}
protected async getWindowCount(): Promise<number> {
return 1;
}
}

View File

@@ -1,11 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Registry } from 'vs/platform/registry/common/platform';
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';
import { NativeTelemetryOptOut } from 'sql/workbench/contrib/welcome/telemetryOptOut/electron-sandbox/telemetryOptOut';
Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench).registerWorkbenchContribution(NativeTelemetryOptOut, LifecyclePhase.Eventually);

View File

@@ -1,36 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { IStorageService } from 'vs/platform/storage/common/storage';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IOpenerService } from 'vs/platform/opener/common/opener';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { IProductService } from 'vs/platform/product/common/productService';
import { IHostService } from 'vs/workbench/services/host/browser/host';
import { AbstractTelemetryOptOut } from 'sql/workbench/contrib/welcome/telemetryOptOut/browser/telemetryOptOut';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { INativeHostService } from 'vs/platform/native/common/native';
export class NativeTelemetryOptOut extends AbstractTelemetryOptOut {
constructor(
@IStorageService storageService: IStorageService,
@IOpenerService openerService: IOpenerService,
@INotificationService notificationService: INotificationService,
@IHostService hostService: IHostService,
@ITelemetryService telemetryService: ITelemetryService,
@IProductService productService: IProductService,
@IEnvironmentService environmentService: IEnvironmentService,
@INativeHostService private readonly nativeHostService: INativeHostService
) {
super(storageService, openerService, notificationService, hostService, telemetryService, productService, environmentService);
this.handleTelemetryOptOut();
}
protected getWindowCount(): Promise<number> {
return this.nativeHostService ? this.nativeHostService.getWindowCount() : Promise.resolve(0);
}
}