1 | <div id="history_detail_${history.id}"> |
---|
2 | <div class="toolbar"> |
---|
3 | <h1>${history.name}</h1> |
---|
4 | <a class="back button" href="#">Back</a> |
---|
5 | </div> |
---|
6 | <ul class="edgetoedge"> |
---|
7 | |
---|
8 | %for data in history.active_datasets: |
---|
9 | %if data.visible: |
---|
10 | |
---|
11 | <% |
---|
12 | if data.state in ['no state','',None]: |
---|
13 | data_state = "queued" |
---|
14 | else: |
---|
15 | data_state = data.state |
---|
16 | %> |
---|
17 | |
---|
18 | <li id="historyItemContainer-${data.id}"> |
---|
19 | |
---|
20 | <div style="float: left; padding-right: 8px;"> |
---|
21 | <div style='display: none;' id="progress-${data.id}"> |
---|
22 | <img src="${h.url_for('/static/style/data_running.gif')}" border="0"> |
---|
23 | </div> |
---|
24 | %if data_state == 'running': |
---|
25 | <div><img src="${h.url_for('/static/style/data_running.gif')}" border="0"></div> |
---|
26 | %elif data_state == 'upload': |
---|
27 | <div><img src="${h.url_for('/static/style/data_upload.gif')}" border="0"></div> |
---|
28 | %else: |
---|
29 | <div><img src="${h.url_for( "/static/style/data_%s.png" % data_state )}" border="0"></div> |
---|
30 | %endif |
---|
31 | </div> |
---|
32 | |
---|
33 | <a href="${h.url_for( action="dataset_detail", id=data.id )}"> |
---|
34 | |
---|
35 | <div>${data.hid}: ${data.display_name()}</div> |
---|
36 | |
---|
37 | <div class="secondary"> |
---|
38 | ## Body for history items, extra info and actions, data "peek" |
---|
39 | <% current_user_roles = trans.get_current_user_roles() %> |
---|
40 | %if not trans.user_is_admin() and not trans.app.security_agent.can_access_dataset( current_user_roles, data.dataset ): |
---|
41 | <div>You do not have permission to view this dataset.</div> |
---|
42 | %elif data_state == "queued": |
---|
43 | <div>Job is waiting to run</div> |
---|
44 | %elif data_state == "running": |
---|
45 | <div>Job is currently running</div> |
---|
46 | %elif data_state == "error": |
---|
47 | <div> |
---|
48 | An error occurred running this job. |
---|
49 | </div> |
---|
50 | %elif data_state == "discarded": |
---|
51 | <div> |
---|
52 | The job creating this dataset was cancelled before completion. |
---|
53 | </div> |
---|
54 | %elif data_state == 'setting_metadata': |
---|
55 | <div>Metadata is being Auto-Detected.</div> |
---|
56 | %elif data_state == "empty": |
---|
57 | <div>No data: <i>${data.display_info()}</i></div> |
---|
58 | %elif data_state in [ "ok", "failed_metadata" ]: |
---|
59 | <div> |
---|
60 | %if data_state == "failed_metadata": |
---|
61 | Warning: setting metadata failed, |
---|
62 | %endif |
---|
63 | ${data.blurb}, |
---|
64 | format: <span class="${data.ext}">${data.ext}</span>, |
---|
65 | database: <span class="${data.dbkey}">${data.dbkey}</span> |
---|
66 | </div> |
---|
67 | %else: |
---|
68 | <div>Error: unknown dataset state "${data_state}".</div> |
---|
69 | %endif |
---|
70 | </div> |
---|
71 | |
---|
72 | </a> |
---|
73 | |
---|
74 | </li> |
---|
75 | %endif |
---|
76 | |
---|
77 | %endfor |
---|
78 | |
---|
79 | </ul> |
---|
80 | </div> |
---|