Chromium Code Reviews| Index: appengine/swarming/elements/res/imp/botlist/bot-list-data.html |
| diff --git a/appengine/swarming/elements/res/imp/botlist/bot-list-data.html b/appengine/swarming/elements/res/imp/botlist/bot-list-data.html |
| index 53c8d4f8c19bef1bca884c1e76d80e7ca614a393..913682aee8c572b25eb860fc0637aefddee4c71c 100644 |
| --- a/appengine/swarming/elements/res/imp/botlist/bot-list-data.html |
| +++ b/appengine/swarming/elements/res/imp/botlist/bot-list-data.html |
| @@ -165,7 +165,7 @@ |
| // Parse the state, which is a JSON string. This contains a lot of |
| // interesting information like details about the devices attached. |
| bot.state = bot.state || "{}"; |
| - bot.state = JSON.parse(bot.state); |
| + bot.state = JSON.parse(bot.state) || {}; |
| // get the disks in an easier to deal with format, sorted by size. |
| var disks = bot.state.disks || {}; |
| var keys = Object.keys(disks); |
| @@ -212,6 +212,9 @@ |
| 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); |
|
jcgregorio
2016/10/13 12:03:45
lease_expiration_ts is in seconds but new Date() i
kjlubick
2016/10/13 12:26:49
This is what we get from the server
"lease_expirat
jcgregorio
2016/10/13 12:43:12
Ah, I didn't realize it was a string, thought it w
|
| + } |
| }.bind(this)); |
| return json.items; |