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/summary.php

90 lines
3.0 KiB
PHP
Raw Normal View History

2012-11-29 22:58:15 +00:00
<!-- $o = ORM::factory('LIBRARY') -->
<!-- <?php $slots = $o->slots(); ?> -->
<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 $o->numemptyslot(); ?></td>
</tr>
<tr>
<td colspan="2">Not Checked In</td>
<td class="data" colspan="8"><?php echo count($o->notcheckedinvol()); ?></td>
</tr>
<tr>
<td colspan="2">Scratch</td>
<td class="data" colspan="8"><?php echo count($o->scratchvol()); ?></td>
</tr>
<tr>
<td colspan="2">Read Only</td>
<td class="data" colspan="8"><?php echo count($o->readonlyvol()); ?></td>
</tr>
<tr>
<td colspan="2">&sup1; Stale Volumes (<span class="data"><?php echo Kohana::$config->load('config')->tsmtapeage; ?></span> days)</td>
<td class="data" colspan="8"><?php echo count($o->stalevol()); ?></td>
</tr>
<tr>
<td colspan="2">&sup2; Removable Volumes</td>
<td class="data" colspan="8"><?php echo count($o->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->load('config')->tsmvolstatus as $status) { ?>
<td class="right"><?php printf('%s: %s',$inout,$status); ?></td>
<?php } ?>
<?php } ?>
</tr>
<tr>
<td class="data" colspan="2">DB VOLS</td>
<?php foreach (array('IN','OUT') as $inout) { ?>
<td class="data-right"><?php echo count($o->dbvolsloc($inout)); ?></td>
<td colspan="3">&nbsp;</td>
<?php } ?>
</tr>
<?php $i=0; foreach (Kohana::$config->load('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($o->dbvolstype($inout,$type)); ?></td>
<td colspan="3">&nbsp;</td>
<?php } ?>
</tr>
<?php } ?>
<?php foreach (Kohana::$config->load('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->load('config')->tsmvolstatus as $status) { ?>
<td class="data-right"><?php echo count($o->volstype($type,$inout,$status)); ?></td>
<?php } ?>
<?php } ?>
</tr>
<?php foreach ($o->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->load('config')->tsmvolstatus as $status) { ?>
<td class="right"><?php echo count($spo->libvolstype($inout,$status)); ?></td>
<?php } ?>
<?php } ?>
</tr>
<?php } ?>
<?php } ?>
</table>