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

Unified Diff: appengine/swarming/ui/res/imp/botlist/bot-list-data.html

Issue 2832423003: Fix Swarming UI timezone bug (Closed)
Patch Set: Fix copy-pasta and use sk.human Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: appengine/swarming/ui/res/imp/botlist/bot-list-data.html
diff --git a/appengine/swarming/ui/res/imp/botlist/bot-list-data.html b/appengine/swarming/ui/res/imp/botlist/bot-list-data.html
index 0369fb1f30b87d12000a06dda27d4bedf30ba485..85cd2e718ab4faca22f4846b3de3d6e0190eb8a8 100644
--- a/appengine/swarming/ui/res/imp/botlist/bot-list-data.html
+++ b/appengine/swarming/ui/res/imp/botlist/bot-list-data.html
@@ -60,6 +60,8 @@
var AVAILABLE = "available";
var BLACKLIST_DIMENSIONS = ["quarantined", "error"];
+ var BOT_TIMES = ["first_seen_ts", "last_seen_ts", "lease_expiration_ts"];
+
function aggregateTemps(temps) {
if (!temps) {
return {};
@@ -206,15 +208,9 @@
}
bot.state.devices = devices;
- if (bot.last_seen_ts) {
- bot.last_seen_ts = new Date(bot.last_seen_ts);
- }
- if (bot.first_seen_ts) {
- bot.first_seen_ts = new Date(bot.first_seen_ts);
- }
- if (bot.lease_expiration_ts) {
- bot.lease_expiration_ts = new Date(bot.lease_expiration_ts);
- }
+ BOT_TIMES.forEach(function(time) {
+ swarming.sanitizeAndHumanizeTime(bot, time);
+ });
}.bind(this));
return json.items;

Powered by Google App Engine
This is Rietveld 408576698