예제 #1
0
$viewList = new ViewList();
$dwoo = new Dwoo($conf['dwoo_compiled_dir'], $conf['dwoo_cache_dir']);
$tpl = new Dwoo_Template_File(template("view_content.tpl"));
$data = new Dwoo_Data();
$size = isset($clustergraphsize) ? $clustergraphsize : 'default';
// set to 'default' to preserve old behavior
if ($size == 'medium') {
    $size = 'default';
}
$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);
$view_items = NULL;
$view = $viewList->getView($view_name);
if ($view != NULL) {
    $range = isset($_GET["r"]) ? escapeshellcmd(rawurldecode($_GET["r"])) : NULL;
    $cs = isset($_GET["cs"]) ? escapeshellcmd($_GET["cs"]) : NULL;
    $ce = isset($_GET["ce"]) ? escapeshellcmd($_GET["ce"]) : NULL;
    if ($cs or $ce) {
        $range = "custom";
    }
    $view_items = getViewItems($view, $range, $cs, $ce);
}
if (isset($view_items)) {
    $data->assign("view_items", $view_items);
    $data->assign("number_of_view_items", count($view_items));
    if ($view['common_y_axis'] != 0) {
        $data->assign("common_y_axis", 1);
    }