This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
phptsmadmin/application/views/nodes/detail_volumes.php
2011-05-30 19:27:08 +10:00

54 lines
2.2 KiB
PHP

<table width="100%">
<?php foreach (Kohana::config('config.tsmdatatypes') as $btype => $ctype) { ?>
<tr>
<td style="width: 100%; vertical-align: top;">
<table class="box-full">
<tr>
<td class="head" colspan="2"><?php echo $ctype=='BACKUP' ? _('Backup Volumes') : _('Archive Volumes'); ?></td>
</tr>
<?php if ($node->volumes($ctype)) { ?>
<tr>
<td class="spacer">&nbsp;</td>
</tr>
<tr>
<td>Volume</td>
<td>Last Read Date</td>
<td>Last Write Date</td>
<td>Access</td>
<td>Status</td>
<td class="right">Errors R/W</td>
<td class="right">Util %</td>
<td class="right">Reclaim</td>
<td class="right">Other FS</td>
<td class="right">Other Node</td>
</tr>
<?php $i=0; foreach ($node->volumes($ctype) as $stgpool => $vols) {
$spo = ORM::factory('STGPOOL',$stgpool); ?>
<tr class="subhead"><td colspan="10"><?php printf('%s: Reclaim: %s%%, Scratch Usage: %s/%s, Device Type: %s',$spo->STGPOOL_NAME,$spo->RECLAIM,$spo->NUMSCRATCHUSED,$spo->MAXSCRATCH,$spo->DEVCLASSES->DEVTYPE); ?></td></tr>
<?php foreach ($vols as $vol) { ?>
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
<td class="data"><?php echo $vol->VOLUME_NAME; ?></td>
<td class="data"><?php echo $vol->display('LAST_READ_DATE'); ?></td>
<td class="data"><?php echo $vol->display('LAST_WRITE_DATE'); ?></td>
<td class="data"><?php echo $vol->display('ACCESS'); ?></td>
<td class="data"><?php echo $vol->display('STATUS'); ?></td>
<td class="data-right"><?php printf('%s/%s',$vol->READ_ERRORS,$vol->WRITE_ERRORS); ?></td>
<td class="data-right"><?php echo $vol->display('EST_CAPACITY_MB'); ?></td>
<td class="data-right"><?php echo $vol->display('PCT_RECLAIM'); ?></td>
<td class="data-right"><?php echo $vol->getFSOnVol($ctype); ?></td>
<td class="data-right"><?php echo $vol->getNodesOnVol($ctype); ?></td>
</tr>
<?php } ?>
<?php } ?>
<?php } else { ?>
<tr><td><?php echo $ctype=='BACKUP' ? _('There are NO Backup Volumes for this Node.') : _('There are NO Archive Volumes for this Node.'); ?></td></tr>
<?php } ?>
</table>
</td>
<td style="width: 50%; vertical-align: top;">
&nbsp;
</td>
</tr>
<?php } ?>
</table>