Get GPU information in issue reporter, #46960

This commit is contained in:
Rachel Macfarlane
2018-04-02 16:12:14 -07:00
parent 3bc2728340
commit 691c789ce3
4 changed files with 52 additions and 4 deletions

View File

@@ -771,10 +771,14 @@ export class IssueReporter extends Disposable {
const target = document.querySelector('.block-system .block-info');
let tableHtml = '';
Object.keys(state.systemInfo).forEach(k => {
const data = typeof state.systemInfo[k] === 'object'
? Object.keys(state.systemInfo[k]).map(key => `${key}: ${state.systemInfo[k][key]}`).join('<br>')
: state.systemInfo[k];
tableHtml += `
<tr>
<td>${k}</td>
<td>${state.systemInfo[k]}</td>
<td>${data}</td>
</tr>`;
});
target.innerHTML = `<table>${tableHtml}</table>`;