diff options
| author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-06-04 10:47:07 +0000 |
|---|---|---|
| committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-06-04 10:47:07 +0000 |
| commit | b9edf1d40fa3247cab6ceea113ea07b35b20018c (patch) | |
| tree | 6d51db56b05c4d194d4acad9aefb2d7d8002268f /frontends/php/include/blocks.inc.php | |
| parent | 829274e52cfd773194248d78353592f430744207 (diff) | |
| download | zabbix-b9edf1d40fa3247cab6ceea113ea07b35b20018c.tar.gz zabbix-b9edf1d40fa3247cab6ceea113ea07b35b20018c.tar.xz zabbix-b9edf1d40fa3247cab6ceea113ea07b35b20018c.zip | |
- [DEV-171] improvements to event details (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5751 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/blocks.inc.php')
| -rw-r--r-- | frontends/php/include/blocks.inc.php | 63 |
1 files changed, 4 insertions, 59 deletions
diff --git a/frontends/php/include/blocks.inc.php b/frontends/php/include/blocks.inc.php index 1cced043..1111b993 100644 --- a/frontends/php/include/blocks.inc.php +++ b/frontends/php/include/blocks.inc.php @@ -22,6 +22,7 @@ require_once "include/graphs.inc.php"; require_once "include/screens.inc.php"; require_once "include/maps.inc.php"; +require_once "include/actions.inc.php"; // Author: Aly @@ -300,66 +301,10 @@ function make_system_summary(){ $description = expand_trigger_description_by_data( array_merge($row_inf, array("clock"=>$row_inf_event["clock"])), ZBX_FLAG_EVENT); -//actions - $actions= new CTable(' - '); - - $sql='SELECT COUNT(a.alertid) as cnt'. - ' FROM alerts a '. - ' WHERE a.eventid='.$row_inf_event['eventid']; - - $alerts=DBfetch(DBselect($sql)); - - if(isset($alerts['cnt']) && ($alerts['cnt'] > 0)){ - $mixed = 0; -// Sent - $sql='SELECT COUNT(a.alertid) as sent '. - ' FROM alerts a '. - ' WHERE a.eventid='.$row_inf_event['eventid']. - ' AND a.status='.ALERT_STATUS_SENT; - - $tmp=DBfetch(DBselect($sql)); - $alerts['sent'] = $tmp['sent']; - $mixed+=($alerts['sent'])?ALERT_STATUS_SENT:0; -// In progress - $sql='SELECT COUNT(a.alertid) as inprogress '. - ' FROM alerts a '. - ' WHERE a.eventid='.$row_inf_event['eventid']. - ' AND a.status='.ALERT_STATUS_NOT_SENT; - - $tmp=DBfetch(DBselect($sql)); - $alerts['inprogress'] = $tmp['inprogress']; -// Failed - $sql='SELECT COUNT(a.alertid) as failed '. - ' FROM alerts a '. - ' WHERE a.eventid='.$row_inf_event['eventid']. - ' AND a.status='.ALERT_STATUS_FAILED; - - $tmp=DBfetch(DBselect($sql)); - $alerts['failed'] = $tmp['failed']; - $mixed+=($alerts['failed'])?ALERT_STATUS_FAILED:0; - - - if($alerts['inprogress']){ - $status = new CSpan(S_IN_PROGRESS,'orange'); - } - else if(ALERT_STATUS_SENT == $mixed){ - $status = new CSpan(S_OK,'green'); - } - else if(ALERT_STATUS_FAILED == $mixed){ - $status = new CSpan(S_FAILED,'red'); - } - else{ - $tdl = new CCol(($alerts['sent'])?(new CSpan($alerts['sent'],'green')):SPACE); - $tdl->AddOption('width','10'); - $tdr = new CCol(($alerts['failed'])?(new CSpan($alerts['failed'],'red')):SPACE); - $tdr->AddOption('width','10'); - - $status = new CRow(array($tdl,$tdr)); - } - - $actions->AddRow($status); - } + +//actions + $actions= get_event_actions_status($row_inf_event['eventid']); //-------- $table_inf->AddRow(array( |
