Changeset 6239
- Timestamp:
- 08/21/08 17:37:03 (5 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/centreon/www/include/monitoring/status/status-ndo/makeJS_service.php
r5992 r6239 34 34 35 35 var _search = '<?php echo $search; ?>'; 36 var _sid='<?php echo $sid ?>';37 var _search_type_host='<?php echo $search_type_host ?>';38 var _search_type_service='<?php echo $search_type_service ?>';39 var _num='<?php echo $num ?>';40 var _limit='<?php echo $limit ?>';41 var _sort_type='<?php echo $sort_type ?>';42 var _order='<?php echo $order ?>';43 var _date_time_format_status='<?php echo _("d/m/Y H:i:s") ?>';44 var _o='<?php echo $o ?>';45 var _p='<?php echo $p ?>';36 var _sid='<?php echo $sid ?>'; 37 var _search_type_host='<?php echo $search_type_host ?>'; 38 var _search_type_service='<?php echo $search_type_service ?>'; 39 var _num='<?php echo $num ?>'; 40 var _limit='<?php echo $limit ?>'; 41 var _sort_type='<?php echo $sort_type ?>'; 42 var _order='<?php echo $order ?>'; 43 var _date_time_format_status='<?php echo _("d/m/Y H:i:s") ?>'; 44 var _o='<?php echo $o ?>'; 45 var _p='<?php echo $p ?>'; 46 46 47 47 var _addrXSL = "./include/monitoring/status/status-ndo/templates/service.xsl"; … … 59 59 var _default_instance = '0'; 60 60 var _nc = 0; 61 <?php 62 include_once("makeJS_Common.php"); 63 ?> 61 62 <?php include_once"makeJS_Common.php"; ?> 64 63 65 64 // linkBar to log/reporting/graph/ID_card 66 function getCheckedList(_input_name) 67 {65 66 function getCheckedList(_input_name){ 68 67 var mesinputs = document.getElementsByTagName("input" ); 69 68 var tab = new Array(); … … 81 80 } 82 81 83 if(document.getElementById('linkBar')) 84 { 82 if (document.getElementById('linkBar')) { 85 83 var _linkBar = document.getElementById('linkBar') 86 84 var _divBar = document.createElement("div"); … … 88 86 _divBar.appendChild(create_graph_link('select','svc_id')); 89 87 _divBar.appendChild(create_log_link('select','svc_id')); 90 // _divBar.appendChild(create_report_link('select','svc_id')); 91 // _divBar.appendChild(create_IDCard_link('select','svc_id')); 92 93 _divBar.setAttribute('style','float:right; margin-right:110px;' ); 88 _divBar.setAttribute('style','float:right; margin-right:10px;' ); 94 89 _linkBar.appendChild(_divBar); 95 90 } … … 101 96 var tempY = 0; 102 97 103 function position(e) 104 { 98 function position(e){ 105 99 tempX = (navigator.appName.substring(0,3) == "Net") ? e.pageX : event.x+document.body.scrollLeft; 106 100 tempY = (navigator.appName.substring(0,3) == "Net") ? e.pageY : event.y+document.body.scrollTop; … … 170 164 } 171 165 } 172 173 174 166 175 167 function monitoring_refresh() { … … 238 230 239 231 _lock = 0; 240 241 242 243 232 viewDebugInfo('--end--'); 244 245 233 246 234 _timeoutID = setTimeout('goM("'+ _time_reload +'","'+ _sid +'","'+_o+'")', _time_reload); 247 235 _time_live = _time_reload; … … 254 242 var span = document.getElementById('span_'+id); 255 243 var proc_popup = new Transformation(); 256 var _addrXMLSpan = "./include/monitoring/engine/ MakeXML_Ndo_for_one_host.php?"+'&sid='+_sid+'&host_id='+id;257 var _addrXSLSpan = "./include/monitoring/status/status-ndo/templates/ host_popup.xsl";244 var _addrXMLSpan = "./include/monitoring/engine/makeXMLForOneHost.php?"+'&sid='+_sid+'&host_id='+id; 245 var _addrXSLSpan = "./include/monitoring/status/status-ndo/templates/popupForHost.xsl"; 258 246 proc_popup.setXml(_addrXMLSpan); 259 247 proc_popup.setXslt(_addrXSLSpan); 260 248 proc_popup.transform('span_'+id); 261 249 262 var l=screen.availWidth; //calcul auto de la largeur de l'ecran client 263 var h=screen.availHeight; //calcul auto de la hauteur de l'ecran client 264 if(h - tempY < span.offsetHeight){ 250 //calcul auto de la largeur de l'ecran client 251 var l = screen.availWidth; 252 253 //calcul auto de la hauteur de l'ecran client 254 var h = screen.availHeight; 255 256 if (h - tempY < span.offsetHeight){ 265 257 span.style.top = '-'+ span.offsetHeight +'px'; 266 258 } … … 270 262 var span = document.getElementById('span_'+id); 271 263 var proc_popup = new Transformation(); 272 var _addrXMLSpan = "./include/monitoring/engine/ MakeXML_Ndo_for_one_svc.php?"+'&sid='+_sid+'&svc_id='+id;273 var _addrXSLSpan = "./include/monitoring/status/status-ndo/templates/ svc_popup.xsl";264 var _addrXMLSpan = "./include/monitoring/engine/makeXMLForOneService.php?"+'&sid='+_sid+'&svc_id='+id; 265 var _addrXSLSpan = "./include/monitoring/status/status-ndo/templates/popupForService.xsl"; 274 266 proc_popup.setXml(_addrXMLSpan); 275 267 proc_popup.setXslt(_addrXSLSpan); 276 268 proc_popup.transform('span_'+id); 277 269 278 var l=screen.availWidth; //calcul auto de la largeur de l'ecran client 279 var h=screen.availHeight; //calcul auto de la hauteur de l'ecran client 280 281 if(h - tempY < span.offsetHeight){ 270 // calcul auto de la largeur de l'ecran client 271 var l = screen.availWidth; 272 273 //calcul auto de la hauteur de l'ecran client 274 var h = screen.availHeight; 275 276 if (h - tempY < span.offsetHeight){ 282 277 span.style.top = '-'+ span.offsetHeight +'px'; 283 278 } … … 290 285 291 286 function displayIMG(index, s_id, id) { 287 // Pour les navigateurs recents 288 if ( document.getElementById && document.getElementById( 'div_img' ) ){ 289 Pdiv = document.getElementById( 'div_img' ); 290 PcH = true; 291 } else if ( document.all && document.all[ 'div_img' ] ){ 292 // Pour les veilles versions 293 Pdiv = document.all[ 'div_img' ]; 294 PcH = true; 295 } else if ( document.layers && document.layers[ 'div_img' ] ){ 296 // Pour les tres veilles versions 297 Pdiv = document.layers[ 'div_img' ]; 298 PcH = true; 299 } else { 300 PcH = false; 301 } 302 if ( PcH ){ 303 _img = mk_img('include/views/graphs/graphODS/generateImages/generateODSImage.php?session_id='+s_id+'&index='+index, 'graph popup'+'&index='+index); 304 Pdiv.appendChild(_img); 305 var l=screen.availWidth; //calcul auto de la largeur de l'ecran client 306 var h=screen.availHeight; //calcul auto de la hauteur de l'ecran client 307 var posy = tempY + 10; 308 if(h - tempY < 420){ 309 posy = tempY-310; 310 } 311 Pdiv.style.display = "block"; 312 Pdiv.style.left = tempX +'px'; 313 Pdiv.style.top = posy +'px'; 314 } 315 } 316 317 function hiddenIMG(id){ 292 318 // Pour les navigateurs récents 293 319 if ( document.getElementById && document.getElementById( 'div_img' ) ){ 294 320 Pdiv = document.getElementById( 'div_img' ); 295 321 PcH = true; 296 } else if ( document.all && document.all[ 'div_img' ] ){297 // Pour les veilles versions298 Pdiv = document.all[ 'div_img' ];299 PcH = true;300 } else if ( document.layers && document.layers[ 'div_img' ] ){301 // Pour les trÚs veilles versions302 Pdiv = document.layers[ 'div_img' ];303 PcH = true;304 } else {305 PcH = false;306 }307 if ( PcH ){308 _img = mk_img('include/views/graphs/graphODS/generateImages/generateODSImage.php?session_id='+s_id+'&index='+index, 'graph popup'+'&index='+index);309 Pdiv.appendChild(_img);310 var l=screen.availWidth; //calcul auto de la largeur de l'ecran client311 var h=screen.availHeight; //calcul auto de la hauteur de l'ecran client312 var posy = tempY + 10;313 if(h - tempY < 420){314 posy = tempY-310;315 }316 Pdiv.style.display = "block";317 Pdiv.style.left = tempX +'px';318 Pdiv.style.top = posy +'px';319 }320 }321 322 function hiddenIMG(id){323 // Pour les navigateurs récents324 if ( document.getElementById && document.getElementById( 'div_img' ) ){325 Pdiv = document.getElementById( 'div_img' );326 PcH = true;327 322 } 328 323 // Pour les veilles versions
