mirror of
https://github.com/unraid/webgui.git
synced 2026-01-14 13:39:58 -06:00
Multi cache pool support
This commit is contained in:
@@ -1,68 +0,0 @@
|
||||
Menu="ShareSettings:2"
|
||||
Title="Cache Settings"
|
||||
Tag="upload"
|
||||
Cond="$pool_devices"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, 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.
|
||||
*/
|
||||
?>
|
||||
<? $disabled = $var['fsState']!='Stopped' ? 'disabled' : ''; ?>
|
||||
|
||||
<script>
|
||||
function check_cache_settings() {
|
||||
var form = document.cache_settings;
|
||||
var enabled = (form.shareCacheEnabled.value == "no");
|
||||
form.shareCacheFloor.disabled = enabled;
|
||||
}
|
||||
<?if ($var['fsState']=='Stopped'):?>
|
||||
$(check_cache_settings);
|
||||
<?endif;?>
|
||||
</script>
|
||||
|
||||
<form markdown="1" name="cache_settings" method="POST" action="/update.htm" target="progressFrame">
|
||||
_(Use cache device)_:
|
||||
: <select name="shareCacheEnabled" onchange="check_cache_settings()" <?=$disabled?>>
|
||||
<?=mk_option($var['shareCacheEnabled'], "yes", _('Yes'))?>
|
||||
<?=mk_option($var['shareCacheEnabled'], "no", _('No'))?>
|
||||
</select>
|
||||
|
||||
:help
|
||||
> If set to 'Yes' then User Shares can possibly make use of the Cache Disk. You still need to enable
|
||||
> use of the Cache Disk on individual user shares.
|
||||
:end
|
||||
|
||||
_(Min. free space)_:
|
||||
: <input type="text" name="shareCacheFloor" maxlength="16" value="<?=$var['shareCacheFloor']?>" class="narrow" disabled>
|
||||
|
||||
:help
|
||||
> This represents a "floor" of the amount of free space remaining on the cache disk. If the free
|
||||
> space becomes less than this value, then new files written to user shares with cache enabled will go to
|
||||
> the array and not the cache disk.
|
||||
>
|
||||
> Enter a numeric value with one of these suffixes:
|
||||
>
|
||||
> **KB** = 1,000<br>
|
||||
> **MB** = 1,000,000<br>
|
||||
> **GB** = 1,000,000,000<br>
|
||||
> **TB** = 1,000,000,000,000
|
||||
>
|
||||
> If no suffix, a count of 1024-byte blocks is assumed.<br>
|
||||
>
|
||||
> Examples:
|
||||
>
|
||||
> **2GB** => 2,000,000,000 bytes<br>
|
||||
> **2000000** => 2,048,000,000 bytes
|
||||
:end
|
||||
|
||||
|
||||
: <input type="submit" name="changeShare" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()"><?if ($disabled):?>*_(Array must be **Stopped** to change)_*<?endif;?>
|
||||
</form>
|
||||
@@ -337,6 +337,14 @@ _(Name)_:
|
||||
: <?=my_lang(my_disk($name),3)?>
|
||||
|
||||
<?endif;?>
|
||||
_(Comments)_:
|
||||
: <input type="text" name="diskComment.<?=$disk['idx']?>" maxlength="256" value="<?=htmlspecialchars($disk['comment'])?>">
|
||||
|
||||
:help12
|
||||
> This text will appear under the *Comments* column for the share in Windows Explorer.
|
||||
> Enter anything you like, up to 256 characters.
|
||||
:end
|
||||
|
||||
_(Partition size)_:
|
||||
: <?=my_number($disk['sizeSb'])?> KB (K=1024)
|
||||
|
||||
@@ -421,14 +429,31 @@ _(File system type)_:
|
||||
: <?=_(str_replace('luks:','',$disk['fsType'])).(strpos($disk['fsType'],'luks:')!==false ? ' - '._('encrypted') : '')?>
|
||||
|
||||
<?endif;?>
|
||||
_(Comments)_:
|
||||
: <input type="text" name="diskComment.<?=$disk['idx']?>" maxlength="256" value="<?=htmlspecialchars($disk['comment'])?>">
|
||||
<?if (in_array($name,$pools)):?>
|
||||
_(Minimum free space)_:
|
||||
: <input type="text" name="diskFloor.<?=$disk['idx']?>" maxlength="16" value="<?=$disk['diskFloor']?>" class="narrow" <?=$disabled?> placeholder="0">
|
||||
|
||||
:help12
|
||||
> This text will appear under the *Comments* column for the share in Windows Explorer.
|
||||
> Enter anything you like, up to 256 characters.
|
||||
:help41
|
||||
> This represents a "floor" of the amount of free space remaining on the cache disk. If the free
|
||||
> space becomes less than this value, then new files written to user shares with cache enabled will go to
|
||||
> the array and not the cache disk.
|
||||
>
|
||||
> Enter a numeric value with one of these suffixes:
|
||||
>
|
||||
> **KB** = 1,000<br>
|
||||
> **MB** = 1,000,000<br>
|
||||
> **GB** = 1,000,000,000<br>
|
||||
> **TB** = 1,000,000,000,000
|
||||
>
|
||||
> If no suffix, a count of 1024-byte blocks is assumed.<br>
|
||||
>
|
||||
> Examples:
|
||||
>
|
||||
> **2GB** => 2,000,000,000 bytes<br>
|
||||
> **2000000** => 2,048,000,000 bytes
|
||||
:end
|
||||
|
||||
<?endif;?>
|
||||
_(Warning disk utilization threshold)_ (%):
|
||||
: <input type="number" min="0" max="100" name="<?=htmlspecialchars($name)?>_warning" class="narrow" value="<?=strlen($disk['warning'])?$disk['warning']:''?>" placeholder="<?=$display['warning']?>">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user