コード例 #1
0
ファイル: cluster_view.php プロジェクト: fjpqzm/ganglia-web
    }
    //////////////////////////////////////////////////////////////////////////////
    // 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) {
    get_load_heatmap($hosts_up, $user['host_regex'], $metrics, $data, $sort);
}
$data->assign("conf", $conf);
$data->assign("showhosts", $showhosts);
// No reason to go on if we are not displaying individual hosts
if (!is_array($hosts_up) or !$showhosts) {
    $dwoo->output($tpl, $data);
    return;
}
///////////////////////////////////////////////////////////////////////////////
// Show stacked graphs
///////////////////////////////////////////////////////////////////////////////
if (isset($conf['show_stacked_graphs']) and $conf['show_stacked_graphs'] == 1 and !preg_match("/_report\$/", $user['metricname'])) {
    $cluster_url = rawurlencode($clustername);
    $stacked_args = "m={$user['metricname']}&c={$cluster_url}&r={$range}&st={$cluster['LOCALTIME']}";
    if (isset($user['host_regex'])) {
コード例 #2
0
ファイル: cluster_view.php プロジェクト: reznor/ganglia-web
    ///////////////////////////////////////////////////////////////////////////////
    // End Host Display Controller
    ///////////////////////////////////////////////////////////////////////////////
}
if (!(isset($conf['heatmaps_enabled']) and $conf['heatmaps_enabled'] == 1)) {
    get_load_pie($showhosts, $hosts_up, $hosts_down, $user, $conf, $metrics, $cluster, $name, $data);
}
get_host_metric_graphs($showhosts, $hosts_up, $hosts_down, $user, $conf, $metrics, $metricname, $sort, $clustername, $get_metric_string, $cluster, $always_timestamp, $reports[$metricname], $clustergraphsize, $range, $cs, $ce, $vlabel, $data);
// No reason to go on if we have no up hosts.
if (!is_array($hosts_up) or !$showhosts) {
    $dwoo->output($tpl, $data);
    return;
}
///////////////////////////////////////////////////////////////////////////////
// Creates a heatmap
///////////////////////////////////////////////////////////////////////////////
if (isset($conf['heatmaps_enabled']) and $conf['heatmaps_enabled'] == 1) {
    get_load_heatmap($hosts_up, $user, $metrics, $data);
}
///////////////////////////////////////////////////////////////////////////////
// Show stacked graphs
///////////////////////////////////////////////////////////////////////////////
if (isset($conf['show_stacked_graphs']) and $conf['show_stacked_graphs'] == 1 and !preg_match("/_report\$/", $metricname)) {
    $cluster_url = rawurlencode($clustername);
    $stacked_args = "m={$metricname}&c={$cluster_url}&r={$range}&st={$cluster['LOCALTIME']}";
    if (isset($user['host_regex'])) {
        $stacked_args .= "&host_regex=" . $user['host_regex'];
    }
    $data->assign("stacked_graph_args", $stacked_args);
}
$dwoo->output($tpl, $data);