diff options
| author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-07-16 10:01:08 +0000 |
|---|---|---|
| committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-07-16 10:01:08 +0000 |
| commit | 4e4aa7eb198963720b377cd568825309616dce8a (patch) | |
| tree | e1c0bb863be19aeb630bf5ef77fb8c3c8e27731f /frontends/php/include/screens.inc.php | |
| parent | bac3a136113548551ad7320cc8a8ed7ecbb2e11a (diff) | |
| download | zabbix-4e4aa7eb198963720b377cd568825309616dce8a.tar.gz zabbix-4e4aa7eb198963720b377cd568825309616dce8a.tar.xz zabbix-4e4aa7eb198963720b377cd568825309616dce8a.zip | |
- added pie graphs (Artem)
- added subclasses chart.inc.php and pie.inc.php, extending graph.inc.php (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@4458 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/screens.inc.php')
| -rw-r--r-- | frontends/php/include/screens.inc.php | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/frontends/php/include/screens.inc.php b/frontends/php/include/screens.inc.php index 7194dd25..664815ba 100644 --- a/frontends/php/include/screens.inc.php +++ b/frontends/php/include/screens.inc.php @@ -329,11 +329,28 @@ $action = "charts.php?graphid=$resourceid".url_param("period"). url_param("inc").url_param("dec"); - $item = new CLink( - new CImg("chart2.php?graphid=$resourceid&width=$width&height=$height". - "&period=$effectiveperiod".url_param("stime").url_param("from")), - $action - ); + $graphtype = GRAPH_TYPE_NORMAL; + + $sql = 'SELECT DISTINCT `graphtype` FROM `graphs` WHERE `graphid`='.$resourceid; + $res = DBselect($sql); + + while($rows = DBfetch($res)){ + $graphtype = $rows['graphtype']; + } + + if(($graphtype == GRAPH_TYPE_PIE) || ($graphtype == GRAPH_TYPE_EXPLODED)){ + $item = new CLink( + new CImg("chart6.php?graphid=$resourceid&width=$width&height=$height"."&period=$effectiveperiod".url_param("stime").url_param("from")), + $action + ); + } + else { + $item = new CLink( + new CImg("chart2.php?graphid=$resourceid&width=$width&height=$height"."&period=$effectiveperiod".url_param("stime").url_param("from")), + $action + ); + + } } elseif( ($screenitemid!=0) && ($resourcetype==SCREEN_RESOURCE_SIMPLE_GRAPH) ) { |
