| Index: appengine/swarming/ui/res/imp/botlist/bot-list.html
|
| diff --git a/appengine/swarming/ui/res/imp/botlist/bot-list.html b/appengine/swarming/ui/res/imp/botlist/bot-list.html
|
| index 831aa52548ca7b893b5432ae058986982133af7a..b209062dc15915417e311a6553d036a81d9bde24 100644
|
| --- a/appengine/swarming/ui/res/imp/botlist/bot-list.html
|
| +++ b/appengine/swarming/ui/res/imp/botlist/bot-list.html
|
| @@ -254,6 +254,8 @@
|
| // columnMap, and specialSort
|
| var specialColumns = ["id", "task", "cloud_console_link", "mp_lease_id"];
|
|
|
| + var deviceColumns = ["battery_health", "battery_level", "battery_status", "battery_temperature", "battery_voltage", "device_temperature"];
|
| +
|
| var headerMap = {
|
| // "id" and "task" are special, so they don't go here. They have their
|
| // headers hard-coded above.
|
| @@ -316,6 +318,9 @@
|
| device_temperature: function(){
|
| return "";
|
| },
|
| + device_os: function(bot) {
|
| + return this._attribute(bot, "device_os", "none").join(" | ");
|
| + },
|
| disk_space: function(bot) {
|
| var aliased = [];
|
| bot.disks.forEach(function(disk){
|
| @@ -588,7 +593,10 @@
|
| },
|
| },
|
|
|
| - observers:["_reload(_query_params,_auth_headers)"],
|
| + observers:[
|
| + "_reload(_query_params,_auth_headers)",
|
| + "_checkDeviceColumns(_columns.*)"
|
| + ],
|
|
|
| _androidAliasDevice: function(device) {
|
| if (device.notReady) {
|
| @@ -623,6 +631,23 @@
|
| return "View Bot";
|
| },
|
|
|
| + _checkDeviceColumns: function() {
|
| + var shouldAdd = false;
|
| + for (var i = 0; i< this._columns.length; i++) {
|
| + var col = this._columns[i];
|
| + if (col === "android_devices") {
|
| + return;
|
| + }
|
| + if (deviceColumns.indexOf(col) !== -1) {
|
| + shouldAdd = true;
|
| + }
|
| + }
|
| + if (shouldAdd) {
|
| + this.push("_columns", "android_devices");
|
| + sk.errorMessage("Some of the columns selected require 'android_devices' to be displayed. It has been automatically added.", 4000);
|
| + }
|
| + },
|
| +
|
| _deviceColumn: function(col, device) {
|
| var f = deviceColumnMap[col];
|
| if (!f || !device) {
|
|
|