Changeset 5859
- Timestamp:
- 07/23/08 18:15:30 (2 months ago)
- Location:
- trunk/centreon/www/include/eventLogs
- Files:
-
- 3 modified
-
log.xsl (modified) (10 diffs)
-
viewLog.ihtml (modified) (1 diff)
-
viewLog.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/centreon/www/include/eventLogs/log.xsl
r5226 r5859 15 15 <td> 16 16 <xsl:element name='input'> 17 <xsl:attribute name="onClick">log_4_host('<xsl:value-of select="//opid"/>', this.form ); return false;</xsl:attribute>17 <xsl:attribute name="onClick">log_4_host('<xsl:value-of select="//opid"/>', this.form, ''); return false;</xsl:attribute> 18 18 <xsl:attribute name="name">notification</xsl:attribute> 19 19 <xsl:attribute name="type">checkbox</xsl:attribute> … … 27 27 <td> 28 28 <xsl:element name='input'> 29 <xsl:attribute name="onClick">log_4_host('<xsl:value-of select="//opid"/>', this.form ); return false;</xsl:attribute>29 <xsl:attribute name="onClick">log_4_host('<xsl:value-of select="//opid"/>', this.form, ''); return false;</xsl:attribute> 30 30 <xsl:attribute name="name">alert</xsl:attribute> 31 31 <xsl:attribute name="type">checkbox</xsl:attribute> … … 41 41 <td> 42 42 <xsl:element name='input'> 43 <xsl:attribute name="onClick">log_4_host('<xsl:value-of select="//opid"/>', this.form ); return false;</xsl:attribute>43 <xsl:attribute name="onClick">log_4_host('<xsl:value-of select="//opid"/>', this.form, ''); return false;</xsl:attribute> 44 44 <xsl:attribute name="name">error</xsl:attribute> 45 45 <xsl:attribute name="type">checkbox</xsl:attribute> … … 63 63 <td> 64 64 <xsl:element name='input'> 65 <xsl:attribute name="onClick">log_4_host('<xsl:value-of select="//opid"/>', this.form ); return false;</xsl:attribute>65 <xsl:attribute name="onClick">log_4_host('<xsl:value-of select="//opid"/>', this.form, ''); return false;</xsl:attribute> 66 66 <xsl:attribute name="name">up</xsl:attribute> 67 67 <xsl:attribute name="type">checkbox</xsl:attribute> … … 75 75 <td> 76 76 <xsl:element name='input'> 77 <xsl:attribute name="onClick">log_4_host('<xsl:value-of select="//opid"/>', this.form ); return false;</xsl:attribute>77 <xsl:attribute name="onClick">log_4_host('<xsl:value-of select="//opid"/>', this.form, ''); return false;</xsl:attribute> 78 78 <xsl:attribute name="name">down</xsl:attribute> 79 79 <xsl:attribute name="type">checkbox</xsl:attribute> … … 89 89 <td> 90 90 <xsl:element name='input'> 91 <xsl:attribute name="onClick">log_4_host('<xsl:value-of select="//opid"/>', this.form ); return false;</xsl:attribute>91 <xsl:attribute name="onClick">log_4_host('<xsl:value-of select="//opid"/>', this.form, ''); return false;</xsl:attribute> 92 92 <xsl:attribute name="name">unreachable</xsl:attribute> 93 93 <xsl:attribute name="type">checkbox</xsl:attribute> … … 111 111 <td> 112 112 <xsl:element name='input'> 113 <xsl:attribute name="onClick">log_4_host('<xsl:value-of select="//opid"/>', this.form ); return false;</xsl:attribute>113 <xsl:attribute name="onClick">log_4_host('<xsl:value-of select="//opid"/>', this.form, ''); return false;</xsl:attribute> 114 114 <xsl:attribute name="name">ok</xsl:attribute> 115 115 <xsl:attribute name="type">checkbox</xsl:attribute> … … 123 123 <td> 124 124 <xsl:element name='input'> 125 <xsl:attribute name="onClick">log_4_host('<xsl:value-of select="//opid"/>', this.form ); return false;</xsl:attribute>125 <xsl:attribute name="onClick">log_4_host('<xsl:value-of select="//opid"/>', this.form, ''); return false;</xsl:attribute> 126 126 <xsl:attribute name="name">warning</xsl:attribute> 127 127 <xsl:attribute name="type">checkbox</xsl:attribute> … … 137 137 <td> 138 138 <xsl:element name='input'> 139 <xsl:attribute name="onClick">log_4_host('<xsl:value-of select="//opid"/>', this.form ); return false;</xsl:attribute>139 <xsl:attribute name="onClick">log_4_host('<xsl:value-of select="//opid"/>', this.form, ''); return false;</xsl:attribute> 140 140 <xsl:attribute name="name">critical</xsl:attribute> 141 141 <xsl:attribute name="type">checkbox</xsl:attribute> … … 149 149 <td> 150 150 <xsl:element name='input'> 151 <xsl:attribute name="onClick">log_4_host('<xsl:value-of select="//opid"/>', this.form ); return false;</xsl:attribute>151 <xsl:attribute name="onClick">log_4_host('<xsl:value-of select="//opid"/>', this.form, ''); return false;</xsl:attribute> 152 152 <xsl:attribute name="name">unknown</xsl:attribute> 153 153 <xsl:attribute name="type">checkbox</xsl:attribute> -
trunk/centreon/www/include/eventLogs/viewLog.ihtml
r5839 r5859 36 36 37 37 38 <a href="javascript:log_ CSV()"><img src="./img/icones/16x16/text_binary_csv.gif" alt="export CSV"/></a>38 <a href="javascript:log_4_host(this, '', 'CSV')"><img src="./img/icones/16x16/text_binary_csv.gif" alt="export CSV"/></a> 39 39 40 <a href="javascript:log_ XML()"><img src="./img/icones/16x16/text_binary_xml.gif" alt="export XML"/></a>40 <a href="javascript:log_4_host(this, '', 'Xml')"><img src="./img/icones/16x16/text_binary_xml.gif" alt="export XML"/></a> 41 41 </td> 42 42 </tr> -
trunk/centreon/www/include/eventLogs/viewLog.php
r5839 r5859 206 206 207 207 if(tree.getAllChecked()){ 208 log_4_host(tree.getAllChecked(),'' );208 log_4_host(tree.getAllChecked(),'',''); 209 209 } else { 210 210 // var logView4xml = document.getElementById('logView4xml').innerHTML = '<- Check or select an item or more !'; … … 218 218 function apply_period(){ 219 219 var openid = document.getElementById('openid').innerHTML; 220 log_4_host(openid );220 log_4_host(openid,'',''); 221 221 } 222 222 … … 224 224 function log_4_host_page(id, formu, num) { 225 225 _num = num; 226 log_4_host(id, formu );226 log_4_host(id, formu, ''); 227 227 } 228 228 … … 298 298 } 299 299 300 function log_4_host(id, formu ){300 function log_4_host(id, formu, type){ 301 301 if(document.formu && !document.formu.period_choice[1].checked) { 302 302 period = document.formu.period.value; … … 350 350 var proc = new Transformation(); 351 351 var _addrXSL = "./include/eventLogs/log.xsl"; 352 var _addrXML = './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(_addrXML) 352 353 if(!type) 354 { 355 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;?>'; 356 proc.setXml(_addr) 354 357 proc.setXslt(_addrXSL) 355 358 proc.transform("logView4xml"); 356 357 if (document.formu){ 358 document.formu.StartDate.value = StartDate; 359 document.formu.EndDate.value = EndDate; 360 document.formu.StartTime.value = StartTime; 361 document.formu.EndTime.value = EndTime; 362 } 363 } 364 365 366 // Function used to lauch the CSV export 367 368 function log_CSV(id, formu){ 369 if(document.formu && !document.formu.period_choice[1].checked) { 370 period = document.formu.period.value; 371 } else if(document.formu) { 372 period = ''; 373 StartDate = document.formu.StartDate.value; 374 EndDate = document.formu.EndDate.value; 375 StartTime = document.formu.StartTime.value; 376 EndTime = document.formu.EndTime.value; 377 } 378 379 380 // type 381 if(document.formu2 && document.formu2.notification) 382 _notification = document.formu2.notification.checked; 383 if(document.formu2 && document.formu2.error) 384 _error = document.formu2.error.checked; 385 if(document.formu2 && document.formu2.alert) 386 _alert = document.formu2.alert.checked; 387 388 if(document.formu2 && document.formu2.up) 389 _up = document.formu2.up.checked; 390 if(document.formu2 && document.formu2.down) 391 _down = document.formu2.down.checked; 392 if(document.formu2 && document.formu2.unreachable) 393 _unreachable = document.formu2.unreachable.checked; 394 395 if(document.formu2 && document.formu2.ok) 396 _ok = document.formu2.ok.checked; 397 398 if(document.formu2 && document.formu2.warning) 399 _warning = document.formu2.warning.checked; 400 401 if(document.formu2 && document.formu2.critical) 402 _critical = document.formu2.critical.checked; 403 404 if(document.formu2 && document.formu2.unknown) 405 _unknown = document.formu2.unknown.checked; 406 407 if(document.formu && document.formu.StartDate.value != "") 408 StartDate = document.formu.StartDate.value; 409 if(document.formu && document.formu.EndDate.value != "") 410 EndDate = document.formu.EndDate.value; 411 412 if(document.formu && document.formu.StartTime.value != "") 413 StartTime = document.formu.StartTime.value; 414 if(document.formu && document.formu.EndTime.value != "") 415 EndTime = document.formu.EndTime.value; 416 417 tree.selectItem(id); 418 419 // send all parmeters via the URL 420 421 var _addrCSV = './include/eventLogs/GetODSCSVLog.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+'&limit=66000&EndTime='+EndTime+'&id='+id+'&sid=<?php echo $sid;?>'; 422 423 document.location.href = _addrCSV; 424 } 425 359 } 360 else{ 361 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;?>'; 362 document.location.href = _addr; 363 } 364 } 426 365 427 366 var nowOnload = window.onload; … … 429 368 // Here is your precious function 430 369 // You can call as many functions as you want here; 431 log_4_host(<?php echo $id_log;?>, null);370 log_4_host(<?php echo $id_log;?>, '', ''); 432 371 433 372 // Now we call old function which was assigned to onLoad, thus playing nice … … 437 376 } 438 377 439 // Function used to lauch the XML export440 441 function log_XML(id, formu){442 if(document.formu && !document.formu.period_choice[1].checked) {443 period = document.formu.period.value;444 } else if(document.formu) {445 period = '';446 StartDate = document.formu.StartDate.value;447 EndDate = document.formu.EndDate.value;448 StartTime = document.formu.StartTime.value;449 EndTime = document.formu.EndTime.value;450 }451 452 453 // type454 if(document.formu2 && document.formu2.notification)455 _notification = document.formu2.notification.checked;456 if(document.formu2 && document.formu2.error)457 _error = document.formu2.error.checked;458 if(document.formu2 && document.formu2.alert)459 _alert = document.formu2.alert.checked;460 461 if(document.formu2 && document.formu2.up)462 _up = document.formu2.up.checked;463 if(document.formu2 && document.formu2.down)464 _down = document.formu2.down.checked;465 if(document.formu2 && document.formu2.unreachable)466 _unreachable = document.formu2.unreachable.checked;467 468 if(document.formu2 && document.formu2.ok)469 _ok = document.formu2.ok.checked;470 471 if(document.formu2 && document.formu2.warning)472 _warning = document.formu2.warning.checked;473 474 if(document.formu2 && document.formu2.critical)475 _critical = document.formu2.critical.checked;476 477 if(document.formu2 && document.formu2.unknown)478 _unknown = document.formu2.unknown.checked;479 480 if(document.formu && document.formu.StartDate.value != "")481 StartDate = document.formu.StartDate.value;482 if(document.formu && document.formu.EndDate.value != "")483 EndDate = document.formu.EndDate.value;484 485 if(document.formu && document.formu.StartTime.value != "")486 StartTime = document.formu.StartTime.value;487 if(document.formu && document.formu.EndTime.value != "")488 EndTime = document.formu.EndTime.value;489 490 tree.selectItem(id);491 492 // send all parmeters via the URL493 494 var _addrXML = './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+'&limit=66000&EndTime='+EndTime+'&id='+id+'&sid=<?php echo $sid;?>';495 496 document.location.href = _addrXML;497 }498 499 500 var nowOnload = window.onload;501 window.onload = function () {502 // Here is your precious function503 // You can call as many functions as you want here;504 log_4_host(<?php echo $id_log;?>,null);505 506 // Now we call old function which was assigned to onLoad, thus playing nice507 if (nowOnload != null && typeof(nowOnload) == 'function') {508 nowOnload();509 }510 }511 512 378 </script>
