$mapInfo[$selement['selementid']]['name'] = $selement['elementtype'] == SYSMAP_ELEMENT_TYPE_IMAGE ? _('Image') : $selement['elementName']; } $allLinks = true; } else { // we need selements to be a hash for further processing $map['selements'] = zbx_toHash($map['selements'], 'selementid'); 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();
if (isset($_REQUEST['selements']) || isset($_REQUEST['noselements'])) { $map['selements'] = get_request('selements', '[]'); $map['selements'] = $json->decode($map['selements'], true); } 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();