summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/classes
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/php/include/classes')
-rw-r--r--frontends/php/include/classes/chostsinfo.mod.php8
-rw-r--r--frontends/php/include/classes/cserverinfo.mod.php9
-rw-r--r--frontends/php/include/classes/ctriggerinfo.mod.php17
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();
}
}
?>