add_triggerExpressions($map['selements']);
    $areas = populateFromMapAreas($map);
    $mapInfo = getSelementsInfo($map, array('severity_min' => get_request('severity_min')));
    processAreasCoordinates($map, $areas, $mapInfo);
    $allLinks = false;
}
/*
 * Draw map
 */
drawMapConnectors($im, $map, $mapInfo, $allLinks);
if (!isset($_REQUEST['noselements'])) {
    drawMapHighligts($im, $map, $mapInfo);
    drawMapSelements($im, $map, $mapInfo);
}
$expandMacros = get_request('expand_macros', true);
drawMapLabels($im, $map, $mapInfo, $expandMacros);
drawMapLinkLabels($im, $map, $mapInfo, $expandMacros);
if (!isset($_REQUEST['noselements']) && $map['markelements'] == 1) {
    drawMapSelementsMarks($im, $map, $mapInfo);
}
show_messages();
if (get_request('base64image')) {
    ob_start();
    imagepng($im);
    $imageSource = ob_get_contents();
    ob_end_clean();
    $json = new CJSON();
    echo $json->encode(array('result' => base64_encode($imageSource)));
    imagedestroy($im);
} else {
    imageOut($im);
Esempio n. 2
0
    add_triggerExpressions($map['selements']);
    $areas = populateFromMapAreas($map);
    $mapInfo = getSelementsInfo($map, ['severity_min' => getRequest('severity_min')]);
    processAreasCoordinates($map, $areas, $mapInfo);
    $allLinks = false;
}
/*
 * Draw map
 */
drawMapConnectors($im, $map, $mapInfo, $allLinks);
if (!isset($_REQUEST['noselements'])) {
    drawMapHighligts($im, $map, $mapInfo);
    drawMapSelements($im, $map, $mapInfo);
}
$expandMacros = getRequest('expand_macros', true);
drawMapLabels($im, $map, $mapInfo, $expandMacros, $graphtheme);
drawMapLinkLabels($im, $map, $mapInfo, $expandMacros, $graphtheme);
if (!isset($_REQUEST['noselements']) && $map['markelements'] == 1) {
    drawMapSelementsMarks($im, $map, $mapInfo);
}
show_messages();
if (getRequest('base64image')) {
    ob_start();
    imagepng($im);
    $imageSource = ob_get_contents();
    ob_end_clean();
    $json = new CJson();
    echo $json->encode(['result' => base64_encode($imageSource)]);
    imagedestroy($im);
} else {
    imageOut($im);
Esempio n. 3
0
} else {
    $areas = populateFromMapAreas($map);
    $map_info = getSelementsInfo($map);
    processAreasCoordinates($map, $areas, $map_info);
    $allLinks = false;
}
/*
 * Draw map
 */
drawMapConnectors($im, $map, $map_info, $allLinks);
if (!isset($_REQUEST['noselements'])) {
    drawMapHighligts($im, $map, $map_info);
    drawMapSelements($im, $map, $map_info);
}
$expand_macros = get_request('expand_macros', true);
drawMapLabels($im, $map, $map_info, $expand_macros);
drawMapLinkLabels($im, $map, $map_info, $expand_macros);
if (!isset($_REQUEST['noselements']) && $map['markelements'] == 1) {
    drawMapSelementsMarks($im, $map, $map_info);
}
show_messages();
if (get_request('base64image')) {
    ob_start();
    imagepng($im);
    $imageSource = ob_get_contents();
    ob_end_clean();
    $json = new CJSON();
    echo $json->encode(array('result' => base64_encode($imageSource)));
    imagedestroy($im);
} else {
    imageOut($im);
Esempio n. 4
0
} else {
    $map['selements'] = zbx_toHash($map['selements'], 'selementid');
}
if (isset($_REQUEST['links']) || isset($_REQUEST['nolinks'])) {
    $map['links'] = get_request('links', '[]');
    $map['links'] = $json->decode($map['links'], true);
} else {
    $map['links'] = zbx_toHash($map['links'], 'linkid');
}
//SDI($selements);
$map_info = getSelementsInfo($map);
// Draw MAP
drawMapConnectors($im, $map, $map_info);
if (!isset($_REQUEST['noselements'])) {
    drawMapHighligts($im, $map, $map_info);
    drawMapSelements($im, $map, $map_info);
}
drawMapLabels($im, $map, $map_info);
drawMapLinkLabels($im, $map, $map_info);
if (!isset($_REQUEST['noselements']) && $map['markelements'] == 1) {
    drawMapSelemetsMarks($im, $map, $map_info);
}
//--
imagestringup($im, 0, imagesx($im) - 10, imagesy($im) - 50, S_ZABBIX_URL, $colors['Gray']);
if (!isset($_REQUEST['border'])) {
    imagerectangle($im, 0, 0, $width - 1, $height - 1, $colors['Black']);
}
show_messages();
imageOut($im);
imagedestroy($im);
include_once 'include/page_footer.php';