add tpm support (#5421)

* add tpm support

Signed-off-by: Simon Smith <simonsmith5521@gmail.com>

* fix tpm semicolon mistake

Signed-off-by: Simon Smith <simonsmith5521@gmail.com>

---------

Signed-off-by: Simon Smith <simonsmith5521@gmail.com>
This commit is contained in:
Simon Smith
2023-11-04 18:44:34 +00:00
committed by GitHub
parent a8aa294199
commit 7b016eac58
5 changed files with 50 additions and 0 deletions

View File

@@ -6016,6 +6016,18 @@
if (x != '') { sections.push({ name: "Motherboard", html: x, img: 'motherboard' }); }
}
// TPM
if (hardware.tpm) {
var x = '', tpm = hardware.tpm;
if (tpm.SpecVersion) { x += addDetailItem("SpecVersion", parseFloat(EscapeHtml(tpm.SpecVersion)).toFixed(1), s); }
if (tpm.ManufacturerId) { x += addDetailItem("ManufacturerId", EscapeHtml(tpm.ManufacturerId), s); }
if (tpm.ManufacturerVersion) { x += addDetailItem("ManufacturerVersion", EscapeHtml(tpm.ManufacturerVersion), s); }
if (tpm.IsActivated != null) { x += addDetailItem("IsActivated", EscapeHtml(tpm.IsActivated), s); }
if (tpm.IsEnabled != null) { x += addDetailItem("IsEnabled", EscapeHtml(tpm.IsEnabled), s); }
if (tpm.IsOwned != null) { x += addDetailItem("IsOwned", EscapeHtml(tpm.IsOwned), s); }
if (x != '') { sections.push({ name: "TPM", html: x, img: 'tpm'}); }
}
if (hardware.windows) {
if (hardware.windows.memory && (hardware.windows.memory.length > 0)) {
var x = '';