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

Side by Side Diff: appengine/swarming/elements/res/imp/taskpage/task-page.html

Issue 2366663003: Use non-proxied links (Closed) Base URL: git@github.com:luci/luci-py@manual-add
Patch Set: Created 4 years, 3 months 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
OLDNEW
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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 520
521 _bytes: function(sizeInBytes) { 521 _bytes: function(sizeInBytes) {
522 return sk.human.bytes(sizeInBytes); 522 return sk.human.bytes(sizeInBytes);
523 }, 523 },
524 524
525 _canCancelTask: function(result, permissions) { 525 _canCancelTask: function(result, permissions) {
526 return result && result.state === "PENDING" && permissions.cancel_task; 526 return result && result.state === "PENDING" && permissions.cancel_task;
527 }, 527 },
528 528
529 _cancelTask: function() { 529 _cancelTask: function() {
530 var url = "/_ah/api/swarming/v1/task/" + this.task_id +"/cancel"; 530 var url = "/api/swarming/v1/task/" + this.task_id +"/cancel";
531 swarming.postWithToast(url, "Canceling task " + this.task_id, this._auth _headers); 531 swarming.postWithToast(url, "Canceling task " + this.task_id, this._auth _headers);
532 }, 532 },
533 533
534 _cipdRowspan: function(request, result) { 534 _cipdRowspan: function(request, result) {
535 if (!request || !request.properties || !request.properties.cipd_input) { 535 if (!request || !request.properties || !request.properties.cipd_input) {
536 return 0; 536 return 0;
537 } 537 }
538 // We always need to at least double the number of packages because we 538 // We always need to at least double the number of packages because we
539 // show the path and then the requested. If the actual package info 539 // show the path and then the requested. If the actual package info
540 // is available, we triple the number of packages to account for that. 540 // is available, we triple the number of packages to account for that.
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 var newTask = { 673 var newTask = {
674 expiration_secs: this._request.expiration_secs, 674 expiration_secs: this._request.expiration_secs,
675 name: this._request.name +" (retry)", 675 name: this._request.name +" (retry)",
676 parent_task_id: this._request.parent_task_id, 676 parent_task_id: this._request.parent_task_id,
677 priority: this._request.priority, 677 priority: this._request.priority,
678 properties:this._request.properties, 678 properties:this._request.properties,
679 tags: this._request.tags, 679 tags: this._request.tags,
680 user: this._profile.email, 680 user: this._profile.email,
681 service_account: this._request.service_account, 681 service_account: this._request.service_account,
682 } 682 }
683 swarming.postWithToast("/_ah/api/swarming/v1/tasks/new", "Retrying task " + this.task_id, 683 swarming.postWithToast("/api/swarming/v1/tasks/new", "Retrying task " + this.task_id,
684 this._auth_headers, newTask) 684 this._auth_headers, newTask)
685 .then(function(response) { 685 .then(function(response) {
686 response = JSON.parse(response); 686 response = JSON.parse(response);
687 if (response && response.task_id) { 687 if (response && response.task_id) {
688 this.set("task_id", response.task_id); 688 this.set("task_id", response.task_id);
689 } 689 }
690 }.bind(this), function(e) { 690 }.bind(this), function(e) {
691 console.log("Task could not be retried", e); 691 console.log("Task could not be retried", e);
692 } 692 }
693 ); 693 );
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 return result && result.state !== this.PENDING && result.state !== this. CANCELED && result.state != this.EXPIRED; 737 return result && result.state !== this.PENDING && result.state !== this. CANCELED && result.state != this.EXPIRED;
738 }, 738 },
739 739
740 _wasNotPickedUp: function(result) { 740 _wasNotPickedUp: function(result) {
741 return result && !this._wasPickedUp(result); 741 return result && !this._wasPickedUp(result);
742 }, 742 },
743 }); 743 });
744 })(); 744 })();
745 </script> 745 </script>
746 </dom-module> 746 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698