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

Unified Diff: appengine/swarming/elements/res/imp/botlist/bot-list-shared-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: fix dangling div 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 side-by-side diff with in-line comments
Download patch
Index: appengine/swarming/elements/res/imp/botlist/bot-list-shared-behavior.html
diff --git a/appengine/swarming/elements/res/imp/botlist/bot-list-shared-behavior.html b/appengine/swarming/elements/res/imp/botlist/bot-list-shared-behavior.html
index 1de27fc480db92a8a47673005d81840736f3f78b..848523d9ac744a312f1886c963035afd806720e7 100644
--- a/appengine/swarming/elements/res/imp/botlist/bot-list-shared-behavior.html
+++ b/appengine/swarming/elements/res/imp/botlist/bot-list-shared-behavior.html
@@ -13,13 +13,6 @@
<link rel="import" href="/res/imp/common/common-behavior.html">
<script>
(function(){
- // Taken from http://developer.android.com/reference/android/os/BatteryManager.html
- var BATTERY_HEALTH_UNKNOWN = 1;
- var BATTERY_HEALTH_GOOD = 2;
- var BATTERY_STATUS_CHARGING = 2;
-
- var UNAUTHENTICATED = "unauthenticated";
- var AVAILABLE = "available";
var UNKNOWN = "unknown";
// This behavior wraps up all the shared bot-list functionality by
@@ -32,7 +25,7 @@
value: function() {
// TODO(kjlubick): Add more of these things from state, as they
// needed/useful/requested.
- return ["disk_space", "task", "status"];
+ return ["disk_space", "task", "status", "version", "external_ip", "last_seen", "first_seen", "battery_level", "battery_voltage", "battery_temperature", "battery_status", "battery_health", "bot_temperature", "device_temperature"];
}
},
},
@@ -46,19 +39,7 @@
},
_devices: function(bot) {
- var devices = [];
- var d = (bot && bot.state && bot.state.devices) || {};
- // state.devices is like {Serial:Object}, so we need to keep the serial
- for (key in d) {
- var o = d[key];
- o.serial = key;
- o.okay = (o.state === AVAILABLE);
- // It is easier to assume all devices on a bot are of the same type
- // than to pick through the (incomplete) device state and find it.
- o.device_type = this._attribute(bot, "device_type")[0];
- devices.push(o);
- }
- return devices;
+ return bot.state.devices;
},
// _deviceType returns the codename of a given Android device.

Powered by Google App Engine
This is Rietveld 408576698