mirror of
https://github.com/unraid/webgui.git
synced 2026-05-14 16:20:06 -05:00
Merge pull request #691 from bergware/mutli-language
Multi cache pool support
This commit is contained in:
@@ -166,12 +166,12 @@ function fs_info(&$disk) {
|
||||
function my_diskio($data) {
|
||||
return my_scale($data,$unit,1)." $unit/s";
|
||||
}
|
||||
function array_offline(&$disk) {
|
||||
function array_offline(&$disk,$pool='') {
|
||||
global $var, $disks;
|
||||
if (strpos($var['mdState'],'ERROR:')===false) {
|
||||
$text = "<span class='red-text'><em>"._('All existing data on this device will be OVERWRITTEN when array is Started')."</em></span>";
|
||||
if ($disk['type']=='Cache') {
|
||||
if (!empty($disks['cache']['uuid']) && $disk['status']=='DISK_NEW') $warning = $text;
|
||||
if (!empty($disks[$pool]['uuid']) && $disk['status']=='DISK_NEW') $warning = $text;
|
||||
} else {
|
||||
if ($var['mdState']=='NEW_ARRAY') {
|
||||
if ($disk['type']=='Parity') $warning = $text;
|
||||
@@ -389,7 +389,7 @@ case 'cache':
|
||||
$log = @(array)parse_ini_file($tmp);
|
||||
$off = false;
|
||||
foreach ($cache as $disk) if (prefix($disk['name'])==$pool) {
|
||||
array_offline($disk);
|
||||
array_offline($disk,$pool);
|
||||
if (isset($log[$disk['name']])) $off |= ($log[$disk['name']]!=$disk['id']); else $log[$disk['name']] = $disk['id'];
|
||||
}
|
||||
$data = []; foreach ($log as $key => $value) $data[] = "$key=\"$value\"";
|
||||
@@ -402,6 +402,7 @@ case 'cache':
|
||||
array_online($disk);
|
||||
}
|
||||
if ($display['total'] && $cache[$pool]['devices']>1) show_totals(sprintf(_('Pool of %s devices'),my_word($cache[$pool]['devices'])),false);
|
||||
$sum = ['count'=>0, 'temp'=>0, 'fsSize'=>0, 'fsUsed'=>0, 'fsFree'=>0, 'ioReads'=>0, 'ioWrites'=>0, 'numReads'=>0, 'numWrites'=>0, 'numErrors'=>0];
|
||||
echo "\0";
|
||||
}
|
||||
@unlink($tmp);
|
||||
|
||||
Reference in New Issue
Block a user