annotate frontend/mfrontend/templates/joblist_ajax.html @ 30:50708627f3c7

Ukończona strona klienta
author mild@mild-laptop
date Sun, 05 Jun 2011 23:10:18 +0200
parents
children
rev   line source
30
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
1 {% block body %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
2 <table border="0" cellpadding="0" cellspacing="0" class="tbt"><tr>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
3 <td class="tbtl">&nbsp;</td>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
4 <td class="tbtbot" nowrap="nowrap"><b>Lista zadań</b></td>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
5 <td class="tbtr">&nbsp;</td>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
6 </tr></table>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
7
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
8 <table align="center" width="100%" border="0" cellspacing="1" cellpadding="4" class="forumline">
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
9 <tr>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
10 <td class="row1">
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
11 <table border="0" cellpadding="0" cellspacing="0" class="tbt" width="70%" align="center">
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
12 <tr>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
13 <th class="colhead">id</th>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
14 <th class="colhead">Właściciel</th>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
15 <th class="colhead">Hash</th>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
16 <th class="colhead">Opis</th>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
17 <th class="colhead">Metoda</th>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
18 <th class="colhead">Stan</th>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
19 <th class="colhead">Postęp</th>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
20 <th class="colhead">Wynik</th>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
21
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
22 </tr>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
23 {% for job in jobs %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
24 <tr class="row{{ job.index % 2 + 2}}">
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
25 <td>{{ job.id }}</td>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
26 <td>{{ job.username }}</td>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
27 <td>{{ job.hash }}</td>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
28 <td>{{ job.label }}</td>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
29 <td>{% if job.method is sameas 0 %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
30 Brute-force
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
31 {% else %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
32 słownik
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
33 {% endif %}</td>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
34 <td align="center">{{ job.state_text }}</td>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
35 <td align="center">{% if job.percent is not sameas None %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
36 {% if job.percent == 100 %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
37 <span class="state100">{{job.percent}}</span>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
38 {% else %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
39 {% if job.percent >= 87 %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
40 <span class="state87">{{job.percent}}</span>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
41 {% else %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
42 {% if job.percent >= 75 %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
43 <span class="state75">{{job.percent}}</span>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
44 {% else %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
45 {% if job.percent >= 62 %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
46 <span class="state62">{{job.percent}}</span>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
47 {% else %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
48 {% if job.percent >= 50 %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
49 <span class="state50">{{job.percent}}</span>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
50 {% else %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
51 {% if job.percent >= 37 %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
52 <span class="state37">{{job.percent}}</span>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
53 {% else %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
54 {% if job.percent >= 25 %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
55 <span class="state25">{{job.percent}}</span>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
56 {% else %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
57 {% if job.percent >= 12 %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
58 <span class="state12">{{job.percent}}</span>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
59 {% else %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
60 <span class="state0">{{job.percent}}</span>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
61 {% endif %}{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
62
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
63 {% else %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
64 brak danych
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
65 {% endif %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
66 </td>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
67 <td align="center">
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
68 {% if job.result is not sameas None %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
69 {{job.result}}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
70 {% else %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
71 brak danych
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
72 {% endif %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
73 </td>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
74 </tr>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
75 {% endfor %}
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
76 </table></td></tr></table>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
77 <table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
78 <td class="tbll">&nbsp;</td>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
79 <td class="tblbot">&nbsp;</td>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
80 <td class="tblr">&nbsp;</td>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
81 </tr></table>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
82 <script>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
83 function refresh()
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
84 {
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
85 $.ajax({
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
86 url: "/jobs/ajax/",
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
87 success: function (html){
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
88 $("#result").html(html);
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
89 }
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
90 });
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
91 }
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
92 setTimeout(refresh,5000);
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
93 </script>
50708627f3c7 Ukończona strona klienta
mild@mild-laptop
parents:
diff changeset
94 {% endblock %}