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

Side by Side Diff: appengine/swarming/elements/res/imp/botpage/bot-page.html

Issue 2404883002: Add links to MP and resolve minor fixes (Closed)
Patch Set: Address Polymer comments 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-page> 9 <bot-page>
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 value="{{_selected}}"> 107 value="{{_selected}}">
108 </url-param> 108 </url-param>
109 <url-param name="show_state" 109 <url-param name="show_state"
110 value="{{_show_state}}"> 110 value="{{_show_state}}">
111 </url-param> 111 </url-param>
112 112
113 <swarming-app 113 <swarming-app
114 client_id="[[client_id]]" 114 client_id="[[client_id]]"
115 auth_headers="{{_auth_headers}}" 115 auth_headers="{{_auth_headers}}"
116 permissions="{{_permissions}}" 116 permissions="{{_permissions}}"
117 server_version="{{_server_version}}" 117 server_details="{{_server_details}}"
118 signed_in="{{_signed_in}}" 118 signed_in="{{_signed_in}}"
119 119
120 busy="[[_or(_busy1,_busy2,_busy3)]]" 120 busy="[[_or(_busy1,_busy2,_busy3)]]"
121 name="Swarming Bot Page"> 121 name="Swarming Bot Page">
122 122
123 <h2 hidden$="[[_signed_in]]">You must sign in to see anything useful.</h2> 123 <h2 hidden$="[[_signed_in]]">You must sign in to see anything useful.</h2>
124 124
125 <div hidden$="[[_not(_signed_in)]]"> 125 <div hidden$="[[_not(_signed_in)]]">
126 126
127 <bot-page-data 127 <bot-page-data
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 <td>[[_concat(dim.value)]]</td> 202 <td>[[_concat(dim.value)]]</td>
203 </tr> 203 </tr>
204 </template> 204 </template>
205 205
206 <tr title="IP address that the server saw the connection from."> 206 <tr title="IP address that the server saw the connection from.">
207 <td>External IP</td> 207 <td>External IP</td>
208 <td><a href$="[[_bot.external_ip]]">[[_bot.external_ip]]</a></td > 208 <td><a href$="[[_bot.external_ip]]">[[_bot.external_ip]]</a></td >
209 <td></td> 209 <td></td>
210 </tr> 210 </tr>
211 <tr 211 <tr
212 class$="[[_classVersion(_server_version.bot_version,_bot.versi on)]]" 212 class$="[[_classVersion(_server_details.bot_version,_bot.versi on)]]"
213 title="Version is based on the content of swarming_bot.zip whi ch is the swarming bot code. The bot won't update if quarantined, dead, or busy. "> 213 title="Version is based on the content of swarming_bot.zip whi ch is the swarming bot code. The bot won't update if quarantined, dead, or busy. ">
214 <td>Bot Version</td> 214 <td>Bot Version</td>
215 <td>[[_shorten(_bot.version,'8')]]</td> 215 <td>[[_shorten(_bot.version,'8')]]</td>
216 <td></td> 216 <td></td>
217 </tr> 217 </tr>
218 <tr title="The version the server expects the bot to be using."> 218 <tr title="The version the server expects the bot to be using.">
219 <td>Expected Bot Version</td> 219 <td>Expected Bot Version</td>
220 <td>[[_shorten(_server_version.bot_version,'8')]]</td> 220 <td>[[_shorten(_server_details.bot_version,'8')]]</td>
221 <td></td> 221 <td></td>
222 </tr> 222 </tr>
223 <tr title="First time ever a bot with this id contacted the server ."> 223 <tr title="First time ever a bot with this id contacted the server .">
224 <td>First seen</td> 224 <td>First seen</td>
225 <td title="[[_bot.human_first_seen_ts]]"> 225 <td title="[[_bot.human_first_seen_ts]]">
226 [[_timeDiffApprox(_bot.first_seen_ts)]] ago 226 [[_timeDiffApprox(_bot.first_seen_ts)]] ago
227 </td> 227 </td>
228 <td></td> 228 <td></td>
229 </tr> 229 </tr>
230 <tr title="How the bot is authenticated by the server."> 230 <tr title="How the bot is authenticated by the server.">
231 <td>Authenticated as</td> 231 <td>Authenticated as</td>
232 <td colspan=2>[[_bot.authenticated_as]]</td> 232 <td colspan=2>[[_bot.authenticated_as]]</td>
233 </tr> 233 </tr>
234 <template is="dom-if" if="[[_bot.lease_id]]"> 234 <template is="dom-if" if="[[_bot.lease_id]]">
235 <tr> 235 <tr>
236 <td>Machine Provider Lease ID</td> 236 <td>Machine Provider Lease ID</td>
237 <td colspan=2>[[_bot.lease_id]]</td> 237 <td colspan=2>
238 <a href$="[[_mpLink(_bot,_server_details.machine_provider_te mplate)]]">
239 [[_bot.lease_id]]
240 </a>
241 </td>
238 </tr> 242 </tr>
239 <tr> 243 <tr>
240 <td>Machine Provider Lease Expires</td> 244 <td>Machine Provider Lease Expires</td>
241 <td colspan=2>[[_bot.human_lease_expiration_ts]]</td> 245 <td colspan=2>[[_bot.human_lease_expiration_ts]]</td>
242 </tr> 246 </tr>
243 </template> 247 </template>
244 </table> 248 </table>
245 249
246 <span class="title">State</span> 250 <span class="title">State</span>
247 251
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 <tr> 330 <tr>
327 <td class="message">[[event.message]]</td> 331 <td class="message">[[event.message]]</td>
328 <td>[[event.event_type]]</td> 332 <td>[[event.event_type]]</td>
329 <td>[[event.human_ts]]</td> 333 <td>[[event.human_ts]]</td>
330 <td> 334 <td>
331 <a target="_blank" rel="noopener" 335 <a target="_blank" rel="noopener"
332 href$="[[_taskLink(event.task_id)]]"> 336 href$="[[_taskLink(event.task_id)]]">
333 [[event.task_id]] 337 [[event.task_id]]
334 </a> 338 </a>
335 </td> 339 </td>
336 <td class$="[[_classVersion(_server_version.bot_version,event. version)]]"> 340 <td class$="[[_classVersion(_server_details.bot_version,event. version)]]">
337 <a target="_blank" rel="noopener"
338 href$="[[_luciLink(event.version)]]">
339 [[_shorten(event.version,'8')]] 341 [[_shorten(event.version,'8')]]
340 </a>
341 </td> 342 </td>
342 </tr> 343 </tr>
343 </template> 344 </template>
344 </tbody> 345 </tbody>
345 </table> 346 </table>
346 </template> 347 </template>
347 <!-- https://github.com/Polymer/polymer/issues/3669 hidden$ doesn't 348 <!-- https://github.com/Polymer/polymer/issues/3669 hidden$ doesn't
348 respect truthiness, only booleanness, so we have _showEvents 349 respect truthiness, only booleanness, so we have _showEvents
349 instead of using _selected directly.--> 350 instead of using _selected directly.-->
350 <pageable-data 351 <pageable-data
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 return "dead"; 503 return "dead";
503 } 504 }
504 return ""; 505 return "";
505 }, 506 },
506 507
507 _luciLink: function(revision) { 508 _luciLink: function(revision) {
508 if (!revision) { 509 if (!revision) {
509 return undefined; 510 return undefined;
510 } 511 }
511 return "https://github.com/luci/luci-py/commit/" + revision; 512 return "https://github.com/luci/luci-py/commit/" + revision;
513 },
512 514
515 _mpLink: function(bot, template) {
516 if (!bot || !bot.lease_id || !template) {
517 return false;
518 }
519 return template.replace("%s", bot.lease_id);
513 }, 520 },
514 521
515 _numRows: function(arr) { 522 _numRows: function(arr) {
516 if (!arr || !arr.length) { 523 if (!arr || !arr.length) {
517 return 1; 524 return 1;
518 } 525 }
519 return 1 + arr.length; 526 return 1 + arr.length;
520 }, 527 },
521 528
522 _prettyPrint: function(obj) { 529 _prettyPrint: function(obj) {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 }, 607 },
601 608
602 _toggleState: function() { 609 _toggleState: function() {
603 this.set("_show_state", !this._show_state); 610 this.set("_show_state", !this._show_state);
604 } 611 }
605 612
606 }); 613 });
607 })(); 614 })();
608 </script> 615 </script>
609 </dom-module> 616 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698