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

Side by Side Diff: appengine/swarming/ui/res/imp/tasklist/task-list-data.html

Issue 2920473002: Make tasklist and taskpage use subsecond durations (Closed)
Patch Set: Created 3 years, 6 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-list-data> 9 <bot-list-data>
10 10
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 t.tagMap = tagMap; 250 t.tagMap = tagMap;
251 251
252 TIMES.forEach(function(time) { 252 TIMES.forEach(function(time) {
253 swarming.sanitizeAndHumanizeTime(t, time); 253 swarming.sanitizeAndHumanizeTime(t, time);
254 }); 254 });
255 // Running tasks have no duration set, so we can figure it out. 255 // Running tasks have no duration set, so we can figure it out.
256 if (!t.duration && t.state === this.RUNNING && t.started_ts){ 256 if (!t.duration && t.state === this.RUNNING && t.started_ts){
257 t.duration = (now - t.started_ts) / 1000; 257 t.duration = (now - t.started_ts) / 1000;
258 } 258 }
259 // Make the duration human readable 259 // Make the duration human readable
260 if (t.duration){ 260 t.human_duration = this._humanDuration(t.duration);
261 t.human_duration = this._humanDuration(t.duration);
262 }
263 }.bind(this)); 261 }.bind(this));
264 return json.items; 262 return json.items;
265 } 263 }
266 }); 264 });
267 })(); 265 })();
268 </script> 266 </script>
269 </dom-module> 267 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698