blast_report_pending.tpl.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * Template to keep the user updated on the progress of their BLAST
  4. *
  5. * Available Variables:
  6. * - $status_code: a numerical code describing the status of the job. See the table
  7. * below for possible values.
  8. * - $status: a string describing the status of the job. See the table below for
  9. * possible values
  10. *
  11. * CODE STATUS DESCRIPTION
  12. * 0 Pending The tripal job has been created but has not yet been launched.
  13. * 1 Running The Tripal job is currently running.
  14. * 999 Cancelled The Tripal job was cancelled by an administrator.
  15. */
  16. ?>
  17. <script>
  18. Drupal.behaviors.blastuiSetTimeout = {
  19. attach: function (context, settings) {
  20. setTimeout(function(){
  21. window.location.reload(1);
  22. }, 5000);
  23. }
  24. };
  25. </script>
  26. <?php
  27. // JOB IN QUEUE
  28. if ($status_code === 0) {
  29. drupal_set_title('BLAST Job in Queue');
  30. ?>
  31. <p>Your BLAST has been registered and will be started shortly. This page will automatically refresh.</p>
  32. <?php
  33. }
  34. // JOB IN PROGRESS
  35. elseif ($status_code === 1) {
  36. drupal_set_title('BLAST Job in Progress');
  37. ?>
  38. <p>Your BLAST job is currently running. The results will be listed here as soon as it completes. This page will automatically refresh.</p>
  39. <?php
  40. }
  41. // JOB CANCELLED
  42. elseif ($status_code === 999) {
  43. drupal_set_title('BLAST Job Cancelled');
  44. ?>
  45. <p>Unfortunately your BLAST job has been cancelled by an Administrator. This page will automatically refresh.</p>
  46. <?php
  47. }
  48. ?>