| 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-data> | 9 <bot-list-data> |
| 10 | 10 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 }, | 160 }, |
| 161 _dimensions: { | 161 _dimensions: { |
| 162 type: Object, | 162 type: Object, |
| 163 }, | 163 }, |
| 164 _list: { | 164 _list: { |
| 165 type: Object, | 165 type: Object, |
| 166 }, | 166 }, |
| 167 }, | 167 }, |
| 168 | 168 |
| 169 signIn: function(){ | 169 signIn: function(){ |
| 170 this._getJsonAsync("_count", "/_ah/api/swarming/v1/bots/count", | 170 this._getJsonAsync("_count", "/api/swarming/v1/bots/count", |
| 171 "_busy2", this.auth_headers); | 171 "_busy2", this.auth_headers); |
| 172 this._getJsonAsync("_dimensions","/_ah/api/swarming/v1/bots/dimensions", | 172 this._getJsonAsync("_dimensions","/api/swarming/v1/bots/dimensions", |
| 173 "_busy3", this.auth_headers); | 173 "_busy3", this.auth_headers); |
| 174 | 174 |
| 175 this._request(); | 175 this._request(); |
| 176 }, | 176 }, |
| 177 | 177 |
| 178 _bots: function(){ | 178 _bots: function(){ |
| 179 if (!this._list || !this._list.items) { | 179 if (!this._list || !this._list.items) { |
| 180 return []; | 180 return []; |
| 181 } | 181 } |
| 182 // Do any preprocessing here | 182 // Do any preprocessing here |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 // No need to sort any of this, bot-filters sorts secondary items | 299 // No need to sort any of this, bot-filters sorts secondary items |
| 300 // automatically, especially when the user types a query. | 300 // automatically, especially when the user types a query. |
| 301 return pMap; | 301 return pMap; |
| 302 }, | 302 }, |
| 303 | 303 |
| 304 _request: function() { | 304 _request: function() { |
| 305 // wait until the user has logged in and the filters have loaded before
requesting this to avoid double or even triple requests. | 305 // wait until the user has logged in and the filters have loaded before
requesting this to avoid double or even triple requests. |
| 306 if (!this.auth_headers || !this.query_params) { | 306 if (!this.auth_headers || !this.query_params) { |
| 307 return; | 307 return; |
| 308 } | 308 } |
| 309 this._getJsonAsync("_list", "/_ah/api/swarming/v1/bots/list", | 309 this._getJsonAsync("_list", "/api/swarming/v1/bots/list", |
| 310 "_busy1", this.auth_headers, this.query_params); | 310 "_busy1", this.auth_headers, this.query_params); |
| 311 }, | 311 }, |
| 312 | 312 |
| 313 }); | 313 }); |
| 314 })(); | 314 })(); |
| 315 </script> | 315 </script> |
| 316 </dom-module> | 316 </dom-module> |
| OLD | NEW |