mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-11-26 16:06:33 +03:00
add linux memory (#5423)
This commit is contained in:
parent
9884db3ce0
commit
556d72dfad
@ -6008,6 +6008,29 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (hardware.linux) {
|
||||
if (hardware.linux.memory && (hardware.linux.memory.Memory_Device.length > 0)) {
|
||||
var x = '';
|
||||
// Sort Memory
|
||||
hardware.linux.memory.Memory_Device.sort(function(a, b) { if (a.Locator > b.Locator) return 1; if (a.Locator < b.Locator) return -1; return 0; });
|
||||
|
||||
x += '<table style=width:100%>';
|
||||
for (var i in hardware.linux.memory.Memory_Device) {
|
||||
var m = hardware.linux.memory.Memory_Device[i];
|
||||
if(m.Size && (m.Size == 'No Module Installed')) continue;
|
||||
x += '<tr><td><div class=style10 style=border-radius:5px;padding:8px>';
|
||||
x += '<div style=margin-bottom:3px><b>' + EscapeHtml((m.Locator ? m.Locator : 'Unknown')) + '</b></div>';
|
||||
if (m.Size && m.Speed) { x += addDetailItem("Capacity / Speed", format("{0}, {1}", m.Size, m.Speed), s); }
|
||||
else if (m.Size) { x += addDetailItem("Capacity", format("{0}", (m.Size)), s); }
|
||||
if (m.PartNumber) { x += addDetailItem("Part Number", EscapeHtml((m.Manufacturer && m.Manufacturer != 'Undefined')?(m.Manufacturer + ', '):'') + EscapeHtml(m.PartNumber), s); }
|
||||
x += '</div>';
|
||||
}
|
||||
x += '</table>';
|
||||
|
||||
if (x != '') { sections.push({ name: "Memory", html: x, img: 'ram'}); }
|
||||
}
|
||||
}
|
||||
|
||||
// Storage
|
||||
if (hardware.identifiers && ident.storage_devices) {
|
||||
var x = '';
|
||||
|
@ -11711,6 +11711,29 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (hardware.linux) {
|
||||
if (hardware.linux.memory && (hardware.linux.memory.Memory_Device.length > 0)) {
|
||||
var x = '';
|
||||
// Sort Memory
|
||||
hardware.linux.memory.Memory_Device.sort(function(a, b) { if (a.Locator > b.Locator) return 1; if (a.Locator < b.Locator) return -1; return 0; });
|
||||
|
||||
x += '<table style=width:100%>';
|
||||
for (var i in hardware.linux.memory.Memory_Device) {
|
||||
var m = hardware.linux.memory.Memory_Device[i];
|
||||
if(m.Size && (m.Size == 'No Module Installed')) continue;
|
||||
x += '<tr><td><div class=style10 style=border-radius:5px;padding:8px>';
|
||||
x += '<div style=margin-bottom:3px><b>' + EscapeHtml((m.Locator ? m.Locator : 'Unknown')) + '</b></div>';
|
||||
if (m.Size && m.Speed) { x += addDetailItem("Capacity / Speed", format("{0}, {1}", m.Size, m.Speed), s); }
|
||||
else if (m.Size) { x += addDetailItem("Capacity", format("{0}", (m.Size)), s); }
|
||||
if (m.PartNumber) { x += addDetailItem("Part Number", EscapeHtml((m.Manufacturer && m.Manufacturer != 'Undefined')?(m.Manufacturer + ', '):'') + EscapeHtml(m.PartNumber), s); }
|
||||
x += '</div>';
|
||||
}
|
||||
x += '</table>';
|
||||
|
||||
if (x != '') { sections.push({ name: "Memory", html: x, img: 'ram64.png'}); }
|
||||
}
|
||||
}
|
||||
|
||||
// Storage
|
||||
if (hardware.identifiers && hardware.identifiers.storage_devices) {
|
||||
var x = '';
|
||||
|
Loading…
Reference in New Issue
Block a user