| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 <url-param name="refresh" | 99 <url-param name="refresh" |
| 100 value="{{_refresh_interval}}" | 100 value="{{_refresh_interval}}" |
| 101 default_value="10"> | 101 default_value="10"> |
| 102 </url-param> | 102 </url-param> |
| 103 | 103 |
| 104 <swarming-app | 104 <swarming-app |
| 105 client_id="[[client_id]]" | 105 client_id="[[client_id]]" |
| 106 auth_headers="{{_auth_headers}}" | 106 auth_headers="{{_auth_headers}}" |
| 107 permissions="{{_permissions}}" | 107 permissions="{{_permissions}}" |
| 108 profile="{{_profile}}" | 108 profile="{{_profile}}" |
| 109 server_details="{{_server_details}}" |
| 109 signed_in="{{_signed_in}}" | 110 signed_in="{{_signed_in}}" |
| 110 | 111 |
| 111 busy="[[_busy]]" | 112 busy="[[_busy]]" |
| 112 name="Swarming Task Page"> | 113 name="Swarming Task Page"> |
| 113 | 114 |
| 114 <h2 hidden$="[[_signed_in]]">You must sign in to see anything useful.</h2> | 115 <h2 hidden$="[[_signed_in]]">You must sign in to see anything useful.</h2> |
| 115 | 116 |
| 116 <div hidden$="[[_not(_signed_in)]]"> | 117 <div hidden$="[[_not(_signed_in)]]"> |
| 117 | 118 |
| 118 <task-page-data | 119 <task-page-data |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 value="{{_refresh_interval}}" | 430 value="{{_refresh_interval}}" |
| 430 title="How often to refresh all information about the task" | 431 title="How often to refresh all information about the task" |
| 431 auto-validate | 432 auto-validate |
| 432 min="1" | 433 min="1" |
| 433 max="1000" | 434 max="1000" |
| 434 pattern="[0-9]+"> | 435 pattern="[0-9]+"> |
| 435 </paper-input> | 436 </paper-input> |
| 436 </div> | 437 </div> |
| 437 | 438 |
| 438 <template is="dom-if" if="[[_supportsMilo(_request,_show_raw)]]"> | 439 <template is="dom-if" if="[[_supportsMilo(_request,_show_raw)]]"> |
| 439 <iframe id="miloFrame" class="milo tabbed" src$="[[_getMiloLink(mi
lo_prefix,task_id)]]"></iframe> | 440 <iframe id="miloFrame" class="milo tabbed" src$="[[_getDisplayServ
erLink(_server_details.display_server_url_template,task_id)]]"></iframe> |
| 440 </template> | 441 </template> |
| 441 <template is="dom-if" if="[[_show_raw]]"> | 442 <template is="dom-if" if="[[_show_raw]]"> |
| 442 <div class="code stdout tabbed">[[_stdout]]</div> | 443 <div class="code stdout tabbed">[[_stdout]]</div> |
| 443 </template> | 444 </template> |
| 444 </div> | 445 </div> |
| 445 </div> | 446 </div> |
| 446 </div> | 447 </div> |
| 447 </swarming-app> | 448 </swarming-app> |
| 448 | 449 |
| 449 <paper-dialog id="prompt" modal on-iron-overlay-closed="_promptClosed"> | 450 <paper-dialog id="prompt" modal on-iron-overlay-closed="_promptClosed"> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 471 SwarmingBehaviors.TaskBehavior, | 472 SwarmingBehaviors.TaskBehavior, |
| 472 ], | 473 ], |
| 473 | 474 |
| 474 properties: { | 475 properties: { |
| 475 task_id: { | 476 task_id: { |
| 476 type: String, | 477 type: String, |
| 477 }, | 478 }, |
| 478 client_id: { | 479 client_id: { |
| 479 type: String, | 480 type: String, |
| 480 }, | 481 }, |
| 481 milo_prefix: { | |
| 482 type: String, | |
| 483 }, | |
| 484 | |
| 485 | 482 |
| 486 _dialogPrompt: { | 483 _dialogPrompt: { |
| 487 type: String, | 484 type: String, |
| 488 value: "", | 485 value: "", |
| 489 }, | 486 }, |
| 490 _refresh_interval: { | 487 _refresh_interval: { |
| 491 type: Number, | 488 type: Number, |
| 492 }, | 489 }, |
| 493 _request: { | 490 _request: { |
| 494 type: Object, | 491 type: Object, |
| 495 observer: "_requestUpdated" | 492 observer: "_requestUpdated" |
| 496 }, | 493 }, |
| 497 _request_detail: { | 494 _request_detail: { |
| 498 type: Boolean, | 495 type: Boolean, |
| 499 }, | 496 }, |
| 500 _result: { | 497 _result: { |
| 501 type: Object, | 498 type: Object, |
| 502 }, | 499 }, |
| 500 _server_details: { |
| 501 type: Object, |
| 502 }, |
| 503 _stdout: { | 503 _stdout: { |
| 504 type: String, | 504 type: String, |
| 505 } | 505 } |
| 506 }, | 506 }, |
| 507 | 507 |
| 508 _alias: function(dim) { | 508 _alias: function(dim) { |
| 509 var values = dim.value; | 509 var values = dim.value; |
| 510 if (!Array.isArray(values)) { | 510 if (!Array.isArray(values)) { |
| 511 values = [values]; | 511 values = [values]; |
| 512 } | 512 } |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 return args.join(" "); | 582 return args.join(" "); |
| 583 }, | 583 }, |
| 584 | 584 |
| 585 _failureClass: function(failure) { | 585 _failureClass: function(failure) { |
| 586 if (failure) { | 586 if (failure) { |
| 587 return "failed_task"; | 587 return "failed_task"; |
| 588 } | 588 } |
| 589 return ""; | 589 return ""; |
| 590 }, | 590 }, |
| 591 | 591 |
| 592 _getMiloLink: function(prefix,id) { | 592 _getDisplayServerLink: function(template,id) { |
| 593 if (!prefix) { | 593 if (!template) { |
| 594 return undefined; | 594 return undefined; |
| 595 } | 595 } |
| 596 return prefix + id; | 596 return template.replace("%s", id); |
| 597 }, | 597 }, |
| 598 | 598 |
| 599 _internalClass: function(failure) { | 599 _internalClass: function(failure) { |
| 600 if (failure) { | 600 if (failure) { |
| 601 return "exception"; | 601 return "exception"; |
| 602 } | 602 } |
| 603 return ""; | 603 return ""; |
| 604 }, | 604 }, |
| 605 | 605 |
| 606 _isolateLink: function(ref) { | 606 _isolateLink: function(ref) { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 }, | 658 }, |
| 659 | 659 |
| 660 _softRefresh: function() { | 660 _softRefresh: function() { |
| 661 if (this._result && this._result.state !== "RUNNING" && | 661 if (this._result && this._result.state !== "RUNNING" && |
| 662 this._result.state !== "PENDING") { | 662 this._result.state !== "PENDING") { |
| 663 return; | 663 return; |
| 664 } | 664 } |
| 665 this.$.data.reload(); | 665 this.$.data.reload(); |
| 666 var miloFrame = this.$$("iframe") | 666 var miloFrame = this.$$("iframe") |
| 667 if (miloFrame) { | 667 if (miloFrame) { |
| 668 miloFrame.src = this._getMiloLink(this.milo_prefix,this.task_id); | 668 miloFrame.src = this._getDisplayServerLink(this._server_details.displa
y_server_url_template,this.task_id); |
| 669 } | 669 } |
| 670 }, | 670 }, |
| 671 | 671 |
| 672 _retryTask: function() { | 672 _retryTask: function() { |
| 673 if (!this._request) { | 673 if (!this._request) { |
| 674 sk.errorMessage("Task not yet loaded", 3000); | 674 sk.errorMessage("Task not yet loaded", 3000); |
| 675 return; | 675 return; |
| 676 } | 676 } |
| 677 var newTask = { | 677 var newTask = { |
| 678 expiration_secs: this._request.expiration_secs, | 678 expiration_secs: this._request.expiration_secs, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 return result && result.state !== this.PENDING && result.state !== this.
CANCELED && result.state != this.EXPIRED; | 741 return result && result.state !== this.PENDING && result.state !== this.
CANCELED && result.state != this.EXPIRED; |
| 742 }, | 742 }, |
| 743 | 743 |
| 744 _wasNotPickedUp: function(result) { | 744 _wasNotPickedUp: function(result) { |
| 745 return result && !this._wasPickedUp(result); | 745 return result && !this._wasPickedUp(result); |
| 746 }, | 746 }, |
| 747 }); | 747 }); |
| 748 })(); | 748 })(); |
| 749 </script> | 749 </script> |
| 750 </dom-module> | 750 </dom-module> |
| OLD | NEW |