This is Pluto, the webhook server.
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.

logs.html 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. {% extends "base.html" %}
  2. {% block title %}Pluto - Logs{% endblock %}
  3. {% block content %}
  4. <p>
  5. Here are the last {{ n }} requests observed to <span class="monospace">/hook</span>:
  6. </p>
  7. <table id="logs">
  8. <tr>
  9. <th>Time</th>
  10. <th>Path</th>
  11. <th>Headers</th>
  12. <th>Data</th>
  13. <th>Hooks</th>
  14. </tr>
  15. {% for log in logs %}
  16. <tr>
  17. <td class="time">{{ log.time | ctime }}</td>
  18. <td class="path">{{ log.path }}</td>
  19. <td class="headers">{{ log.headers | hloads | pprint(True) }}</td>
  20. <td class="data">{{ log.data | jloads | pprint(True) }}</td>
  21. <td class="hooks">
  22. {% if log.hooks %}
  23. {% for hookid in log.hooks.split(',') %}
  24. {% set num = hookid|int %}
  25. {% set hook = g.Hook.get_one(rowid = num) %}
  26. {{ macros.hook(hook) }}
  27. {% endfor %}
  28. {% else %}
  29. <span class="nodata">No hooks.</span>
  30. {% endif %}
  31. </td>
  32. </tr>
  33. {% else %}
  34. <tr>
  35. <td colspan="4" class="nodata">No data.</td>
  36. </tr>
  37. {% endfor %}
  38. </table>
  39. {% endblock %}