Minor updates

This commit is contained in:
Deon George 2012-11-27 16:46:43 +11:00
parent ea1346447f
commit e00c3751de
7 changed files with 82 additions and 12 deletions

View File

@ -39,7 +39,9 @@ class Controller_Domain extends Controller_TemplateDefault {
));
}
public function action_detail($domain_name=NULL) {
public function action_detail() {
$domain_name = $this->request->param('id');
if (is_null($domain_name) AND (empty($_POST['domain_name']) OR ! $domain_name = $_POST['domain_name'])) {
SystemMessage::add(array(
'title'=>_('DOMAIN_NAME is required'),

View File

@ -39,7 +39,9 @@ class Controller_Library extends Controller_TemplateDefault {
));
}
public function action_detail($library=NULL) {
public function action_detail() {
$library = $this->request->param('id');
if (is_null($library) AND (empty($_POST['library_name']) OR ! $library = $_POST['library_name'])) {
SystemMessage::add(array(
'title'=>_('LIBRARY_NAME is required'),

View File

@ -39,7 +39,9 @@ class Controller_Node extends Controller_TemplateDefault {
));
}
public function action_detail($node_name=NULL) {
public function action_detail() {
$node_name = $this->request->param('id');
if (is_null($node_name) AND (empty($_POST['node_name']) OR ! $node_name = $_POST['node_name'])) {
SystemMessage::add(array(
'title'=>_('NODE_NAME is required'),

View File

@ -39,7 +39,9 @@ class Controller_Stgpool extends Controller_TemplateDefault {
));
}
public function action_detail($stgpool=NULL) {
public function action_detail() {
$stgpool = $this->request->param('id');
if (is_null($stgpool) AND (empty($_POST['stgpool_name']) OR ! $stgpool = $_POST['stgpool_name'])) {
SystemMessage::add(array(
'title'=>_('STGPOOL_NAME is required'),

View File

@ -20,6 +20,9 @@ class Model_STGPOOL extends TSM_ORM {
'DEVCLASSES'=>array('foreign_key'=>'DEVCLASS_NAME','far_key'=>'DEVCLASS'),
);
protected $_has_many = array(
'COPYGROUP_AR'=>array('foreign_key'=>'DESTINATION','far_key'=>'STGPOOL_NAME'),
'COPYGROUP_BU'=>array('foreign_key'=>'DESTINATION','far_key'=>'STGPOOL_NAME'),
'MGMTCLASS'=>array('foreign_key'=>'MIGDESTINATION','far_key'=>'STGPOOL_NAME'),
'VOLUME'=>array('foreign_key'=>'STGPOOL_NAME','far_key'=>'STGPOOL_NAME'),
);

View File

@ -14,6 +14,7 @@
<td>OS</td>
<td>Last Access</td>
<td>Last IP Addr</td>
<td>Client Opt</td>
<?php foreach (Kohana::$config->load('config')->tsmdatatypes as $btype => $ctype) { ?>
<td><?php echo $ctype[0]; ?></td>
<?php } ?>
@ -23,11 +24,12 @@
</tr>
<?php $i=0; foreach ($do->NODE->find_all() as $no) { ?>
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
<td class="data"><?php echo HTML::anchor('node/detail/'.$no->NODE_NAME,$no->NODE_NAME); ?></td>
<td class="data"><abbr title="<?php printf('%s (%s)',$no->display('CONTACT'),$no->display('EMAIL_ADDRESS')); ?>"><?php echo HTML::anchor('node/detail/'.$no->NODE_NAME,$no->NODE_NAME); ?></abbr></td>
<td class="data"><?php echo $no->tsmclientversion(); ?></td>
<td class="data"><?php echo $no->platform(); ?></td>
<td class="data"><?php echo $no->display('LASTACC_TIME'); ?></td>
<td class="data"><?php echo $no->display('TCP_ADDRESS'); ?></td>
<td class="data"><?php echo $no->display('OPTION_SET'); ?></td>
<?php foreach (Kohana::$config->load('config')->tsmdatatypes as $btype => $ctype) { ?>
<td class="data"><?php echo $no->hasData($btype) ? 'Y' : 'N'; ?></td>
<?php } ?>

View File

@ -1,6 +1,6 @@
<table width="100%">
<tr>
<td style="width: 50%; vertical-align: top;">
<td rowspan="2" style="width: 50%; vertical-align: top;">
<table class="box-full">
<tr>
<td class="head" colspan="5">Information for this Storage Pool</td>
@ -71,7 +71,7 @@
<tr>
<td>Next Pool</td>
<?php if ($so->NEXTSTGPOOL AND $so->POOLTYPE === 'PRIMARY') { ?>
<td class="data"><?php echo $so->display('NEXTSTGPOOL'); ?></td>
<td class="data"><?php echo HTML::anchor('stgpool/detail/'.$so->NEXTSTGPOOL,$so->display('NEXTSTGPOOL')); ?></td>
</tr>
<tr>
<td>Migratable %</td>
@ -129,10 +129,6 @@
<td style="width: 40%;">Access</td>
<td style="width: 60%;" class="data"><?php echo $so->DEVCLASSES->display('ACCESS_STRATEGY'); ?></td>
</tr>
<tr>
<td>Total Storage Pools</td>
<td class="data"><?php echo $so->DEVCLASSES->display('STGPOOL_COUNT'); ?></td>
</tr>
<tr>
<td>Device Type</td>
<td class="data"><?php echo $so->DEVCLASSES->display('DEVTYPE'); ?></td>
@ -171,6 +167,67 @@
</table>
</td>
</tr>
<tr>
<td style="width: 50%; vertical-align: top;">
<table class="box-full">
<tr>
<td class="head" colspan="5">Management classes that directly store here</td>
</tr>
<tr>
<td class="spacer">&nbsp;</td>
</tr>
<tr>
<td class="head" colspan="5">Backup Management Classes</td>
</tr>
<tr>
<td>Domain</td>
<td>MgmtClass</td>
<td>Copy Group</td>
</tr>
<?php $i=0; foreach ($so->COPYGROUP_BU->where('SET_NAME','=','ACTIVE')->find_all() as $cgo) { ?>
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
<td class="data"><?php echo HTML::anchor('domain/detail/'.$cgo->DOMAIN_NAME,$cgo->display('DOMAIN_NAME')); ?></td>
<td class="data"><?php echo $cgo->display('CLASS_NAME'); ?></td>
<td class="data"><?php echo $cgo->display('COPYGROUP_NAME'); ?></td>
</tr>
<?php } ?>
<tr>
<td class="spacer">&nbsp;</td>
</tr>
<tr>
<td class="head" colspan="5">Archive Management Classes</td>
</tr>
<tr>
<td>Domain</td>
<td>MgmtClass</td>
<td>Copy Group</td>
</tr>
<?php $i=0; foreach ($so->COPYGROUP_AR->where('SET_NAME','=','ACTIVE')->find_all() as $cgo) { ?>
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
<td class="data"><?php echo $cgo->display('DOMAIN_NAME'); ?></td>
<td class="data"><?php echo $cgo->display('CLASS_NAME'); ?></td>
<td class="data"><?php echo $cgo->display('COPYGROUP_NAME'); ?></td>
</tr>
<?php } ?>
<tr>
<td class="spacer">&nbsp;</td>
</tr>
<tr>
<td class="head" colspan="5">HSM Management Classes</td>
</tr>
<tr>
<td>Domain</td>
<td>MgmtClass</td>
</tr>
<?php $i=0; foreach ($so->MGMTCLASS->where('SET_NAME','=','ACTIVE')->find_all() as $mo) { ?>
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
<td class="data"><?php echo $mo->display('DOMAIN_NAME'); ?></td>
<td class="data"><?php echo $mo->display('CLASS_NAME'); ?><?php echo $mo->DEFAULTMC == 'Yes' ? '*' : ''; ?></td>
</tr>
<?php } ?>
</table>
</td>
</tr>
<tr>
<td style="width: 100%; vertical-align: top;" colspan="2">
<table class="box-full">
@ -202,7 +259,7 @@
<td class="data"><?php echo $vo->display('ACCESS'); ?></td>
<td class="data"><?php echo $vo->display('STATUS'); ?></td>
<td class="data-right"><?php printf('%s/%s',$vo->READ_ERRORS,$vo->WRITE_ERRORS); ?></td>
<td class="data-right"><?php echo $vo->display('EST_CAPACITY_MB'); ?></td>
<td class="data-right"><abbr title="<?php echo $vo->display('EST_CAPACITY_MB'); ?>"><?php echo $vo->display('PCT_UTILIZED'); ?></abbr></td>
<td class="data-right"><?php echo $vo->display('PCT_RECLAIM'); ?></td>
<?php foreach (Kohana::$config->load('config')->tsmdatatypes as $btype => $ctype) { ?>
<td class="data-right"><?php echo $vo->getFSOnVol($ctype); ?></td>