diff frontend/mfrontend/templates/joblist.html @ 29:28eb82047167

Ukończona strona klienta
author mild@mild-laptop
date Sun, 05 Jun 2011 23:09:18 +0200
parents 9916d46ff096
children
line wrap: on
line diff
--- a/frontend/mfrontend/templates/joblist.html	Mon May 23 12:49:48 2011 +0200
+++ b/frontend/mfrontend/templates/joblist.html	Sun Jun 05 23:09:18 2011 +0200
@@ -1,11 +1,15 @@
 {% extends "layout.html" %}
 {% block body %}
+<table border="0" cellpadding="0" cellspacing="0" class="tbt"><tr>
+	<td class="tbtl">&nbsp;</td>
+	<td class="tbtbot" nowrap="nowrap"><b>Lista zadań</b></td>
+	<td class="tbtr">&nbsp;</td>
+</tr></table>
 
-<div class="frame">
-<div class="ft"><div class="ftl"></div><div class="ftc">Lista zadań</div><div class="ftr"></div></div>
-<div class="fm">
-
-<table class="inner" width="100%">
+<table align="center" width="100%" border="0" cellspacing="1" cellpadding="4" class="forumline">
+    <tr>
+	<td class="row1">
+<table border="0" cellpadding="0" cellspacing="0" class="tbt" width="70%" align="center">
     <tr>
             <th class="colhead">id</th>
             <th class="colhead">Właściciel</th>
@@ -23,22 +27,71 @@
         <td>{{ job.username }}</td>
         <td>{{ job.hash }}</td>
         <td>{{ job.label }}</td>
-        <td>{{ job.method }}</td>
-        <td>{{ job.state_text }}</td>
-        <td>{% if job.percent is not sameas None %}
-                {{ job.percent }}%
+        <td>{% if job.method is sameas 0 %}
+                Brute-force
+            {% else %}
+		słownik
+            {% endif %}</td>
+        <td align="center">{{ job.state_text }}</td>
+        <td align="center">{% if job.percent is not sameas None %}
+		{% if job.percent == 100 %}
+		<span class="state100">{{job.percent}}</span>
+	        {% else %}
+		{% if job.percent >= 87 %}
+		<span class="state87">{{job.percent}}</span>
+	        {% else %}
+		{% if job.percent >= 75 %}
+		<span class="state75">{{job.percent}}</span>
+	        {% else %}
+		{% if job.percent >= 62 %}
+		<span class="state62">{{job.percent}}</span>
+	        {% else %}
+		{% if job.percent >= 50 %}
+		<span class="state50">{{job.percent}}</span>
+	        {% else %}
+		{% if job.percent >= 37 %}
+		<span class="state37">{{job.percent}}</span>
+	        {% else %}
+		{% if job.percent >= 25 %}
+		<span class="state25">{{job.percent}}</span>
+	        {% else %}
+		{% if job.percent >= 12 %}
+		<span class="state12">{{job.percent}}</span>
+	        {% else %}
+		<span class="state0">{{job.percent}}</span>
+            {% endif %}{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}
+	
             {% else %}
                 brak danych
             {% endif %}
         </td>
-        <td>{{ job.result }}</td>
+        <td align="center">
+	    {% if job.result is not sameas None %}
+		{{job.result}}
+            {% else %}
+                brak danych
+            {% endif %}
+	</td>
     </tr>
     {% endfor %}
-</table>
-</div>
-<div class="fb"><div class="fbl"></div><div class="fbc"></div><div class="fbr"></div></div>
-</div>
-&nbsp;
-</div>
+</table></td></tr></table>
+<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr>
+	<td class="tbll">&nbsp;</td>
+	<td class="tblbot">&nbsp;</td>
+	<td class="tblr">&nbsp;</td>
+</tr></table>
+<script>
+function refresh()
+{
+	$.ajax({
+	url: "/jobs/ajax/",
+	success: function (html){
+		$("#result").html(html);
+
+	}
+	});
+}
+setTimeout(refresh,5000);
+</script>
 {% endblock %}