~kampka/ubuntu/quantal/zabbix/upstart-support

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Michael Ablassmeier
  • Date: 2009-06-28 19:11:29 UTC
  • mfrom: (19.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090628191129-5esmmf2h3tbff1fv
* New upstream release
* Merge upstream config file to template (Closes: #528426)
* Move logrotate from Depends to Suggests (Closes: #534096)
* Server should not crash anymore if postgresql transaction fails
  (Closes: #520197)
* Update fr.po (Closes: #527559)
* Update es.po (Closes: #527600)
* Update sv.po (Closes: #528571)
* Update it.po (Closes: #529157)
* Update cs.po (Closes: #529502)
* Update de.po (Closes: #532344)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2080
2080
                $target_sql = 'SELECT DISTINCT g.groupid as target_id, g.name as target_name '.
2081
2081
                        ' FROM groups g, hosts_groups hg '.
2082
2082
                        ' WHERE hg.groupid=g.groupid '.
 
2083
                                ' AND '.DBin_node('g.groupid').
2083
2084
                        ' ORDER BY g.name';
2084
2085
 
2085
2086
                if(0 == $copy_type){
2213
2214
                $frmTrig = new CFormTable(S_TRIGGER,"triggers.php");
2214
2215
                $frmTrig->SetHelp("config_triggers.php");
2215
2216
 
2216
 
                if($_REQUEST['hostid']>0){
 
2217
                if(isset($_REQUEST['hostid'])){
2217
2218
                        $frmTrig->AddVar("hostid",$_REQUEST['hostid']);
2218
2219
                }
2219
2220
 
2750
2751
                }
2751
2752
 
2752
2753
                if($type != GRAPH_ITEM_SUM){
2753
 
                        $frmGItem->AddRow(S_SORT_ORDER_1_100, new CTextBox('sortorder',$sortorder,3));
 
2754
                        $frmGItem->AddRow(S_SORT_ORDER_0_100, new CTextBox('sortorder',$sortorder,3));
2754
2755
                }
2755
2756
 
2756
2757
                $frmGItem->AddItemToBottomRow(new CButton('save', isset($gid) ? S_SAVE : S_ADD));
3298
3299
                }
3299
3300
 
3300
3301
                $esc_step_from = array();
 
3302
                $objects_tmp = array();
 
3303
                $objectids_tmp = array();
3301
3304
                foreach($operations as $key => $operation) {
3302
3305
                        $esc_step_from[$key]  = $operation['esc_step_from'];
 
3306
                        $objects_tmp[$key] = $operation['object'];
 
3307
                        $objectids_tmp[$key] = $operation['objectid'];
3303
3308
                }
3304
 
                array_multisort($esc_step_from, SORT_ASC, $operations);
 
3309
 
 
3310
                array_multisort($esc_step_from, SORT_ASC, SORT_NUMERIC, $objects_tmp, SORT_DESC, $objectids_tmp, SORT_ASC, $operations);
3305
3311
 
3306
3312
                $tblOper->SetHeader(array(
3307
3313
                                new CCheckBox('all_operations',null,'CheckAll("'.S_ACTION.'","all_operations","g_operationid");'),
3313
3319
                        ));
3314
3320
 
3315
3321
                $allowed_operations = get_operations_by_eventsource($eventsource);
3316
 
 
3317
 
                zbx_rksort($operations);
3318
 
 
 
3322
                
3319
3323
                $delay = count_operations_delay($operations,$esc_period);
3320
3324
                foreach($operations as $id => $val){
3321
3325
                        if( !str_in_array($val['operationtype'], $allowed_operations) ) continue;
3339
3343
                        }
3340
3344
 
3341
3345
                        $tblOper->AddRow(array(
3342
 
                                new CCheckBox("g_operationid[]", 'no', null,$id),
 
3346
                                new CCheckBox('g_operationid['.$id.']', 'no', null,$id),
3343
3347
                                $esc_steps_txt,
3344
3348
                                $oper_details,
3345
3349
                                $esc_period_txt,
5263
5267
// Insert form for Host Groups
5264
5268
        function insert_hostgroups_form(){
5265
5269
                global  $USER_DETAILS;
5266
 
                $available_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY,PERM_RES_IDS_ARRAY);
 
5270
                $available_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_WRITE,PERM_RES_IDS_ARRAY);
5267
5271
 
5268
5272
                $hosts = get_request('hosts',array());
5269
5273
                $frm_title = S_HOST_GROUP;
6061
6065
                        $colorbox = new CSpan(SPACE.SPACE.SPACE);
6062
6066
                        $colorbox->AddOption('style','text-decoration: none; outline-color: black; outline-style: solid; outline-width: 1px; background-color: #'.$trigger['color'].';');
6063
6067
 
 
6068
                        $link_desc = new CSpan($trigger['description'],'link');
 
6069
                        $link_desc->addoption('onclick', "javascript: openWinCentered('popup_link_tr.php?form=1&dstfrm=".$frmCnct->GetName()."&triggerid=".$trigger['triggerid'].url_param('linkid')."','ZBX_Link_Indicator',560,260,'scrollbars=1, toolbar=0, menubar=0, resizable=0');");
 
6070
                        
6064
6071
                        $table->AddRow(array(
6065
6072
                                        array(
6066
6073
                                                new CCheckBox('triggers['.$trigger['triggerid'].'][triggerid]',null,null,$trigger['triggerid']),
6067
6074
                                                new CVar('triggers['.$trigger['triggerid'].'][triggerid]', $trigger['triggerid'])
6068
6075
                                                ),
6069
6076
                                        array(
6070
 
                                                new CLink($trigger['description'],"javascript: openWinCentered('popup_link_tr.php?form=1&dstfrm=".$frmCnct->GetName()."&triggerid=".$trigger['triggerid'].url_param('linkid')."','ZBX_Link_Indicator',560,260,'scrollbars=1, toolbar=0, menubar=0, resizable=0');"),
 
6077
                                                $link_desc,
6071
6078
                                                new CVar('triggers['.$trigger['triggerid'].'][description]', $trigger['description'])
6072
6079
                                                ),
6073
6080
                                        array(