} else { // We have to disable the sort_menu if we are not in the cluster context $data->assign("is_metrics_picker_disabled", '$("#sort_menu").toggle(); '); $data->assign("picker_metrics", ""); } # # Show sort order if there is more than one physical machine present. # $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); } if ($context == "host") { $metric_cols_menu = make_metric_cols_menu(); } $custom_time = ""; if (in_array($context, array("meta", "cluster", "host", "views", "decompose_graph", "compare_hosts"))) { $examples = "Feb 27 2007 00:00, 2/27/2007, 27.2.2007, now -1 week," . " -2 days, start + 1 hour, etc."; $custom_time = "or <span class=\"nobr\">from <input type=\"TEXT\" title=\"{$examples}\" NAME=\"cs\" ID=\"datepicker-cs\" SIZE=\"17\""; if ($cs) { $custom_time .= " value=\"{$cs}\""; } $custom_time .= "> to <input type=\"TEXT\" title=\"{$examples}\" name=\"ce\" ID=\"datepicker-ce\" SIZE=\"17\""; if ($ce) { $custom_time .= " value=\"{$ce}\""; } $custom_time .= "> <input type=\"submit\" value=\"Go\">\n"; $custom_time .= "<input type=\"button\" value=\"Clear\" onclick=\"ganglia_submit(1)\"></span>\n"; # $custom_time .= $calendar;
$data->assign("host_metrics_count", $host_metrics); $_SESSION['metric_group'] = $new_open_groups; $data->assign("g_metrics_group_data", $metrics_group_data); $data->assign("g_open_metric_groups", $new_open_groups); } $optional_reports = getOptionalReports($hostname, $clustername, $graph_args); // dump_var($optional_reports, "optional_reports"); $data->assign("optional_reports", $optional_reports); getHostOverViewData($hostname, $metrics, $cluster, $hosts_up, $hosts_down, $always_timestamp, $always_constant, $data); # No reason to go on if this node is down. if ($hosts_down) { $dwoo->output($tpl, $data); return; } $data->assign('columns_dropdown', 1); $data->assign("metric_cols_menu", make_metric_cols_menu($conf['metriccols'])); $data->assign("size_menu", $size_menu); $size = isset($clustergraphsize) ? $clustergraphsize : 'default'; //set to 'default' to preserve old behavior $size = $size == 'medium' ? 'default' : $size; // set host zoom class based on the size of the graph shown $additional_host_img_css_classes = ""; if (isset($conf['zoom_support']) && $conf['zoom_support'] === true) { $additional_host_img_css_classes = "host_{$size}_zoomable"; } $data->assign("additional_host_img_css_classes", $additional_host_img_css_classes); # in case this is not defined, set to LOCALTIME so uptime will be 0 # in the display if (!isset($metrics['boottime']['VAL'])) { $metrics['boottime']['VAL'] = $cluster['LOCALTIME']; }