crawler_functions.js 704 B

12345678910111213141516171819202122232425262728293031323334
  1. var timer = null;
  2. $(document).ready(function() {
  3. //start_crawler();
  4. });
  5. function start_crawler() {
  6. if (timer===null) {
  7. timer = setInterval(doCall,1000);
  8. $('#console').append("Crawler script started...<hr>");
  9. $('#console').animate({scrollTop: $('#console').prop("scrollHeight")}, 500);
  10. return true;
  11. }
  12. else {
  13. return false;
  14. }
  15. }
  16. function doCall() {
  17. $.get('/admin/monitoring/get/',function(resp) {
  18. $('#console').html(resp);
  19. $('#console').animate({scrollTop: $('#console').prop("scrollHeight")}, 500);
  20. return true;
  21. });
  22. }
  23. function reset_console() {
  24. $('#console').html('');
  25. return true;
  26. }