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

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

Issue 2470973003: give user notification if bot or task not found (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
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-data> 9 <task-page-data>
10 10
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 result: { 84 result: {
85 type: Object, 85 type: Object,
86 computed: "_parseResult(_result)", 86 computed: "_parseResult(_result)",
87 notify: true, 87 notify: true,
88 }, 88 },
89 stdout: { 89 stdout: {
90 type: String, 90 type: String,
91 computed: "_parseStdout(_stdout)", 91 computed: "_parseStdout(_stdout)",
92 notify: true, 92 notify: true,
93 }, 93 },
94 task_exists: {
95 type: Boolean,
96 value: true,
97 notify: true,
98 },
94 99
95 // private 100 // private
96 _busy1: { 101 _busy1: {
97 type: Boolean, 102 type: Boolean,
98 value: false 103 value: false
99 }, 104 },
100 _busy2: { 105 _busy2: {
101 type: Boolean, 106 type: Boolean,
102 value: false 107 value: false
103 }, 108 },
(...skipping 21 matching lines...) Expand all
125 console.log("task_id and auth_headers can't be empty"); 130 console.log("task_id and auth_headers can't be empty");
126 return; 131 return;
127 } 132 }
128 if (lastRequest) { 133 if (lastRequest) {
129 this.cancelAsync(lastRequest); 134 this.cancelAsync(lastRequest);
130 } 135 }
131 136
132 var baseUrl = "/api/swarming/v1/task/" + this.task_id; 137 var baseUrl = "/api/swarming/v1/task/" + this.task_id;
133 lastRequest = this.async(function(){ 138 lastRequest = this.async(function(){
134 lastRequest = undefined; 139 lastRequest = undefined;
135 this._getJsonAsync("_request", baseUrl + "/request", 140 var p = this._getJsonAsync("_request", baseUrl + "/request",
136 "_busy1", this.auth_headers); 141 "_busy1", this.auth_headers);
142 p.then(function(){
143 this.set("task_exists", true);
144 }.bind(this)).catch(function(){
145 this.set("task_exists", false);
nodir 2016/11/02 18:46:29 same here
kjlubick 2016/11/03 15:48:35 Done.
146 }.bind(this));
137 this._getJsonAsync("_result", 147 this._getJsonAsync("_result",
138 baseUrl + "/result?include_performance_stats=true", 148 baseUrl + "/result?include_performance_stats=true",
139 "_busy2", this.auth_headers); 149 "_busy2", this.auth_headers);
140 this.reloadStdout(); 150 this.reloadStdout();
141 }, TASK_ID_DEBOUNCE_MS); 151 }, TASK_ID_DEBOUNCE_MS);
142 }, 152 },
143 153
144 _parseRequest: function(request) { 154 _parseRequest: function(request) {
145 if (!request) { 155 if (!request) {
146 return {}; 156 return {};
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 204
195 reloadStdout: function() { 205 reloadStdout: function() {
196 this._getJsonAsync("_stdout", "/api/swarming/v1/task/" + 206 this._getJsonAsync("_stdout", "/api/swarming/v1/task/" +
197 this.task_id + "/stdout", "_busy3", this.auth_headers); 207 this.task_id + "/stdout", "_busy3", this.auth_headers);
198 }, 208 },
199 209
200 }); 210 });
201 })(); 211 })();
202 </script> 212 </script>
203 </dom-module> 213 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698