Show
Ignore:
Timestamp:
07/11/07 23:45:44 (6 years ago)
Author:
gregmac
Message:

Remove old code from individual div updates (pre-JSON)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.3/dashboard/page.index.php

    r4361 r4362  
    3232 
    3333// AJAX update intervals (in seconds) 
    34 define('SYSSTATS_UPDATE_TIME', 5); // update interval for system stats (cpu, memory, etc) 
    35 define('ASTSTATS_UPDATE_TIME', 5); // update interval for asterisk stats (number calls, ..) 
    36 define('SYSINFO_UPDATE_TIME', 60); // update interval for system uptime information 
    37 define('PROCINFO_UPDATE_TIME', 30); // update interval for process information (asterisk, mysql, etc running) 
    38 define('SYSLOG_UPDATE_TIME', 300); // update interval for system uptime information 
    39  
    4034define('STATS_UPDATE_TIME', 6); // update interval for system uptime information 
    4135define('INFO_UPDATE_TIME', 60); // update interval for system uptime information 
     
    404398  $(document).ready(function(){ 
    405399    $.ajaxTimeout( 20000 ); 
    406     /*scheduleSysstatsUpdate('', 'start'); 
    407     scheduleAststatsUpdate('', 'start'); 
    408     scheduleProcinfoUpdate('', 'start'); 
    409     scheduleSysinfoUpdate('', 'start'); 
    410     */ 
    411400    scheduleInfoUpdate(); 
    412401    scheduleStatsUpdate(); 
     
    464453        $('#datavalue_Web_Server').removeClass("graphok"); 
    465454        $('#datavalue_Web_Server').addClass("grapherror"); 
    466         $('#dashboard').prepend('<div class="warning">Warning: Update timed out<br/></div>'); 
     455        $('#syslog').prepend('<div class="warning">Warning: Update timed out<br/></div>'); 
    467456      }, 
    468457    }); 
     
    472461  } 
    473462   
    474   /* 
    475   function updateSysstats() { 
    476     $('#sysstats').load("<?php echo $_SERVER["PHP_SELF"]; ?>?type=tool&display=<?php echo $module_page; ?>&quietmode=1&info=sysstats", {}, scheduleSysstatsUpdate); 
    477   } 
    478   function scheduleSysstatsUpdate(responseText, status) { 
    479     if (status == 'start' || status == 'success') { 
    480       setTimeout('updateSysstats();',<?php echo SYSSTATS_UPDATE_TIME; ?>000); 
    481     } else { 
    482       //$('#sysstats').prepend('<div class="warning">Warning: Update timed out<br/></div>'); 
    483     } 
    484   } 
    485    
    486   function updateAststats() { 
    487     $('#aststats').load("<?php echo $_SERVER["PHP_SELF"]; ?>?type=tool&display=<?php echo $module_page; ?>&quietmode=1&info=aststats", {}, scheduleAststatsUpdate); 
    488   } 
    489   function scheduleAststatsUpdate(responseText, status) { 
    490     if (status == 'start' || status == 'success') { 
    491       setTimeout('updateAststats();',<?php echo ASTSTATS_UPDATE_TIME; ?>000); 
    492     } else { 
    493       $('#aststats').prepend('<div class="warning">Warning: Update timed out<br/></div>'); 
    494     } 
    495   } 
    496    
    497   function updateProcinfo() { 
    498     $('#procinfo').load("<?php echo $_SERVER["PHP_SELF"]; ?>?type=tool&display=<?php echo $module_page; ?>&quietmode=1&info=procinfo", {}, scheduleProcinfoUpdate); 
    499   } 
    500   function scheduleProcinfoUpdate(responseText, status) { 
    501     if (status == 'start' || status == 'success') { 
    502       setTimeout('updateProcinfo();', <?php echo PROCINFO_UPDATE_TIME; ?>000); 
    503     } else { 
    504       $('#datavalue_Web_Server').text("ERROR"); 
    505       $('#datavalue_Web_Server').removeClass("graphok"); 
    506       $('#datavalue_Web_Server').addClass("grapherror"); 
    507     } 
    508   } 
    509    
    510    
    511   function updateSysinfo() { 
    512     $('#sysinfo').load("<?php echo $_SERVER["PHP_SELF"]; ?>?type=tool&display=<?php echo $module_page; ?>&quietmode=1&info=sysinfo", {}, scheduleSysinfoUpdate); 
    513   } 
    514   function scheduleSysinfoUpdate(responseText, status) { 
    515     if (status == 'start' || status == 'success') { 
    516       setTimeout('updateSysinfo();',<?php echo SYSINFO_UPDATE_TIME; ?>000); 
    517     } else { 
    518       //$('#sysinfo').prepend('<div class="warning">Warning: Update timed out<br/></div>'); 
    519     } 
    520   } 
    521    
    522   function updateSyslog() { 
    523     $('#syslog').load("<?php echo $_SERVER["PHP_SELF"]; ?>?type=tool&display=<?php echo $module_page; ?>&quietmode=1&info=syslog", {}, scheduleSyslogUpdate); 
    524   } 
    525   function scheduleSyslogUpdate(responseText, status) { 
    526     if (status == 'start' || status == 'success') { 
    527       setTimeout('updateSyslog();',<?php echo SYSLOG_UPDATE_TIME; ?>000); 
    528     } else { 
    529       //$('#syslog').prepend('<div class="warning">Warning: Update timed out<br/></div>'); 
    530     } 
    531   }  
    532   */ 
    533463   
    534464  function changeSyslog(showall) { 
     
    541471 
    542472  function hide_notification(domid, module, id) { 
    543   //  $('#'+domid).hide('slow'); 
    544      
    545     /* 
    546     $('#'+domid).animate({backgroundColor:'red'}, 'fast', function() { 
    547       $('#'+domid).fadeOut(); 
    548     }); 
    549     */ 
    550473    $('#'+domid).fadeOut('slow'); 
    551474    $.post('config.php', {display:'<?php echo $module_page; ?>', quietmode:1, info:'syslog_ack', module:module, id:id});