mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-27 09:35:37 -05:00
Merge from vscode 3a6dcb42008d509900b3a3b2d695564eeb4dbdac (#5098)
This commit is contained in:
@@ -40,7 +40,7 @@ import { OcticonLabel } from 'vs/base/browser/ui/octiconLabel/octiconLabel';
|
||||
import { normalizeGitHubUrl } from 'vs/code/electron-browser/issue/issueReporterUtil';
|
||||
import { Button } from 'vs/base/browser/ui/button/button';
|
||||
import { withUndefinedAsNull } from 'vs/base/common/types';
|
||||
import { SystemInfo } from 'vs/platform/diagnostics/common/diagnosticsService';
|
||||
import { SystemInfo, isRemoteDiagnosticError } from 'vs/platform/diagnostics/common/diagnosticsService';
|
||||
|
||||
const MAX_URL_LENGTH = platform.isWindows ? 2081 : 5400;
|
||||
|
||||
@@ -940,15 +940,24 @@ export class IssueReporter extends Disposable {
|
||||
</table>`;
|
||||
|
||||
systemInfo.remoteData.forEach(remote => {
|
||||
renderedData += `
|
||||
<hr>
|
||||
<table>
|
||||
<tr><td>Remote</td><td>${remote.hostName}</td></tr>
|
||||
<tr><td>OS</td><td>${remote.machineInfo.os}</td></tr>
|
||||
<tr><td>CPUs</td><td>${remote.machineInfo.cpus}</td></tr>
|
||||
<tr><td>Memory (System)</td><td>${remote.machineInfo.memory}</td></tr>
|
||||
<tr><td>VM</td><td>${remote.machineInfo.vmHint}</td></tr>
|
||||
</table>`;
|
||||
if (isRemoteDiagnosticError(remote)) {
|
||||
renderedData += `
|
||||
<hr>
|
||||
<table>
|
||||
<tr><td>Remote</td><td>${remote.hostName}</td></tr>
|
||||
<tr><td></td><td>${remote.errorMessage}</td></tr>
|
||||
</table>`;
|
||||
} else {
|
||||
renderedData += `
|
||||
<hr>
|
||||
<table>
|
||||
<tr><td>Remote</td><td>${remote.hostName}</td></tr>
|
||||
<tr><td>OS</td><td>${remote.machineInfo.os}</td></tr>
|
||||
<tr><td>CPUs</td><td>${remote.machineInfo.cpus}</td></tr>
|
||||
<tr><td>Memory (System)</td><td>${remote.machineInfo.memory}</td></tr>
|
||||
<tr><td>VM</td><td>${remote.machineInfo.vmHint}</td></tr>
|
||||
</table>`;
|
||||
}
|
||||
});
|
||||
|
||||
target.innerHTML = renderedData;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
import { IssueType, ISettingSearchResult, IssueReporterExtensionData } from 'vs/platform/issue/common/issue';
|
||||
import { SystemInfo } from 'vs/platform/diagnostics/common/diagnosticsService';
|
||||
import { SystemInfo, isRemoteDiagnosticError } from 'vs/platform/diagnostics/common/diagnosticsService';
|
||||
|
||||
export interface IssueReporterData {
|
||||
issueType: IssueType;
|
||||
@@ -76,7 +76,8 @@ ${this.getInfos()}
|
||||
|
||||
private getRemoteOSes(): string {
|
||||
if (this._data.systemInfo && this._data.systemInfo.remoteData.length) {
|
||||
return this._data.systemInfo.remoteData.map(remote => `Remote OS version: ${remote.machineInfo.os}`).join('\n') + '\n';
|
||||
return this._data.systemInfo.remoteData
|
||||
.map(remote => isRemoteDiagnosticError(remote) ? remote.errorMessage : `Remote OS version: ${remote.machineInfo.os}`).join('\n') + '\n';
|
||||
}
|
||||
|
||||
return '';
|
||||
@@ -169,7 +170,10 @@ ${this.getInfos()}
|
||||
|VM|${this._data.systemInfo.vmHint}|`;
|
||||
|
||||
this._data.systemInfo.remoteData.forEach(remote => {
|
||||
md += `
|
||||
if (isRemoteDiagnosticError(remote)) {
|
||||
md += `\n\n${remote.errorMessage}`;
|
||||
} else {
|
||||
md += `
|
||||
|
||||
|Item|Value|
|
||||
|---|---|
|
||||
@@ -178,6 +182,7 @@ ${this.getInfos()}
|
||||
|CPUs|${remote.machineInfo.cpus}|
|
||||
|Memory (System)|${remote.machineInfo.memory}|
|
||||
|VM|${remote.machineInfo.vmHint}|`;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user