mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-03 23:06:49 +01:00
Change process list formatting to raw instead of table, fixes ##44733
This commit is contained in:
@@ -679,26 +679,7 @@ export class IssueReporter extends Disposable {
|
||||
|
||||
private updateProcessInfo = (state) => {
|
||||
const target = document.querySelector('.block-process .block-info');
|
||||
|
||||
let tableHtml = `
|
||||
<tr>
|
||||
<th>pid</th>
|
||||
<th>CPU %</th>
|
||||
<th>Memory (MB)</th>
|
||||
<th>Name</th>
|
||||
</tr>`;
|
||||
|
||||
state.processInfo.forEach(p => {
|
||||
tableHtml += `
|
||||
<tr>
|
||||
<td>${p.pid}</td>
|
||||
<td>${p.cpu}</td>
|
||||
<td>${p.memory}</td>
|
||||
<td>${p.name}</td>
|
||||
</tr>`;
|
||||
});
|
||||
|
||||
target.innerHTML = `<table>${tableHtml}</table>`;
|
||||
target.innerHTML = `<code>${state.processInfo}</code>`;
|
||||
}
|
||||
|
||||
private updateWorkspaceInfo = (state) => {
|
||||
|
||||
@@ -144,20 +144,15 @@ ${this.getInfos()}
|
||||
}
|
||||
|
||||
private generateProcessInfoMd(): string {
|
||||
let md = `<details>
|
||||
return `<details>
|
||||
<summary>Process Info</summary>
|
||||
|
||||
|pid|CPU|Memory (MB)|Name|
|
||||
|---|---|---|---|
|
||||
\`\`\`
|
||||
${this._data.processInfo}
|
||||
\`\`\`
|
||||
|
||||
</details>
|
||||
`;
|
||||
|
||||
this._data.processInfo.forEach(p => {
|
||||
md += `|${p.pid}|${p.cpu}|${p.memory}|${p.name}|\n`;
|
||||
});
|
||||
|
||||
md += '\n</details>';
|
||||
|
||||
return md;
|
||||
}
|
||||
|
||||
private generateWorkspaceInfoMd(): string {
|
||||
|
||||
@@ -52,9 +52,9 @@ export default (): string => `
|
||||
<label class="caption" for="includeProcessInfo">${escape(localize('sendData', "Send my data"))}</label>
|
||||
</div>
|
||||
</summary>
|
||||
<div class="block-info">
|
||||
<pre class="block-info">
|
||||
<!-- To be dynamically filled -->
|
||||
</div>
|
||||
</pre>
|
||||
</details>
|
||||
</div>
|
||||
<div class="block block-workspace">
|
||||
|
||||
@@ -126,7 +126,7 @@ body {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
pre {
|
||||
margin: 0;
|
||||
margin: 10px 20px;
|
||||
}
|
||||
pre code {
|
||||
font-family: 'Menlo', 'Courier New', 'Courier', monospace;
|
||||
|
||||
Reference in New Issue
Block a user