Changeset 6239

Show
Ignore:
Timestamp:
08/21/08 17:37:03 (5 months ago)
Author:
jmathis
Message:

new version of makeXML for bubulle

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/centreon/www/include/monitoring/status/status-ndo/makeJS_service.php

    r5992 r6239  
    3434         
    3535        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 ?>'; 
    4646         
    4747        var _addrXSL = "./include/monitoring/status/status-ndo/templates/service.xsl"; 
     
    5959        var _default_instance = '0'; 
    6060        var _nc = 0; 
    61 <?php 
    62 include_once("makeJS_Common.php"); 
    63 ?> 
     61         
     62<?php include_once"makeJS_Common.php"; ?> 
    6463 
    6564// linkBar to log/reporting/graph/ID_card 
    66         function getCheckedList(_input_name) 
    67         { 
     65 
     66        function getCheckedList(_input_name){ 
    6867                var mesinputs = document.getElementsByTagName("input" ); 
    6968                var tab = new Array(); 
     
    8180        } 
    8281 
    83         if(document.getElementById('linkBar')) 
    84         { 
     82        if (document.getElementById('linkBar')) { 
    8583                var _linkBar = document.getElementById('linkBar') 
    8684                var _divBar = document.createElement("div"); 
     
    8886                _divBar.appendChild(create_graph_link('select','svc_id')); 
    8987                _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;' ); 
    9489                _linkBar.appendChild(_divBar); 
    9590        } 
     
    10196var tempY = 0; 
    10297 
    103 function position(e) 
    104 { 
     98function position(e){ 
    10599        tempX = (navigator.appName.substring(0,3) == "Net") ? e.pageX : event.x+document.body.scrollLeft; 
    106100        tempY = (navigator.appName.substring(0,3) == "Net") ? e.pageY : event.y+document.body.scrollTop; 
     
    170164        } 
    171165} 
    172  
    173  
    174166 
    175167function monitoring_refresh()   { 
     
    238230 
    239231        _lock = 0; 
    240  
    241  
    242  
    243232        viewDebugInfo('--end--'); 
    244  
    245  
     233         
    246234        _timeoutID = setTimeout('goM("'+ _time_reload +'","'+ _sid +'","'+_o+'")', _time_reload); 
    247235        _time_live = _time_reload; 
     
    254242        var span = document.getElementById('span_'+id); 
    255243        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"; 
    258246        proc_popup.setXml(_addrXMLSpan); 
    259247        proc_popup.setXslt(_addrXSLSpan); 
    260248        proc_popup.transform('span_'+id); 
    261249 
    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){ 
    265257                span.style.top = '-'+ span.offsetHeight +'px'; 
    266258        } 
     
    270262        var span = document.getElementById('span_'+id); 
    271263        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"; 
    274266        proc_popup.setXml(_addrXMLSpan); 
    275267        proc_popup.setXslt(_addrXSLSpan); 
    276268        proc_popup.transform('span_'+id); 
    277269 
    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){ 
    282277                span.style.top = '-'+ span.offsetHeight +'px'; 
    283278        } 
     
    290285 
    291286function 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 
     317function hiddenIMG(id){ 
    292318        // Pour les navigateurs récents 
    293319    if ( document.getElementById && document.getElementById( 'div_img' ) ){ 
    294320        Pdiv = document.getElementById( 'div_img' ); 
    295321        PcH = true; 
    296     } else if ( document.all && document.all[ 'div_img' ] ){ 
    297             // Pour les veilles versions 
    298         Pdiv = document.all[ 'div_img' ]; 
    299         PcH = true; 
    300     } else if ( document.layers && document.layers[ 'div_img' ] ){ 
    301     // Pour les trÚs veilles versions 
    302         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 client  
    311                         var h=screen.availHeight; //calcul auto de la hauteur de l'ecran client                  
    312                         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écents 
    324     if ( document.getElementById && document.getElementById( 'div_img' ) ){ 
    325         Pdiv = document.getElementById( 'div_img' ); 
    326         PcH = true; 
    327322    } 
    328323    // Pour les veilles versions