Menu="Main:4"
Title="Unassigned Devices"
Tag="unlink"
Cond="(count($devs)>0)"
---
<?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($devs,'transport')) ? _('Power').' / ' : '';
$tabX  = '#tab'.($var['fsState']=='Stopped'||$pool_devices ? '4' : '3');
?>
<script>
<?if ($var['fsState']=='Started'):?>
$('<?=$tabX?>').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="open_devices">
    <?
    foreach ($devs as $dev):
      echo "<tr><td colspan='10'></td></tr>";
    endforeach;
    ?>
    </tbody>
  </table>
</div>

:open_devices_help:
