histogram: Make histograms crash less
[ninja.git] / application / controllers / pnp.php
blob42e0410278754af9bd57d183e43f0026b2750cfe
1 <?php defined('SYSPATH') OR die('No direct access allowed.');
2 /**
3 * Tactical overview controller
4 * Requires authentication
6 * op5, and the op5 logo are trademarks, servicemarks, registered servicemarks
7 * or registered trademarks of op5 AB.
8 * All other trademarks, servicemarks, registered trademarks, and registered
9 * servicemarks mentioned herein may be the property of their respective owner(s).
10 * The information contained herein is provided AS IS with NO WARRANTY OF ANY
11 * KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY, AND FITNESS FOR A
12 * PARTICULAR PURPOSE.
14 class Pnp_Controller extends Authenticated_Controller {
16 public $model = false;
18 public function __construct()
20 parent::__construct();
21 $this->model = Current_status_Model::instance();
24 public function index($host=false, $srv=false)
26 $host = $this->input->get('host', $host);
27 $srv = $this->input->get('srv', $srv);
29 if(!$host) {
30 $host = '.pnp-internal';
33 $target_link = pnp::url($host, $srv);
34 $this->template->content = '<iframe src="'.$target_link.'" style="width: 100%; height: 600px" frameborder="0" id="iframe"></iframe>';
35 $this->template->title = _('Reporting ยป Graphs');
36 $this->template->disable_refresh = true;
37 $this->xtra_js[] = $this->add_path('/js/iframe-adjust.js');
38 $this->xtra_js[] = $this->add_path('/js/pnp.js');