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/library/detail.php
2011-06-27 14:46:37 +10:00

258 lines
8.8 KiB
PHP

<table width="100%">
<tr>
<td style="width: 50%; vertical-align: top;">
<table class="box-full">
<tr>
<td class="head" colspan="2">Information for this Library</td>
</tr>
<tr>
<td class="spacer">&nbsp;</td>
</tr>
<tr>
<td style="width: 40%;">Name</td>
<td style="width: 60%;" class="data"><?php printf('%s (%s)',$lo->display('LIBRARY_NAME'),$slots->ProductId); ?></td>
</tr>
<tr>
<td>Serial Number</td>
<td class="data"><?php echo $lo->display('LIBRARY_SERIAL'); ?></td>
</tr>
<tr>
<td>Type</td>
<td class="data"><?php echo $lo->display('LIBRARY_TYPE'); ?></td>
</tr>
<tr>
<td>Drives</td>
<td class="data"><?php echo $slots->Drives; ?></td>
</tr>
<tr>
<td>Slots/Changers</td>
<td class="data"><?php printf('%s/%s',$slots->Slots-$slots->Changers,$slots->Changers); ?></td>
</tr>
<tr>
<td>Shared</td>
<td class="data"><?php echo $lo->display('SHARED'); ?></td>
</tr>
<tr>
<td>LAN Free</td>
<td class="data"><?php echo $lo->display('LANFREE'); ?></td>
</tr>
<tr>
<td>Auto Label</td>
<td class="data"><?php echo $lo->display('AUTOLABEL'); ?></td>
</tr>
<tr>
<td>Paths</td>
<td>
<table style="width: 100%;">
<?php $i=0; foreach ($lo->PATH->find_all() as $po) { ?>
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
<td><?php echo $po->display('SOURCE_NAME'); ?></td>
<td><?php echo $po->display('SOURCE_TYPE'); ?></td>
<td><?php echo $po->display('DESTINATION_TYPE'); ?></td>
<td><?php echo $po->display('DEVICE'); ?></td>
</tr>
</table>
</td>
</tr>
<?php } ?>
</table>
</td>
<td style="width: 100%; vertical-align: top;" rowspan="2">
<table class="box-full">
<tr>
<td class="head" colspan="10">Library Volume Summary</td>
</tr>
<tr>
<td class="spacer">&nbsp;</td>
</tr>
<tr>
<td style="width: 40%;" colspan="2">Empty Slots</td>
<td style="width: 60%;" class="data" colspan="8"><?php echo $lo->numemptyslot(); ?></td>
</tr>
<tr>
<td colspan="2">Not Checked In</td>
<td class="data" colspan="8"><?php echo count($lo->notcheckedinvol()); ?></td>
</tr>
<tr>
<td colspan="2">Scratch</td>
<td class="data" colspan="8"><?php echo count($lo->scratchvol()); ?></td>
</tr>
<tr>
<td colspan="2">Read Only</td>
<td class="data" colspan="8"><?php echo count($lo->readonlyvol()); ?></td>
</tr>
<tr>
<td colspan="2">&sup1; Stale Storage Pool Volumes (<span class="data"><?php echo Kohana::config('config.tsmtapeage'); ?></span> days)</td>
<td class="data" colspan="8"><?php echo count($lo->stalevol()); ?></td>
</tr>
<tr>
<td colspan="2">&sup2; Removable Volumes</td>
<td class="data" colspan="8"><?php echo count($lo->removablelibvol()); ?></td>
</tr>
<tr>
<td class="spacer">&nbsp;</td>
</tr>
<tr>
<td class="head" colspan="10">Storage Pool Volumes for this Library</td>
</tr>
<tr>
<td class="spacer">&nbsp;</td>
</tr>
<tr>
<td colspan="2">Storage Type</td>
<?php foreach (array('IN','OUT') as $inout) { ?>
<?php foreach (Kohana::config('config.tsmvolstatus') as $status) { ?>
<td class="right"><?php printf('%s: %s',$inout,$status); ?></td>
<?php } ?>
<?php } ?>
</tr>
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
<td class="data" colspan="2">DB VOLS</td>
<?php foreach (array('IN','OUT') as $inout) { ?>
<td class="data-right"><?php echo count($lo->dbvolsloc($inout)); ?></td>
<td colspan="3">&nbsp;</td>
<?php } ?>
</tr>
<?php $i=0; foreach (Kohana::config('config.tsmdbtypes') as $type) { ?>
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
<td>&nbsp;</td>
<td><?php echo $type; ?></td>
<?php foreach (array('IN','OUT') as $inout) { ?>
<td class="right"><?php echo count($lo->dbvolstype($inout,$type)); ?></td>
<td colspan="3">&nbsp;</td>
<?php } ?>
</tr>
<?php } ?>
<?php foreach (Kohana::config('config.tsmpooltypes') as $type) { ?>
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
<td class="data" colspan="2"><?php echo $type; ?></td>
<?php foreach (array('IN','OUT') as $inout) { ?>
<?php foreach (Kohana::config('config.tsmvolstatus') as $status) { ?>
<td class="data-right"><?php echo count($lo->volstype($type,$inout,$status)); ?></td>
<?php } ?>
<?php } ?>
</tr>
<?php foreach ($lo->storagepoolstype($type) as $spo) { ?>
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
<td>&nbsp;</td>
<td><?php echo $spo; ?></td>
<?php foreach (array('IN','OUT') as $inout) { ?>
<?php foreach (Kohana::config('config.tsmvolstatus') as $status) { ?>
<td class="right"><?php echo count($spo->libvolstype($inout,$status)); ?></td>
<?php } ?>
<?php } ?>
</tr>
<?php } ?>
<?php } ?>
</table>
</td>
</tr>
<tr>
<td style="width: 50%; vertical-align: top;">
<table class="box-full">
<tr>
<td class="head" colspan="5">Drives in this Library</td>
</tr>
<tr>
<td class="spacer">&nbsp;</td>
</tr>
<tr>
<td>Name</td>
<td>Serial Number</td>
<td>Online</td>
<td>State</td>
<td>Volume</td>
</tr>
<?php $i=0;foreach ($lo->DRIVE->find_all() as $do) { ?>
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
<td class="data"><?php echo $do->display('DRIVE_NAME'); ?></td>
<td class="data"><?php echo $do->display('DRIVE_SERIAL'); ?></td>
<td class="data"><?php echo $do->display('ONLINE'); ?></td>
<td class="data"><?php echo $do->display('DRIVE_STATE'); ?></td>
<td class="data"><?php echo $do->display('VOLUME_NAME'); ?></td>
</tr>
<?php foreach ($do->PATH->find_all() as $po) { ?>
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
<td>&nbsp;</td>
<td><?php echo $po->display('SOURCE_NAME'); ?></td>
<td><?php echo $po->display('SOURCE_TYPE'); ?></td>
<td><?php echo $po->display('DESTINATION_TYPE'); ?></td>
<td><?php echo $po->display('DEVICE'); ?></td>
</tr>
<?php } ?>
<?php } ?>
</table>
</td>
</tr>
<tr>
<td style="width: 100%; vertical-align: top;" colspan="2">
<table class="box-full">
<tr>
<td class="head" colspan="5">Volumes in this Library</td>
</tr>
<tr>
<td class="spacer">&nbsp;</td>
</tr>
<tr>
<td>Barcode</td>
<td>Usage</td>
<td>Status/Access</td>
<td>Utilisation</td>
<td>Reclaim</td>
<td>Last Read</td>
<td>Last Write</td>
<td>Slot</td>
<td>Library Access</td>
</tr>
<?php $i=0; foreach ($slots as $slot) { ?>
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
<td class="data"><?php echo HTML::nbsp($slot->barcodelabel().($slot->LIBVOLUME->VOLUME->recycle() ? ' &sup1' : '').($slot->LIBVOLUME->removable() ? ' &sup2' : '')); ?></td>
<td class="data"><?php echo $slot->LIBVOLUME->volusage(); ?></td>
<td class="data"><?php echo HTML::nbsp($slot->LIBVOLUME->status()); ?></td>
<td class="data"><?php echo $slot->LIBVOLUME->VOLUME->display('PCT_UTILIZED'); ?></td>
<td class="data"><?php echo $slot->LIBVOLUME->VOLUME->display('PCT_RECLAIM'); ?></td>
<td class="data"><?php echo $slot->LIBVOLUME->VOLUME->display('LAST_READ_DATE'); ?></td>
<td class="data"><?php echo HTML::nbsp($slot->LIBVOLUME->lastwrite()); ?></td>
<td class="data"><acronym title="<?php printf('%s: %s',_('Element'),$slot->element); ?>"><?php echo $slot; ?></acronym></td>
<td class="data"><?php echo HTML::nbsp($slot->LIBVOLUME->access()); ?></td>
</tr>
<?php } ?>
</table>
</td>
</tr>
<tr>
<td style="width: 100%; vertical-align: top;" colspan="2">
<table class="box-full">
<tr>
<td class="head" colspan="5">Volumes out of this Library</td>
</tr>
<tr>
<td class="spacer">&nbsp;</td>
</tr>
<tr>
<td>Volume</td>
<td>Usage</td>
<td>Status/Access</td>
<td>Utilisation</td>
<td>Reclaim</td>
<td>Last Read</td>
<td>Last Write</td>
<td>Location</td>
</tr>
<?php $i=0; foreach ($lo->volsnotinlib() as $vo) { ?>
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
<td class="data"><?php echo $vo; ?></td>
<td class="data"><?php echo $vo->STGPOOL_NAME; ?></td>
<td class="data"><?php printf('%s/%s',$vo->display('STATUS'),$vo->display('ACCESS')); ?></td>
<td class="data"><?php echo $vo->display('PCT_UTILIZED'); ?></td>
<td class="data"><?php echo $vo->display('PCT_RECLAIM'); ?></td>
<td class="data"><?php echo $vo->display('LAST_READ_DATE'); ?></td>
<td class="data"><?php echo $vo->display('LAST_WRITE_DATE'); ?></td>
<td class="data"><?php echo $vo->display('LOCATION'); ?></td>
</tr>
<?php } ?>
</table>
</td>
</tr>
</table>