You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.2 KiB

  1. {% extends "base.html" %}
  2. {% block content %}
  3. <h2>Batch Query Chemicals</h2>
  4. <a href="https://git.junickim.me/junikimm717/walker-database/raw/master/validate.py"> Source Code with required type definitions </a>
  5. <form method="post" enctype="multipart/form-data">
  6. <label for="csv">CSV: </label>
  7. <input type="file" name="csv">
  8. <input type="submit" value="Submit">
  9. </form>
  10. {% if invalid %}
  11. <p style="color: red;">Data Points are Incorrectly added: {{invalid}}</p>
  12. {% endif %}
  13. {% if success %}
  14. <p style="color: green;">Success!</p>
  15. {% for result in data %}
  16. <hr>
  17. <h2>Query {{loop.index}}</h2>
  18. <p>
  19. {{result.query.mz_min}} &lt; M/Z Ratio &lt; {{result.query.mz_max}},
  20. {{result.query.rt_min}} &lt; Retention Time &lt; {{result.query.rt_max}}
  21. </p>
  22. {% for hit in result.hits %}
  23. <div>
  24. <a href="{{hit.url}}">
  25. <h3>{{hit.name}}</h3>
  26. </a>
  27. <table>
  28. <tr>
  29. <td>Retention Time</td>
  30. <td>{{hit.rt}}</td>
  31. </tr>
  32. <tr>
  33. <td>M/Z Ratio</td>
  34. <td>{{hit.mz}}</td>
  35. </tr>
  36. </table>
  37. </div>
  38. {% endfor %}
  39. {% endfor %}
  40. {% endif %}
  41. {% endblock %}