function __statistics($hidden = true) { $data = ''; if ($hidden === true) { require_once $this->openqrm->get('basedir') . '/plugins/collectd/web/class/collectd.controller.class.php'; $controller = new collectd_controller($this->openqrm, $this->response); $controller->actions_name = $this->actions_name; $controller->tpldir = $this->openqrm->get('basedir') . '/plugins/collectd/web/tpl/'; $controller->message_param = $this->message_param; $controller->image_path = 'api.php?action=collectd&' . $controller->actions_name . '=image'; $controller->image_width = 600; $controller->image_height = 150; $controller->action = 'statistics'; $data = $controller->statistics(); $data = $data['value']; } $content['label'] = $this->lang['appliances']['tab']; $content['value'] = $data; $content['target'] = $this->response->html->thisfile; $content['request'] = $this->response->get_array($this->actions_name, 'appliances'); $content['onclick'] = false; if ($this->action === 'statistics') { $content['active'] = true; } return $content; }