summaryrefslogtreecommitdiffstats
path: root/frontends/php/hostprofiles.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-04-07 07:47:25 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-04-07 07:47:25 +0000
commit7a4b3f6a57f9b063f5acb77ecded743dc139f8cf (patch)
tree80f1d3dbd0af363c16ab00e94f0d09dd736c1f3c /frontends/php/hostprofiles.php
parenta3c18691bd39cd254cf8636fceae94c22c1b6a4a (diff)
downloadzabbix-7a4b3f6a57f9b063f5acb77ecded743dc139f8cf.tar.gz
zabbix-7a4b3f6a57f9b063f5acb77ecded743dc139f8cf.tar.xz
zabbix-7a4b3f6a57f9b063f5acb77ecded743dc139f8cf.zip
- improved filter by hosts and groups (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2723 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/hostprofiles.php')
-rw-r--r--frontends/php/hostprofiles.php15
1 files changed, 5 insertions, 10 deletions
diff --git a/frontends/php/hostprofiles.php b/frontends/php/hostprofiles.php
index b3e0aacf..47537692 100644
--- a/frontends/php/hostprofiles.php
+++ b/frontends/php/hostprofiles.php
@@ -43,15 +43,10 @@
?>
<?php
- if(isset($_REQUEST["groupid"])&&($_REQUEST["groupid"]==0))
- {
- unset($_REQUEST["groupid"]);
- }
+ validate_group_with_host("R", array("allow_all_hosts","monitored_hosts","with_items"));
?>
<?php
- $_REQUEST["hostid"]=@iif(isset($_REQUEST["hostid"]),$_REQUEST["hostid"],get_profile("web.latest.hostid",0));
- update_profile("web.latest.hostid",$_REQUEST["hostid"]);
update_profile("web.menu.cm.last",$page["file"]);
?>
@@ -82,9 +77,8 @@
$form->AddItem(SPACE.S_HOST.SPACE);
$cmbHost = new CComboBox("hostid",get_request("hostid",0),"submit()");
- $cmbHost->AddItem(0,S_SELECT_HOST_DOT_DOT_DOT);
- if(isset($_REQUEST["groupid"]))
+ if($_REQUEST["groupid"] > 0)
{
$sql="select h.hostid,h.host from hosts h,items i,hosts_groups hg".
" where h.status=".HOST_STATUS_MONITORED." and h.hostid=i.hostid and".
@@ -93,6 +87,7 @@
}
else
{
+ $cmbHost->AddItem(0,S_ALL_SMALL);
$sql="select h.hostid,h.host from hosts h,items i where h.status=".HOST_STATUS_MONITORED.
" and h.hostid=i.hostid group by h.hostid,h.host order by h.host";
}
@@ -109,7 +104,7 @@
?>
<?php
- if(isset($_REQUEST["hostid"])&&($_REQUEST["hostid"]!=0))
+ if($_REQUEST["hostid"] > 0)
{
echo BR;
insert_host_profile_form();
@@ -119,7 +114,7 @@
$table = new CTableInfo();
$table->setHeader(array(S_HOST,S_NAME,S_OS,S_SERIALNO,S_TAG,S_MACADDRESS));
- if(isset($_REQUEST["groupid"])&&($_REQUEST["groupid"]!=0))
+ if($_REQUEST["groupid"] > 0)
{
$sql="select h.hostid,h.host,p.name,p.os,p.serialno,p.tag,p.macaddress".
" from hosts h,hosts_profiles p,hosts_groups hg where h.hostid=p.hostid".