| OLD | NEW |
| 1 // Copyright 2016 The LUCI Authors. All rights reserved. | 1 // Copyright 2016 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 this.swarming = this.swarming || function() { | 5 this.swarming = this.swarming || function() { |
| 6 | 6 |
| 7 var swarming = {}; | 7 var swarming = {}; |
| 8 | 8 |
| 9 // naturalCompare tries to use natural sorting (e.g. sort ints by value). | 9 // naturalCompare tries to use natural sorting (e.g. sort ints by value). |
| 10 swarming.naturalCompare = function(a, b) { | 10 swarming.naturalCompare = function(a, b) { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 return response; | 68 return response; |
| 69 }).catch(function(reason) { | 69 }).catch(function(reason) { |
| 70 console.log("Request failed", reason); | 70 console.log("Request failed", reason); |
| 71 sk.errorMessage("Request failed. Reason: "+reason, 5000); | 71 sk.errorMessage("Request failed. Reason: "+reason, 5000); |
| 72 return Promise.reject(reason); | 72 return Promise.reject(reason); |
| 73 }); | 73 }); |
| 74 } | 74 } |
| 75 | 75 |
| 76 return swarming; | 76 return swarming; |
| 77 }(); | 77 }(); |
| OLD | NEW |