Files
webgui/plugins/dynamix/OpenDevices.page
2016-04-07 21:31:40 +02:00

53 lines
1.7 KiB
Plaintext

Menu="Main:4"
Title="Unassigned Devices"
Cond="((count($devs)>0)&&($var['fsState']=='Started'))"
---
<?PHP
/* Copyright 2015-2016, Bergware International.
* Copyright 2015-2016, Lime Technology
*
* 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.
*/
?>
<?
$tabX = '#tab'.($var['fsState']=='Stopped'||is_dir('/mnt/cache') ? '4' : '3');
?>
<script>
function open_status() {
$.post('/webGui/include/DeviceList.php',{path:'<?=$path?>',device:'open'},function(data) {
if (data) $('#open_devices').html(data);
<?if ($update && $var['fsState']=='Started'):?>
<?if ($tabbed):?>
if ($('<?=$tabX?>').is(':checked')) timer = setTimeout(open_status,<?=abs($display['refresh'])?>);
<?else:?>
setTimeout(open_status,<?=abs($display['refresh'])?>);
<?endif;?>
<?endif;?>
});
}
<?if ($update && $var['fsState']=='Started' && $tabbed):?>
$('<?=$tabX?>').bind({click:function() {clearTimeout(timer); open_status();}});
<?endif;?>
open_status();
</script>
<table class="disk_status <?=($var['fsState']=='Stopped'?'small':$display['view']).' '.$display['align']?>">
<thead><tr><td>Device</td><td>Identification</td><td>Temp.</td><td>Reads</td><td>Writes</td><td>Errors</td><td>FS</td><td>Size</td><td>Used</td><td>Free</td><td>View</td></tr></thead>
<tbody id="open_devices">
<?
foreach ($devs as $dev):
echo "<tr><td colspan='11'>&nbsp;</td></tr>";
endforeach;
?>
</tbody>
</table>
> These are devices installed in your server but not assigned to either the parity-protected
> array or the cache disk/pool.