Commit | Line | Data |
---|---|---|
808eac00 JW |
1 | {# |
2 | # GNU MediaGoblin -- federated, autonomous media hosting | |
3 | # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. | |
4 | # | |
5 | # This program is free software: you can redistribute it and/or modify | |
6 | # it under the terms of the GNU Affero General Public License as published by | |
7 | # the Free Software Foundation, either version 3 of the License, or | |
8 | # (at your option) any later version. | |
9 | # | |
10 | # This program is distributed in the hope that it will be useful, | |
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | # GNU Affero General Public License for more details. | |
14 | # | |
15 | # You should have received a copy of the GNU Affero General Public License | |
16 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
17 | #} | |
18 | {% extends "mediagoblin/base.html" %} | |
19 | ||
daecdea9 A |
20 | {% block title -%} |
21 | {% trans %}Media processing panel{% endtrans %} — {{ super() }} | |
22 | {%- endblock %} | |
23 | ||
dc31cd1b | 24 | |
808eac00 JW |
25 | {% block mediagoblin_content %} |
26 | ||
27 | <h1>{% trans %}Media processing panel{% endtrans %}</h1> | |
28 | ||
29 | <p> | |
30 | {% trans %}Here you can track the state of media being processed on this instance.{% endtrans %} | |
31 | </p> | |
dfd66b78 | 32 | |
808eac00 JW |
33 | <h2>{% trans %}Media in-processing{% endtrans %}</h2> |
34 | ||
35 | {% if processing_entries.count() %} | |
36 | <table class="media_panel processing"> | |
37 | <tr> | |
58dce892 | 38 | <th>{% trans %}Thumbnail{% endtrans %}</th> |
e228876e LAR |
39 | <th>{% trans %}ID{% endtrans %}</th> |
40 | <th>{% trans %}User{% endtrans %}</th> | |
41 | <th>{% trans %}Title{% endtrans %}</th> | |
42 | <th>{% trans %}When submitted{% endtrans %}</th> | |
43 | <th>{% trans %}Transcoding progress{% endtrans %}</th> | |
808eac00 JW |
44 | </tr> |
45 | {% for media_entry in processing_entries %} | |
46 | <tr> | |
4dd814a9 BB |
47 | <td> |
48 | <div class="thumb-wrapper"> | |
49 | <img src="{{ media_entry.thumb_url }}" alt="{{ media_entry.title }}" /> | |
50 | <div class="thumb-overlay-status thumb-processing">Processing...</div> | |
51 | </div> | |
52 | </td> | |
5c2b8486 | 53 | <td>{{ media_entry.id }}</td> |
4dd814a9 BB |
54 | <td> |
55 | <a href="{{ request.urlgen('mediagoblin.moderation.users_detail', user=media_entry.get_actor.username) }}"> | |
56 | {{ media_entry.get_actor.username }} | |
57 | </a> | |
58 | </td> | |
808eac00 | 59 | <td>{{ media_entry.title }}</td> |
b3b42bbe | 60 | <td>{{ media_entry.created.strftime("%F %R") }}</td> |
808eac00 JW |
61 | {% if media_entry.transcoding_progress %} |
62 | <td>{{ media_entry.transcoding_progress }}%</td> | |
63 | {% else %} | |
e228876e | 64 | <td>{% trans %}Unknown{% endtrans %}</td> |
808eac00 JW |
65 | {% endif %} |
66 | </tr> | |
67 | {% endfor %} | |
68 | </table> | |
69 | {% else %} | |
70 | <p><em>{% trans %}No media in-processing{% endtrans %}</em></p> | |
dfd66b78 | 71 | {% endif %} |
808eac00 JW |
72 | |
73 | <h2>{% trans %}These uploads failed to process:{% endtrans %}</h2> | |
74 | {% if failed_entries.count() %} | |
75 | ||
76 | <table class="media_panel failed"> | |
77 | <tr> | |
e228876e LAR |
78 | <th>{% trans %}ID{% endtrans %}</th> |
79 | <th>{% trans %}User{% endtrans %}</th> | |
80 | <th>{% trans %}Title{% endtrans %}</th> | |
81 | <th>{% trans %}When submitted{% endtrans %}</th> | |
82 | <th>{% trans %}Reason for failure{% endtrans %}</th> | |
83 | <th>{% trans %}Failure metadata{% endtrans %}</th> | |
808eac00 JW |
84 | </tr> |
85 | {% for media_entry in failed_entries %} | |
86 | <tr> | |
5c2b8486 | 87 | <td>{{ media_entry.id }}</td> |
0f3bf8d4 | 88 | <td>{{ media_entry.get_actor.username }}</td> |
808eac00 | 89 | <td>{{ media_entry.title }}</td> |
b3b42bbe | 90 | <td>{{ media_entry.created.strftime("%F %R") }}</td> |
808eac00 JW |
91 | {% if media_entry.get_fail_exception() %} |
92 | <td>{{ media_entry.get_fail_exception().general_message }}</td> | |
93 | <td>{{ media_entry.fail_metadata }}</td> | |
94 | {% else %} | |
95 | <td> </td> | |
96 | <td> </td> | |
97 | {% endif %} | |
98 | </tr> | |
99 | {% endfor %} | |
100 | </table> | |
101 | {% else %} | |
102 | <p><em>{% trans %}No failed entries!{% endtrans %}</em></p> | |
103 | {% endif %} | |
104 | <h2>{% trans %}Last 10 successful uploads{% endtrans %}</h2> | |
105 | {% if processed_entries.count() %} | |
106 | ||
107 | <table class="media_panel processed"> | |
108 | <tr> | |
e228876e LAR |
109 | <th>{% trans %}ID{% endtrans %}</th> |
110 | <th>{% trans %}User{% endtrans %}</th> | |
111 | <th>{% trans %}Title{% endtrans %}</th> | |
112 | <th>{% trans %}Submitted{% endtrans %}</th> | |
808eac00 JW |
113 | </tr> |
114 | {% for media_entry in processed_entries %} | |
115 | <tr> | |
5c2b8486 | 116 | <td>{{ media_entry.id }}</td> |
0f3bf8d4 | 117 | <td>{{ media_entry.get_actor.username }}</td> |
808eac00 | 118 | <td><a href="{{ media_entry.url_for_self(request.urlgen) }}">{{ media_entry.title }}</a></td> |
88dd6fc2 | 119 | <td><span title='{{ media_entry.created.strftime("%F %R") }}'>{{ timesince(media_entry.created) }}</span></td> |
808eac00 JW |
120 | </tr> |
121 | {% endfor %} | |
122 | </table> | |
123 | {% else %} | |
124 | <p><em>{% trans %}No processed entries, yet!{% endtrans %}</em></p> | |
125 | {% endif %} | |
126 | {% endblock %} |