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

Side by Side Diff: appengine/swarming/elements/res/imp/botpage/bot-page-data.html

Issue 2403543002: Add Machine Provider ui parts (Closed)
Patch Set: Created 4 years, 2 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-page-data> 9 <bot-page-data>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 <dom-module id="bot-page-data"> 49 <dom-module id="bot-page-data">
50 <script> 50 <script>
51 (function(){ 51 (function(){
52 // Time to wait before requesting a new bot. This is to allow a user to 52 // Time to wait before requesting a new bot. This is to allow a user to
53 // type in a name and not have it make one set of requests for each 53 // type in a name and not have it make one set of requests for each
54 // keystroke. 54 // keystroke.
55 var BOT_ID_DEBOUNCE_MS = 400; 55 var BOT_ID_DEBOUNCE_MS = 400;
56 var lastRequest; 56 var lastRequest;
57 57
58 var BOT_TIMES = ["first_seen_ts", "last_seen_ts"]; 58 var BOT_TIMES = ["first_seen_ts", "last_seen_ts", "lease_expiration_ts"];
59 var TASK_TIMES = ["started_ts", "completed_ts", "abandoned_ts", "modified_ts "]; 59 var TASK_TIMES = ["started_ts", "completed_ts", "abandoned_ts", "modified_ts "];
60 60
61 var timezone; 61 var timezone;
62 function formatDate(date) { 62 function formatDate(date) {
63 if (!timezone) { 63 if (!timezone) {
64 // Date.toString() looks like "Mon Aug 29 2016 09:03:41 GMT-0400 (EDT)" 64 // Date.toString() looks like "Mon Aug 29 2016 09:03:41 GMT-0400 (EDT)"
65 // we want to extract the time zone part and append it to the 65 // we want to extract the time zone part and append it to the
66 // locale time. 66 // locale time.
67 var str = date.toString(); 67 var str = date.toString();
68 timezone = str.substring(str.indexOf("(")); 68 timezone = str.substring(str.indexOf("("));
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 return b.started_ts - a.started_ts; 238 return b.started_ts - a.started_ts;
239 }); 239 });
240 240
241 return tasks; 241 return tasks;
242 } 242 }
243 243
244 }); 244 });
245 })(); 245 })();
246 </script> 246 </script>
247 </dom-module> 247 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698