%s defined nodes.'),$no->cached(0)->count_all());
$output .= '
';
$output .= '
';
$select = array();
$select[NULL] = '';
foreach ($no->find_all() as $node)
$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 .= Form::submit('form_submit',_('Go'));
$output .= Form::close();
Script::add(array(
'type'=>'stdin',
'data'=>'
$(document).ready(function () {$("#node_name").change(function () {
$("#node_detail").trigger("submit");
});});'
));
Block::add(array(
'title'=>_('TSM Nodes'),
'body'=>$output,
));
}
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');
$no = ORM::factory('node',$node_name);
Block::add(array(
'title'=>sprintf('%s %s',_('Detailed Node Information for'),$no->NODE_NAME),
'body'=>View::factory('nodes/detail')->set('node',$no),
));
Block::add(array(
'title'=>_('Protected File System Information'),
'body'=>View::factory('nodes/detail_filesystem')->set('node',$no),
));
Block::add(array(
'title'=>_('Sequential Volume Usage Information'),
'body'=>View::factory('nodes/detail_volumes')->set('node',$no),
));
Block::add(array(
'title'=>_('Schedule Information'),
'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)
));
}
}
?>