mirror of
https://github.com/unraid/webgui.git
synced 2026-05-08 05:12:14 -05:00
Merge pull request #641 from bergware/mutli-language
Multi cache pool support
This commit is contained in:
@@ -346,8 +346,7 @@ function cache_slots($off,$pool,$min,$slots) {
|
||||
return $out;
|
||||
}
|
||||
$crypto = false;
|
||||
$cache = cache_filter($disks);
|
||||
$pools = pools_filter($cache);
|
||||
$pools = pools_filter($disks);
|
||||
switch ($_POST['device']) {
|
||||
case 'array':
|
||||
$parity = parity_filter($disks);
|
||||
@@ -382,6 +381,7 @@ case 'flash':
|
||||
echo "</tr>";
|
||||
break;
|
||||
case 'cache':
|
||||
$cache = cache_filter($disks);
|
||||
foreach ($pools as $pool) {
|
||||
$tmp = "/var/tmp/$pool.log.tmp";
|
||||
foreach ($cache as $disk) if (prefix($disk['name'])==$pool) $crypto |= $disk['luksState']!=0 || vfs_luks($disk['fsType']);
|
||||
|
||||
@@ -53,7 +53,8 @@ function my_temp($value) {
|
||||
return is_numeric($value) ? (($unit=='F' ? round(9/5*$value+32) : str_replace('.', $number[0], $value))." $unit") : $value;
|
||||
}
|
||||
function my_disk($name) {
|
||||
return ucfirst(preg_replace('/(\d+)$/',' $1',$name));
|
||||
global $display;
|
||||
return $display['raw'] ? $name : ucfirst(preg_replace('/(\d+)$/',' $1',$name));
|
||||
}
|
||||
function my_disks($disk) {
|
||||
return strpos($disk['status'],'_NP')===false;
|
||||
|
||||
@@ -52,8 +52,8 @@ function my_lang($text,$do=0) {
|
||||
foreach ($keys as $key) if (isset($language[$key])) $text = preg_replace("/\b$key\b/",$language[$key],$text);
|
||||
break;
|
||||
case 3: // device translation
|
||||
[$p1,$p2] = explode(' ',$text);
|
||||
$text = rtrim(_($p1)." $p2");
|
||||
[$p1,$p2] = preg_split('/(?<=[a-z])(?= ?[0-9]+)/i',$text);
|
||||
$text = _($p1).$p2;
|
||||
}
|
||||
return $text;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user