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

Side by Side Diff: appengine/swarming/elements/res/imp/botlist/bot-list.html

Issue 2266133002: Add filter to task-list (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@extract-filters
Patch Set: Fix default sort 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 <bot-list> 9 <bot-list>
10 10
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 "device_type": "Device Type", 227 "device_type": "Device Type",
228 "disk_space": "Free Space (MB)", 228 "disk_space": "Free Space (MB)",
229 "gpu": "GPU", 229 "gpu": "GPU",
230 "os": "OS", 230 "os": "OS",
231 "pool": "Pool", 231 "pool": "Pool",
232 "status": "Status", 232 "status": "Status",
233 "xcode_version": "XCode Version", 233 "xcode_version": "XCode Version",
234 }; 234 };
235 235
236 var columnMap = { 236 var columnMap = {
237 android_devices: function(bot) {
238 var devs = this._attribute(bot, "android_devices", "0");
239 if (this._verbose) {
240 return devs.join(" | ") + " devices available";
241 }
242 // max() works on strings as long as they can be coerced to Number.
243 return Math.max(...devs) + " devices available";
244 },
237 disk_space: function(bot) { 245 disk_space: function(bot) {
238 var aliased = []; 246 var aliased = [];
239 bot.disks.forEach(function(disk){ 247 bot.disks.forEach(function(disk){
240 var alias = sk.human.bytes(disk.mb, swarming.MB); 248 var alias = sk.human.bytes(disk.mb, swarming.MB);
241 aliased.push(swarming.alias.apply(disk.mb, disk.id + " "+ alias)); 249 aliased.push(swarming.alias.apply(disk.mb, disk.id + " "+ alias));
242 }.bind(this)); 250 }.bind(this));
243 if (this._verbose) { 251 if (this._verbose) {
244 return aliased.join(" | "); 252 return aliased.join(" | ");
245 } 253 }
246 return aliased[0]; 254 return aliased[0];
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 if (data && data.task_id) { 401 if (data && data.task_id) {
394 return "/user/task/" + data.task_id; 402 return "/user/task/" + data.task_id;
395 } 403 }
396 return undefined; 404 return undefined;
397 } 405 }
398 406
399 }); 407 });
400 })(); 408 })();
401 </script> 409 </script>
402 </dom-module> 410 </dom-module>
OLDNEW
« no previous file with comments | « appengine/swarming/elements/build/elements.html ('k') | appengine/swarming/elements/res/imp/common/common-behavior.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698