Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Side by Side Diff: appengine/swarming/templates/user_task.html

Issue 2523433002: Add link to old ui back in (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « appengine/swarming/templates/root.html ('k') | appengine/swarming/templates/user_tasks.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 {% extends "swarming/base.html" %}
2
3
4 {% block headers %}
5 <style>
6 h1 {
7 margin-top: 10px;
8 margin-bottom: 10px;
9 }
10
11 h2 {
12 margin-top: 10px;
13 margin-bottom: 5px;
14 }
15
16 h2.inline {
17 display: inline;
18 }
19
20 table.property_table {
21 font-family: monospace;
22 border-spacing: 0;
23 }
24
25 table.property_table tbody tr:nth-child(even) {
26 background-color: #eeeeee;
27 }
28
29 table.property_table td {
30 padding-left: 0.5em;
31 padding-right: 0.5em;
32 }
33
34 table.property_table tbody tr:hover {
35 background-color: #eeffee;
36 }
37
38 table.property_table tbody tr td:first-child {
39 white-space: nowrap;
40 }
41
42 .failed_test {
43 background-color: #ffdddd;
44 }
45
46 .blink {
47 animation: blink 1s steps(5, start) infinite;
48 -webkit-animation: blink 1s steps(5, start) infinite;
49 }
50 @keyframes blink {
51 to { visibility: hidden; }
52 }
53 @-webkit-keyframes blink {
54 to { visibility: hidden; }
55 }
56
57 .highlight_section {
58 background-color: #ffffee;
59 border-radius: 20px;
60 padding: 5px;
61 }
62
63 .code {
64 font-family: monospace;
65 white-space: pre-wrap;
66 }
67
68 .spaced {
69 margin-top: 10px;
70 margin-bottom: 5px;
71 }
72
73 .package-list {
74 margin-left: 1em;
75 }
76
77 .package-pin-name {
78 font-weight: bold;
79 }
80
81 .package-pin-version {
82 color: blue;
83 }
84 </style>
85 {% endblock %}
86
87
88 {% block body %}
89 {% import 'swarming/bot_view.html' as bot_view %}
90
91
92 {% macro summarize_array(values) %}
93 {% if not values %}
94 &#8209;&#8209;
95 {% else %}
96 {{values|sum|filesizeformat}} total; {{values|length}} items;
97 {% if values|length <= 10 %}
98 ({{values|map('filesizeformat')|join('; ')}})
99 {% else %}
100 ({{values[0]|filesizeformat}}; {{values[1]|filesizeformat}}; {{values[2]|f ilesizeformat}}; {{values[3]|filesizeformat}}; {{values[4]|filesizeformat}}; ... ; {{values[-5]|filesizeformat}}; {{values[-4]|filesizeformat}}; {{values[-3]|fil esizeformat}}; {{values[-2]|filesizeformat}}; {{values[-1]|filesizeformat}})
101 {% endif %}
102 {% endif %}
103 {% endmacro %}
104
105
106 <h1>Task summary</h1>
107 <a href="/oldui/user/tasks">Back to tasks list</a>
108 <br/>
109 <h1>THIS UI WILL GO AWAY ON JAN 1, 2017. If it has something you need and the ne w UI doesn't have it, file a bug ASAP. </h1>
110 <a href="{{try_link}}">Try out the new task page UI</a>
111 <p>
112
113 <div title="Information about the request itself that doesn't include what is be ing run; it's about the context and description.">
114 <h2>Request metadata</h2>
115 <table class="property_table">
116 <tbody>
117 <tr title="Name of the task, used for display purpose only.">
118 <td>Name</td>
119 <td>{{request.name}}</td>
120 </tr>
121 <tr title="Who triggered this task, as reported by the client.">
122 <td>User</td>
123 <td>
124 {% if request.user %}
125 {{request.user}}
126 {% else %}
127 &#8209;&#8209;
128 {% endif %}
129 </td>
130 </tr>
131 <tr title="Authenticated credential used by the client to trigger this tas k.">
132 <td>Authenticated</td>
133 <td>
134 {# The only reason for this condition is to not crash on older
135 entities. #}
136 {% if request.authenticated %}
137 {{request.authenticated.to_bytes()}}
138 {% else %}
139 &#8209;&#8209;
140 {% endif %}
141 </td>
142 </tr>
143 <tr title="What credentials that task is using when calling other services .">
144 <td>Running as</td>
145 <td>
146 {% if request.service_account and request.service_account != 'none' %}
147 {{request.service_account}}
148 {% else %}
149 &#8209;&#8209;
150 {% endif %}
151 </td>
152 </tr>
153 <tr title="Task priority is between 1 and 255, lower value is higher prior ity. Higher priority requests are executed first.">
154 <td>Priority</td>
155 <td>{{request.priority}}</td>
156 </tr>
157 <tr title="When the request was done by the client.">
158 <td>Created</td>
159 <td>{{request.created_ts|datetimeformat}}</td>
160 </tr>
161 <tr title="When this request becomes so old it's not even worth handing to a bot. It may happen to low priority on a busy fleet.">
162 <td>Expiration</td>
163 <td>
164 {{request.expiration_ts|datetimeformat}}
165 ({{(request.expiration_ts-request.created_ts)|timedeltaformat}})
166 </td>
167 </tr>
168 <tr title="Tags used for searching and/or analyzing groups of tasks.">
169 <td>Tags</td>
170 <td>{{request.tags|join('<br>'|safe)}}</td>
171 </tr>
172 {% if request.pubsub_topic %}
173 <tr title="PubSub topic notified about task completion.">
174 <td>Pubsub topic</td>
175 <td>{{request.pubsub_topic}}</td>
176 </tr>
177 <tr title="Data passed along with PubSub notification.">
178 <td>Pubsub data</td>
179 <td>
180 {% if request.pubsub_userdata %}
181 {{request.pubsub_userdata}}
182 {% else %}
183 &#8209;&#8209;
184 {% endif %}
185 </td>
186 </tr>
187 {% endif %}
188 <tr title="Parent task that created this task.">
189 <td>Parent task</td>
190 <td>
191 {% if parent_task %}
192 <a href="/oldui/user/task/{{parent_task.task_id}}">{{parent_task.nam e}}</a>
193 {% else %}
194 &#8209;&#8209;
195 {% endif %}
196 </td>
197 </tr>
198 </tbody>
199 </table>
200 </div>
201
202 <div title="Information about what was asked to be run. This is what is used for task deduplication.">
203 {% if request.properties.is_terminate %}
204 <div class="spaced">
205 <h2 class="inline">Bot termination request</h2>
206 </div>
207 <table class="property_table">
208 <tbody>
209 <tr title="The request dimensions is the minimum set of properties a bot must advertise to be able to execute this task.">
210 <td>Bot</td>
211 <td>{{request.properties.dimensions['id']}}</td>
212 </tr>
213 </tbody>
214 </table>
215 {% else %}
216 <div class="spaced">
217 <h2 class="inline">Request properties</h2>
218 {% if is_privileged_user %}
219 <form method="POST" action="/oldui/user/task/{{task.task_id}}/retry" sty le="display:inline">
220 <input type="submit" value="Retry" style="display:inline"></input>
221 <input type="hidden" name="xsrf_token" value="{{xsrf_token}}" />
222 </form>
223 {% endif %}
224 </div>
225 <table class="property_table">
226 <tbody>
227 <tr title="The request dimensions is the minimum set of properties a bot must advertise to be able to execute this task.">
228 <td>Request dims</td>
229 <td>{{bot_view.render_dict(request.properties.dimensions)}}</td>
230 </tr>
231 <tr title="The maximum number of seconds that the command may use, other wise it is forcibly killed.">
232 <td>Exec timeout</td>
233 <td>{{request.properties.execution_timeout_secs}}</td>
234 </tr>
235 <tr title="The maximum number of seconds that the command may not output any stdout in a single shot.">
236 <td>I/O timeout</td>
237 <td>{{request.properties.io_timeout_secs}}</td>
238 </tr>
239 <tr title="Additional environment variables to the one provided by the b ot.">
240 <td>Env vars</td>
241 <td>{{bot_view.render_dict(request.properties.env)}}</td>
242 </tr>
243 <tr title="If True, successful task results may be reused for subsequent requests, so the task can be deduped.">
244 <td>Idempotent</td>
245 <td>{{request.properties.idempotent}}</td>
246 </tr>
247 {% if cipd %}
248 <tr title="CIPD server">
249 <td>CIPD server</td>
250 <td>{{cipd.server}}</td>
251 </tr>
252 <tr title="CIPD client">
253 <td>CIPD client</td>
254 <td>{{cipd.client_package}}</td>
255 </tr>
256 {% if cipd.packages %}
257 <tr title="CIPD packages">
258 <td>CIPD packages</td>
259 <td>
260 {% for path, packages in cipd.packages %}
261 <div>{{path or '.'}}/</div>
262 <div class="package-list">
263 {{packages|join('<br>'|safe)}}
264 </div>
265 {% endfor %}
266 </td>
267 </tr>
268 {% endif %}
269 {% endif %}
270
271 {% if request.properties.caches %}
272 <tr title="Named caches">
273 <td>Named caches</td>
274 <td>
275 {% for cache in request.properties.caches %}
276 <div>
277 <span>{{cache.name}}</span>:<span>{{cache.path}}</span>
278 </div>
279 {% endfor %}
280 </td>
281 </tr>
282 {% endif %}
283
284 {% if request.properties.inputs_ref and request.properties.inputs_ref.is olated %}
285 <tr title="Inputs files">
286 <td>Isolated inputs</td>
287 <td>
288 <a
289 href="{{request.properties.inputs_ref.isolatedserver}}/browse?na mespace={{request.properties.inputs_ref.namespace}}&hash={{request.properties.in puts_ref.isolated}}">
290 {{request.properties.inputs_ref.isolated}}
291 </a>
292 </td>
293 </tr>
294 <tr title="Extra arguments if applicable">
295 <td>Extra args</td>
296 <td>
297 {{request.properties.extra_args|join(' ')}}<br>
298 </td>
299 </tr>
300 <tr title="Expected output files">
301 <td>Expected outputs</td>
302 <td>
303 {% for output in request.properties.outputs %}
304 {{output}}<br/>
305 {% endfor %}
306 </td>
307 </tr>
308 {% else %}
309 {# Raw command #}
310 <tr title="Actual command executed by the bot.">
311 <td>Commands</td>
312 <td>
313 {% if request.properties.commands %}
314 {{request.properties.commands[0]|join(' ')}}<br>
315 {% elif request.properties.command %}
316 {{request.properties.command|join(' ')}}<br>
317 {% else %}
318 &#8209;&#8209;
319 {% endif %}
320 </td>
321 </tr>
322 {% endif %}
323 <tr title="Secret bytes">
324 <td>Secret bytes</td>
325 <td>
326 {% if request.properties.has_secret_bytes %}
327 <strong>&lt;REDACTED&gt;</strong>
328 {% else %}
329 &#8209;&#8209;
330 {% endif %}
331 </td>
332 </tr>
333 </tbody>
334 </table>
335 {% endif %}
336 </div>
337
338 <div title="Information about the result: the task was run where (which bot), wh en and what is the result.">
339 <h2>Execution</h2>
340 <table class="property_table">
341 <tbody>
342 <tr title="The previous task executed by this bot before this task, if any .">
343 <td>Previous task</td>
344 <td>
345 {% if previous_task %}
346 <a href="/oldui/user/task/{{previous_task.task_id}}">
347 &#x2190; {{previous_task.name}}
348 </a>
349 {% else %}
350 &#8209;&#8209;
351 {% endif %}
352 </td>
353 </tr>
354 <tr title="Link to the bot that executed this task, if any.">
355 <td>Bot</td>
356 <td>{{bot_view.bot_link(task.bot_id, is_privileged_user)}}</td>
357 </tr>
358 <tr title="The next task executed by this bot, if any.">
359 <td>Following task</td>
360 <td>
361 {% if following_task %}
362 <a href="/oldui/user/task/{{following_task.task_id}}">
363 {{following_task.name}} &#x2192;
364 </a>
365 {% else %}
366 &#8209;&#8209;
367 {% endif %}
368 </td>
369 </tr>
370 <tr class="{% if task.is_exceptional %}failed_test{% endif%}"
371 title="Current state of the task, may be pending, running, completed, bo t_died, expired, canceled.">
372 <td>State</td>
373 <td>
374 {{task.to_string()}} ({{task.state}})
375 {% if task.can_be_canceled %}
376 <form id="cancel" method="POST"
377 action="/oldui/user/task/{{task.task_id}}/cancel"
378 style="display:inline">
379 <input type="hidden" name="xsrf_token" value="{{xsrf_token}}" />
380 <input type="submit" value="Cancel" style="display:inline"></input >
381 </form>
382 {% endif %}
383 </td>
384 </tr>
385 <tr title="When the bot was handed this task.">
386 <td>Started</td>
387 <td>{{task.started_ts|datetimeformat}}</td>
388 </tr>
389 <tr title="When the task was completed, if done.">
390 <td>Completed</td>
391 <td>{{task.completed_ts|datetimeformat}}</td>
392 </tr>
393 <tr title="Moment where the task was declared a failure by the server due to internal error or expiration.">
394 <td>Abandoned</td>
395 <td>
396 {{task.abandoned_ts|datetimeformat}}
397 {% if task.abandoned_ts %}
398 {% if task.started_ts %}
399 ({{(task.abandoned_ts-task.started_ts)|timedeltaformat}} since tas k started)
400 {% else %}
401 ({{(task.abandoned_ts-request.created_ts)|timedeltaformat}} since task request)
402 {% endif %}
403 {% endif %}
404 </td>
405 </tr>
406 <tr class="{% if task.exit_code %}failed_test{% endif%}"
407 title="Process exit code for each commands executed on the bot.">
408 <td>Exit code</td>
409 <td>{{task.exit_code}}</td>
410 </tr>
411 <tr title="Outputs files">
412 <td>Isolated outputs</td>
413 <td>
414 {% if task.outputs_ref %}
415 <a
416 href="{{task.outputs_ref.isolatedserver}}/browse?namespace={{task. outputs_ref.namespace}}&hash={{task.outputs_ref.isolated}}">
417 {{task.outputs_ref.isolated}}
418 </a>
419 {% else %}
420 &#8209;&#8209;
421 {% endif %}
422 </td>
423 </tr>
424 <tr title="Children tasks that were created by this task.">
425 <td>Children tasks</td>
426 <td>
427 {% if children_tasks %}
428 {% for children in children_tasks %}
429 <a href="/oldui/user/task/{{children.task_id}}">{{children.name}}< /a>
430 <br>
431 {% endfor %}
432 {% else %}
433 &#8209;&#8209;
434 {% endif %}
435 </td>
436 </tr>
437 <tr title="This task was not executed, results from the task listed here w ere reused as-is.">
438 <td>
439 {% if task.deduped_from %}
440 <strong>Was deduped from</strong>
441 {% else %}
442 Was deduped from
443 {% endif %}
444 </td>
445 <td>
446 {% if task.deduped_from %}
447 <a href="/oldui/user/task/{{task.deduped_from}}">{{task.deduped_from }}</a>
448 {% else %}
449 &#8209;&#8209;
450 {% endif %}
451 </td>
452 </tr>
453 <tr class="{% if task.internal_failure %}failed_test{% endif%}"
454 title="True if an internal Swarming error occured for this task. A BSOD is considered an internal failure.">
455 <td>Internal failure</td>
456 <td>{{task.internal_failure}}</td>
457 </tr>
458 <tr title="A task may be tried 2 times. This list the try number starting at 1.">
459 <td>Try number</td>
460 <td>{{task.try_number}}</td>
461 </tr>
462 <tr title="Last time this bot sent an update about this task.">
463 <td>Last updated</td>
464 <td>{{(now-task.modified_ts)|timedeltaformat}} ago</td>
465 </tr>
466 <tr title="Current bot dimensions.">
467 <td>Bot dimensions</td>
468 <td>
469 {% if task.bot_dimensions %}
470 {{bot_view.render_dict(task.bot_dimensions)}}
471 {% else %}
472 {{bot_view.bot_dimensions(bot)}}
473 {% endif %}
474 </td>
475 </tr>
476 {% if cipd_pins %}
477 <tr title="CIPD client">
478 <td>CIPD client</td>
479 <td>{{cipd_pins.client_package}}</td>
480 </tr>
481 {% if cipd_pins.packages %}
482 <tr title="CIPD packages">
483 <td>CIPD packages</td>
484 <td>
485 {% for path, packages in cipd_pins.packages %}
486 <div>{{path or '.'}}/</div>
487 <div class="package-list">
488 {{packages|join('<br>'|safe)}}
489 </div>
490 {% endfor %}
491 </td>
492 </tr>
493 {% endif %}
494 {% endif %}
495 <tr title="Current bot version. TODO(maruel): List bot version at time of task reaping.">
496 <td>Bot version</td>
497 <td>{{task.bot_version}}</td>
498 </tr>
499 <tr title="List of server versions that touched this task.">
500 <td>Server version</td>
501 <td>
502 {% for v in task.server_versions %}
503 {% if is_gae_admin %}
504 <a href="https://appengine.google.com/logs?&app_id={{full_appid}}& version_id={{v}}">
505 {{v}}
506 </a>
507 {% else %}
508 {{v}}
509 {% endif %}
510 {% endfor %}
511 </td>
512 </tr>
513 </tbody>
514 </table>
515 </div>
516
517 <div title="Information about how fast we got the results.">
518 <h2>Performance</h2>
519 <table class="property_table">
520 <tbody>
521 <tr title="Time between when the request was done and the bot started the task.">
522 <td>Pending time</td>
523 <td>
524 {{bot_view.pending_star(task)}}{{task.pending_now(now)|timedeltaformat (include_ms=True)}}
525 </td>
526 </tr>
527 <tr title="Duration of the task, up to now if the task is still on-going." >
528 <td>Duration </td>
529 <td>{{task.duration_now(now)|timedeltaformat(include_ms=True)}}</td>
530 </tr>
531 {% if task.performance_stats_key %}
532 <tr title="Overhead from installing CIPD packages">
533 <td>Overhead CIPD packages</td>
534 <td>{{task.overhead_package_installation|timedeltaformat(include_ms=Tr ue)}}</td>
535 </tr>
536 <tr title="Overhead from installing isolated inputs">
537 <td>Overhead isolated inputs</td>
538 <td>{{task.overhead_isolated_inputs|timedeltaformat(include_ms=True)}} </td>
539 </tr>
540 <tr title="Overhead from pushing isolated outputs">
541 <td>Overhead isolated outputs</td>
542 <td>{{task.overhead_isolated_outputs|timedeltaformat(include_ms=True)} }</td>
543 </tr>
544 {% endif %}
545 <tr title="Overhead from task_runner This is bot side overheads excluding isolated setup and teardown.">
546 <td>Overhead bot (miscellaneous)</td>
547 <td>{{task.overhead_task_runner|timedeltaformat(include_ms=True)}}</td>
548 </tr>
549 <tr title="Overhead from server<-> communication. Includes DB access.">
550 <td>Overhead server<->bot communication</td>
551 <td>{{task.overhead_server|timedeltaformat(include_ms=True)}}</td>
552 </tr>
553 <tr title="Cost of running this task, as reported by the bot, if applicabl e.">
554 {% if task.cost_saved_usd %}
555 <td>$ USD saved</td>
556 <td>
557 <span style="color:green">{{task.cost_saved_usd|round(4) }} $</span>
558 </td>
559 {% else %}
560 <td>$ USD</td>
561 <td>
562 {% if task.cost_usd %}
563 {{task.cost_usd|round(5) }} $
564 {% else %}
565 &#8209;&#8209;
566 {% endif %}
567 </td>
568 {% endif %}
569 </tr>
570 {% if task.performance_stats.is_valid %}
571 <tr title="Size of the bot cache before this task started. This cache pe rmits to reduce the amount of items downloaded.">
572 <td>Initial bot cache</td>
573 <td>{{task.performance_stats.isolated_download.initial_size or 0|files izeformat}} total; {{task.performance_stats.isolated_download.initial_number_ite ms or 0}} items</td>
574 </tr>
575 <tr title="Items found in the cache so the bot didn't have to download t hese before starting the task. This means these items are used by multiple tasks .">
576 <td>Task inputs: Hot items</td>
577 <td>{{summarize_array(task.performance_stats.isolated_download.items_h ot_array)}}</td>
578 </tr>
579 <tr title="Items missing from the cache, so they had to be downloaded be fore the task could start.">
580 <td>Task inputs: Cold items (i.e. downloaded)</td>
581 <td>{{summarize_array(task.performance_stats.isolated_download.items_c old_array)}}</td>
582 </tr>
583 <tr title="Task outputs (via ISOLATED_OUTDIR) that were already on the i solated server.">
584 <td>Task results: Hot items</td>
585 <td>{{summarize_array(task.performance_stats.isolated_upload.items_hot _array)}}</td>
586 </tr>
587 <tr title="Task outputs (via ISOLATED_OUTDIR) that were missing from the isolated server.">
588 <td>Task results: Cold items (i.e. uploaded)</td>
589 <td>{{summarize_array(task.performance_stats.isolated_upload.items_col d_array)}}</td>
590 </tr>
591 {% endif %}
592 </tbody>
593 </table>
594 </div>
595
596 <br>
597 <div class=highlight_section>
598 <h2>Help</h2>
599 {% if request.properties.inputs_ref and request.properties.inputs_ref.isolated % }
600 <div>Download inputs files into directory <i>foo</i>:</div>
601 <div class=code> python isolateserver.py download -I {{request.properties.input s_ref.isolatedserver}} --namespace {{request.properties.inputs_ref.namespace}} - s {{request.properties.inputs_ref.isolated}} --target foo</div>
602 <br>
603 {%endif%}
604 <div>Run this task locally:</div>
605 <div class=code> python swarming.py reproduce -S {{host_url}} {{task.task_id}}< /div>
606 <br>
607 <div>Download output results into directory <i>foo</i>:</div>
608 <div class=code> python swarming.py collect -S {{host_url}} --task-output-dir=f oo {{task.task_id}}</div>
609 <br>
610 <div>Looking for <i>swarming.py</i>?</div>
611 <div class=code> git clone https://github.com/luci/client-py</div>
612 </div>
613
614 {% set output = task.get_output() %}
615 {% if output is not none %}
616 <h3>Output:</h3>
617 <pre>
618 {{task.get_output().decode('utf-8', 'replace')}}{% if is_running %}<p class="con sole"><span class="blink">|</span>{% endif %}
619 </pre>
620 {% endif %}
621
622 {% endblock %}
OLDNEW
« no previous file with comments | « appengine/swarming/templates/root.html ('k') | appengine/swarming/templates/user_tasks.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698