mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 17:22:42 -05:00
Merge from vscode fc10e26ea50f82cdd84e9141491357922e6f5fba (#4639)
This commit is contained in:
@@ -30,7 +30,7 @@ import { resolveCommonProperties } from 'vs/platform/telemetry/node/commonProper
|
||||
import { WindowsService } from 'vs/platform/windows/electron-browser/windowsService';
|
||||
import { MainProcessService, IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService';
|
||||
import { EnvironmentService } from 'vs/platform/environment/node/environmentService';
|
||||
import { IssueReporterModel } from 'vs/code/electron-browser/issue/issueReporterModel';
|
||||
import { IssueReporterModel, IssueReporterData as IssueReporterModelData } from 'vs/code/electron-browser/issue/issueReporterModel';
|
||||
import { IssueReporterData, IssueReporterStyles, IssueType, ISettingsSearchIssueReporterData, IssueReporterFeatures, IssueReporterExtensionData } from 'vs/platform/issue/common/issue';
|
||||
import BaseHtml from 'vs/code/electron-browser/issue/issueReporterPage';
|
||||
import { createSpdLogService } from 'vs/platform/log/node/spdlogService';
|
||||
@@ -92,7 +92,7 @@ export class IssueReporter extends Disposable {
|
||||
this.previewButton = new Button(issueReporterElement);
|
||||
}
|
||||
|
||||
ipcRenderer.on('vscode:issuePerformanceInfoResponse', (_, info) => {
|
||||
ipcRenderer.on('vscode:issuePerformanceInfoResponse', (_: unknown, info: Partial<IssueReporterData>) => {
|
||||
this.logService.trace('issueReporter: Received performance data');
|
||||
this.issueReporterModel.update(info);
|
||||
this.receivedPerformanceInfo = true;
|
||||
@@ -103,7 +103,7 @@ export class IssueReporter extends Disposable {
|
||||
this.updatePreviewButtonState();
|
||||
});
|
||||
|
||||
ipcRenderer.on('vscode:issueSystemInfoResponse', (_, info) => {
|
||||
ipcRenderer.on('vscode:issueSystemInfoResponse', (_: unknown, info: any) => {
|
||||
this.logService.trace('issueReporter: Received system data');
|
||||
this.issueReporterModel.update({ systemInfo: info });
|
||||
this.receivedSystemInfo = true;
|
||||
@@ -899,7 +899,7 @@ export class IssueReporter extends Disposable {
|
||||
return `${repositoryUrl}${queryStringPrefix}title=${encodeURIComponent(issueTitle)}`;
|
||||
}
|
||||
|
||||
private updateSystemInfo = (state) => {
|
||||
private updateSystemInfo(state: IssueReporterModelData) {
|
||||
const target = document.querySelector('.block-system .block-info');
|
||||
if (target) {
|
||||
let tableHtml = '';
|
||||
@@ -968,14 +968,14 @@ export class IssueReporter extends Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
private updateProcessInfo = (state) => {
|
||||
private updateProcessInfo(state: IssueReporterModelData) {
|
||||
const target = document.querySelector('.block-process .block-info');
|
||||
if (target) {
|
||||
target.innerHTML = `<code>${state.processInfo}</code>`;
|
||||
}
|
||||
}
|
||||
|
||||
private updateWorkspaceInfo = (state) => {
|
||||
private updateWorkspaceInfo(state: IssueReporterModelData) {
|
||||
document.querySelector('.block-workspace .block-info code')!.textContent = '\n' + state.workspaceInfo;
|
||||
}
|
||||
|
||||
@@ -1075,9 +1075,13 @@ export class IssueReporter extends Disposable {
|
||||
|
||||
// helper functions
|
||||
|
||||
function hide(el) {
|
||||
el.classList.add('hidden');
|
||||
function hide(el: Element | undefined | null) {
|
||||
if (el) {
|
||||
el.classList.add('hidden');
|
||||
}
|
||||
}
|
||||
function show(el) {
|
||||
el.classList.remove('hidden');
|
||||
function show(el: Element | undefined | null) {
|
||||
if (el) {
|
||||
el.classList.remove('hidden');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ import { ILocalizationsService } from 'vs/platform/localizations/common/localiza
|
||||
import { LocalizationsChannel } from 'vs/platform/localizations/node/localizationsIpc';
|
||||
import { DialogChannelClient } from 'vs/platform/dialogs/node/dialogIpc';
|
||||
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
|
||||
import { IDisposable, dispose, combinedDisposable, toDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IDisposable, dispose, combinedDisposable } from 'vs/base/common/lifecycle';
|
||||
import { DownloadService } from 'vs/platform/download/node/downloadService';
|
||||
import { IDownloadService } from 'vs/platform/download/common/download';
|
||||
import { StaticRouter } from 'vs/base/parts/ipc/node/ipc';
|
||||
@@ -161,12 +161,12 @@ function main(server: Server, initData: ISharedProcessInitData, configuration: I
|
||||
const localizationsChannel = new LocalizationsChannel(localizationsService);
|
||||
server.registerChannel('localizations', localizationsChannel);
|
||||
|
||||
// clean up deprecated extensions
|
||||
(extensionManagementService as ExtensionManagementService).removeDeprecatedExtensions();
|
||||
// update localizations cache
|
||||
(localizationsService as LocalizationsService).update();
|
||||
// cache clean ups
|
||||
disposables.push(combinedDisposable([
|
||||
// clean up deprecated extensions
|
||||
toDisposable(() => (extensionManagementService as ExtensionManagementService).removeDeprecatedExtensions()),
|
||||
// update localizations cache
|
||||
toDisposable(() => (localizationsService as LocalizationsService).update()),
|
||||
// other cache clean ups
|
||||
instantiationService2.createInstance(NodeCachedDataCleaner),
|
||||
instantiationService2.createInstance(LanguagePackCachedDataCleaner),
|
||||
instantiationService2.createInstance(StorageDataCleaner),
|
||||
|
||||
Reference in New Issue
Block a user