~ubuntu-dev/ubuntu/lucid/zabbix/lucid-201002110857

« back to all changes in this revision

Viewing changes to frontends/php/include/reports.inc.php

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Haas
  • Date: 2009-10-10 12:21:16 UTC
  • mfrom: (1.1.10 upstream) (8.2.6 sid)
  • Revision ID: james.westby@ubuntu.com-20091010122116-44k2zdq57rb40i6z
Tags: 1:1.6.6-2
* debian/po/ja.po updated (Closes: #548651)
* debian/po/cs.po updated (Closes: #548675)
* debian/po/sv.po updated (Closes: #548796)
* debian/po/de.po updated (Closes: #549248)
* debian/po/it.po updated (Closes: #549579)
* debian/po/pt.po updated (Closes: #550087)
* debian/po/ru.po updated (Closes: #550102)
* debian/po/es.po updated (Closes: #550173)
* debian/po/fr.po updated (Closes: #550315)
* Manpages for zabbix_server and zabbix_agent added (Closes: #496696)
* Added hint about the difference of the zabbix_agent.conf and
  zabbix_agentd.conf in each config file as a comment. (Closes: #548701)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
/* 
 
2
/*
3
3
** ZABBIX
4
4
** Copyright (C) 2000-2008 SIA Zabbix
5
5
**
27
27
 
28
28
//      $available_groups = $PAGE_GROUPS['groupids'];
29
29
//      $available_hosts = $PAGE_HOSTS['hostids'];
30
 
        
 
30
 
31
31
        $r_form = new CForm();
32
32
        $r_form->setMethod('get');
33
 
        
 
33
 
34
34
        $cmbConf = new CComboBox('config',$config,'submit()');
35
35
        $cmbConf->addItem(0,S_BY_HOST);
36
36
        $cmbConf->addItem(1,S_BY_TRIGGER_TEMPLATE);
46
46
        foreach($PAGE_HOSTS['hosts'] as $hostid => $name){
47
47
                $cmbHosts->addItem($hostid, get_node_name_by_elid($hostid).$name);
48
48
        }
49
 
        
 
49
 
50
50
        $r_form->addItem(array(S_GROUP.SPACE,$cmbGroups));
51
51
        $r_form->addItem(array(SPACE.S_HOST.SPACE,$cmbHosts));
52
52
 
53
53
        if(1 == $config){
54
54
                $cmbTrigs = new CComboBox('tpl_triggerid',get_request('tpl_triggerid',0),'submit()');
55
55
                $cmbHGrps = new CComboBox('hostgroupid',get_request('hostgroupid',0),'submit()');
56
 
                
 
56
 
57
57
                $cmbTrigs->addItem(0,S_ALL_SMALL);
58
58
                $cmbHGrps->addItem(0,S_ALL_SMALL);
59
59
        }
60
 
        
 
60
 
61
61
        if(0 == $config){
62
62
                show_table_header(S_AVAILABILITY_REPORT_BIG, $r_form);
63
63
        }
64
64
        else{
65
65
                $sql_cond = ' AND h.hostid=ht.hostid ';
66
66
                if($_REQUEST['hostid'] > 0)     $sql_cond.=' AND ht.templateid='.$_REQUEST['hostid'];
67
 
                
 
67
 
68
68
                if(isset($_REQUEST['tpl_triggerid']) && ($_REQUEST['tpl_triggerid'] > 0))
69
69
                        $sql_cond.= ' AND t.templateid='.$_REQUEST['tpl_triggerid'];
70
70
 
89
89
                                get_node_name_by_elid($row['groupid']).$row['name']
90
90
                                );
91
91
                }
92
 
                
 
92
 
93
93
                $sql_cond=($_REQUEST['hostid'] > 0)?' AND h.hostid='.$_REQUEST['hostid']:' AND '.DBcondition('h.hostid',$available_hosts);
94
94
                $sql = 'SELECT DISTINCT t.triggerid,t.description '.
95
95
                        ' FROM triggers t,hosts h,items i,functions f '.
115
115
                $rr_form->addVar('config',$config);
116
116
                $rr_form->addVar('groupid',$_REQUEST['groupid']);
117
117
                $rr_form->addVar('hostid',$_REQUEST['hostid']);
118
 
                
 
118
 
119
119
                $rr_form->addItem(array(S_TRIGGER.SPACE,$cmbTrigs,BR(),S_FILTER,SPACE,S_HOST_GROUP.SPACE,$cmbHGrps));
120
120
                show_table_header(S_AVAILABILITY_REPORT_BIG, array($r_form,$rr_form));
121
121
        }
122
122
}
123
 
?>
 
 
b'\\ No newline at end of file'
 
123
?>