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

Side by Side Diff: appengine/swarming/elements/res/imp/common/common-behavior.html

Issue 2359993002: Medium sized improvements to bot-list and task-list (Closed) Base URL: git@github.com:luci/luci-py@master
Patch Set: condense loop 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 It contains the definition of the following Behaviors: 6 It contains the definition of the following Behaviors:
7 7
8 SwarmingBehaviors.CommonBehavior 8 SwarmingBehaviors.CommonBehavior
9 9
10 To use it, include 10 To use it, include
(...skipping 22 matching lines...) Expand all
33 // filters should be an array of {key:String, value:String} and 33 // filters should be an array of {key:String, value:String} and
34 // columns should be an array of Strings. 34 // columns should be an array of Strings.
35 _botListLink: function(filters, columns) { 35 _botListLink: function(filters, columns) {
36 filters = filters || []; 36 filters = filters || [];
37 columns = columns || []; 37 columns = columns || [];
38 var fArr = []; 38 var fArr = [];
39 filters.forEach(function(f){ 39 filters.forEach(function(f){
40 fArr.push(f.key + ":" + f.value); 40 fArr.push(f.key + ":" + f.value);
41 }); 41 });
42 var obj = { 42 var obj = {
43 filters: fArr, 43 f: fArr,
44 columns: columns, 44 c: columns,
45 } 45 }
46 return "/newui/botlist?" + sk.query.fromParamSet(obj); 46 return "/newui/botlist?" + sk.query.fromParamSet(obj);
47 }, 47 },
48 48
49 // _getJsonAsync makes an XHR to a url, parses the response as JSON 49 // _getJsonAsync makes an XHR to a url, parses the response as JSON
50 // and sticks the resulting object into the property with the name given 50 // and sticks the resulting object into the property with the name given
51 // by "bindTo". If busy is defined, the property with that name will be 51 // by "bindTo". If busy is defined, the property with that name will be
52 // set to true while the request is in flight and false afterwards. 52 // set to true while the request is in flight and false afterwards.
53 // request headers (e.g. authentication) and query params will be used if 53 // request headers (e.g. authentication) and query params will be used if
54 // provided. Query params is an object like {String:Array<String>}. On 54 // provided. Query params is an object like {String:Array<String>}. On
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 return "eons"; 132 return "eons";
133 } 133 }
134 if (!second) { 134 if (!second) {
135 second = new Date(); 135 second = new Date();
136 } 136 }
137 return this._humanDuration((second.getTime() - first.getTime())/1000); 137 return this._humanDuration((second.getTime() - first.getTime())/1000);
138 }, 138 },
139 }; 139 };
140 })(); 140 })();
141 </script> 141 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698