histogram: Make histograms crash less
[ninja.git] / application / controllers / nagvis.php
blob2255dc6edf5bef391057220e5847e3eee8a19b91
1 <?php defined('SYSPATH') OR die('No direct access allowed.');
2 /**
3 * Nagvis controller
5 * op5, and the op5 logo are trademarks, servicemarks, registered servicemarks
6 * or registered trademarks of op5 AB.
7 * All other trademarks, servicemarks, registered trademarks, and registered
8 * servicemarks mentioned herein may be the property of their respective owner(s).
9 * The information contained herein is provided AS IS with NO WARRANTY OF ANY
10 * KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY, AND FITNESS FOR A
11 * PARTICULAR PURPOSE.
13 class Nagvis_Controller extends Authenticated_Controller {
14 public function __call($name, $args)
16 $this->template->disable_refresh = true;
17 $this->template->title = _('Monitoring') . ' » NagVis';
18 $this->template->breadcrumb = _('Monitoring') . ' » '
19 . '<a href="' . Kohana::config('config.site_domain') .
20 'index.php/nagvis/index">NagVis</a> » ';
21 $this->template->content = $this->add_view('nagvis/index');
22 $this->xtra_js[] = $this->add_path('/js/iframe-adjust.js');
24 $queryparams = http_build_query($_GET, '', '&amp;');
25 switch($name) {
26 case 'index':
27 case 'configure':
28 $this->template->content->params = $queryparams;
29 break;
30 case 'view':
31 case 'edit':
32 $this->template->content->params = 'mod=Map&amp;act=view&amp;show='.$args[0].'&amp;'.$queryparams;
33 break;
34 case 'automap':
35 if (isset($args[1]))
36 $queryparams .= '&amp;root='.$args[1];
37 $this->template->content->params = 'mod=Map&amp;act=view&amp;show=automap&amp;'.$queryparams;
38 break;
39 case 'rotate':
40 $this->template->content->params = 'mod=Map&amp;act=view&amp;show='.$args[1].'&amp;rotation='.$args[0].'&amp;rotationStep=0&amp;'.$queryparams;
41 break;
42 default:
43 return parent::__call($name, $args);