Exemple #1
0
 public function __construct()
 {
     $this->available_views = get_available_views();
 }
Exemple #2
0
<div class="ui-widget">
  <div class="ui-state-default ui-corner-all" style="padding: 0 .7em;"> 
    <p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span> 
    <?php echo $output ?></p>
  </div>
</div>
<?php
  exit(1);
} 



// Load the metric caching code we use if we need to display graphs
require_once('./cache.php');

$available_views = get_available_views();

// Pop up a warning message if there are no available views
if ( sizeof($available_views) == 0 ) {
    ?>
	<div class="ui-widget">
			  <div class="ui-state-error ui-corner-all" style="padding: 0 .7em;"> 
				  <p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span> 
				  <strong>Alert:</strong> There are no views defined.</p>
			  </div>
	</div>
  <?php
} else {

  if ( !isset($_GET['view_name']) ) {
    if ( sizeof($available_views) == 1 )
Exemple #3
0
function rrdtool_graph_build_view_graph($rrdtool_graph, $view_name, $item_id, $context, $size, $conf_rrds, $conf_graphreport_stats, $conf_graphreport_stat_items)
{
    $available_views = get_available_views();
    foreach ($available_views as $view) {
        // Find view settings
        if ($view_name == $view['view_name']) {
            break;
        }
    }
    foreach ($view['items'] as $view_item) {
        if ($item_id == $view_item['item_id']) {
            break;
        }
    }
    $rrdtool_graph = rrdtool_graph_merge_args_from_json($rrdtool_graph, $view_item, $context, $size, $conf_rrds, $conf_graphreport_stats, $conf_graphreport_stat_items);
    return array($rrdtool_graph, $view_item);
}