Files
webgui/emhttp/plugins/dynamix/ArrayDevices.page
Eli Bosley f2cad7693c feat: Implement deprecated filesystem detection and warnings for array and cache devices
- Added a shared function to check for deprecated filesystems (ReiserFS and XFS v4) across array and cache devices.
- Updated ArrayDevices.page and CacheDevices.page to display warnings for deprecated filesystems.
- Introduced helper functions for generating filesystem warning icons and messages.
2025-09-12 13:55:04 -04:00

62 lines
2.1 KiB
Plaintext

Menu="Main:1"
Title="Array Devices"
Tag="database"
Cond="(_var($var,'SYS_ARRAY_SLOTS') > 0 || $var['fsState']=='Stopped')"
---
<?PHP
/* Copyright 2005-2023, Lime Technology
* Copyright 2012-2023, Bergware International.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*/
$power = _var($display,'power') && in_array('nvme',array_column(main_filter($disks),'transport')) ? _('Power').' / ' : '';
// Check for deprecated filesystems using shared function
$deprecatedDisks = check_deprecated_filesystems_array($disks, 'main_filter');
?>
<script>
<?if (_var($var,'fsState')=="Started"):?>
$('#tab1').bind({click:function() {$('i.toggle').show('slow');}});
<?endif;?>
</script>
<div class="TableContainer">
<table class="unraid disk_status">
<thead>
<tr>
<td>_(Device)_</td>
<td>_(Identification)_</td>
<td><?=$power?>_(Temp)_</td>
<td>_(Reads)_</td>
<td>_(Writes)_</td>
<td>_(Errors)_</td>
<td>_(FS)_</td>
<td>_(Size)_</td>
<td>_(Used)_</td>
<td>_(Free)_</td>
</tr>
</thead>
<tbody id="array_devices">
<? foreach (main_filter($disks) as $disk) :?>
<? if (substr($disk['status'],0,7) != 'DISK_NP') :?>
<tr><td colspan='10'></td></tr>
<? endif;?>
<? endforeach;?>
<? if (_var($display,'total') && _var($var,'mdNumDisks',0) > 1) :?>
<tr class='tr_last'><td colspan='10'></td></tr>
<? endif;?>
</tbody>
</table>
</div>
<?=display_deprecated_filesystem_warning($deprecatedDisks, 'array')?>
:main_array_devices_help:
<?if (_var($var,'fsState')=="Stopped"):?>
:main_slots_help:
<?endif;?>