| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 Copyright 2016 The LUCI Authors. All rights reserved. | 2 Copyright 2016 The LUCI Authors. All rights reserved. |
| 3 Use of this source code is governed under the Apache License, Version 2.0 | 3 Use of this source code is governed under the Apache License, Version 2.0 |
| 4 that can be found in the LICENSE file. | 4 that can be found in the LICENSE file. |
| 5 | 5 |
| 6 This in an HTML Import-able file that contains the definition | 6 This in an HTML Import-able file that contains the definition |
| 7 of the following elements: | 7 of the following elements: |
| 8 | 8 |
| 9 <task-page> | 9 <task-page> |
| 10 | 10 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 .stdout { | 75 .stdout { |
| 76 white-space: pre-line; | 76 white-space: pre-line; |
| 77 padding: 2px; | 77 padding: 2px; |
| 78 } | 78 } |
| 79 | 79 |
| 80 .refresh_input { | 80 .refresh_input { |
| 81 padding: 0 5px; | 81 padding: 0 5px; |
| 82 } | 82 } |
| 83 | 83 |
| 84 .reproduce { |
| 85 margin-left: 5px; |
| 86 } |
| 87 |
| 84 .tabbed { | 88 .tabbed { |
| 85 border: 3px solid #1F78B4; | 89 border: 3px solid #1F78B4; |
| 86 margin-left: 5px; | 90 margin-left: 5px; |
| 87 min-height: 80vh; | 91 min-height: 80vh; |
| 88 } | 92 } |
| 89 </style> | 93 </style> |
| 90 | 94 |
| 91 <url-param name="id" | 95 <url-param name="id" |
| 92 value="{{task_id}}"> | 96 value="{{task_id}}"> |
| 93 </url-param> | 97 </url-param> |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 <td>Uploading Outputs To Isolate</td> | 447 <td>Uploading Outputs To Isolate</td> |
| 444 <td>[[_humanDuration(_result.performance_stats.isolated_upload
.duration)]]</td> | 448 <td>[[_humanDuration(_result.performance_stats.isolated_upload
.duration)]]</td> |
| 445 </tr> | 449 </tr> |
| 446 <tr> | 450 <tr> |
| 447 <td>Initial bot cache</td> | 451 <td>Initial bot cache</td> |
| 448 <td>[[_result.performance_stats.isolated_download.initial_numb
er_items]] items; | 452 <td>[[_result.performance_stats.isolated_download.initial_numb
er_items]] items; |
| 449 [[_bytes(_result.performance_stats.isolated_download.initial_s
ize)]]</td> | 453 [[_bytes(_result.performance_stats.isolated_download.initial_s
ize)]]</td> |
| 450 </tr> | 454 </tr> |
| 451 </table> | 455 </table> |
| 452 </template> | 456 </template> |
| 457 |
| 458 <div class="title">Reproducing the task locally</div> |
| 459 <div class="reproduce"> |
| 460 <div>Download inputs files into directory <i>foo</i>:</div> |
| 461 <div class="code"> python isolateserver.py download -I [[_request
.properties.inputs_ref.isolatedserver]] --namespace [[_request.properties.inputs
_ref.namespace]] -s [[_request.properties.inputs_ref.isolated]] --target foo</di
v> |
| 462 <br> |
| 463 <div>Run this task locally:</div> |
| 464 <div class="code"> python swarming.py reproduce -S [[_host_url]]
[[task_id]]</div> |
| 465 <br> |
| 466 <div>Download output results into directory <i>foo</i>:</div> |
| 467 <div class="code"> python swarming.py collect -S [[_host_url]] --
task-output-dir=foo [[task_id]]</div> |
| 468 <br> |
| 469 <div>Looking for <i>swarming.py</i>?</div> |
| 470 <div class="code"> git clone https://github.com/luci/client-py</d
iv> |
| 471 </div> |
| 453 </div> | 472 </div> |
| 454 | 473 |
| 455 <div class="flex right" hidden$="[[_not(_task_exists)]]"> | 474 <div class="flex right" hidden$="[[_not(_task_exists)]]"> |
| 456 <div class="horizontal layout"> | 475 <div class="horizontal layout"> |
| 457 <div class="tabs"> | 476 <div class="tabs"> |
| 458 <paper-tabs selected="{{_show_raw}}" no-bar> | 477 <paper-tabs selected="{{_show_raw}}" no-bar> |
| 459 <paper-tab disabled$="[[_noMilo(_request)]]">Milo Output</pape
r-tab> | 478 <paper-tab disabled$="[[_noMilo(_request)]]">Milo Output</pape
r-tab> |
| 460 <paper-tab>Raw Output</paper-tab> | 479 <paper-tab>Raw Output</paper-tab> |
| 461 </paper-tabs> | 480 </paper-tabs> |
| 462 </div> | 481 </div> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 482 <template is="dom-if" if="[[_show_raw]]"> | 501 <template is="dom-if" if="[[_show_raw]]"> |
| 483 <div class="code stdout tabbed">[[_stdout]]</div> | 502 <div class="code stdout tabbed">[[_stdout]]</div> |
| 484 </template> | 503 </template> |
| 485 </div> | 504 </div> |
| 486 </div> | 505 </div> |
| 487 </div> | 506 </div> |
| 488 </swarming-app> | 507 </swarming-app> |
| 489 | 508 |
| 490 <paper-dialog id="prompt" modal on-iron-overlay-closed="_promptClosed"> | 509 <paper-dialog id="prompt" modal on-iron-overlay-closed="_promptClosed"> |
| 491 <h2>Are you sure?</h2> | 510 <h2>Are you sure?</h2> |
| 492 <div>Are you sure you want to [[_dialogPrompt]]?</div> | 511 <div>Are you sure you want to [[_dialog_prompt]]?</div> |
| 493 <div class="buttons"> | 512 <div class="buttons"> |
| 494 <paper-button dialog-dismiss autofocus>No</paper-button> | 513 <paper-button dialog-dismiss autofocus>No</paper-button> |
| 495 <paper-button dialog-confirm>Yes</paper-button> | 514 <paper-button dialog-confirm>Yes</paper-button> |
| 496 </div> | 515 </div> |
| 497 </paper-dialog> | 516 </paper-dialog> |
| 498 | 517 |
| 499 <error-toast></error-toast> | 518 <error-toast></error-toast> |
| 500 | 519 |
| 501 <interval-timer period="[[_refresh_interval]]" on-trigger="_softRefresh"> | 520 <interval-timer period="[[_refresh_interval]]" on-trigger="_softRefresh"> |
| 502 </interval-timer> | 521 </interval-timer> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 513 ], | 532 ], |
| 514 | 533 |
| 515 properties: { | 534 properties: { |
| 516 task_id: { | 535 task_id: { |
| 517 type: String, | 536 type: String, |
| 518 }, | 537 }, |
| 519 client_id: { | 538 client_id: { |
| 520 type: String, | 539 type: String, |
| 521 }, | 540 }, |
| 522 | 541 |
| 523 _dialogPrompt: { | 542 _dialog_prompt: { |
| 524 type: String, | 543 type: String, |
| 525 value: "", | 544 value: "", |
| 526 }, | 545 }, |
| 546 _host_url: { |
| 547 type: String, |
| 548 value: function(){ |
| 549 return window.location.hostname; |
| 550 } |
| 551 }, |
| 527 _refresh_interval: { | 552 _refresh_interval: { |
| 528 type: Number, | 553 type: Number, |
| 529 }, | 554 }, |
| 530 _request: { | 555 _request: { |
| 531 type: Object, | 556 type: Object, |
| 532 observer: "_requestUpdated" | 557 observer: "_requestUpdated" |
| 533 }, | 558 }, |
| 534 _request_detail: { | 559 _request_detail: { |
| 535 type: Boolean, | 560 type: Boolean, |
| 536 }, | 561 }, |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 var end = result.started_ts || result.abandoned_ts || new Date(); | 698 var end = result.started_ts || result.abandoned_ts || new Date(); |
| 674 // In the case of deduplicated tasks, started_ts comes before the task. | 699 // In the case of deduplicated tasks, started_ts comes before the task. |
| 675 if (end <= result.created_ts) { | 700 if (end <= result.created_ts) { |
| 676 return "0s"; | 701 return "0s"; |
| 677 } | 702 } |
| 678 return this._timeDiffExact(result.created_ts, end); | 703 return this._timeDiffExact(result.created_ts, end); |
| 679 }, | 704 }, |
| 680 | 705 |
| 681 _promptClosed: function(e) { | 706 _promptClosed: function(e) { |
| 682 if (e.detail.confirmed) { | 707 if (e.detail.confirmed) { |
| 683 if (this._dialogPrompt.startsWith("cancel")) { | 708 if (this._dialog_prompt.startsWith("cancel")) { |
| 684 this._cancelTask(); | 709 this._cancelTask(); |
| 685 } else { | 710 } else { |
| 686 this._retryTask(); | 711 this._retryTask(); |
| 687 } | 712 } |
| 688 } | 713 } |
| 689 }, | 714 }, |
| 690 | 715 |
| 691 _promptCancel: function() { | 716 _promptCancel: function() { |
| 692 this.set("_dialogPrompt", "cancel task "+this.task_id); | 717 this.set("_dialog_prompt", "cancel task "+this.task_id); |
| 693 this.$.prompt.open(); | 718 this.$.prompt.open(); |
| 694 }, | 719 }, |
| 695 | 720 |
| 696 _promptRetry: function() { | 721 _promptRetry: function() { |
| 697 this.set("_dialogPrompt", "retry task "+this.task_id); | 722 this.set("_dialog_prompt", "retry task "+this.task_id); |
| 698 this.$.prompt.open(); | 723 this.$.prompt.open(); |
| 699 }, | 724 }, |
| 700 | 725 |
| 701 _refresh: function() { | 726 _refresh: function() { |
| 702 this.$.data.reload(); | 727 this.$.data.reload(); |
| 703 }, | 728 }, |
| 704 | 729 |
| 705 _requestUpdated: function(request) { | 730 _requestUpdated: function(request) { |
| 706 if (this._noMilo(request)) { | 731 if (this._noMilo(request)) { |
| 707 this.set("_show_raw", 1); | 732 this.set("_show_raw", 1); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 return result && result.state !== this.PENDING && result.state !== this.
CANCELED && result.state != this.EXPIRED; | 803 return result && result.state !== this.PENDING && result.state !== this.
CANCELED && result.state != this.EXPIRED; |
| 779 }, | 804 }, |
| 780 | 805 |
| 781 _wasNotPickedUp: function(result) { | 806 _wasNotPickedUp: function(result) { |
| 782 return result && !this._wasPickedUp(result); | 807 return result && !this._wasPickedUp(result); |
| 783 }, | 808 }, |
| 784 }); | 809 }); |
| 785 })(); | 810 })(); |
| 786 </script> | 811 </script> |
| 787 </dom-module> | 812 </dom-module> |
| OLD | NEW |