-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
98 lines (80 loc) · 2.51 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
{% extends "template.html" %}
{% block contents %}
<h2>Summary</h2>
<table class="states">
{% for state in states %}
<tr>
<th>{{state}}</th>
<td>{{files_in_states.get(state, 0)}}</td>
</tr>
{% endfor %}
</table>
<table id="main_table" class="formatting" style="width:100%">
{#
<tr>
<th>Filename</th><th>Status</th>
</tr>
#}
<tr><td colspan=3><hr/></td></tr>
<tr>
<th>Active transfers</th>
</tr>
{% for m in active %}
<tr>
<td><a href="./history?filename={{m.FileDescriptor.Name}}">{{m.FileDescriptor.Path}}</a></td>
<td>{{m.Status}}</td>
</tr>
{% endfor %}
{% for m in queue %}
<tr>
<td><a href="./history?filename={{m.FileDescriptor.Name}}">{{m.FileDescriptor.Path}}</a></td>
<td>queued</td>
</tr>
{% endfor %}
{% for t, desc in retry %}
<tr>
<td><a href="./history?filename={{desc.Name}}">{{desc.Path}}</a></td>
<td>retry after {{t|dt_fmt}} <a href="./retry_now?filename={{desc.Name}}">retry now</a></td>
</tr>
{% endfor %}
<tr><td colspan=3><hr/></td></tr>
<tr>
<th>Done transfers</th>
<td><a href="javascript:toggle_expand('state:done')" class="button" mode="collapsed">{{done|length}}</a></td>
</tr>
{% for filename, event, tend, size, elapsed in done %}
<tr tag="state:done" style="visibility:hidden">
<td><a href="./history?filename={{filename}}">{{filename}}</a></td>
<td>done at {{tend|dt_fmt}}</td>
<td>{{size|pretty_size}}, {{(size/elapsed)|pretty_size}}/sec</td>
</tr>
{% endfor %}
</table>
<script type="text/javascript">
var done_visible = false;
function toggle_expand(tag)
{
var tab = document.getElementById("main_table");
var rows = tab.rows;
var n = rows.length;
for( var ir = 0; ir < n; ir++ )
{
var row = rows[ir];
if( row.getAttribute("tag") == tag )
{
if( !done_visible )
{
//row.style.display = "";
row.style.visibility = "visible";
}
else
{
//row.style.display = "none";
row.style.visibility = "hidden";
}
}
}
done_visible = !done_visible;
}
</script>
{% endblock %}