Hi,
I've found another problem. When I try to sort the triggers with the trigger status onlytrue I still get all the triggers. I have placed a 1 in the following query for the database in the file tr_status.php(its red).
Can anyone debug this properly this is only a workaround.
best regard,
Remco
$availiable_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_RE AD_LIST, null, null, get_current_nodeid());
$result=DBselect("select distinct g.groupid,g.name from groups g, hosts_groups hg, hosts h, items i, functions f, triggers t ".
" where h.hostid in (".$availiable_hosts.") ".
" AND hg.groupid=g.groupid AND h.status=".HOST_STATUS_MONITORED.
" AND h.hostid=i.hostid AND hg.hostid=h.hostid AND i.status=1".ITEM_STATUS_ACTIVE.
" AND i.itemid=f.itemid AND t.triggerid=f.triggerid AND t.status=".TRIGGER_STATUS_ENABLED.
" order by g.name");
while($row=DBfetch($result))
{
$cmbGroup->AddItem(
$row['groupid'],
get_node_name_by_elid($row['groupid']).$row['name']
);
unset($row);
}
I've found another problem. When I try to sort the triggers with the trigger status onlytrue I still get all the triggers. I have placed a 1 in the following query for the database in the file tr_status.php(its red).
Can anyone debug this properly this is only a workaround.
best regard,
Remco
$availiable_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_RE AD_LIST, null, null, get_current_nodeid());
$result=DBselect("select distinct g.groupid,g.name from groups g, hosts_groups hg, hosts h, items i, functions f, triggers t ".
" where h.hostid in (".$availiable_hosts.") ".
" AND hg.groupid=g.groupid AND h.status=".HOST_STATUS_MONITORED.
" AND h.hostid=i.hostid AND hg.hostid=h.hostid AND i.status=1".ITEM_STATUS_ACTIVE.
" AND i.itemid=f.itemid AND t.triggerid=f.triggerid AND t.status=".TRIGGER_STATUS_ENABLED.
" order by g.name");
while($row=DBfetch($result))
{
$cmbGroup->AddItem(
$row['groupid'],
get_node_name_by_elid($row['groupid']).$row['name']
);
unset($row);
}