Fixes for Client Session graphing

This commit is contained in:
Deon George 2012-12-12 22:11:42 +11:00
parent d84d7de251
commit 31609b2121
3 changed files with 33 additions and 23 deletions

View File

@ -39,31 +39,41 @@ class Controller_Node extends Controller_TemplateDefault_View {
$result = array();
foreach ($aso->actlog() as $alo) {
foreach ($aso->actlog() as $alo)
$result = array_merge($result,$alo->msgtrim());
}
if (! $result)
continue;
$google->pdata($aso->display('START_TIME'),array(
'yr'=>array(
'OBJECT_TOTAL'=>$result['OBJECT_TOTAL'],
'OBJECT_BACKUP'=>$result['OBJECT_BACKUP'],
'OBJECT_DELETED'=>$result['OBJECT_DELETED'],
'OBJECT_UDPATE'=>$result['OBJECT_UDPATE'],
'OBJECT_FAILED'=>$result['OBJECT_FAILED'],
'OBJECT_REBOUND'=>$result['OBJECT_REBOUND'],
'OBJECT_EXPIRED'=>$result['OBJECT_EXPIRED'],
'OJBECT_DEDUPED'=>$result['OJBECT_DEDUPED'],
),
'yl'=>array(
'BYTES_INSPECT'=>$result['BYTES_INSPECT'],
'BYTES_PROCESS'=>$result['BYTES_PROCESS'],
'BYTES_TRANSFER'=>$result['BYTES_TRANSFER'],
'BYTES_DEDUPE_BEFORE'=>$result['BYTES_DEDUPE_BEFORE'],
),
));
$yr = $yl = array();
// Process our YR columns
foreach (array(
'OBJECT_TOTAL',
'OBJECT_BACKUP',
'OBJECT_DELETED',
'OBJECT_UDPATE',
'OBJECT_FAILED',
'OBJECT_REBOUND',
'OBJECT_EXPIRED',
'OJBECT_DEDUPED',
) as $c)
if (isset($result[$c]) AND $result[$c])
$yr[$c] = $result[$c];
// Process our YL columns
foreach (array(
'BYTES_INSPECT',
'BYTES_PROCESS',
'BYTES_TRANSFER',
'BYTES_DEDUPE_BEFORE',
'BYTES_DEDUPE_AFTER',
) as $c)
if (isset($result[$c]) AND $result[$c])
$yl[$c] = $result[$c];
// Process our YR columns
$google->pdata($aso->display('START_TIME'),array('yr'=>$yr,'yl'=>$yl));
}
$this->auto_render = FALSE;

View File

@ -24,7 +24,7 @@ class Model_ACTLOG extends ORM_TSM {
private $_msgno_ba_objects = array(
4952=>array('msg'=>'ANE4952I Total number of objects inspected:\s+([0-9,]+).*','id'=>'OBJECT_TOTAL'),
4953=>array('msg'=>'','id'=>''),
4953=>array('msg'=>'ANE4953I Total number of objects archived:\s+([0-9,]+).*','id'=>'OBJECT_TOTAL'),
4954=>array('msg'=>'ANE4954I Total number of objects backed up:\s+([0-9,]+).*','id'=>'OBJECT_BACKUP'),
4957=>array('msg'=>'ANE4957I Total number of objects deleted:\s+([0-9,]+).*','id'=>'OBJECT_DELETED'),
4958=>array('msg'=>'ANE4958I Total number of objects updated:\s+([0-9,]+).*','id'=>'OBJECT_UDPATE'),
@ -38,7 +38,7 @@ class Model_ACTLOG extends ORM_TSM {
4977=>array('msg'=>'ANE4977I Total number of bytes inspected:\s+([0-9,\.]+) ([KMG]B).*','id'=>'BYTES_INSPECT'),
4975=>array('msg'=>'ANE4975I Total number of bytes processed:\s+([0-9,\.]+) ([KMG]B).*','id'=>'BYTES_PROCESS'),
4984=>array('msg'=>'ANE4984I Total bytes before deduplication:\s+([0-9,\.]+) ([KMG]B).*','id'=>'BYTES_DEDUPE_BEFORE'),
4198=>array('msg'=>'','id'=>''),
4198=>array('msg'=>'ANE4198I Total bytes after deduplication:\s+([0-9,\.]+) ([KMG]B).*','id'=>'BYTES_DEDUPE_AFTER'),
);
private $_msgno_ba_transfer = array(
4963=>array('msg'=>'ANE4963I Data transfer time:\s+([0-9,\.]+).*','id'=>'TRANSFER_SEC'),

View File

@ -68,7 +68,7 @@ class GoogleChart_ComboChart extends GoogleChart {
array_push($data,array('v'=>$k));
foreach ($this->_axis as $l => $axis)
array_push($data,array('v'=>$v[$l]));
array_push($data,array('v'=>isset($v[$l]) ? $v[$l] : 0));
$return['rows'][] = array('c'=>$data);
}