1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

add Capacity Remaining

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
Simon Smith 2024-02-22 17:09:28 +00:00 committed by GitHub
parent 26bb350122
commit 0b2368df9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 1809 additions and 1788 deletions

View file

@ -6152,6 +6152,12 @@
var fsize = (j === 0 ? `${m.size} ${sizes[j]}` : `${(m.size / (1024 ** j)).toFixed(2)} ${sizes[j]}`);
x += addDetailItem("Capacity", EscapeHtml(fsize), s);
}
if (m.sizeremaining) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
var j = parseInt(Math.floor(Math.log(Math.abs(m.sizeremaining)) / Math.log(1024)), 10);
var fsize = (j === 0 ? `${m.sizeremaining} ${sizes[j]}` : `${(m.sizeremaining / (1024 ** j)).toFixed(2)} ${sizes[j]}`);
x += addDetailItem("Capacity Remaining", EscapeHtml(fsize), s);
}
if (m.type) { x += addDetailItem("File System", (m.removable == true ? ("Removable" + ' / ') : '') + (m.type == 'Unknown' ? "Unknown" : EscapeHtml(m.type)), s); }
if (m.protectionStatus || m.volumeStatus) {

View file

@ -12134,6 +12134,12 @@
var fsize = (j === 0 ? `${m.size} ${sizes[j]}` : `${(m.size / (1024 ** j)).toFixed(2)} ${sizes[j]}`);
x += addDetailItem("Capacity", EscapeHtml(fsize), s);
}
if (m.sizeremaining) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
var j = parseInt(Math.floor(Math.log(Math.abs(m.sizeremaining)) / Math.log(1024)), 10);
var fsize = (j === 0 ? `${m.sizeremaining} ${sizes[j]}` : `${(m.sizeremaining / (1024 ** j)).toFixed(2)} ${sizes[j]}`);
x += addDetailItem("Capacity Remaining", EscapeHtml(fsize), s);
}
if (m.type) { x += addDetailItem("File System", (m.removable == true ? ("Removable" + ' / ') : '') + (m.type == 'Unknown' ? "Unknown" : EscapeHtml(m.type)), s); }
if (m.protectionStatus || m.volumeStatus) {