Fixes for traffic, manage_button and SSL work

This commit is contained in:
Deon George
2012-10-22 23:24:28 +11:00
parent 59321a6877
commit 002c3b8f44
7 changed files with 42 additions and 11 deletions

View File

@@ -73,6 +73,24 @@ class Controller_Admin_SSL extends Controller_TemplateDefault_Admin {
'title'=>sprintf('%s: %s (%s)',_('View SSL CA Certificate'),$id,ORM::factory('ssl_ca',$id)->display('sign_cert')),
'body'=>$this->add_view($id,$output),
));
Block::add(array(
'title'=>_('Services using this Certificate'),
'body'=>Table::display(
ORM::factory('ssl_ca',$id)->list_issued(),
25,
array(
'id'=>array('label'=>'ID','url'=>'admin/service/view/'),
'plugin()->dn()'=>array('label'=>'Cert'),
'plugin()->valid_to(TRUE)'=>array('label'=>'Expires'),
),
array(
'page'=>TRUE,
'type'=>'select',
'form'=>'admin/service/view',
)),
));
}
}
?>

View File

@@ -17,7 +17,8 @@ class Model_SSL_CA extends ORMOSB {
protected $_belongs_to = array(
);
protected $_has_one = array(
protected $_has_many = array(
'service'=>array('through'=>'service__ssl'),
);
protected $_display_filters = array(
@@ -65,5 +66,9 @@ class Model_SSL_CA extends ORMOSB {
// Save the record
return parent::save($validation);
}
public function list_issued() {
return $this->service->find_all();
}
}
?>