if (isset($user['max_graphs']) && is_numeric($user['max_graphs'])) { $max_graphs = $user['max_graphs']; } else { $max_graphs = $conf['max_graphs']; } $max_graphs_values = "<option value=0>all</option>"; foreach ($max_graphs_options as $value) { if ($max_graphs == $value) { $max_graphs_values .= "<option selected>" . $value . "</option>"; } else { $max_graphs_values .= "<option>" . $value . "</option>"; } } $data->assign("additional_filter_options", ""); if ($showhosts) { $data->assign("additional_filter_options", 'Show only nodes matching <input name=host_regex ' . $set_host_regex_value . '>' . '<input class="header_btn" type="SUBMIT" VALUE="Filter">' . '<div style="display:inline;padding-left:10px;" class="nobr">Max graphs to show <select onChange="ganglia_submit();" name="max_graphs">' . $max_graphs_values . '</select></div>' . '<div style="display:inline;padding-left:10px;" class="nobr">' . make_sort_menu($context, $sort) . '</div>'); } ////////////////////////////////////////////////////////////////////////////// // End Host Display Controller ////////////////////////////////////////////////////////////////////////////// } if (count($hosts_up) == 0 || !(isset($conf['heatmaps_enabled']) and $conf['heatmaps_enabled'] == 1)) { get_load_pie($showhosts, $hosts_up, $hosts_down, $user, $conf, $metrics, $cluster, $name, $data); } if ($showhosts != 0) { get_host_metric_graphs($showhosts, $hosts_up, $hosts_down, $user, $conf, $metrics, $user['metricname'], $sort, $clustername, $get_metric_string, $cluster, $always_timestamp, $reports[$user['metricname']], $clustergraphsize, $range, $start, $end, $cs, $ce, $vlabel, $data); } /////////////////////////////////////////////////////////////////////////////// // Creates a heatmap /////////////////////////////////////////////////////////////////////////////// if (isset($conf['heatmaps_enabled']) and $conf['heatmaps_enabled'] == 1 and count($hosts_up) > 0) {
if ($physical) { $node_menu .= hiddenvar("p", $physical); } # Save other CGI variables $node_menu .= hiddenvar("cr", $controlroom); $node_menu .= hiddenvar("js", $jobstart); $node_menu .= hiddenvar("jr", $jobrange); } $data->assign("node_menu", $node_menu); # # If there are graphs present, show ranges. # $range_menu = make_range_menu($physical, $jobrange, $cs, $ce, $range); $data->assign("range_menu", $range_menu); if ($context == 'meta') { $sort_menu = make_sort_menu($context, $sort); $data->assign("sort_menu", $sort_menu); } if ($context == "physical" or $context == "cluster" or $context == 'host') { $cols_menu = make_cols_menu(); $size_menu = make_size_menu($clustergraphsize, $context); } $custom_time = ""; $timezone_picker = ""; if (in_array($context, array("meta", "cluster", "cluster-summary", "host", "views", "decompose_graph", "compare_hosts"))) { $custom_time = make_custom_time_selector($cs, $ce); $timezone_picker = make_timezone_picker(); #$tpl->assign("custom_time_head", $calendar_head); $data->assign("custom_time_head", ""); } else { $data->assign("custom_time_head", "");