From 40febc8ef23dc324fbeedd9e7ec6b60eda98ac39 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Sat, 30 Nov 2024 12:00:36 +0100 Subject: [PATCH] system: rename DISK_TYPES to FS_TYPES --- src/system.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/system.js b/src/system.js index 516bcb923..62a7346e3 100644 --- a/src/system.js +++ b/src/system.js @@ -97,19 +97,19 @@ async function getFilesystems() { const filesystems = {}; // by file system let rootDisk; - const DISK_TYPES = [ 'ext4', 'xfs', 'cifs', 'nfs', 'fuse.sshfs' ]; // we don't show size of contents in untracked disk types + const FS_TYPES = [ 'ext4', 'xfs', 'cifs', 'nfs', 'fuse.sshfs' ]; // we don't show size of contents in untracked disk types - for (const disk of dfEntries) { - if (!DISK_TYPES.includes(disk.type)) continue; - if (disk.mountpoint === '/') rootDisk = disk; - filesystems[disk.filesystem] = { - filesystem: disk.filesystem, - type: disk.type, - size: disk.size, - used: disk.used, - available: disk.available, - capacity: disk.capacity, - mountpoint: disk.mountpoint, + for (const dfEntry of dfEntries) { + if (!FS_TYPES.includes(dfEntry.type)) continue; + if (dfEntry.mountpoint === '/') rootDisk = dfEntry; + filesystems[dfEntry.filesystem] = { + filesystem: dfEntry.filesystem, + type: dfEntry.type, + size: dfEntry.size, + used: dfEntry.used, + available: dfEntry.available, + capacity: dfEntry.capacity, + mountpoint: dfEntry.mountpoint, contents: [] // filled below }; }