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
|
|
@ -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