diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-11-17 11:30:56 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-11-17 11:30:56 +0000 |
| commit | 896a5045bfed78472b805ad508e164d91430fc4a (patch) | |
| tree | 638b6f8c78c965fc87fccac003acd396bbcffa3b /frontends/php/include/forms.inc.php | |
| parent | 2564a7134d667269a6b4a8bc30afe5b2e81fd150 (diff) | |
| download | zabbix-896a5045bfed78472b805ad508e164d91430fc4a.tar.gz zabbix-896a5045bfed78472b805ad508e164d91430fc4a.tar.xz zabbix-896a5045bfed78472b805ad508e164d91430fc4a.zip | |
- developed interface for export/import (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3497 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/forms.inc.php')
| -rw-r--r-- | frontends/php/include/forms.inc.php | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php index 83d465e6..c35b82a8 100644 --- a/frontends/php/include/forms.inc.php +++ b/frontends/php/include/forms.inc.php @@ -2316,25 +2316,19 @@ if($resourcetype == SCREEN_RESOURCE_GRAPH) { // User-defined graph - $result = DBselect("select distinct g.graphid,g.name,n.name as node_name ". - " from graphs g, nodes n, graphs_items gi, items i, hosts h ". - " where n.nodeid=".DBid2nodeid("g.graphid")." and g.graphid=gi.graphid ". - " and gi.itemid=i.itemid and h.hostid=i.hostid". - " and i.hostid not in (".get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY,PERM_MODE_LT).")". - " order by node_name,host,name,graphid"); + $result = DBselect("select g.graphid,g.name,n.name as node_name, h.host". + " from graphs g left join graphs_items gi on g.graphid=gi.graphid left join items i on gi.itemid=i.itemid ". + " left join hosts h on h.hostid=i.hostid left join nodes n on n.nodeid=".DBid2nodeid("g.graphid"). + " where i.hostid not in (".get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY,PERM_MODE_LT).")". + " group by graphid,name,node_name". + " order by node_name,host,name,graphid" + ); $cmbGraphs = new CComboBox("resourceid",$resourceid); while($row=DBfetch($result)) { - $db_host = DBfetch(get_hosts_by_graphid($row["graphid"])); - if($db_host) - { - $name = "(".$row["node_name"].") ".$db_host["host"].":".$row["name"]; - } - else - { - $name = $row["name"]; - } + $row["node_name"] = isset($row["node_name"]) ? "(".$row["node_name"].") " : ''; + $name = $row["node_name"].$row["host"].":".$row["name"]; $cmbGraphs->AddItem($row["graphid"],$name); } |
