mirror of
https://github.com/unraid/webgui.git
synced 2026-02-26 12:18:56 -06:00
Exclude disks that have no device designation - disks are not assigned yet.
This commit is contained in:
@@ -63,12 +63,12 @@ $pools = implode(',', $pools_check);
|
||||
// Natural sorting of share names
|
||||
uksort($shares,'strnatcasecmp');
|
||||
|
||||
// Function to filter out unwanted disks and check if any valid disks exist.
|
||||
// Function to filter out unwanted disks, check if any valid disks exist, and ignore disks with a blank device.
|
||||
function checkDisks($disks) {
|
||||
foreach ($disks as $disk) {
|
||||
// Check the disk type and fsStatus.
|
||||
if (!in_array($disk['name'], ['flash', 'parity', 'parity2']) && $disk['fsStatus'] !== "Unmountable: unsupported or no file system") {
|
||||
// A valid disk is found, return true.
|
||||
// Check the disk type, fsStatus, and ensure the device is not blank.
|
||||
if (!in_array($disk['name'], ['flash', 'parity', 'parity2']) && $disk['fsStatus'] !== "Unmountable: unsupported or no file system" && !empty($disk['device'])) {
|
||||
// A valid disk with a non-blank device is found, return true.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user