diff options
author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-04-12 14:24:05 +0000 |
---|---|---|
committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-04-12 14:24:05 +0000 |
commit | 7bcea294d44454612408a1d767b6542c3a318c4b (patch) | |
tree | 7519895ff34bb9ea61cbf9ec8dbd0d53e95f9e14 /frontends/php | |
parent | 4a63d35d87dd4e72db91d32f258f9100ae529ce6 (diff) | |
download | zabbix-7bcea294d44454612408a1d767b6542c3a318c4b.tar.gz zabbix-7bcea294d44454612408a1d767b6542c3a318c4b.tar.xz zabbix-7bcea294d44454612408a1d767b6542c3a318c4b.zip |
- added vertical text for OVERVIEW (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2733 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php')
-rw-r--r-- | frontends/php/css.css | 2 | ||||
-rw-r--r-- | frontends/php/include/items.inc.php | 2 | ||||
-rw-r--r-- | frontends/php/include/triggers.inc.php | 2 | ||||
-rw-r--r-- | frontends/php/vtext.php | 49 |
4 files changed, 53 insertions, 2 deletions
diff --git a/frontends/php/css.css b/frontends/php/css.css index 76ecfdc2..cf63ce3b 100644 --- a/frontends/php/css.css +++ b/frontends/php/css.css @@ -280,6 +280,8 @@ table.tableinfo tr.header td { } table.tableinfo tr.vertical_header td { padding: 0; + padding-top: 5; + padding-bottom: 5; margin: 0; white-space: nowrap; word-spacing: nowrap; diff --git a/frontends/php/include/items.inc.php b/frontends/php/include/items.inc.php index 13820bbd..e7ee6f67 100644 --- a/frontends/php/include/items.inc.php +++ b/frontends/php/include/items.inc.php @@ -474,7 +474,7 @@ " group by h.host,h.hostid order by h.host"); while($row=DBfetch($result)) { - $header=array_merge($header,array(do_vertival_text($row["host"]))); + $header=array_merge($header,array(new CImg("vtext.php?text=".$row["host"]))); $hosts=array_merge($hosts,array($row["hostid"])); } $table->SetHeader($header,"vertical_header"); diff --git a/frontends/php/include/triggers.inc.php b/frontends/php/include/triggers.inc.php index cd04bb27..b28d500f 100644 --- a/frontends/php/include/triggers.inc.php +++ b/frontends/php/include/triggers.inc.php @@ -964,7 +964,7 @@ " group by h.host,h.hostid order by h.host"); while($row=DBfetch($result)) { - $header=array_merge($header,array(do_vertival_text($row["host"]))); + $header=array_merge($header,array(new CImg("vtext.php?text=".$row["host"]))); $hosts=array_merge($hosts,array($row["hostid"])); } $table->SetHeader($header,"vertical_header"); diff --git a/frontends/php/vtext.php b/frontends/php/vtext.php new file mode 100644 index 00000000..5ce61bc2 --- /dev/null +++ b/frontends/php/vtext.php @@ -0,0 +1,49 @@ +<?php +/* +** ZABBIX +** Copyright (C) 2000-2005 SIA Zabbix +** +** This program is free software; you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation; either version 2 of the License, or +** (at your option) any later version. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +**/ +?> +<?php + include "include/config.inc.php"; + +# PARAMETERS: + +# itemid +# type + + $text = get_request("text","");; + $font = get_request("font",3); + + $width = ImageFontWidth($font) * strlen($text); + $height = ImageFontHeight($font); + +// Header( "Content-type: text/html"); + Header( "Content-type: image/png"); + Header( "Expires: Mon, 17 Aug 1998 12:51:50 GMT"); + + $im = imagecreate($height,$width); + + $backgroud_color = ImageColorAllocate($im,255,255,255); + $text_color = ImageColorAllocate($im,0,0,0); + + ImageStringUp($im,$font,0,$width-1,$text,$text_color); + imagecolortransparent($im,$backgroud_color); + + ImageOut($im); + ImageDestroy($im); +?> |