diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-05-25 10:20:17 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-05-25 10:20:17 +0000 |
| commit | 75865b1d90ca04e74845d84d430a0a3fac1180ca (patch) | |
| tree | 9ee8e52caae6740cae3d1c06405eb722552c3328 /frontends/php/include | |
| parent | 22997b810e9cb390ed6dc9dfdd54a0e0ead05b25 (diff) | |
| download | zabbix-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')
| -rw-r--r-- | frontends/php/include/classes/chostsinfo.mod.php | 8 | ||||
| -rw-r--r-- | frontends/php/include/classes/cserverinfo.mod.php | 9 | ||||
| -rw-r--r-- | frontends/php/include/classes/ctriggerinfo.mod.php | 17 |
3 files changed, 14 insertions, 20 deletions
diff --git a/frontends/php/include/classes/chostsinfo.mod.php b/frontends/php/include/classes/chostsinfo.mod.php index b570f7e2..65f5a88a 100644 --- a/frontends/php/include/classes/chostsinfo.mod.php +++ b/frontends/php/include/classes/chostsinfo.mod.php @@ -36,7 +36,7 @@ $this->style = $value; } - function UpdateInfo() + function BodyToString() { $this->CleanItems(); @@ -72,11 +72,7 @@ $this->AddRow($notav); $this->AddRow($uncn); } - } - function Show() - { - $this->UpdateInfo(); - parent::Show(); + return parent::BodyToString(); } } ?> diff --git a/frontends/php/include/classes/cserverinfo.mod.php b/frontends/php/include/classes/cserverinfo.mod.php index 7aae9a3f..4315c701 100644 --- a/frontends/php/include/classes/cserverinfo.mod.php +++ b/frontends/php/include/classes/cserverinfo.mod.php @@ -26,7 +26,7 @@ parent::CTable(NULL,"server_info"); } - function UpdateInfo() + function BodyToString() { global $USER_DETAILS; global $_SERVER; @@ -68,11 +68,8 @@ ))); $this->AddRow(S_NUMBER_OF_ALARMS.": ".$status["alarms_count"]); $this->AddRow(S_NUMBER_OF_ALERTS.": ".$status["alerts_count"]); - } - function Show() - { - $this->UpdateInfo(); - parent::Show(); + + return parent::BodyToString(); } } ?> 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(); } } ?> |
