Changeset 5912 for trunk/centreon/www/include/eventLogs/viewLog.php
- Timestamp:
- 07/24/08 16:58:52 (4 months ago)
- Files:
-
- 1 modified
-
trunk/centreon/www/include/eventLogs/viewLog.php (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/centreon/www/include/eventLogs/viewLog.php
r5860 r5912 56 56 if (!isset($user_params["log_filter_alert"])) 57 57 $user_params["log_filter_alert"] = 1; 58 if (!isset($user_params["log_filter_oh"])) 59 $user_params["log_filter_oh"] = 1; 58 60 59 61 #Path to the configuration dir … … 69 71 $openid = '0'; 70 72 $open_id_sub = '0'; 71 if (isset($_GET["openid"])){73 if (isset($_GET["openid"])){ 72 74 $openid = $_GET["openid"]; 73 75 $open_id_type = substr($openid, 0, 2); … … 75 77 } 76 78 77 if (isset($_GET["id"])){79 if (isset($_GET["id"])){ 78 80 $id = $_GET["id"]; 79 81 } else 80 82 $id = 1; 81 if (isset($_POST["id"])){83 if (isset($_POST["id"])){ 82 84 $id = $_POST["id"]; 83 85 } else … … 88 90 $id_svc = $_POST["svc_id"]; 89 91 $tab_svcs = explode(",", $id_svc); 90 foreach($tab_svcs as $svc) 91 { 92 foreach ($tab_svcs as $svc){ 92 93 $tmp = explode(";", $svc); 93 94 $id .= "HS_" . getMyServiceID($tmp[1], getMyHostID($tmp[0])).","; … … 96 97 $id_log = "'RR_0'"; 97 98 $multi =0; 98 if (isset($_GET["mode"]) && $_GET["mode"] == "0"){99 if (isset($_GET["mode"]) && $_GET["mode"] == "0"){ 99 100 $mode = 0; 100 101 $id_log = "'".$id."'"; 101 102 $multi =1; 102 } else {103 } else { 103 104 $mode = 1; 104 105 $id = 1; … … 148 149 cssNode.rel = 'stylesheet'; 149 150 cssNode.href = css_file; 150 cssNode.media = 'screen';headID.appendChild(cssNode); 151 cssNode.media = 'screen'; 152 headID.appendChild(cssNode); 151 153 152 154 var multi = <?php echo $multi; ?>; … … 175 177 return tree.getAllChecked(); 176 178 } 177 if (document.getElementById('linkBar')){179 if (document.getElementById('linkBar')){ 178 180 var _menu_2 = document.getElementById('linkBar') 179 181 var _divBar = document.createElement("div"); … … 195 197 function onNodeSelect(nodeId){ 196 198 var logView4xml = document.getElementById('logView4xml'); 197 logView4xml.innerHTML ="Waiting XML log";199 logView4xml.innerHTML = "Waiting XML log"; 198 200 199 201 tree.openItem(nodeId); … … 239 241 var _error = <?php echo $user_params["log_filter_error"]; ?>; 240 242 var _alert = <?php echo $user_params["log_filter_alert"]; ?>; 243 244 var _oh = <?php echo $user_params["log_filter_oh"]; ?>; 241 245 242 246 // Period … … 296 300 297 301 function log_4_host(id, formu, type){ 298 if (document.formu && !document.formu.period_choice[1].checked) {302 if (document.formu && !document.formu.period_choice[1].checked) { 299 303 period = document.formu.period.value; 300 304 } else if(document.formu) { … … 307 311 308 312 // type 309 if (document.formu2 && document.formu2.notification)313 if (document.formu2 && document.formu2.notification) 310 314 _notification = document.formu2.notification.checked; 311 if (document.formu2 && document.formu2.error)315 if (document.formu2 && document.formu2.error) 312 316 _error = document.formu2.error.checked; 313 if (document.formu2 && document.formu2.alert)317 if (document.formu2 && document.formu2.alert) 314 318 _alert = document.formu2.alert.checked; 315 319 316 if (document.formu2 && document.formu2.up)320 if (document.formu2 && document.formu2.up) 317 321 _up = document.formu2.up.checked; 318 if (document.formu2 && document.formu2.down)322 if (document.formu2 && document.formu2.down) 319 323 _down = document.formu2.down.checked; 320 if (document.formu2 && document.formu2.unreachable)324 if (document.formu2 && document.formu2.unreachable) 321 325 _unreachable = document.formu2.unreachable.checked; 322 326 323 if (document.formu2 && document.formu2.ok)327 if (document.formu2 && document.formu2.ok) 324 328 _ok = document.formu2.ok.checked; 325 326 if(document.formu2 && document.formu2.warning) 329 if (document.formu2 && document.formu2.warning) 327 330 _warning = document.formu2.warning.checked; 328 329 if(document.formu2 && document.formu2.critical) 331 if (document.formu2 && document.formu2.critical) 330 332 _critical = document.formu2.critical.checked; 331 332 if(document.formu2 && document.formu2.unknown) 333 if (document.formu2 && document.formu2.unknown) 333 334 _unknown = document.formu2.unknown.checked; 334 335 335 if (document.formu && document.formu.StartDate.value != "")336 if (document.formu && document.formu.StartDate.value != "") 336 337 StartDate = document.formu.StartDate.value; 337 if (document.formu && document.formu.EndDate.value != "")338 if (document.formu && document.formu.EndDate.value != "") 338 339 EndDate = document.formu.EndDate.value; 339 340 340 if (document.formu && document.formu.StartTime.value != "")341 if (document.formu && document.formu.StartTime.value != "") 341 342 StartTime = document.formu.StartTime.value; 342 if (document.formu && document.formu.EndTime.value != "")343 if (document.formu && document.formu.EndTime.value != "") 343 344 EndTime = document.formu.EndTime.value; 345 346 if (document.formu2 && document.formu2.oh) 347 _oh = document.formu2.oh.checked; 344 348 345 349 tree.selectItem(id); … … 348 352 var _addrXSL = "./include/eventLogs/log.xsl"; 349 353 350 if(!type) 351 { 352 var _addr = './include/eventLogs/GetODSXmlLog.php?multi='+multi+'&warning='+_warning+'&unknown='+_unknown+'&critical='+_critical+'&ok='+_ok+'&unreachable='+_unreachable+'&down='+_down+'&up='+_up+'&num='+_num+'&error='+_error+'&alert='+_alert+'¬ification='+_notification+'&period='+period+'&StartDate='+StartDate+'&EndDate='+EndDate+'&StartTime='+StartTime+'&EndTime='+EndTime+'&id='+id+'&sid=<?php echo $sid;?>'; 353 proc.setXml(_addr) 354 proc.setXslt(_addrXSL) 355 proc.transform("logView4xml"); 356 } 357 else{ 358 var _addr = './include/eventLogs/GetODS'+type+'Log.php?multi='+multi+'&warning='+_warning+'&unknown='+_unknown+'&critical='+_critical+'&ok='+_ok+'&unreachable='+_unreachable+'&down='+_down+'&up='+_up+'&num='+_num+'&error='+_error+'&alert='+_alert+'¬ification='+_notification+'&period='+period+'&StartDate='+StartDate+'&EndDate='+EndDate+'&StartTime='+StartTime+'&EndTime='+EndTime+'&id='+id+'&sid=<?php echo $sid;?>'; 359 document.location.href = _addr; 354 if (!type){ 355 var _addr = './include/eventLogs/GetODSXmlLog.php?multi='+multi+'&oh='+_oh+'&warning='+_warning+'&unknown='+_unknown+'&critical='+_critical+'&ok='+_ok+'&unreachable='+_unreachable+'&down='+_down+'&up='+_up+'&num='+_num+'&error='+_error+'&alert='+_alert+'¬ification='+_notification+'&period='+period+'&StartDate='+StartDate+'&EndDate='+EndDate+'&StartTime='+StartTime+'&EndTime='+EndTime+'&id='+id+'&sid=<?php echo $sid;?>'; 356 proc.setXml(_addr) 357 proc.setXslt(_addrXSL) 358 proc.transform("logView4xml"); 359 } else{ 360 var _addr = './include/eventLogs/GetODS'+type+'Log.php?multi='+multi+'&oh='+_oh+'&warning='+_warning+'&unknown='+_unknown+'&critical='+_critical+'&ok='+_ok+'&unreachable='+_unreachable+'&down='+_down+'&up='+_up+'&num='+_num+'&error='+_error+'&alert='+_alert+'¬ification='+_notification+'&period='+period+'&StartDate='+StartDate+'&EndDate='+EndDate+'&StartTime='+StartTime+'&EndTime='+EndTime+'&id='+id+'&sid=<?php echo $sid;?>'; 361 document.location.href = _addr; 360 362 } 361 363 } … … 372 374 } 373 375 } 374 375 376 </script>
