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

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

Issue 2391583002: Several small changes to new UI pages (Closed) Base URL: git@github.com:luci/luci-py@uptime
Patch Set: rebase Created 4 years, 2 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 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 <span>Bot Id</span> 125 <span>Bot Id</span>
126 <sort-toggle 126 <sort-toggle
127 name="id" 127 name="id"
128 current="[[_sort]]"> 128 current="[[_sort]]">
129 </sort-toggle> 129 </sort-toggle>
130 </th> 130 </th>
131 <!-- This wonky syntax is the proper way to listen to changes on a n 131 <!-- This wonky syntax is the proper way to listen to changes on a n
132 array (we are listening to all subproperties). The element returne d is 132 array (we are listening to all subproperties). The element returne d is
133 not of much use, so we'll ignore it in _hide() and use this._colum ns. 133 not of much use, so we'll ignore it in _hide() and use this._colum ns.
134 --> 134 -->
135 <th hidden$="[[_hide('cloud_console_link', _columns.*)]]">
136 <span>Bot in Cloud Console</span>
137 <sort-toggle
138 name="cloud_console_link"
139 current="[[_sort]]">
140 </sort-toggle>
141 </th>
135 <th hidden$="[[_hide('task', _columns.*)]]"> 142 <th hidden$="[[_hide('task', _columns.*)]]">
136 <span>Current Task</span> 143 <span>Current Task</span>
137 <sort-toggle 144 <sort-toggle
138 name="task" 145 name="task"
139 current="[[_sort]]"> 146 current="[[_sort]]">
140 </sort-toggle> 147 </sort-toggle>
141 </th> 148 </th>
142 149
143 <template 150 <template
144 is="dom-repeat" 151 is="dom-repeat"
(...skipping 15 matching lines...) Expand all
160 is="dom-repeat" 167 is="dom-repeat"
161 items="[[_filteredSortedItems]]" 168 items="[[_filteredSortedItems]]"
162 as="bot" 169 as="bot"
163 initial-count=50> 170 initial-count=50>
164 171
165 <tr class$="[[_botClass(bot)]]"> 172 <tr class$="[[_botClass(bot)]]">
166 <td> 173 <td>
167 <a 174 <a
168 class="center" 175 class="center"
169 href$="[[_botLink(bot.bot_id)]]" 176 href$="[[_botLink(bot.bot_id)]]"
170 target="_blank"> 177 target="_blank"
178 rel="noopener">
171 [[bot.bot_id]] 179 [[bot.bot_id]]
172 </a> 180 </a>
173 </td> 181 </td>
182 <td hidden$="[[_hide('cloud_console_link', _columns.*)]]">
183 <a href$="[[_ccLink(bot)]]">[[_ccText(bot)]]</a>
184 </td>
174 <td hidden$="[[_hide('task', _columns.*)]]"> 185 <td hidden$="[[_hide('task', _columns.*)]]">
175 <a href$="[[_taskLink(bot.task_id)]]">[[_taskId(bot)]]</a> 186 <a href$="[[_taskLink(bot.task_id)]]">[[_taskId(bot)]]</a>
176 </td> 187 </td>
177 188
178 <template 189 <template
179 is="dom-repeat" 190 is="dom-repeat"
180 items="[[_plainColumns]]" 191 items="[[_plainColumns]]"
181 as="c"> 192 as="c">
182 <td hidden$="[[_hide(c)]]"> 193 <td hidden$="[[_hide(c)]]">
183 [[_column(c, bot, _verbose)]] 194 [[_column(c, bot, _verbose)]]
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 _botClass: function(bot) { 546 _botClass: function(bot) {
536 if (bot.is_dead) { 547 if (bot.is_dead) {
537 return "dead"; 548 return "dead";
538 } 549 }
539 if (bot.quarantined) { 550 if (bot.quarantined) {
540 return "quarantined"; 551 return "quarantined";
541 } 552 }
542 return ""; 553 return "";
543 }, 554 },
544 555
556 _ccLink: function(bot){
557 var z = this._attribute(bot, "zone")[0];
558 if (z === "unknown") {
559 return undefined;
560 }
561 return this._cloudConsoleLink(z, bot.bot_id);
562 },
563
564 _ccText: function(bot){
565 var z = this._attribute(bot, "zone")[0];
566 if (z === "unknown") {
567 return "Not on GCE";
568 }
569 return "View Bot";
570 },
571
545 _androidAliasDevice: function(device) { 572 _androidAliasDevice: function(device) {
546 if (device.notReady) { 573 if (device.notReady) {
547 return UNAUTHENTICATED.toUpperCase(); 574 return UNAUTHENTICATED.toUpperCase();
548 } 575 }
549 return swarming.alias.android(this._deviceType(device)); 576 return swarming.alias.android(this._deviceType(device));
550 }, 577 },
551 578
552 _deviceColumn: function(col, device) { 579 _deviceColumn: function(col, device) {
553 var f = deviceColumnMap[col]; 580 var f = deviceColumnMap[col];
554 if (!f || !device) { 581 if (!f || !device) {
(...skipping 14 matching lines...) Expand all
569 return; 596 return;
570 } 597 }
571 var url = "/_ah/api/swarming/v1/bots/list?" + sk.query.fromParamSet(this ._query_params); 598 var url = "/_ah/api/swarming/v1/bots/list?" + sk.query.fromParamSet(this ._query_params);
572 this.$.page_bots.load(url,this._auth_headers); 599 this.$.page_bots.load(url,this._auth_headers);
573 } 600 }
574 601
575 }); 602 });
576 })(); 603 })();
577 </script> 604 </script>
578 </dom-module> 605 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698