| 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 |
| 11 task-page shows the request, results, stats, and standard output of a task. | 11 task-page shows the request, results, stats, and standard output of a task. |
| 12 | 12 |
| 13 This is a top-level element. | 13 This is a top-level element. |
| 14 | 14 |
| 15 Properties: | 15 Properties: |
| 16 task_id: String, Used in testing to specify a task_id | 16 task_id: String, Used in testing to specify a task_id |
| 17 client_id: String, Oauth 2.0 client id. It will be set by server-side | 17 client_id: String, Oauth 2.0 client id. It will be set by server-side |
| 18 template evaluation. | 18 template evaluation. |
| 19 | 19 |
| 20 Methods: | 20 Methods: |
| 21 None. | 21 None. |
| 22 | 22 |
| 23 Events: | 23 Events: |
| 24 None. | 24 None. |
| 25 --> | 25 --> |
| 26 | 26 |
| 27 <link rel="import" href="/res/imp/bower_components/iron-icon/iron-icon.html"> | 27 <link rel="import" href="/res/imp/bower_components/iron-icon/iron-icon.html"> |
| 28 <link rel="import" href="/res/imp/bower_components/iron-icons/iron-icons.html"> | 28 <link rel="import" href="/res/imp/bower_components/iron-icons/iron-icons.html"> |
| 29 <link rel="import" href="/res/imp/bower_components/paper-button/paper-button.htm
l"> | 29 <link rel="import" href="/res/imp/bower_components/paper-button/paper-button.htm
l"> |
| 30 <link rel="import" href="/res/imp/bower_components/paper-checkbox/paper-checkbox
.html"> |
| 30 <link rel="import" href="/res/imp/bower_components/paper-dialog/paper-dialog.htm
l"> | 31 <link rel="import" href="/res/imp/bower_components/paper-dialog/paper-dialog.htm
l"> |
| 31 <link rel="import" href="/res/imp/bower_components/paper-input/paper-input.html"
> | 32 <link rel="import" href="/res/imp/bower_components/paper-input/paper-input.html"
> |
| 32 <link rel="import" href="/res/imp/bower_components/paper-tabs/paper-tabs.html"> | 33 <link rel="import" href="/res/imp/bower_components/paper-tabs/paper-tabs.html"> |
| 33 <link rel="import" href="/res/imp/bower_components/polymer/polymer.html"> | 34 <link rel="import" href="/res/imp/bower_components/polymer/polymer.html"> |
| 34 | 35 |
| 35 <link rel="import" href="/res/imp/common/common-behavior.html"> | 36 <link rel="import" href="/res/imp/common/common-behavior.html"> |
| 36 <link rel="import" href="/res/imp/common/interval-timer.html"> | 37 <link rel="import" href="/res/imp/common/interval-timer.html"> |
| 37 <link rel="import" href="/res/imp/common/single-page-style.html"> | 38 <link rel="import" href="/res/imp/common/single-page-style.html"> |
| 38 <link rel="import" href="/res/imp/common/swarming-app.html"> | 39 <link rel="import" href="/res/imp/common/swarming-app.html"> |
| 39 <link rel="import" href="/res/imp/common/task-behavior.html"> | 40 <link rel="import" href="/res/imp/common/task-behavior.html"> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 65 min-width: 3em; | 66 min-width: 3em; |
| 66 vertical-align: middle; | 67 vertical-align: middle; |
| 67 padding: .5em; | 68 padding: .5em; |
| 68 } | 69 } |
| 69 | 70 |
| 70 .code { | 71 .code { |
| 71 font-family: monospace; | 72 font-family: monospace; |
| 72 } | 73 } |
| 73 | 74 |
| 74 .stdout { | 75 .stdout { |
| 75 white-space: pre-line; | 76 white-space: pre-wrap; |
| 76 padding: 2px; | 77 padding: 2px; |
| 77 } | 78 } |
| 79 .stdout.wide { |
| 80 white-space: pre; |
| 81 overflow-x: auto |
| 82 } |
| 78 | 83 |
| 79 .refresh_input { | 84 .refresh_input { |
| 80 padding: 0 5px; | 85 padding: 0 5px; |
| 81 } | 86 } |
| 82 | 87 |
| 83 .reproduce { | 88 .reproduce { |
| 84 margin-left: 5px; | 89 margin-left: 5px; |
| 85 } | 90 } |
| 86 | 91 |
| 87 .tabbed { | 92 .tabbed { |
| 88 border: 3px solid #1F78B4; | 93 border: 3px solid #1F78B4; |
| 89 margin-left: 5px; | 94 margin-left: 5px; |
| 90 min-height: 80vh; | 95 min-height: 80vh; |
| 91 min-width: 550px; | 96 min-width: 550px; |
| 92 } | 97 } |
| 93 | 98 |
| 94 .task-info { | 99 .task-info { |
| 95 min-width: 500px; | 100 min-width: 500px; |
| 96 } | 101 } |
| 97 | 102 |
| 98 .cipd-header { | 103 .cipd-header { |
| 99 -moz-user-select: none; | 104 -moz-user-select: none; |
| 100 -webkit-user-select: none; | 105 -webkit-user-select: none; |
| 101 -ms-user-select: none; | 106 -ms-user-select: none; |
| 102 user-select: none; | 107 user-select: none; |
| 103 font-weight: bold; | 108 font-weight: bold; |
| 104 margin-left: 8px; | 109 margin-left: 8px; |
| 105 } | 110 } |
| 111 |
| 112 .full-width { |
| 113 min-width: 100%; |
| 114 } |
| 115 |
| 116 .full-width-container { |
| 117 position: relative; |
| 118 } |
| 119 |
| 120 .full-width-container > paper-checkbox { |
| 121 position: absolute; |
| 122 bottom: 10px; |
| 123 width: 140px; |
| 124 left: 5px; |
| 125 } |
| 106 </style> | 126 </style> |
| 107 | 127 |
| 108 <url-param name="id" | 128 <url-param name="id" |
| 109 value="{{task_id}}"> | 129 value="{{task_id}}"> |
| 110 </url-param> | 130 </url-param> |
| 111 <url-param name="try_detail" | 131 <url-param name="try_detail" |
| 112 value="{{_try_detail}}"> | 132 value="{{_try_detail}}"> |
| 113 </url-param> | 133 </url-param> |
| 114 <url-param name="request_detail" | 134 <url-param name="request_detail" |
| 115 value="{{_request_detail}}"> | 135 value="{{_request_detail}}"> |
| 116 </url-param> | 136 </url-param> |
| 117 <url-param name="show_raw" | 137 <url-param name="show_raw" |
| 118 value="{{_show_raw}}"> | 138 value="{{_show_raw}}"> |
| 119 </url-param> | 139 </url-param> |
| 140 <url-param name="wide_logs" |
| 141 value="{{_wide_logs}}"> |
| 142 </url-param> |
| 120 <url-param name="refresh" | 143 <url-param name="refresh" |
| 121 value="{{_refresh_interval}}" | 144 value="{{_refresh_interval}}" |
| 122 default_value="10"> | 145 default_value="10"> |
| 123 </url-param> | 146 </url-param> |
| 124 | 147 |
| 125 <swarming-app | 148 <swarming-app |
| 126 client_id="[[client_id]]" | 149 client_id="[[client_id]]" |
| 127 auth_headers="{{_auth_headers}}" | 150 auth_headers="{{_auth_headers}}" |
| 128 permissions="{{_permissions}}" | 151 permissions="{{_permissions}}" |
| 129 profile="{{_profile}}" | 152 profile="{{_profile}}" |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 <br> | 516 <br> |
| 494 <div>Download output results into directory <i>foo</i>:</div> | 517 <div>Download output results into directory <i>foo</i>:</div> |
| 495 <div class="code"> python swarming.py collect -S [[_host_url]]
--task-output-dir=foo [[task_id]]</div> | 518 <div class="code"> python swarming.py collect -S [[_host_url]]
--task-output-dir=foo [[task_id]]</div> |
| 496 <br/> | 519 <br/> |
| 497 <div>Looking for <i>swarming.py</i>?</div> | 520 <div>Looking for <i>swarming.py</i>?</div> |
| 498 <div class="code"> git clone https://github.com/luci/client-py<
/div> | 521 <div class="code"> git clone https://github.com/luci/client-py<
/div> |
| 499 </div> | 522 </div> |
| 500 </div> | 523 </div> |
| 501 </div> | 524 </div> |
| 502 | 525 |
| 503 <div class="flex right" hidden$="[[_not(_task_exists)]]"> | 526 <div class$="flex right [[_classRight(_wide_logs)]]" hidden$="[[_not(_
task_exists)]]"> |
| 504 <div class="horizontal layout"> | 527 <div class="horizontal layout"> |
| 505 <div class="tabs"> | 528 <div class="tabs"> |
| 506 <paper-tabs selected="{{_show_raw}}" no-bar> | 529 <paper-tabs selected="{{_show_raw}}" no-bar> |
| 507 <paper-tab disabled$="[[_noMilo(_request)]]">Milo Output</pape
r-tab> | 530 <paper-tab disabled$="[[_noMilo(_request)]]">Milo Output</pape
r-tab> |
| 508 <paper-tab>Raw Output</paper-tab> | 531 <paper-tab>Raw Output</paper-tab> |
| 509 </paper-tabs> | 532 </paper-tabs> |
| 510 </div> | 533 </div> |
| 511 | 534 |
| 512 <paper-input | 535 <paper-input |
| 513 class="refresh_input" | 536 class="refresh_input" |
| 514 label="Refresh Interval (seconds)" | 537 label="Refresh Interval (seconds)" |
| 515 value="{{_refresh_interval}}" | 538 value="{{_refresh_interval}}" |
| 516 title="How often to refresh all information about the task" | 539 title="How often to refresh all information about the task" |
| 517 auto-validate | 540 auto-validate |
| 518 min="1" | 541 min="1" |
| 519 max="1000" | 542 max="1000" |
| 520 pattern="[0-9]+"> | 543 pattern="[0-9]+"> |
| 521 </paper-input> | 544 </paper-input> |
| 545 |
| 546 <div class="full-width-container"> |
| 547 <paper-checkbox checked="{{_wide_logs}}"> |
| 548 Full Width Logs |
| 549 </paper-checkbox> |
| 550 </div> |
| 551 |
| 522 </div> | 552 </div> |
| 523 | 553 |
| 524 <template is="dom-if" if="[[_supportsMilo(_request,_show_raw)]]"> | 554 <template is="dom-if" if="[[_supportsMilo(_request,_show_raw)]]"> |
| 525 <div class="milo tabbed" hidden$="[[_isSummaryLink(task_id)]]"> | 555 <div class="milo tabbed" hidden$="[[_isSummaryLink(task_id)]]"> |
| 526 Milo results are only generated for task summaires, that is, tas
ks whose ids end in 0. Tasks ending in 1 or 2 represent possible retries of tas
ks. See <a href="//goo.gl/LE4rwV">the docs</a> for more. | 556 Milo results are only generated for task summaires, that is, tas
ks whose ids end in 0. Tasks ending in 1 or 2 represent possible retries of tas
ks. See <a href="//goo.gl/LE4rwV">the docs</a> for more. |
| 527 </div> | 557 </div> |
| 528 <iframe id="miloFrame" class="milo tabbed" src$="[[_getDisplayServ
erLink(_server_details.display_server_url_template,task_id)]]"></iframe> | 558 <iframe id="miloFrame" class="milo tabbed" src$="[[_getDisplayServ
erLink(_server_details.display_server_url_template,task_id)]]"></iframe> |
| 529 </template> | 559 </template> |
| 530 <template is="dom-if" if="[[_show_raw]]"> | 560 <template is="dom-if" if="[[_show_raw]]"> |
| 531 <div class="code stdout tabbed break-all">[[_rawOutput(_stdout,_re
sult)]]</div> | 561 <div class$="code stdout tabbed break-all [[_classStdout(_wide_log
s)]]">[[_rawOutput(_stdout,_result)]]</div> |
| 532 </template> | 562 </template> |
| 533 </div> | 563 </div> |
| 534 </div> | 564 </div> |
| 535 </div> | 565 </div> |
| 536 </swarming-app> | 566 </swarming-app> |
| 537 | 567 |
| 538 <paper-dialog id="prompt" modal on-iron-overlay-closed="_promptClosed"> | 568 <paper-dialog id="prompt" modal on-iron-overlay-closed="_promptClosed"> |
| 539 <h2>Are you sure?</h2> | 569 <h2>Are you sure?</h2> |
| 540 <div>Are you sure you want to [[_dialog_prompt]]?</div> | 570 <div>Are you sure you want to [[_dialog_prompt]]?</div> |
| 541 <div class="buttons"> | 571 <div class="buttons"> |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 p.requested = p.package_name + ":" + p.version; | 680 p.requested = p.package_name + ":" + p.version; |
| 651 actual.forEach(function(c) { | 681 actual.forEach(function(c) { |
| 652 if (c.path === p.path) { | 682 if (c.path === p.path) { |
| 653 p.actual = c.package_name + ":" + c.version; | 683 p.actual = c.package_name + ":" + c.version; |
| 654 } | 684 } |
| 655 }); | 685 }); |
| 656 }); | 686 }); |
| 657 return packages; | 687 return packages; |
| 658 }, | 688 }, |
| 659 | 689 |
| 690 _classRight: function(wide_logs) { |
| 691 if (wide_logs) { |
| 692 return "full-width"; |
| 693 } |
| 694 return ""; |
| 695 }, |
| 696 |
| 697 _classStdout: function(wide_logs) { |
| 698 if (wide_logs) { |
| 699 return "wide"; |
| 700 } |
| 701 return ""; |
| 702 }, |
| 703 |
| 660 _command: function(request) { | 704 _command: function(request) { |
| 661 if (!request || !request.properties) { | 705 if (!request || !request.properties) { |
| 662 return ""; | 706 return ""; |
| 663 } | 707 } |
| 664 var args = request.properties.command || []; | 708 var args = request.properties.command || []; |
| 665 return args.join(" "); | 709 return args.join(" "); |
| 666 }, | 710 }, |
| 667 | 711 |
| 668 _disambiguate: function(taskId, result) { | 712 _disambiguate: function(taskId, result) { |
| 669 if (!taskId.endsWith("0") || !result) { | 713 if (!taskId.endsWith("0") || !result) { |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 return result && result.state !== this.PENDING && result.state !== this.
CANCELED && result.state != this.EXPIRED; | 897 return result && result.state !== this.PENDING && result.state !== this.
CANCELED && result.state != this.EXPIRED; |
| 854 }, | 898 }, |
| 855 | 899 |
| 856 _wasNotPickedUp: function(result) { | 900 _wasNotPickedUp: function(result) { |
| 857 return result && !this._wasPickedUp(result); | 901 return result && !this._wasPickedUp(result); |
| 858 }, | 902 }, |
| 859 }); | 903 }); |
| 860 })(); | 904 })(); |
| 861 </script> | 905 </script> |
| 862 </dom-module> | 906 </dom-module> |
| OLD | NEW |