| 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 <bot-list> | 9 <bot-list> |
| 10 | 10 |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 }, | 495 }, |
| 496 disk_space: function(dir, botA, botB) { | 496 disk_space: function(dir, botA, botB) { |
| 497 // We sort based on the raw number of MB of the first disk. | 497 // We sort based on the raw number of MB of the first disk. |
| 498 var botACol = botA.disks[0].mb; | 498 var botACol = botA.disks[0].mb; |
| 499 var botBCol = botB.disks[0].mb; | 499 var botBCol = botB.disks[0].mb; |
| 500 return dir * swarming.naturalCompare(botACol, botBCol); | 500 return dir * swarming.naturalCompare(botACol, botBCol); |
| 501 }, | 501 }, |
| 502 first_seen: function(dir, botA, botB) { | 502 first_seen: function(dir, botA, botB) { |
| 503 var botACol = botA.first_seen_ts; | 503 var botACol = botA.first_seen_ts; |
| 504 var botBCol = botB.first_seen_ts; | 504 var botBCol = botB.first_seen_ts; |
| 505 return dir * swarming.naturalCompare(botACol, botBCol) | 505 return dir * swarming.naturalCompare(botACol, botBCol); |
| 506 }, |
| 507 gpu: function(dir, botA, botB) { |
| 508 // We want all the "none" GPU bots to come last in the list. |
| 509 var botACol = this._column("gpu", botA); |
| 510 if (botACol === "none") { |
| 511 botACol = "ZZZ"; |
| 512 } |
| 513 var botBCol = this._column("gpu", botB); |
| 514 if (botBCol === "none") { |
| 515 botBCol = "ZZZ"; |
| 516 } |
| 517 return dir * swarming.naturalCompare(botACol, botBCol); |
| 506 }, | 518 }, |
| 507 last_seen: function(dir, botA, botB) { | 519 last_seen: function(dir, botA, botB) { |
| 508 var botACol = botA.last_seen_ts; | 520 var botACol = botA.last_seen_ts; |
| 509 var botBCol = botB.last_seen_ts; | 521 var botBCol = botB.last_seen_ts; |
| 510 return dir * swarming.naturalCompare(botACol, botBCol) | 522 return dir * swarming.naturalCompare(botACol, botBCol) |
| 511 }, | 523 }, |
| 512 running_time: function(dir, botA, botB) { | 524 running_time: function(dir, botA, botB) { |
| 513 var botACol = this._state(botA, "running_time") || 0; | 525 var botACol = this._state(botA, "running_time") || 0; |
| 514 var botBCol = this._state(botB, "running_time") || 0; | 526 var botBCol = this._state(botB, "running_time") || 0; |
| 515 return dir * swarming.naturalCompare(botACol, botBCol) | 527 return dir * swarming.naturalCompare(botACol, botBCol) |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 return; | 650 return; |
| 639 } | 651 } |
| 640 var url = "/api/swarming/v1/bots/list?" + sk.query.fromParamSet(this._qu
ery_params); | 652 var url = "/api/swarming/v1/bots/list?" + sk.query.fromParamSet(this._qu
ery_params); |
| 641 this.$.page_bots.load(url,this._auth_headers); | 653 this.$.page_bots.load(url,this._auth_headers); |
| 642 } | 654 } |
| 643 | 655 |
| 644 }); | 656 }); |
| 645 })(); | 657 })(); |
| 646 </script> | 658 </script> |
| 647 </dom-module> | 659 </dom-module> |
| OLD | NEW |