/modules/mod_development/templates/wmtrace_conf.tpl

https://code.google.com/p/zotonic/ · Smarty Template · 56 lines · 41 code · 15 blank · 0 comment · 1 complexity · b1851d3ca0969c769268f515e4c865be MD5 · raw file

  1. {% extends "admin_base.tpl" %}
  2. {% block title %}Webmachine Trace Configuration{% endblock %}
  3. {% block content %}
  4. <div id="content" class="zp-85">
  5. <div class="block clearfix">
  6. <h2>Webmachine Trace Configuration</h2>
  7. <div class="clearfix">
  8. <label for="trace_dd">Global tracing:</label>
  9. {% wire id="trace_dd" type="change" postback={set_global} %}
  10. <select name="trace_global" id="trace_dd">
  11. <option {% ifequal trace_global "disable" %} selected {% endifequal %} value="disable">No global resource tracing</option>
  12. <option {% ifequal trace_global "5xx" %} selected {% endifequal %} value="5xx">Log all requests with 5xx response code</option>
  13. <option {% ifequal trace_global "4xx&5xx" %} selected {% endifequal %} value="4xx&5xx">Log all requests with 4xx and 5xx response codes</option>
  14. </select>
  15. </div>
  16. <br /><hr />
  17. <div class="clearfix">
  18. {% button text="Add trace rule" action={dialog_open title="Select a resource" template="_wmtrace_add.tpl" resources=res} %}
  19. </div>
  20. <h3 class="above-list ">Traced resources</h3>
  21. <ul class="short-list">
  22. <li class="headers clearfix">
  23. <span class="zp-90">Resource name</span>
  24. <span class="zp-10 last">Options</span>
  25. </li>
  26. {% for traced_res in trace_conf %}
  27. <li class="clearfix">
  28. <span class="zp-90">{{ traced_res|escape }}</span>
  29. <span class="zp-10">
  30. {% button text="Delete" postback={delete res_to_del=traced_res} %}
  31. </span>
  32. </li>
  33. {% empty %}
  34. <li class="clearfix">
  35. No traced resources.
  36. </li>
  37. {% endfor %}
  38. </ul>
  39. </div>
  40. </div>
  41. {% endblock %}