add dns servers to details tab (#5709)

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
Simon Smith 2024-01-18 21:42:17 +00:00 committed by GitHub
parent 21bd171167
commit 6cb05ce009
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 3 deletions

View File

@ -1921,6 +1921,7 @@ function getSystemInformation(func) {
} catch (ex) { } } catch (ex) { }
} }
results.hardware.agentvers = process.versions; results.hardware.agentvers = process.versions;
results.hardware.network = { dns: require('os').dns() };
replaceSpacesWithUnderscoresRec(results); replaceSpacesWithUnderscoresRec(results);
var hasher = require('SHA384Stream').create(); var hasher = require('SHA384Stream').create();
// results.hash = hasher.syncHash(JSON.stringify(results)).toString('hex'); // results.hash = hasher.syncHash(JSON.stringify(results)).toString('hex');

View File

@ -6015,7 +6015,12 @@
if (iplayer.family == 'IPv6') { x += addDetailItem("IPv6 Layer", items.join(", ")); } if (iplayer.family == 'IPv6') { x += addDetailItem("IPv6 Layer", items.join(", ")); }
} }
} }
x += '</div>'; x += '</div></td></tr>';
}
if (hardware.network && hardware.network.dns) {
x += '<tr><td><div class=style10 style=border-radius:5px;padding:8px>';
x += addDetailItem("<b>DNS Servers</b>", hardware.network.dns.join(", "));
x += '</div></td></tr>';
} }
x += '</table>'; x += '</table>';
if (x != '') { sections.push({ name: "Networking", html: x, img: 'networking' }); } if (x != '') { sections.push({ name: "Networking", html: x, img: 'networking' }); }

View File

@ -11877,7 +11877,7 @@
if (ipv4layer.v4addr) { x += addDetailItem("IPv4 Layer", format("IP: {0}", EscapeHtml(ipv4layer.v4addr))); } if (ipv4layer.v4addr) { x += addDetailItem("IPv4 Layer", format("IP: {0}", EscapeHtml(ipv4layer.v4addr))); }
} }
} }
x += '</div>'; x += '</div></td></tr>';
} }
x += '</table>'; x += '</table>';
if (x != '') { sections.push({ name: "Networking", html: x, img: 'networking64.png'}); } if (x != '') { sections.push({ name: "Networking", html: x, img: 'networking64.png'}); }
@ -11915,7 +11915,12 @@
if (iplayer.family == 'IPv6') { x += addDetailItem("IPv6 Layer", items.join(", ")); } if (iplayer.family == 'IPv6') { x += addDetailItem("IPv6 Layer", items.join(", ")); }
} }
} }
x += '</div>'; x += '</div></td></tr>';
}
if (hardware.network && hardware.network.dns) {
x += '<tr><td><div class=style10 style=border-radius:5px;padding:8px>';
x += addDetailItem("<b>DNS Servers</b>", hardware.network.dns.join(", "));
x += '</div></td></tr>';
} }
x += '</table>'; x += '</table>';
if (x != '') { sections.push({ name: "Networking", html: x, img: 'networking64.png'}); } if (x != '') { sections.push({ name: "Networking", html: x, img: 'networking64.png'}); }