hello ,in zabbix map link type is limited i think for example our boss wants to put our network map to a tv screen 7/24 but our issue is when we look to map from a distance the link type Bold not enought.it looks too thin
Ad Widget
Collapse
Zabbix Map Link Type Custom
Collapse
X
-
Tags: None
-
You could patch the frontend to make bold even more bold. In the following example (for 2.2.10) the variable $boldMultiplier controls how thick bold links finally become.
Code:--- ./include/draw.inc.php.orig 2015-08-10 12:37:29.000000000 +0200 +++ ./include/draw.inc.php 2015-09-28 22:19:57.000000000 +0200 @@ -81,6 +81,9 @@ $dx = $x2 - $x1; $dy = $y2 - $y1; + // Bold multiplier + $boldMultiplier = 10; + if (abs($dx) > abs($dy)) { if ($dx < 0) { zbx_swap($x1, $x2); @@ -93,13 +96,16 @@ if (LINE_TYPE_BOLD == $style) { $bc = imagecolorsforindex($image, imagecolorat($image, $x, $yint - 1)); $bc = array($bc['red'], $bc['green'], $bc['blue']); - imagesetpixel($image, $x, $yint - 1, zbx_colormix($image, $lc, $bc, $yfrac)); + imagesetpixel($image, $x, $yint - $boldMultiplier, zbx_colormix($image, $lc, $bc, $yfrac)); $bc = imagecolorsforindex($image, imagecolorat($image, $x, $yint + 1)); $bc = array($bc['red'], $bc['green'], $bc['blue']); - imagesetpixel($image, $x, $yint + 1, zbx_colormix($image, $lc, $bc, 1 - $yfrac)); + imagesetpixel($image, $x, $yint + $boldMultiplier, zbx_colormix($image, $lc, $bc, 1 - $yfrac)); - imagesetpixel($image, $x, $yint, $color); + for ($i = $boldMultiplier - 1; $i >= 0; $i--) { + imagesetpixel($image, $x, $yint - $i, $color); + imagesetpixel($image, $x, $yint + $i, $color); + } } else { $bc = imagecolorsforindex($image, imagecolorat($image, $x, $yint)); @@ -125,13 +131,16 @@ if (LINE_TYPE_BOLD == $style) { $bc = imagecolorsforindex($image, imagecolorat($image, $xint - 1, $y)); $bc = array($bc['red'], $bc['green'], $bc['blue']); - imagesetpixel($image, $xint - 1, $y, zbx_colormix($image, $lc, $bc, $xfrac)); + imagesetpixel($image, $xint - $boldMultiplier, $y, zbx_colormix($image, $lc, $bc, $xfrac)); $bc = imagecolorsforindex($image, imagecolorat($image, $xint + 1, $y)); $bc = array($bc['red'], $bc['green'], $bc['blue']); - imagesetpixel($image, $xint + 1, $y, zbx_colormix($image, $lc, $bc, 1 - $xfrac)); + imagesetpixel($image, $xint + $boldMultiplier, $y, zbx_colormix($image, $lc, $bc, 1 - $xfrac)); - imagesetpixel($image, $xint, $y, $color); + for ($i = $boldMultiplier - 1; $i >= 0; $i--) { + imagesetpixel($image, $xint - $i, $y, $color); + imagesetpixel($image, $xint + $i, $y, $color); + } } else { $bc = imagecolorsforindex($image, imagecolorat($image, $xint, $y));
Comment