From 469d17e7d448ec1833abb72add88d1d1f61c4a06 Mon Sep 17 00:00:00 2001 From: artem Date: Wed, 20 Aug 2008 14:46:11 +0000 Subject: - [DEV-199] performance improvements of js scripts in hosts screen (Artem) - [DEV-137] many small fixes (Artem) git-svn-id: svn://svn.zabbix.com/trunk@5932 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/graphs.php | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'frontends/php/graphs.php') diff --git a/frontends/php/graphs.php b/frontends/php/graphs.php index 885493a1..3ed64e3f 100644 --- a/frontends/php/graphs.php +++ b/frontends/php/graphs.php @@ -19,12 +19,12 @@ **/ ?> ---- @@ -206,7 +205,7 @@ include_once "include/page_header.php"; $sql = 'SELECT distinct h.hostid '. ' FROM hosts h, hosts_groups hg'. ' WHERE h.hostid=hg.hostid '. - ' AND hg.groupid IN ('.implode(',',$_REQUEST['copy_targetid']).')'. + ' AND '.DBcondition('hg.groupid',$_REQUEST['copy_targetid']). ' AND '.DBcondition('h.hostid',$available_hosts); $db_hosts = DBselect($sql); while($db_host = DBfetch($db_hosts)){ @@ -310,8 +309,8 @@ include_once "include/page_header.php"; $r_form = new CForm(); $r_form->SetMethod('get'); - $cmbGroup = new CComboBox("groupid",$_REQUEST["groupid"],"submit()"); - $cmbHosts = new CComboBox("hostid",$_REQUEST["hostid"],"submit()"); + $cmbGroup = new CComboBox('groupid',$_REQUEST['groupid'],'submit()'); + $cmbHosts = new CComboBox('hostid',$_REQUEST['hostid'],'submit()'); $cmbGroup->AddItem(0,S_ALL_SMALL); @@ -322,17 +321,17 @@ include_once "include/page_header.php"; ' ORDER BY g.name'; $result=DBselect($sql); while($row=DBfetch($result)){ - $cmbGroup->AddItem($row["groupid"],$row["name"]); + $cmbGroup->AddItem($row['groupid'],$row['name']); } $r_form->AddItem(array(S_GROUP.SPACE,$cmbGroup)); - if($_REQUEST["groupid"] > 0){ + if($_REQUEST['groupid'] > 0){ $sql='SELECT DISTINCT h.hostid,h.host '. ' FROM hosts h, hosts_groups hg '. - ' WHERE hg.groupid='.$_REQUEST["groupid"]. + ' WHERE hg.groupid='.$_REQUEST['groupid']. ' AND hg.hostid=h.hostid '. ' AND '.DBcondition('h.hostid',$available_hosts). - ' AND h.status IN ('.HOST_STATUS_MONITORED.','.HOST_STATUS_TEMPLATE.') '. + ' AND h.status IN ('.HOST_STATUS_MONITORED.','.HOST_STATUS_NOT_MONITORED.','.HOST_STATUS_TEMPLATE.') '. ' ORDER BY h.host'; } else{ @@ -340,7 +339,7 @@ include_once "include/page_header.php"; $sql='SELECT DISTINCT h.hostid,h.host '. ' FROM hosts h '. ' WHERE '.DBcondition('h.hostid',$available_hosts). - ' AND h.status IN ('.HOST_STATUS_MONITORED.','.HOST_STATUS_TEMPLATE.') '. + ' AND h.status IN ('.HOST_STATUS_MONITORED.','.HOST_STATUS_NOT_MONITORED.','.HOST_STATUS_TEMPLATE.') '. ' ORDER BY h.host'; } -- cgit