PageRenderTime 21ms CodeModel.GetById 18ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

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