summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--frontends/php/map.html10
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 596b04ad..615e5494 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
Changes for 1.0alpha8:
+ - improved performance of network map
- added column icon to table sysmaps_hosts
- added images Hub.png, Notebook.png, Printer.png, Router.png, Server.png, host.png
- created table help
diff --git a/frontends/php/map.html b/frontends/php/map.html
index 0f6a79af..694337ed 100644
--- a/frontends/php/map.html
+++ b/frontends/php/map.html
@@ -75,6 +75,7 @@
# Draw hosts
+ $icons=array();
$result=DBselect("select h.host,sh.shostid,sh.sysmapid,sh.hostid,sh.label,sh.x,sh.y,h.status,sh.icon from sysmaps_hosts sh,hosts h where sh.sysmapid=$sysmapid and h.hostid=sh.hostid");
for($i=0;$i<DBnum_rows($result);$i++)
{
@@ -88,7 +89,12 @@
$status=DBget_field($result,$i,7);
$icon=DBget_field($result,$i,8);
- $img=ImageCreateFromPNG("images/sysmaps/$icon.png");
+ if(@gettype($icons["$icon"])!="resource")
+ {
+ $icons[$icon]=ImageCreateFromPNG("images/sysmaps/$icon.png");
+ }
+
+ $img=$icons[$icon];
ImageCopy($im,$img,$x,$y,0,0,ImageSX($img),ImageSY($img));
@@ -130,7 +136,7 @@
# ImageFilledRectangle($im,$x+ImageSX($img)/2-ImageFontWidth(2)*strlen($label)/2-2, $y+ImageSY($img),$x+ImageSX($img)/2+ImageFontWidth(2)*strlen($label)/2, $y+ImageSY($img)+ImageFontHeight(2),$white);
# ImageString($im, 2, $x+ImageSX($img)/2-ImageFontWidth(2)*strlen($label)/2, $y+ImageSY($img)+ImageFontHeight(2), $label,$color);
- ImageDestroy($img);
+# ImageDestroy($img);
}
ImageString($im,0,$width-147,$height-10, "http://zabbix.sourceforge.net", $gray);