Changeset 6688
- Timestamp:
- 10/02/08 11:26:37 (2 months ago)
- Location:
- trunk/centreon/www/include/monitoring/status/status-ndo
- Files:
-
- 2 modified
-
host.php (modified) (3 diffs)
-
service.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/centreon/www/include/monitoring/status/status-ndo/host.php
r6646 r6688 18 18 if (!isset($oreon)) 19 19 exit(); 20 21 /* 22 * ACL Actions 23 */ 24 $GroupListofUser = array(); 25 $GroupListofUser = getGroupListofUser($pearDB); 26 27 $allActions = false; 28 // Get list of actions allowed for user 29 if(count($GroupListofUser) > 0 && isUserAdmin($pearDB) == 1) { 30 $authorized_actions = array(); 31 $authorized_actions = getActionsACLList($GroupListofUser); 32 } 33 else { 34 // if user is admin, or without ACL, he cans perform all actions 35 $allActions = true; 36 } 20 37 21 38 $pagination = "maxViewMonitoring"; … … 83 100 <?php 84 101 102 $action_list = array(); 103 $action_list[] = _("More actions..."); 104 // Showing actions allowed for current user 105 if(isset($authorized_actions) && $allActions == false){ 106 foreach($authorized_actions as $action_name) { 107 if($action_name == "host_acknowledgement" || $allActions == true) $action_list[72] = _("Hosts : Acknowledge"); 108 if($action_name == "host_acknowledgement" || $allActions == true) $action_list[73] = _("Hosts : Disacknowledge"); 109 if($action_name == "host_notifications" || $allActions == true) $action_list[82] = _("Hosts : Enable Notification"); 110 if($action_name == "host_notifications" || $allActions == true) $action_list[83] = _("Hosts : Disable Notification"); 111 if($action_name == "host_checks" || $allActions == true) $action_list[92] = _("Hosts : Enable Check"); 112 if($action_name == "host_checks" || $allActions == true) $action_list[93] = _("Hosts : Disable Check"); 113 } 114 } else { 115 $action_list[72] = _("Hosts : Acknowledge"); 116 $action_list[73] = _("Hosts : Disacknowledge"); 117 $action_list[82] = _("Hosts : Enable Notification"); 118 $action_list[83] = _("Hosts : Disable Notification"); 119 $action_list[92] = _("Hosts : Enable Check"); 120 $action_list[93] = _("Hosts : Disable Check"); 121 } 122 85 123 $attrs = array( 'onchange'=>"javascript: setO(this.form.elements['o1'].value); submit();"); 86 $form->addElement('select', 'o1', NULL, array( NULL => _("More actions..."), 87 "72" => _("Hosts : Acknowledge"), 88 "73" => _("Hosts : Disacknowledge"), 89 "82" => _("Hosts : Enable Notification"), 90 "83" => _("Hosts : Disable Notification"), 91 "92" => _("Hosts : Enable Check"), 92 "93" => _("Hosts : Disable Check")), $attrs); 124 $form->addElement('select', 'o1', NULL, $action_list, $attrs); 93 125 $form->setDefaults(array('o1' => NULL)); 94 126 $o1 =& $form->getElement('o1'); … … 96 128 97 129 $attrs = array('onchange'=>"javascript: setO(this.form.elements['o2'].value); submit();"); 98 $form->addElement('select', 'o2', NULL, array( NULL => _("More actions..."), 99 "72" => _("Hosts : Acknowledge"), 100 "73" => _("Hosts : Disacknowledge"), 101 "82" => _("Hosts : Enable Notification"), 102 "83" => _("Hosts : Disable Notification"), 103 "92" => _("Hosts : Enable Check"), 104 "93" => _("Hosts : Disable Check")), $attrs); 130 $form->addElement('select', 'o2', NULL, $action_list, $attrs); 105 131 $form->setDefaults(array('o2' => NULL)); 106 132 $o2 =& $form->getElement('o2'); -
trunk/centreon/www/include/monitoring/status/status-ndo/service.php
r6646 r6688 18 18 if (!isset($oreon)) 19 19 exit(); 20 21 /* 22 * ACL Actions 23 */ 24 $GroupListofUser = array(); 25 $GroupListofUser = getGroupListofUser($pearDB); 26 27 $allActions = false; 28 // Get list of actions allowed for user 29 if(count($GroupListofUser) > 0 && isUserAdmin($pearDB) == 1) { 30 $authorized_actions = array(); 31 $authorized_actions = getActionsACLList($GroupListofUser); 32 } 33 else { 34 // if user is admin, or without ACL, he cans perform all actions 35 $allActions = true; 36 } 20 37 21 38 $pagination = "maxViewMonitoring"; … … 80 97 </SCRIPT> 81 98 <?php 82 99 100 $action_list = array(); 101 $action_list[] = _("More actions..."); 102 // Showing actions allowed for current user 103 if(isset($authorized_actions) && $allActions == false){ 104 foreach($authorized_actions as $action_name) { 105 if($action_name == "service_checks" || $allActions == true) $action_list[3] = _("Verification Check"); 106 if($action_name == "service_checks" || $allActions == true) $action_list[4] = _("Verification Check (Forced)"); 107 if($action_name == "service_acknowledgement" || $allActions == true) $action_list[70] = _("Services : Acknowledge"); 108 if($action_name == "service_acknowledgement" || $allActions == true) $action_list[71] = _("Services : Disacknowledge"); 109 if($action_name == "service_notifications" || $allActions == true) $action_list[80] = _("Services : Enable Notification"); 110 if($action_name == "service_notifications" || $allActions == true) $action_list[81] = _("Services : Disable Notification"); 111 if($action_name == "service_checks" || $allActions == true) $action_list[90] = _("Services : Enable Check"); 112 if($action_name == "service_checks" || $allActions == true) $action_list[91] = _("Services : Disable Check"); 113 if($action_name == "host_acknowledgement" || $allActions == true) $action_list[72] = _("Hosts : Acknowledge"); 114 if($action_name == "host_acknowledgement" || $allActions == true) $action_list[73] = _("Hosts : Disacknowledge"); 115 if($action_name == "host_notifications" || $allActions == true) $action_list[82] = _("Hosts : Enable Notification"); 116 if($action_name == "host_notifications" || $allActions == true) $action_list[83] = _("Hosts : Disable Notification"); 117 if($action_name == "host_checks" || $allActions == true) $action_list[92] = _("Hosts : Enable Check"); 118 if($action_name == "host_checks" || $allActions == true) $action_list[93] = _("Hosts : Disable Check"); 119 } 120 } else { 121 $action_list[3] = _("Verification Check"); 122 $action_list[4] = _("Verification Check (Forced)"); 123 $action_list[70] = _("Services : Acknowledge"); 124 $action_list[71] = _("Services : Disacknowledge"); 125 $action_list[80] = _("Services : Enable Notification"); 126 $action_list[81] = _("Services : Disable Notification"); 127 $action_list[90] = _("Services : Enable Check"); 128 $action_list[91] = _("Services : Disable Check"); 129 $action_list[72] = _("Hosts : Acknowledge"); 130 $action_list[73] = _("Hosts : Disacknowledge"); 131 $action_list[82] = _("Hosts : Enable Notification"); 132 $action_list[83] = _("Hosts : Disable Notification"); 133 $action_list[92] = _("Hosts : Enable Check"); 134 $action_list[93] = _("Hosts : Disable Check"); 135 } 136 83 137 $attrs = array( 'onchange'=>"javascript: setO(this.form.elements['o1'].value); submit();"); 84 $form->addElement('select', 'o1', NULL, array( NULL => _("More actions..."), 85 "3" => _("Verification Check"), 86 "4" => _("Verification Check (Forced)"), 87 "70" => _("Services : Acknowledge"), 88 "71" => _("Services : Disacknowledge"), 89 "80" => _("Services : Enable Notification"), 90 "81" => _("Services : Disable Notification"), 91 "90" => _("Services : Enable Check"), 92 "91" => _("Services : Disable Check"), 93 "72" => _("Hosts : Acknowledge"), 94 "73" => _("Hosts : Disacknowledge"), 95 "82" => _("Hosts : Enable Notification"), 96 "83" => _("Hosts : Disable Notification"), 97 "92" => _("Hosts : Enable Check"), 98 "93" => _("Hosts : Disable Check")), $attrs); 138 $form->addElement('select', 'o1', NULL, $action_list, $attrs); 99 139 100 140 $form->setDefaults(array('o1' => NULL)); … … 103 143 104 144 $attrs = array('onchange'=>"javascript: setO(this.form.elements['o2'].value); submit();"); 105 $form->addElement('select', 'o2', NULL, array( NULL => _("More actions..."), 106 "3" => _("Verification Check"), 107 "4" => _("Verification Check (Forced)"), 108 "70" => _("Services : Acknowledge"), 109 "71" => _("Services : Disacknowledge"), 110 "80" => _("Services : Enable Notification"), 111 "81" => _("Services : Disable Notification"), 112 "90" => _("Services : Enable Check"), 113 "91" => _("Services : Disable Check"), 114 "72" => _("Hosts : Acknowledge"), 115 "73" => _("Hosts : Disacknowledge"), 116 "82" => _("Hosts : Enable Notification"), 117 "83" => _("Hosts : Disable Notification"), 118 "92" => _("Hosts : Enable Check"), 119 "93" => _("Hosts : Disable Check")), $attrs); 145 $form->addElement('select', 'o2', NULL, $action_list, $attrs); 120 146 $form->setDefaults(array('o2' => NULL)); 121 147 $o2 =& $form->getElement('o2');
