summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/classes/ctriggerinfo.mod.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-05-25 10:20:17 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-05-25 10:20:17 +0000
commit75865b1d90ca04e74845d84d430a0a3fac1180ca (patch)
tree9ee8e52caae6740cae3d1c06405eb722552c3328 /frontends/php/include/classes/ctriggerinfo.mod.php
parent22997b810e9cb390ed6dc9dfdd54a0e0ead05b25 (diff)
downloadzabbix-75865b1d90ca04e74845d84d430a0a3fac1180ca.tar.gz
zabbix-75865b1d90ca04e74845d84d430a0a3fac1180ca.tar.xz
zabbix-75865b1d90ca04e74845d84d430a0a3fac1180ca.zip
- fixed "Server info" screen item (Eugene)
- fixed "Host info" screen item (Eugene) - fixed "Trigger info" screen item (Eugene) git-svn-id: svn://svn.zabbix.com/trunk@2906 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/classes/ctriggerinfo.mod.php')
-rw-r--r--frontends/php/include/classes/ctriggerinfo.mod.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/frontends/php/include/classes/ctriggerinfo.mod.php b/frontends/php/include/classes/ctriggerinfo.mod.php
index 7c1f9d76..8c10ec93 100644
--- a/frontends/php/include/classes/ctriggerinfo.mod.php
+++ b/frontends/php/include/classes/ctriggerinfo.mod.php
@@ -36,13 +36,15 @@
$this->style = $value;
}
- function UpdateInfo()
+ function BodyToString()
{
$this->CleanItems();
$uncn = $info = $warn = $avg = $high = $dis = 0;
- $db_priority = DBselect("select t.priority,count(*) as cnt from triggers t,hosts h,items i,functions f where t.value=1 and t.status=0 and f.itemid=i.itemid and h.hostid=i.hostid and h.status=".HOST_STATUS_MONITORED." and t.triggerid=f.triggerid and i.status=0 group by priority");
+ $db_priority = DBselect("select t.priority,count(*) as cnt from triggers t,hosts h,items i,functions f".
+ " where t.value=1 and t.status=0 and f.itemid=i.itemid and h.hostid=i.hostid".
+ " and h.status=".HOST_STATUS_MONITORED." and t.triggerid=f.triggerid and i.status=0 group by priority");
while($row=DBfetch($db_priority))
{
@@ -57,7 +59,10 @@
}
}
- $db_ok_cnt = DBselect("select count(*) as cnt from triggers t,hosts h,items i,functions f where t.value=0 and t.status=0 and f.itemid=i.itemid and h.hostid=i.hostid and h.status=".HOST_STATUS_MONITORED." and t.triggerid=f.triggerid and i.status=0");
+ $db_ok_cnt = DBselect("select count(*) as cnt from triggers t,hosts h,items i,functions f".
+ " where t.value=0 and t.status=0 and f.itemid=i.itemid and h.hostid=i.hostid".
+ " and h.status=".HOST_STATUS_MONITORED." and t.triggerid=f.triggerid and i.status=0");
+
$ok_cnt = DBfetch($db_ok_cnt);
$header = new CCol(S_TRIGGERS_INFO,"header");
@@ -88,11 +93,7 @@
$this->AddRow($high);
$this->AddRow($dis);
}
- }
- function Show()
- {
- $this->UpdateInfo();
- parent::Show();
+ return parent::BodyToString();
}
}
?>