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

Side by Side Diff: appengine/swarming/ui/res/imp/botlist/bot-list.html

Issue 2558633009: Make old version bots show up yellow on botlist (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 <!-- 1 <!--
2 Copyright 2016 The LUCI Authors. All rights reserved. 2 Copyright 2016 The LUCI Authors. All rights reserved.
3 Use of this source code is governed under the Apache License, Version 2.0 3 Use of this source code is governed under the Apache License, Version 2.0
4 that can be found in the LICENSE file. 4 that can be found in the LICENSE file.
5 5
6 This in an HTML Import-able file that contains the definition 6 This in an HTML Import-able file that contains the definition
7 of the following elements: 7 of the following elements:
8 8
9 <bot-list> 9 <bot-list>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 .dead { 51 .dead {
52 background-color: #cccccc; 52 background-color: #cccccc;
53 } 53 }
54 .alt { 54 .alt {
55 background-color: #f8f8f8; 55 background-color: #f8f8f8;
56 } 56 }
57 .bot-list th > span { 57 .bot-list th > span {
58 /* Leave space for sort-toggle*/ 58 /* Leave space for sort-toggle*/
59 padding-right: 30px; 59 padding-right: 30px;
60 } 60 }
61 .old_version {
62 background-color: #ffffdd;
63 }
61 </style> 64 </style>
62 65
63 <url-param name="s" 66 <url-param name="s"
64 value="{{_sortstr}}" 67 value="{{_sortstr}}"
65 default_value="id:asc"> 68 default_value="id:asc">
66 </url-param> 69 </url-param>
67 70
68 <swarming-app 71 <swarming-app
69 client_id="[[client_id]]" 72 client_id="[[client_id]]"
70 auth_headers="{{_auth_headers}}" 73 auth_headers="{{_auth_headers}}"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 </tr> 179 </tr>
177 </thead> 180 </thead>
178 <tbody> 181 <tbody>
179 <template 182 <template
180 id="bot_table" 183 id="bot_table"
181 is="dom-repeat" 184 is="dom-repeat"
182 items="[[_filteredSortedItems]]" 185 items="[[_filteredSortedItems]]"
183 as="bot" 186 as="bot"
184 initial-count=50> 187 initial-count=50>
185 188
186 <tr class$="[[_botClass(bot)]]"> 189 <tr class$="[[_botClass(bot,_server_details.bot_version)]]">
187 <td> 190 <td>
188 <a 191 <a
189 class="center" 192 class="center"
190 href$="[[_botLink(bot.bot_id)]]" 193 href$="[[_botLink(bot.bot_id)]]"
191 target="_blank" 194 target="_blank"
192 rel="noopener"> 195 rel="noopener">
193 [[bot.bot_id]] 196 [[bot.bot_id]]
194 </a> 197 </a>
195 </td> 198 </td>
196 <td hidden$="[[_hide('cloud_console_link', _columns.*)]]"> 199 <td hidden$="[[_hide('cloud_console_link', _columns.*)]]">
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 "_checkDeviceColumns(_columns.*)" 598 "_checkDeviceColumns(_columns.*)"
596 ], 599 ],
597 600
598 _androidAliasDevice: function(device) { 601 _androidAliasDevice: function(device) {
599 if (device.notReady) { 602 if (device.notReady) {
600 return UNAUTHENTICATED.toUpperCase(); 603 return UNAUTHENTICATED.toUpperCase();
601 } 604 }
602 return swarming.alias.android(this._deviceType(device)); 605 return swarming.alias.android(this._deviceType(device));
603 }, 606 },
604 607
605 _botClass: function(bot) { 608 _botClass: function(bot, serverVersion) {
606 if (bot.is_dead) { 609 if (bot.is_dead) {
607 return "dead"; 610 return "dead";
608 } 611 }
609 if (bot.quarantined) { 612 if (bot.quarantined) {
610 return "quarantined"; 613 return "quarantined";
611 } 614 }
615 if (bot.version !== serverVersion) {
M-A Ruel 2016/12/09 20:57:13 I'd prefer these to be additive.
kjlubick 2016/12/12 13:26:11 Done.
616 return "old_version";
617 }
612 return ""; 618 return "";
613 }, 619 },
614 620
615 _ccLink: function(bot){ 621 _ccLink: function(bot){
616 var z = this._attribute(bot, "zone")[0]; 622 var z = this._attribute(bot, "zone")[0];
617 if (z === "unknown") { 623 if (z === "unknown") {
618 return undefined; 624 return undefined;
619 } 625 }
620 return this._cloudConsoleLink(z, bot.bot_id); 626 return this._cloudConsoleLink(z, bot.bot_id);
621 }, 627 },
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 return; 681 return;
676 } 682 }
677 var url = "/api/swarming/v1/bots/list?" + sk.query.fromParamSet(this._qu ery_params); 683 var url = "/api/swarming/v1/bots/list?" + sk.query.fromParamSet(this._qu ery_params);
678 this.$.page_bots.load(url,this._auth_headers); 684 this.$.page_bots.load(url,this._auth_headers);
679 } 685 }
680 686
681 }); 687 });
682 })(); 688 })();
683 </script> 689 </script>
684 </dom-module> 690 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698