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

Unified Diff: appengine/swarming/ui/res/imp/botpage/bot-page.html

Issue 2553563003: Link Swarming Tasklist and Botlist together (Closed)
Patch Set: Rebuild Created 4 years 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/botpage/bot-page.html
diff --git a/appengine/swarming/ui/res/imp/botpage/bot-page.html b/appengine/swarming/ui/res/imp/botpage/bot-page.html
index 1017860ac01ffb3528a2e0a73f718fd6895f7f55..ca214dc531ddf1f2e096af0a765cfda4acb69eea 100644
--- a/appengine/swarming/ui/res/imp/botpage/bot-page.html
+++ b/appengine/swarming/ui/res/imp/botpage/bot-page.html
@@ -195,7 +195,9 @@
</td>
</tr>
<tr>
- <td rowspan$="[[_numRows(_bot.dimensions)]]">Dimensions</td>
+ <td rowspan$="[[_numRows(_bot.dimensions)]]">
+ <a href$="[[_siblingBotsLink(_bot.dimensions)]]" title="The list of bots that also matches these dimensions (except id)."> Dimensions</a>
+ </td>
</tr>
<template
is="dom-repeat"
@@ -591,6 +593,25 @@
"Shutting down "+this.bot_id, this._auth_headers);
},
+ _siblingBotsLink(dimensions) {
+ var cols = ["id", "os", "task", "status"];
+ if (!dimensions) {
+ return this._botListLink([], cols);
+ }
+
+ dimensions = dimensions.filter(function(f){
+ return f.key !== "id";
+ });
+
+ dimensions.forEach(function(f) {
+ if (cols.indexOf(f.key) === -1) {
+ cols.push(f.key);
+ }
+ }.bind(this));
+
+ return this._botListLink(dimensions, cols);
+ },
+
_task: function(bot) {
return (bot && bot.task_id) || "idle";
},
« no previous file with comments | « appengine/swarming/ui/res/imp/botlist/bot-filters.html ('k') | appengine/swarming/ui/res/imp/common/common-behavior.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698