Updated Domain and Node views
This commit is contained in:
parent
ae2c1440ed
commit
d7822a03e8
78
application/classes/controller/domain.php
Normal file
78
application/classes/controller/domain.php
Normal file
@ -0,0 +1,78 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides information on TSM Nodes.
|
||||
*
|
||||
* @package PTA
|
||||
* @subpackage Domains
|
||||
* @category Controllers
|
||||
* @author Deon George
|
||||
* @copyright (c) 2010 phpTSMadmin Development Team
|
||||
* @license http://phptsmadmin.sf.net/license.html
|
||||
*/
|
||||
class Controller_DOMAIN extends Controller_TemplateDefault {
|
||||
/**
|
||||
* Default Index for Controller
|
||||
*/
|
||||
public function action_index() {
|
||||
$do = ORM::factory('domain');
|
||||
$output = '';
|
||||
|
||||
$output .= sprintf(_('This server has <b>%s</b> domains.'),$do->count_all());
|
||||
$output .= '<br/>';
|
||||
$output .= '<br/>';
|
||||
|
||||
$select = array();
|
||||
$select[NULL] = '';
|
||||
|
||||
foreach ($do->find_all() as $domain)
|
||||
$select[$domain->DOMAIN_NAME] = $domain->DOMAIN_NAME;
|
||||
|
||||
$output .= Form::open('/domain/detail',array('id'=>'domain_detail'));
|
||||
$output .= sprintf('%s: %s',_('Choose a domain to view'),Form::select('domain_name',$select,NULL,array('id'=>'domain_name')));
|
||||
$output .= Form::submit('form_submit',_('Go'));
|
||||
$output .= Form::close();
|
||||
|
||||
Script::add(array(
|
||||
'type'=>'stdin',
|
||||
'data'=>'
|
||||
$(document).ready(function () {$("#domain_name").change(function () {
|
||||
$("#domain_name").trigger("submit");
|
||||
});});'
|
||||
));
|
||||
|
||||
Block::add(array(
|
||||
'title'=>_('TSM Domains'),
|
||||
'body'=>$output,
|
||||
));
|
||||
}
|
||||
|
||||
public function action_detail($domain_name=NULL) {
|
||||
if (is_null($domain_name) AND (empty($_POST['domain_name']) OR ! $domain_name = $_POST['domain_name'])) {
|
||||
SystemMessage::add(array(
|
||||
'title'=>_('DOMAIN_NAME is required'),
|
||||
'type'=>'error',
|
||||
'body'=>_('The domain name is required.'),
|
||||
));
|
||||
|
||||
Request::current()->redirect('domain');
|
||||
}
|
||||
|
||||
$do = ORM::factory('domain',$domain_name);
|
||||
if (! $do->loaded()) {
|
||||
SystemMessage::add(array(
|
||||
'title'=>_('Unknown DOMAIN_NAME'),
|
||||
'type'=>'error',
|
||||
'body'=>sprintf(_('The domain [%s] does not exist?.'),$domain_name),
|
||||
));
|
||||
|
||||
Request::current()->redirect('domain');
|
||||
}
|
||||
|
||||
Block::add(array(
|
||||
'title'=>sprintf(_('Node Information for Domain %s'),$do->DOMAIN_NAME),
|
||||
'body'=>View::factory('domain/detail')->set('do',$do)
|
||||
));
|
||||
}
|
||||
}
|
||||
?>
|
@ -29,7 +29,7 @@ class Controller_NODE extends Controller_TemplateDefault {
|
||||
$select[$node->NODE_NAME] = $node->NODE_NAME;
|
||||
|
||||
$output .= Form::open('/node/detail',array('id'=>'node_detail'));
|
||||
$output .= sprintf('%s: %s',_('Choose a new to view'),Form::select('node_name',$select,NULL,array('id'=>'node_name')));
|
||||
$output .= sprintf('%s: %s',_('Choose a node to view'),Form::select('node_name',$select,NULL,array('id'=>'node_name')));
|
||||
$output .= Form::submit('form_submit',_('Go'));
|
||||
$output .= Form::close();
|
||||
|
||||
@ -48,10 +48,26 @@ $(document).ready(function () {$("#node_name").change(function () {
|
||||
}
|
||||
|
||||
public function action_detail($node_name=NULL) {
|
||||
if (is_null($node_name) AND (empty($_POST['node_name']) OR ! $node_name = $_POST['node_name']))
|
||||
throw new Kohana_Exception('Missing NODE_NAME');
|
||||
if (is_null($node_name) AND (empty($_POST['node_name']) OR ! $node_name = $_POST['node_name'])) {
|
||||
SystemMessage::add(array(
|
||||
'title'=>_('NODE_NAME is required'),
|
||||
'type'=>'error',
|
||||
'body'=>_('The node name is required.'),
|
||||
));
|
||||
|
||||
Request::current()->redirect('node');
|
||||
}
|
||||
|
||||
$no = ORM::factory('node',$node_name);
|
||||
if (! $no->loaded()) {
|
||||
SystemMessage::add(array(
|
||||
'title'=>_('Unknown NODE_NAME'),
|
||||
'type'=>'error',
|
||||
'body'=>sprintf(_('The node [%s] does not exist?.'),$node_name),
|
||||
));
|
||||
|
||||
Request::current()->redirect('node');
|
||||
}
|
||||
|
||||
Block::add(array(
|
||||
'title'=>sprintf('%s %s',_('Detailed Node Information for'),$no->NODE_NAME),
|
||||
@ -73,15 +89,5 @@ $(document).ready(function () {$("#node_name").change(function () {
|
||||
'body'=>View::factory('nodes/detail_schedule')->set('node',$no),
|
||||
));
|
||||
}
|
||||
|
||||
public function action_summary() {
|
||||
$do = ORM::factory('domain');
|
||||
|
||||
foreach ($do->find_all() as $domain)
|
||||
Block::add(array(
|
||||
'title'=>_('Node Information by Domain'),
|
||||
'body'=>View::factory('nodes/summary')->set('do',$domain)
|
||||
));
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -23,20 +23,20 @@ class Controller_Tree extends Controller_lnApp_Tree {
|
||||
*/
|
||||
public function action_json($id=null,array $data=array()) {
|
||||
// @todo Our menu options
|
||||
array_push($data,array(
|
||||
'id'=>'domain',
|
||||
'name'=>'Domain Info',
|
||||
'state'=>'none',
|
||||
'attr_id'=>'1',
|
||||
'attr_href'=>URL::Site('domain'),
|
||||
));
|
||||
|
||||
array_push($data,array(
|
||||
'id'=>'node',
|
||||
'name'=>'Node Info',
|
||||
'state'=>'none',
|
||||
'attr_id'=>'1',
|
||||
'attr_href'=>URL::Site('/node'),
|
||||
));
|
||||
|
||||
array_push($data,array(
|
||||
'id'=>'node_summary',
|
||||
'name'=>'Node Summary',
|
||||
'state'=>'none',
|
||||
'attr_id'=>'1',
|
||||
'attr_href'=>URL::Site('/node/summary'),
|
||||
'attr_href'=>URL::Site('node'),
|
||||
));
|
||||
|
||||
array_push($data,array(
|
||||
@ -44,7 +44,7 @@ class Controller_Tree extends Controller_lnApp_Tree {
|
||||
'name'=>'Server Activity Gantt',
|
||||
'state'=>'none',
|
||||
'attr_id'=>'1',
|
||||
'attr_href'=>URL::Site('/server/gantt'),
|
||||
'attr_href'=>URL::Site('server/gantt'),
|
||||
));
|
||||
|
||||
return parent::action_json($id,$data);
|
||||
|
@ -17,7 +17,9 @@ class Model_DOMAIN extends ORMTSM {
|
||||
);
|
||||
|
||||
protected $_has_many = array(
|
||||
'MGMTCLASS'=>array('foreign_key'=>'DOMAIN_NAME','far_key'=>'DOMAIN_NAME'),
|
||||
'NODE'=>array('foreign_key'=>'DOMAIN_NAME','far_key'=>'DOMAIN_NAME'),
|
||||
'SCHEDULE_CLIENT'=>array('foreign_key'=>'DOMAIN_NAME','far_key'=>'DOMAIN_NAME')
|
||||
);
|
||||
|
||||
// Pools used by a domain.
|
||||
@ -83,5 +85,17 @@ class Model_DOMAIN extends ORMTSM {
|
||||
|
||||
return $count;
|
||||
}
|
||||
|
||||
// $dtype is BACKUP or ARCHIVE
|
||||
// $ptype is pool type (PRIMARY,ACTIVE,COPY)
|
||||
public function getStorageModeNodes($dtype,$ptype,$spo='') {
|
||||
$result = array();
|
||||
|
||||
foreach ($this->NODE->find_all() as $no)
|
||||
if ($no->getStorageModeData($dtype,$ptype,$spo))
|
||||
array_push($result,$no);
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -16,6 +16,9 @@ class Model_NODE extends ORMTSM {
|
||||
'NODE_NAME'=>'ASC',
|
||||
);
|
||||
|
||||
protected $_has_one = array(
|
||||
'DOMAIN'=>array('foreign_key'=>'DOMAIN_NAME','far_key'=>'DOMAIN_NAME'),
|
||||
);
|
||||
protected $_has_many = array(
|
||||
'FILESPACE'=>array('foreign_key'=>'NODE_NAME','far_key'=>'NODE_NAME'),
|
||||
'VOLUMEUSAGE'=>array('foreign_key'=>'NODE_NAME','far_key'=>'NODE_NAME'),
|
||||
@ -60,7 +63,14 @@ class Model_NODE extends ORMTSM {
|
||||
private $pools = array();
|
||||
|
||||
public function tsmclientversion() {
|
||||
if ($this->CLIENT_VERSION)
|
||||
return sprintf('%s.%s.%s.%s',$this->CLIENT_VERSION,$this->CLIENT_RELEASE,$this->CLIENT_LEVEL,$this->CLIENT_SUBLEVEL);
|
||||
else
|
||||
return '';
|
||||
}
|
||||
|
||||
public function platform() {
|
||||
return sprintf('%s %s',$this->PLATFORM_NAME,$this->CLIENT_OS_LEVEL ? '('.$this->CLIENT_OS_LEVEL.')' : '');
|
||||
}
|
||||
|
||||
// @todo This needs to return the global configuration.
|
||||
@ -133,6 +143,12 @@ class Model_NODE extends ORMTSM {
|
||||
return $this->pools[$dtype];
|
||||
}
|
||||
|
||||
// Test to see if a node has any data of type
|
||||
// $dtype is BACKUP (Bkup) or ARCHIVE (Arch)
|
||||
public function hasData($dtype) {
|
||||
return $this->getStoragePools($dtype) ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
public function getAllStoragePoolsType($ptype) {
|
||||
$result = array();
|
||||
|
||||
@ -188,6 +204,7 @@ class Model_NODE extends ORMTSM {
|
||||
return $count;
|
||||
}
|
||||
|
||||
// $ptype is pool type (PRIMARY,ACTIVE,COPY)
|
||||
public function getStorageTypeFiles($ptype,$spo='') {
|
||||
$count = 0;
|
||||
|
||||
@ -210,6 +227,7 @@ class Model_NODE extends ORMTSM {
|
||||
return $count;
|
||||
}
|
||||
|
||||
// $ptype is pool type (PRIMARY,ACTIVE,COPY)
|
||||
public function getStorageTypeData($ptype,$spo='') {
|
||||
$count = 0;
|
||||
|
||||
|
@ -16,10 +16,18 @@ class Model_SCHEDULE_CLIENT extends ORMTSM {
|
||||
'SCHEDULE_NAME'=>'ASC',
|
||||
);
|
||||
|
||||
protected $_has_many = array(
|
||||
'ASSOCIATION'=>array('foreign_key'=>'SCHEDULE_NAME','far_key'=>'SCHEDULE_NAME'),
|
||||
);
|
||||
|
||||
protected $_display_filters = array(
|
||||
'STARTTIME'=>array(
|
||||
array('ORMTSM::date',array(':value','h:m')),
|
||||
),
|
||||
);
|
||||
|
||||
public function getNodes() {
|
||||
return $this->ASSOCIATION->find_all();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -41,5 +41,13 @@ class Model_VOLUME extends ORMTSM {
|
||||
public function getNodesOnVol($dtype) {
|
||||
return $this->VOLUMEUSAGE->select('NODE_NAME')->distinct(TRUE)->where('COPY_TYPE','=',$dtype)->find_all()->count();
|
||||
}
|
||||
|
||||
public function isScratch() {
|
||||
return $this->SCRATCH === 'YES' ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
public function location() {
|
||||
return $this->display('LOCATION');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
209
application/views/domain/detail.php
Normal file
209
application/views/domain/detail.php
Normal file
@ -0,0 +1,209 @@
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width: 100%; vertical-align: top;">
|
||||
<table class="box-full">
|
||||
<tr>
|
||||
<td class="head" colspan="5">Nodes in this Domain</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Node</td>
|
||||
<td>Version</td>
|
||||
<td>OS</td>
|
||||
<td>Last Access</td>
|
||||
<td>Last IP Addr</td>
|
||||
<?php foreach (Kohana::config('config.tsmdatatypes') as $btype => $ctype) { ?>
|
||||
<td><?php echo $ctype[0]; ?></td>
|
||||
<?php } ?>
|
||||
<?php foreach (Kohana::config('config.tsmpooltypes') as $type) { ?>
|
||||
<td colspan="3" class="right"><?php echo $type; ?>(Vol/Fil/Dat)</td>
|
||||
<?php } ?>
|
||||
</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"><?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>
|
||||
<?php foreach (Kohana::config('config.tsmdatatypes') as $btype => $ctype) { ?>
|
||||
<td class="data"><?php echo $no->hasData($btype) ? 'Y' : 'N'; ?></td>
|
||||
<?php } ?>
|
||||
<?php foreach (Kohana::config('config.tsmpooltypes') as $type) { ?>
|
||||
<td class="data-right"><?php echo count($no->getStorageTypeVols($type)); ?></td>
|
||||
<td class="data-right"><?php echo $no->getStorageTypeFiles($type); ?></td>
|
||||
<td class="data-right"><?php echo $no->getStorageTypeData($type); ?></td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 100%; vertical-align: top;">
|
||||
<table class="box-full">
|
||||
<tr>
|
||||
<td class="head" colspan="15">Storage Pools used by nodes in this Domain</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">Storage Pool</td>
|
||||
<td class="right">Scr Use</td>
|
||||
<td class="right">Scr Avl</td>
|
||||
<td class="right">Access</td>
|
||||
<td class="right">Rec %</td>
|
||||
<td class="right">Util %</td>
|
||||
<td class="right">Migr %</td>
|
||||
<td class="right">High/Low</td>
|
||||
<td class="right">Next</td>
|
||||
<td class="right">Nodes</td>
|
||||
<td class="right">Vols</td>
|
||||
<td class="right">Files</td>
|
||||
<td class="right">MB</td>
|
||||
</tr>
|
||||
<?php foreach (Kohana::config('config.tsmdatatypes') as $btype => $ctype) { ?>
|
||||
<tr class="subhead">
|
||||
<td colspan="15"><?php echo $btype; ?></td>
|
||||
</tr>
|
||||
<?php foreach (Kohana::config('config.tsmpooltypes') as $type) { ?>
|
||||
<tr class="subhead">
|
||||
<td> </td>
|
||||
<td colspan="14"><?php echo $type; ?></td>
|
||||
</tr>
|
||||
<?php $i=0; foreach ($do->getStoragePoolsType($btype,$type) as $spo) { ?>
|
||||
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
|
||||
<td colspan="2"> </td>
|
||||
<td class="data"><?php echo $spo->STGPOOL_NAME; ?></td>
|
||||
<td class="data-right"><?php echo $spo->display('NUMSCRATCHUSED'); ?></td>
|
||||
<td class="data-right"><?php echo $spo->display('MAXSCRATCH'); ?></td>
|
||||
<td class="data-right"><?php echo $spo->display('ACCESS'); ?></td>
|
||||
<td class="data-right"><?php echo $spo->display('RECLAIM'); ?></td>
|
||||
<td class="data-right"><?php echo $spo->display('PCT_UTILIZED'); ?></td>
|
||||
<td class="data-right"><?php echo $spo->display('PCT_MIGR'); ?></td>
|
||||
<td class="data-right"><?php printf('%s/%s',$spo->HIGHMIG,$spo->LOWMIG); ?></td>
|
||||
<td class="data-right"><?php echo $spo->display('NEXTSTGPOOL'); ?></td>
|
||||
<td class="data-right"><?php echo count($do->getStorageModeNodes($btype,$type,$spo)); ?></td>
|
||||
<td class="data-right"><?php echo count($do->getStorageModeVols($ctype,$type,$spo)); ?></td>
|
||||
<td class="data-right"><?php echo $do->getStorageModeFiles($btype,$type,$spo); ?></td>
|
||||
<td class="data-right"><?php echo $do->getStorageModeData($btype,$type,$spo); ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 100%; vertical-align: top;">
|
||||
<table class="box-full">
|
||||
<tr>
|
||||
<td class="head" colspan="15">Sequential Volumes needed to restore Data for Nodes in this Domain</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">Volume</td>
|
||||
<td>Status</td>
|
||||
<td>Access</td>
|
||||
<td>Scr</td>
|
||||
<td class="right">Pct %</td>
|
||||
<td class="right">Rec %</td>
|
||||
<td class="right">Mounted</td>
|
||||
<td class="right">Writes</td>
|
||||
<td class="right">R/W Err</td>
|
||||
<td class="right">FS</td>
|
||||
<td class="right">Nodes</td>
|
||||
<td class="right">Location</td>
|
||||
</tr>
|
||||
<?php foreach (Kohana::config('config.tsmdatatypes') as $btype => $ctype) { ?>
|
||||
<tr class="subhead">
|
||||
<td colspan="15"><?php echo $btype; ?></td>
|
||||
</tr>
|
||||
<?php foreach (Kohana::config('config.tsmpooltypes') as $type) { ?>
|
||||
<tr class="subhead">
|
||||
<td> </td>
|
||||
<td colspan="14"><?php echo $type; ?></td>
|
||||
</tr>
|
||||
<?php $i=0;foreach ($do->getStoragePoolsType($btype,$type) as $spo) { ?>
|
||||
<tr class="subhead">
|
||||
<td colspan="2"> </td>
|
||||
<td colspan="13"><?php echo $spo->DISPLAY('STGPOOL_NAME'); ?></td>
|
||||
</tr>
|
||||
<?php foreach ($do->getStorageModeVols($ctype,$type,$spo) as $vuo) { ?>
|
||||
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
|
||||
<td colspan="3"> </td>
|
||||
<td class="data"><?php echo $vuo->VOLUME_NAME; ?></td>
|
||||
<td class="data"><?php echo $vuo->VOLUME->display('STATUS'); ?></td>
|
||||
<td class="data"><?php echo $vuo->VOLUME->display('ACCESS'); ?></td>
|
||||
<td class="data"><?php echo $vuo->VOLUME->isScratch() ? 'Y' : 'N'; ?></td>
|
||||
<td class="data-right"><?php echo $vuo->VOLUME->display('PCT_UTILIZED'); ?></td>
|
||||
<td class="data-right"><?php echo $vuo->VOLUME->display('PCT_RECLAIM'); ?></td>
|
||||
<td class="data-right"><?php echo $vuo->VOLUME->display('TIMES_MOUNTED'); ?></td>
|
||||
<td class="data-right"><?php echo $vuo->VOLUME->display('WRITE_PASS'); ?></td>
|
||||
<td class="data-right"><?php printf('%s/%s',$vuo->VOLUME->READ_ERRORS,$vuo->VOLUME->WRITE_ERRORS); ?></td>
|
||||
<td class="data-right"><?php echo $vuo->VOLUME->getFSOnVol($ctype); ?></td>
|
||||
<td class="data-right"><?php echo $vuo->VOLUME->getNodesOnVol($ctype); ?></td>
|
||||
<td class="data-right"><?php echo $vuo->VOLUME->location(); ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo View::factory('nodes/policy')->set('domain',$do); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 100%; vertical-align: top;">
|
||||
<table class="box-full">
|
||||
<tr>
|
||||
<td class="head" colspan="7">Schedules used in this Domain</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Schedule</td>
|
||||
<td>Start Time</td>
|
||||
<td>Duration</td>
|
||||
<td>Repeat</td>
|
||||
<td>Valid Day</td>
|
||||
<td>Priority</td>
|
||||
<td>Nodes</td>
|
||||
</tr>
|
||||
<?php $i=0;foreach ($do->SCHEDULE_CLIENT->find_all() as $so) { ?>
|
||||
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
|
||||
<td class="data"><?php echo $so->display('SCHEDULE_NAME'); ?></td>
|
||||
<td class="data"><?php echo $so->display('STARTTIME'); ?></td>
|
||||
<td class="data"><?php printf('%s %s',$so->DURATION,$so->DURUNITS); ?></td>
|
||||
<td class="data"><?php printf('%s %s',$so->PERIOD,$so->PERUNITS); ?></td>
|
||||
<td class="data"><?php echo $so->display('DAYOFWEEK'); ?></td>
|
||||
<td class="data"><?php echo $so->display('PRIORITY'); ?></td>
|
||||
<td class="data"><?php echo count($so->getNodes()); ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
@ -10,11 +10,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 40%;">Node Name</td>
|
||||
<td style="width: 60%;" class="data"><?php echo $node->display('NODE_NAME'); ?> (<?php echo $node->display('TCP_ADDRESS'); ?>)</td>
|
||||
<td style="width: 60%;" class="data"><?php echo $node->display('NODE_NAME'); ?> (<?php echo $node->URL ? HTML::anchor($node->URL,$node->display('TCP_ADDRESS')) : $node->display('TCP_ADDRESS'); ?>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Node Contact</td>
|
||||
<td class="data"><?php echo $node->display('CONTACT'); echo $node->EMAIL_ADDRESS ? ' ('.HTML::mailto($node->EMAIL_ADDRESS).')' : ''; ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Operating Sytem</td>
|
||||
<td class="data"><?php printf('%s (%s)',$node->display('PLATFORM_NAME'),$node->display('CLIENT_OS_LEVEL')); ?></td>
|
||||
<td class="data"><?php echo $node->platform(); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>TSM Client Version</td>
|
||||
@ -105,8 +109,12 @@
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 40%;">Client Option Set</td>
|
||||
<td style="width: 60%;" class="data"><?php echo $node->display('OPTION_SET'); ?></td>
|
||||
<td style="width: 40%;">Domain</td>
|
||||
<td style="width: 60%;" class="data"><?php echo HTML::anchor('domain/detail/'.$node->DOMAIN,$node->display('DOMAIN')); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Client Option Set</td>
|
||||
<td class="data"><?php echo $node->display('OPTION_SET'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Collocation Group</td>
|
||||
@ -140,53 +148,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 50%; vertical-align: top;">
|
||||
<table class="box-full">
|
||||
<tr>
|
||||
<td class="head" colspan="2">Policy Settings</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="head" colspan="2">Backup Settings</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MGMT Class</td>
|
||||
<td>HSM Pool</td>
|
||||
<td>1st Backup Pool</td>
|
||||
<td>Ver Exist</td>
|
||||
<td>Ver Del</td>
|
||||
<td>Frequency</td>
|
||||
</tr>
|
||||
<?php $i=0; foreach ($node->MGMTCLASS->where('SET_NAME','=','ACTIVE')->find_all() as $mco) { ?>
|
||||
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
|
||||
<td class="data"><?php echo $mco->display('CLASS_NAME'); ?><?php echo $mco->DEFAULTMC=='Yes' ? ' <sup>*</sup>' : ''; ?></td>
|
||||
<td class="data"><?php echo $mco->display('MIGDESTINATION'); ?></td>
|
||||
<td class="data"><?php echo $mco->COPYGROUP_BU->display('DESTINATION'); ?></td>
|
||||
<td class="data"><?php printf('%s/%s',$mco->COPYGROUP_BU->display('VEREXISTS'),$mco->COPYGROUP_BU->display('RETEXTRA')); ?></td>
|
||||
<td class="data"><?php printf('%s/%s',$mco->COPYGROUP_BU->display('VERDELETED'),$mco->COPYGROUP_BU->display('RETONLY')); ?></td>
|
||||
<td class="data"><?php echo $mco->COPYGROUP_BU->display('FREQUENCY'); ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="head" colspan="2">Archive Settings</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MGMT Class</td>
|
||||
<td>Destination</td>
|
||||
<td>Retain</td>
|
||||
</tr>
|
||||
<?php $i=0; foreach ($node->MGMTCLASS->where('SET_NAME','=','ACTIVE')->find_all() as $mco) { ?>
|
||||
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
|
||||
<td class="data"><?php echo $mco->display('CLASS_NAME'); ?><?php echo $mco->DEFAULTMC=='Yes' ? ' <sup>*</sup>' : ''; ?></td>
|
||||
<td class="data"><?php echo $mco->COPYGROUP_AR->display('DESTINATION'); ?></td>
|
||||
<td class="data"><?php echo $mco->COPYGROUP_AR->display('RETVER'); ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
<?php echo View::factory('nodes/policy')->set('domain',$node->DOMAIN); ?>
|
||||
</td>
|
||||
<td style="width: 50%; vertical-align: top;">
|
||||
<table class="box-full">
|
||||
|
@ -75,7 +75,7 @@
|
||||
<td>Status</td>
|
||||
<td>Completed</td>
|
||||
<td>Result</td>
|
||||
<tr>
|
||||
</tr>
|
||||
<?php $i=0;foreach ($node->EVENT->find_all() as $eo) { ?>
|
||||
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
|
||||
<td class="data"><?php echo $eo->display('SCHEDULED_START'); ?></td>
|
||||
|
47
application/views/nodes/policy.php
Normal file
47
application/views/nodes/policy.php
Normal file
@ -0,0 +1,47 @@
|
||||
<table class="box-full">
|
||||
<tr>
|
||||
<td class="head" colspan="2">Policy Settings</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="head" colspan="2">Backup Settings</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MGMT Class</td>
|
||||
<td>HSM Pool</td>
|
||||
<td>1st Backup Pool</td>
|
||||
<td>Ver Exist</td>
|
||||
<td>Ver Del</td>
|
||||
<td>Frequency</td>
|
||||
</tr>
|
||||
<?php $i=0; foreach ($domain->MGMTCLASS->where('SET_NAME','=','ACTIVE')->find_all() as $mco) { ?>
|
||||
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
|
||||
<td class="data"><?php echo $mco->display('CLASS_NAME'); ?><?php echo $mco->DEFAULTMC=='Yes' ? ' <sup>*</sup>' : ''; ?></td>
|
||||
<td class="data"><?php echo $mco->display('MIGDESTINATION'); ?></td>
|
||||
<td class="data"><?php echo $mco->COPYGROUP_BU->display('DESTINATION'); ?></td>
|
||||
<td class="data"><?php printf('%s/%s',$mco->COPYGROUP_BU->display('VEREXISTS'),$mco->COPYGROUP_BU->display('RETEXTRA')); ?></td>
|
||||
<td class="data"><?php printf('%s/%s',$mco->COPYGROUP_BU->display('VERDELETED'),$mco->COPYGROUP_BU->display('RETONLY')); ?></td>
|
||||
<td class="data"><?php echo $mco->COPYGROUP_BU->display('FREQUENCY'); ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="head" colspan="2">Archive Settings</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MGMT Class</td>
|
||||
<td>Destination</td>
|
||||
<td>Retain</td>
|
||||
</tr>
|
||||
<?php $i=0; foreach ($domain->MGMTCLASS->where('SET_NAME','=','ACTIVE')->find_all() as $mco) { ?>
|
||||
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
|
||||
<td class="data"><?php echo $mco->display('CLASS_NAME'); ?><?php echo $mco->DEFAULTMC=='Yes' ? ' <sup>*</sup>' : ''; ?></td>
|
||||
<td class="data"><?php echo $mco->COPYGROUP_AR->display('DESTINATION'); ?></td>
|
||||
<td class="data"><?php echo $mco->COPYGROUP_AR->display('RETVER'); ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
@ -1,108 +0,0 @@
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width: 100%; vertical-align: top;">
|
||||
<table class="box-full">
|
||||
<tr>
|
||||
<td class="head">Node Information for Nodes in Domain <?php echo $do->DOMAIN_NAME; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>Node</td>
|
||||
<td>Version</td>
|
||||
<td>Last Access</td>
|
||||
<td>Last IP Addr</td>
|
||||
<?php foreach (Kohana::config('config.tsmpooltypes') as $type) { ?>
|
||||
<td colspan="3" class="right"><?php echo $type; ?>(Vol/Fil/Dat)</td>
|
||||
<?php } ?>
|
||||
</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"><?php echo $no->tsmclientversion(); ?></td>
|
||||
<td class="data"><?php echo $no->display('LASTACC_TIME'); ?></td>
|
||||
<td class="data"><?php echo $no->display('TCP_ADDRESS'); ?></td>
|
||||
<?php foreach (Kohana::config('config.tsmpooltypes') as $type) { ?>
|
||||
<td class="data-right"><?php echo count($no->getStorageTypeVols($type)); ?></td>
|
||||
<td class="data-right"><?php echo $no->getStorageTypeFiles($type); ?></td>
|
||||
<td class="data-right"><?php echo $no->getStorageTypeData($type); ?></td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
</td>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="head">Storage Pools used by nodes in this domain</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table width="50%" class="box-left">
|
||||
<tr>
|
||||
<td colspan="3">Storage Pool</td>
|
||||
<td class="right">Vols</td>
|
||||
<td class="right">Files</td>
|
||||
<td class="right">MB</td>
|
||||
</tr>
|
||||
<?php foreach (Kohana::config('config.tsmdatatypes') as $btype => $ctype) { ?>
|
||||
<tr class="subhead">
|
||||
<td colspan="6"><?php echo $btype; ?></td>
|
||||
</tr>
|
||||
<?php foreach (Kohana::config('config.tsmpooltypes') as $type) { ?>
|
||||
<tr class="subhead">
|
||||
<td> </td>
|
||||
<td colspan="5"><?php echo $type; ?></td>
|
||||
</tr>
|
||||
<?php $i=0; foreach ($do->getStoragePoolsType($btype,$type) as $spo) { ?>
|
||||
<tr class="<?php echo $i++%2 ? 'odd' : 'even'; ?>">
|
||||
<td colspan="2"> </td>
|
||||
<td class="data"><?php echo $spo->STGPOOL_NAME; ?></td>
|
||||
<td class="data-right"><?php echo count($do->getStorageModeVols($ctype,$type,$spo)); ?></td>
|
||||
<td class="data-right"><?php echo $do->getStorageModeFiles($btype,$type,$spo); ?></td>
|
||||
<td class="data-right"><?php echo $do->getStorageModeData($btype,$type,$spo); ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</table>
|
||||
</td>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="head" colspan="2">Sequential Volumes needed to restore Data for Nodes in this domain</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="head" colspan="2">Policy in this domain</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="head" colspan="2">Schedules used in this domain</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
Reference in New Issue
Block a user