diff options
author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-05-22 14:12:44 +0000 |
---|---|---|
committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-05-22 14:12:44 +0000 |
commit | 6a552162aec2f5792283711b4045b2a46eb51cd0 (patch) | |
tree | 6aa24787e5f4e11455d494b2b79ddc2493793419 /frontends/php/charts.php | |
parent | d25027cf11279e91edd6658f4c5f9e7a35231b43 (diff) | |
download | zabbix-6a552162aec2f5792283711b4045b2a46eb51cd0.tar.gz zabbix-6a552162aec2f5792283711b4045b2a46eb51cd0.tar.xz zabbix-6a552162aec2f5792283711b4045b2a46eb51cd0.zip |
- fixed graph duplication (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2878 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/charts.php')
-rw-r--r-- | frontends/php/charts.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/frontends/php/charts.php b/frontends/php/charts.php index 26fe7252..2b665b1d 100644 --- a/frontends/php/charts.php +++ b/frontends/php/charts.php @@ -170,13 +170,17 @@ } elseif ($_REQUEST["groupid"] > 0) { - $sql = "select distinct g.graphid,g.name from graphs g,graphs_items gi,items i,hosts_groups hg". - " where i.itemid=gi.itemid and g.graphid=gi.graphid and i.hostid=gh.hostid and gh.groupid=".$_REQUEST["groupid"]. + $sql = "select distinct g.graphid,g.name from graphs g,graphs_items gi,items i,hosts_groups hg,hosts h". + " where i.itemid=gi.itemid and g.graphid=gi.graphid and i.hostid=hg.hostid and hg.groupid=".$_REQUEST["groupid"]. + " and i.hostid=h.hostid and h.status=".HOST_STATUS_MONITORED. " order by g.name"; } else { - $sql = "select distinct g.graphid,g.name from graphs g"; + $sql = "select distinct g.graphid,g.name from graphs g,graphs_items gi,items i,hosts h". + " where i.itemid=gi.itemid and g.graphid=gi.graphid ". + " and i.hostid=h.hostid and h.status=".HOST_STATUS_MONITORED. + " order by g.name"; } $result=DBselect($sql); |