summaryrefslogtreecommitdiffstats
path: root/frontends/php/queue.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-02-22 15:28:41 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-02-22 15:28:41 +0000
commit9848b90bd9eddf0324ffdc0d8f089c6c24683fe8 (patch)
tree755bae71a9ecbc5d3f3c9085c0583a345c0c00d8 /frontends/php/queue.php
parent2a35ecbf642a185e3b53f66f783272e03fe99e93 (diff)
downloadzabbix-9848b90bd9eddf0324ffdc0d8f089c6c24683fe8.tar.gz
zabbix-9848b90bd9eddf0324ffdc0d8f089c6c24683fe8.tar.xz
zabbix-9848b90bd9eddf0324ffdc0d8f089c6c24683fe8.zip
- [DEV-118] added dashboard screen to monitoring (Artem)
- [ZBX-206] merged rev.5367:5370 of 1.4/ (Artem) [fixed case sensitive hosts sorting] - [DEV-119] changes how users online are counted (Artem) - implemented patch [added y axis calculation type: "Calculated [Min=0]"] (Artem) - changes in schema.sql (Artem) - fixed JS lib, url class (Artem) - some other small fixes (Artem) git-svn-id: svn://svn.zabbix.com/trunk@5387 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/queue.php')
-rw-r--r--frontends/php/queue.php42
1 files changed, 25 insertions, 17 deletions
diff --git a/frontends/php/queue.php b/frontends/php/queue.php
index 5320a9b4..1ca91ef6 100644
--- a/frontends/php/queue.php
+++ b/frontends/php/queue.php
@@ -70,18 +70,21 @@ include_once "include/page_header.php";
//ITEM_TYPE_HTTPTEST,
ITEM_TYPE_EXTERNAL);
- $result = DBselect("select i.itemid,i.nextcheck,i.description,i.key_,i.type,h.host,h.hostid ".
- " from items i,hosts h ".
- " where i.status=".ITEM_STATUS_ACTIVE." and i.type in (".implode(',',$item_types).") ".
- " and ((h.status=".HOST_STATUS_MONITORED." and h.available != ".HOST_AVAILABLE_FALSE.") ".
- " or (h.status=".HOST_STATUS_MONITORED." and h.available=".HOST_AVAILABLE_FALSE." and h.disable_until<=$now)) ".
- " and i.hostid=h.hostid and i.nextcheck<$now and i.key_ not in ('status','icmpping','icmppingsec','zabbix[log]') ".
- " and i.value_type not in (".ITEM_VALUE_TYPE_LOG.") ".
- " and h.hostid in (".get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY,null,null,get_current_nodeid()).")".
-// " and h.hostid in (".get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY,null,null,$ZBX_LOCALNODEID).")".
-// " and ".DBin_node('h.hostid', $ZBX_LOCALNODEID).
- " and ".DBin_node('h.hostid', get_current_nodeid()).
- " order by i.nextcheck,h.host,i.description,i.key_");
+ $result = DBselect('SELECT i.itemid,i.nextcheck,i.description,i.key_,i.type,h.host,h.hostid '.
+ ' FROM items i,hosts h '.
+ ' WHERE i.status='.ITEM_STATUS_ACTIVE.
+ ' AND i.type in ('.implode(',',$item_types).') '.
+ ' AND ((h.status='.HOST_STATUS_MONITORED.' AND h.available != '.HOST_AVAILABLE_FALSE.') '.
+ ' or (h.status='.HOST_STATUS_MONITORED.' AND h.available='.HOST_AVAILABLE_FALSE.' AND h.disable_until<='.$now.')) '.
+ ' AND i.hostid=h.hostid '.
+ ' AND i.nextcheck<'.$now.
+ " AND i.key_ not in ('status','icmpping','icmppingsec','zabbix[log]') ".
+ ' AND i.value_type not in ('.ITEM_VALUE_TYPE_LOG.') '.
+ ' AND h.hostid in ('.get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY,null,null,get_current_nodeid()).')'.
+// ' AND h.hostid in ('.get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY,null,null,$ZBX_LOCALNODEID).')'.
+// ' AND '.DBin_node('h.hostid', $ZBX_LOCALNODEID).
+ ' AND '.DBin_node('h.hostid', get_current_nodeid()).
+ ' order by i.nextcheck,h.host,i.description,i.key_');
$table = new CTableInfo(S_THE_QUEUE_IS_EMPTY);
@@ -111,11 +114,16 @@ include_once "include/page_header.php";
$table->setHeader(array(S_ITEMS,S_5_SECONDS,S_10_SECONDS,S_30_SECONDS,S_1_MINUTE,S_5_MINUTES,S_MORE_THAN_5_MINUTES));
foreach($item_types as $type)
{
- $elements=array(item_type2str($type),$sec_5[$type],$sec_10[$type],
- new CCol($sec_30[$type],"warning"),
- new CCol($sec_60[$type],"average"),
- new CCol($sec_300[$type],"high"),
- new CCol($sec_rest[$type],"disaster"));
+ $elements=array(
+ item_type2str($type),
+ new CCol($sec_5[$type],($sec_5[$type])?"unknown_trigger":"normal"),
+ new CCol($sec_10[$type],($sec_10[$type])?"information":"normal"),
+ new CCol($sec_30[$type],($sec_30[$type])?"warning":"normal"),
+ new CCol($sec_60[$type],($sec_60[$type])?"average":"normal"),
+ new CCol($sec_300[$type],($sec_300[$type])?"high":"normal"),
+ new CCol($sec_rest[$type],($sec_rest[$type])?"disaster":"normal")
+ );
+
$table->addRow($elements);
}
}