mirror of
https://github.com/unraid/webgui.git
synced 2026-01-14 13:39:58 -06:00
Multi cache support
This commit is contained in:
@@ -87,7 +87,7 @@ pool_status();
|
||||
<table class="disk_status wide<?=$i?' divider':''?>">
|
||||
<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="pool_device<?=$i++?>">
|
||||
<?foreach (cache_filter($disks) as $disk) if (prefix($disk['name']==$pool)) echo "<tr><td colspan='11'> </td></tr>"?>
|
||||
<?foreach (cache_filter($disks) as $disk) if (prefix($disk['name'])==$pool) echo "<tr><td colspan='11'> </td></tr>"?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?endif;?>
|
||||
|
||||
@@ -309,7 +309,7 @@ function show_totals($text,$array) {
|
||||
echo "<td></td>";
|
||||
} else
|
||||
echo "<td colspan=4></td>";
|
||||
echo "</tr>\0";
|
||||
echo "</tr>";
|
||||
}
|
||||
function array_slots() {
|
||||
global $var;
|
||||
@@ -385,8 +385,7 @@ case 'cache':
|
||||
if ($var['fsState']=='Stopped') {
|
||||
$log = @(array)parse_ini_file($tmp);
|
||||
$off = false;
|
||||
foreach ($cache as $disk) {
|
||||
if (prefix($disk['name'])!=$pool) continue;
|
||||
foreach ($cache as $disk) if (prefix($disk['name'])==$pool) {
|
||||
array_offline($disk);
|
||||
if (isset($log[$disk['name']])) $off |= ($log[$disk['name']]!=$disk['id']); else $log[$disk['name']] = $disk['id'];
|
||||
}
|
||||
@@ -396,7 +395,7 @@ case 'cache':
|
||||
} else {
|
||||
if ($cache[$pool]['devices']) {
|
||||
foreach ($cache as $disk) if (prefix($disk['name'])==$pool) {
|
||||
if (substr($cache[$pool]['fsStatus'],0,11)=='Unmountable') $disk['fsStatus'] = $cache[$pool]['fsStatus'];
|
||||
if (substr($cache[$pool]['fsStatus'],0,11)=='Unmountable' && empty($disk['fsStatus'])) $disk['fsStatus'] = $cache[$pool]['fsStatus'];
|
||||
array_online($disk);
|
||||
}
|
||||
if ($display['total'] && $cache[$pool]['devices']>1) show_totals(sprintf(_('Pool of %s devices'),my_word($cache[$pool]['devices'])),false);
|
||||
|
||||
Reference in New Issue
Block a user