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

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: Make classes additive 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 27 matching lines...) Expand all
38 <link rel="import" href="bot-list-shared-behavior.html"> 38 <link rel="import" href="bot-list-shared-behavior.html">
39 <link rel="import" href="bot-list-summary.html"> 39 <link rel="import" href="bot-list-summary.html">
40 40
41 <dom-module id="bot-list"> 41 <dom-module id="bot-list">
42 <template> 42 <template>
43 <style include="iron-flex iron-flex-alignment iron-positioning swarming-app- style dynamic-table-style"> 43 <style include="iron-flex iron-flex-alignment iron-positioning swarming-app- style dynamic-table-style">
44 bot-filters, bot-list-summary { 44 bot-filters, bot-list-summary {
45 margin-bottom: 8px; 45 margin-bottom: 8px;
46 margin-right: 10px; 46 margin-right: 10px;
47 } 47 }
48 .old_version {
49 background-color: #ffffdd;
50 }
48 .quarantined, .bad-device { 51 .quarantined, .bad-device {
49 background-color: #ffdddd; 52 background-color: #ffdddd;
50 } 53 }
51 .dead { 54 .dead {
52 background-color: #cccccc; 55 background-color: #cccccc;
53 } 56 }
54 .alt { 57 .alt {
55 background-color: #f8f8f8; 58 background-color: #f8f8f8;
56 } 59 }
57 .bot-list th > span { 60 .bot-list th > span {
(...skipping 118 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) {
609 var classes = "";
606 if (bot.is_dead) { 610 if (bot.is_dead) {
607 return "dead"; 611 classes += "dead ";
608 } 612 }
609 if (bot.quarantined) { 613 if (bot.quarantined) {
610 return "quarantined"; 614 classes += "quarantined ";
611 } 615 }
612 return ""; 616 if (bot.version !== serverVersion) {
617 classes += "old_version";
618 }
619 return classes;
613 }, 620 },
614 621
615 _ccLink: function(bot){ 622 _ccLink: function(bot){
616 var z = this._attribute(bot, "zone")[0]; 623 var z = this._attribute(bot, "zone")[0];
617 if (z === "unknown") { 624 if (z === "unknown") {
618 return undefined; 625 return undefined;
619 } 626 }
620 return this._cloudConsoleLink(z, bot.bot_id); 627 return this._cloudConsoleLink(z, bot.bot_id);
621 }, 628 },
622 629
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 return; 682 return;
676 } 683 }
677 var url = "/api/swarming/v1/bots/list?" + sk.query.fromParamSet(this._qu ery_params); 684 var url = "/api/swarming/v1/bots/list?" + sk.query.fromParamSet(this._qu ery_params);
678 this.$.page_bots.load(url,this._auth_headers); 685 this.$.page_bots.load(url,this._auth_headers);
679 } 686 }
680 687
681 }); 688 });
682 })(); 689 })();
683 </script> 690 </script>
684 </dom-module> 691 </dom-module>
OLDNEW
« no previous file with comments | « appengine/swarming/ui/build/elements.html ('k') | appengine/swarming/ui/res/imp/botlist/bot-list-demo.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698