mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
add macos storage volumes using df
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
e3f68226d2
commit
be3e333b40
4 changed files with 1854 additions and 1787 deletions
|
@ -6378,7 +6378,6 @@
|
|||
x += '<div style=margin-bottom:3px><b>' + EscapeHtml((m.DeviceLocator ? m.DeviceLocator : '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); }
|
||||
console.log(m.Manufacturer);
|
||||
if (m.PartNumber) { x += addDetailItem("Part Number", EscapeHtml((m.Manufacturer && m.Manufacturer != '')?(m.Manufacturer + ', '):'') + EscapeHtml(m.PartNumber), s); }
|
||||
x += '</div>';
|
||||
}
|
||||
|
@ -6485,6 +6484,29 @@
|
|||
if (x != '') { sections.push({ name: "Storage Volumes", html: '<table style=width:100%>' + x + '</table>', img: 'storage'}); }
|
||||
}
|
||||
|
||||
// MacOS Volumes
|
||||
if (hardware.darwin && hardware.darwin.volumes) {
|
||||
var x = '';
|
||||
for (var i in hardware.darwin.volumes) {
|
||||
var m = hardware.darwin.volumes[i];
|
||||
if(m.mount_point.startsWith('/var/lib/docker/overlay2')) continue;
|
||||
x += '<tr><td><div class=style10 style=border-radius:5px;padding:8px>';
|
||||
x += '<div style=margin-bottom:3px><b>' + m.mount_point + '</b></div>';
|
||||
if (m.size) {
|
||||
x += addDetailItem("Capacity", EscapeHtml(m.size), s);
|
||||
}
|
||||
if (m.available) {
|
||||
x += addDetailItem("Capacity Remaining", EscapeHtml(m.available), s);
|
||||
}
|
||||
if (m.type) {
|
||||
var type = (m.removable == true ? "Removable" : (m.cdrom == true ? "CD-ROM" : ''));
|
||||
x += addDetailItem("File System", (type != '' ? (type + ' / ') : '') + (m.type == 'Unknown' ? "Unknown" : EscapeHtml(m.type)), s);
|
||||
}
|
||||
x += '</div>';
|
||||
}
|
||||
if (x != '') { sections.push({ name: "Storage Volumes", html: '<table style=width:100%>' + x + '</table>', img: 'storage'}); }
|
||||
}
|
||||
|
||||
// Render the sections
|
||||
var x = '';
|
||||
for (var i in sections) {
|
||||
|
|
|
@ -12297,6 +12297,29 @@
|
|||
if (x != '') { sections.push({ name: "Storage Volumes", html: '<table style=width:100%>' + x + '</table>', img: 'storage64.png'}); }
|
||||
}
|
||||
|
||||
// MacOS Volumes
|
||||
if (hardware.darwin && hardware.darwin.volumes) {
|
||||
var x = '';
|
||||
for (var i in hardware.darwin.volumes) {
|
||||
var m = hardware.darwin.volumes[i];
|
||||
if(m.mount_point.startsWith('/var/lib/docker/overlay2')) continue;
|
||||
x += '<tr><td><div class=style10 style=border-radius:5px;padding:8px>';
|
||||
x += '<div style=margin-bottom:3px><b>' + m.mount_point + '</b></div>';
|
||||
if (m.size) {
|
||||
x += addDetailItem("Capacity", EscapeHtml(m.size), s);
|
||||
}
|
||||
if (m.available) {
|
||||
x += addDetailItem("Capacity Remaining", EscapeHtml(m.available), s);
|
||||
}
|
||||
if (m.type) {
|
||||
var type = (m.removable == true ? "Removable" : (m.cdrom == true ? "CD-ROM" : ''));
|
||||
x += addDetailItem("File System", (type != '' ? (type + ' / ') : '') + (m.type == 'Unknown' ? "Unknown" : EscapeHtml(m.type)), s);
|
||||
}
|
||||
x += '</div>';
|
||||
}
|
||||
if (x != '') { sections.push({ name: "Storage Volumes", html: '<table style=width:100%>' + x + '</table>', img: 'storage64.png'}); }
|
||||
}
|
||||
|
||||
// Render the sections
|
||||
var x = '';
|
||||
for (var i in sections) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue