Added Client Session graphing

This commit is contained in:
Deon George
2012-12-12 21:39:00 +11:00
parent 12a2a53ef7
commit d84d7de251
9 changed files with 195 additions and 20 deletions

View File

@@ -16,6 +16,10 @@ class Model_ACTSUM extends ORM_TSM {
'START_TIME'=>'ASC',
);
protected $_has_one = array(
'NODE'=>array('foreign_key'=>'NODE_NAME','far_key'=>'ENTITY'),
);
protected $_display_filters = array(
'START_TIME'=>array(
array('ORM_TSM::date',array(':value','d-M H:i')),
@@ -32,6 +36,16 @@ class Model_ACTSUM extends ORM_TSM {
return ORM_TSM::date(ORM::factory('ACTLOG')->FirstRec(),'U') <= $this->start();
}
/**
* Get the ACTIVITY LOG data for this SESSION
*/
public function actlog() {
if (! isset($this->ENTITY))
throw new Kohana_Exception('Activity Summary has no NODENAME data');
return $this->NODE->actlog_session($this->NUMBER,$this->start());
}
/**
* Return this ACTIVITY SUMMARY in GB
*/