1 | <%inherit file="/base.mako"/> |
---|
2 | <%namespace file="/message.mako" import="render_msg" /> |
---|
3 | |
---|
4 | <%def name="title()">Jobs</%def> |
---|
5 | |
---|
6 | <h2>Jobs</h2> |
---|
7 | |
---|
8 | %if message: |
---|
9 | ${render_msg( message, status )} |
---|
10 | %endif |
---|
11 | |
---|
12 | <p> |
---|
13 | All unfinished jobs are displayed here. To display only jobs that have not |
---|
14 | had their job state updated recently, set a cutoff value in the 'cutoff' |
---|
15 | box below. |
---|
16 | </p> |
---|
17 | <p> |
---|
18 | If any jobs are displayed, you may choose to stop them. Your stop message |
---|
19 | will be displayed to the user as: "This job was stopped by an |
---|
20 | administrator: <b><YOUR MESSAGE></b> For more information or help, |
---|
21 | report this error". |
---|
22 | </p> |
---|
23 | |
---|
24 | <form name="jobs" action="${h.url_for()}" method="POST"> |
---|
25 | |
---|
26 | <p/> |
---|
27 | |
---|
28 | %if jobs: |
---|
29 | <table class="manage-table colored" border="0" cellspacing="0" cellpadding="0" width="100%"> |
---|
30 | <tr class="header"> |
---|
31 | <td> </td> |
---|
32 | <td>Job ID</td> |
---|
33 | <td>User</td> |
---|
34 | <td>Last Update</td> |
---|
35 | <td>Tool</td> |
---|
36 | <td>State</td> |
---|
37 | <td>Command Line</td> |
---|
38 | <td>Job Runner</td> |
---|
39 | <td>PID/Cluster ID</td> |
---|
40 | </tr> |
---|
41 | %for job in jobs: |
---|
42 | <td> |
---|
43 | %if job.state == 'upload': |
---|
44 | |
---|
45 | %else: |
---|
46 | <input type="checkbox" name="stop" value="${job.id}"/> |
---|
47 | %endif |
---|
48 | </td> |
---|
49 | <td>${job.id}</td> |
---|
50 | %if job.history.user: |
---|
51 | <td>${job.history.user.email}</td> |
---|
52 | %else: |
---|
53 | <td>anonymous</td> |
---|
54 | %endif |
---|
55 | <td>${last_updated[job.id]} ago</td> |
---|
56 | <td>${job.tool_id}</td> |
---|
57 | <td>${job.state}</td> |
---|
58 | <td>${job.command_line}</td> |
---|
59 | <td>${job.job_runner_name}</td> |
---|
60 | <td>${job.job_runner_external_id}</td> |
---|
61 | </tr> |
---|
62 | %endfor |
---|
63 | </table> |
---|
64 | <p/> |
---|
65 | <div class="toolForm"> |
---|
66 | <div class="toolFormTitle"> |
---|
67 | Stop Jobs |
---|
68 | </div> |
---|
69 | <div class="toolFormBody"> |
---|
70 | <div class="form-row"> |
---|
71 | <label> |
---|
72 | Stop message: |
---|
73 | </label> |
---|
74 | <div class="form-row-input"> |
---|
75 | <input type="text" name="stop_msg" size="40"/> |
---|
76 | </div> |
---|
77 | <div class="toolParamHelp" style="clear: both;"> |
---|
78 | to be displayed to the user |
---|
79 | </div> |
---|
80 | </div> |
---|
81 | <div class="form-row"> |
---|
82 | <input type="submit" class="primary-button" name="submit" value="Submit"> |
---|
83 | </div> |
---|
84 | </div> |
---|
85 | </div> |
---|
86 | <p/> |
---|
87 | %else: |
---|
88 | <div class="infomessage">There are no unfinished jobs to show with current cutoff time.</div> |
---|
89 | <p/> |
---|
90 | %endif |
---|
91 | <div class="toolForm"> |
---|
92 | <div class="toolFormTitle"> |
---|
93 | Update Jobs |
---|
94 | </div> |
---|
95 | <div class="toolFormBody"> |
---|
96 | |
---|
97 | <div class="form-row"> |
---|
98 | <label> |
---|
99 | Cutoff: |
---|
100 | </label> |
---|
101 | <div class="form-row-input"> |
---|
102 | <input type="text" name="cutoff" size="4" value="${cutoff}"/> |
---|
103 | </div> |
---|
104 | <div class="toolParamHelp" style="clear: both;"> |
---|
105 | In seconds |
---|
106 | </div> |
---|
107 | </div> |
---|
108 | <div class="form-row"> |
---|
109 | <input type="submit" class="primary-button" name="submit" value="Refresh"> |
---|
110 | </div> |
---|
111 | </div> |
---|
112 | </div> |
---|
113 | <p/> |
---|
114 | <div class="toolForm"> |
---|
115 | <div class="toolFormTitle"> |
---|
116 | Administrative Job Lock |
---|
117 | </div> |
---|
118 | <div class="toolFormBody"> |
---|
119 | %if job_lock==True: |
---|
120 | <div class="form-row"> |
---|
121 | <p>All job execution is currently locked. Click here to unlock.</p> |
---|
122 | <input type='hidden' name='job_lock' value='unlock'/> |
---|
123 | </div> |
---|
124 | <div class="form-row"> |
---|
125 | <input type="submit" class="primary-button" name="submit" value="Unlock"> |
---|
126 | </div> |
---|
127 | %else: |
---|
128 | <div class="form-row"> |
---|
129 | <p>To prevent new jobs from dispatching, you can lock the job queue here.</p> |
---|
130 | <input type='hidden' name='job_lock' value='lock'/> |
---|
131 | </div> |
---|
132 | <div class="form-row"> |
---|
133 | <input type="submit" class="primary-button" name="submit" value="Lock"> |
---|
134 | </div> |
---|
135 | %endif |
---|
136 | </div> |
---|
137 | </div> |
---|
138 | |
---|
139 | </form> |
---|