More fixes to work with KH 3.3

This commit is contained in:
Deon George
2013-01-04 15:13:48 +11:00
parent 6db02ae77d
commit 19411b6352
10 changed files with 49 additions and 39 deletions

View File

@@ -54,9 +54,9 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
$google = GoogleChart::factory('ComboChart');
foreach ($data['data'] as $key => $values)
$google->data(array('yl'=>$key),array($key=>$values));
$google->sdata(array('yl'=>$key),array($key=>$values));
$google->data(array('yr'=>'services'),array('services'=>$data['svs']));
$google->sdata(array('yr'=>'services'),array('services'=>$data['svs']));
$this->auto_render = FALSE;
$this->response->headers('Content-Type','application/json');
@@ -195,16 +195,11 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin {
public function action_listadslservices() {
$svs = ORM::factory('Service')->list_bylistgroup('ADSL');
$data = $this->consoltraffic($svs,time());
$google = GoogleChart::factory('ComboChart')
->dataurl(URL::site('admin/service/ajaxjson_traffic'))
->title(sprintf('ADSL traffic as at %s',date('Y-m-d',strtotime('yesterday'))));
foreach ($data['data'] as $key => $values)
$google->data(array('yl'=>$key),array($key=>$values));
$google->data(array('yr'=>'services'),array('services'=>$data['svs']));
Block::add(array('body'=>(string)$google));
Block::add(array(