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

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

Issue 2361833002: Fix two glitches on bot-page (Closed) Base URL: git@github.com:luci/luci-py@master
Patch Set: Created 4 years, 3 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 <template is="dom-if" if="[[_canDelete(_bot,_permissions)]]"> 138 <template is="dom-if" if="[[_canDelete(_bot,_permissions)]]">
139 <button class="raised" on-click="_promptDelete"> 139 <button class="raised" on-click="_promptDelete">
140 Delete 140 Delete
141 </button> 141 </button>
142 </template> 142 </template>
143 </td> 143 </td>
144 </tr> 144 </tr>
145 <template is="dom-if" if="[[_bot.quarantined]]"> 145 <template is="dom-if" if="[[_bot.quarantined]]">
146 <tr class="quarantined"> 146 <tr class="quarantined">
147 <td>Quarantined</td> 147 <td>Quarantined</td>
148 <td colspan="2">[[_quarantineMessage(_bot)]]</td> 148 <td colspan="2" class="message">[[_quarantineMessage(_bot)]]</td >
149 </tr> 149 </tr>
150 </template> 150 </template>
151 <tr> 151 <tr>
152 <td>Current Task</td> 152 <td>Current Task</td>
153 <td> 153 <td>
154 <a target="_blank" href$="[[_taskLink(_bot.task_id)]]"> 154 <a target="_blank" href$="[[_taskLink(_bot.task_id)]]">
155 [[_task(_bot)]] 155 [[_task(_bot)]]
156 </a> 156 </a>
157 </td> 157 </td>
158 <td> 158 <td>
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 this.set("_dialogPrompt", "shut down "+this.bot_id); 413 this.set("_dialogPrompt", "shut down "+this.bot_id);
414 this.$.prompt.open(); 414 this.$.prompt.open();
415 }, 415 },
416 416
417 _quarantineMessage: function(bot) { 417 _quarantineMessage: function(bot) {
418 if (bot && bot.quarantined) { 418 if (bot && bot.quarantined) {
419 var msg = bot.state.quarantined; 419 var msg = bot.state.quarantined;
420 // Sometimes, the quarantined message is actually in "error". This 420 // Sometimes, the quarantined message is actually in "error". This
421 // happens when the bot code has thrown an exception. 421 // happens when the bot code has thrown an exception.
422 if (msg === undefined || msg === "true" || msg === true) { 422 if (msg === undefined || msg === "true" || msg === true) {
423 msg = this._attribute(bot, "error"); 423 msg = bot.state && bot.state.error;
424 } 424 }
425 return msg || "True"; 425 return msg || "True";
426 } 426 }
427 return ""; 427 return "";
428 }, 428 },
429 429
430 _refresh: function() { 430 _refresh: function() {
431 this.$.data.request(); 431 this.$.data.request();
432 }, 432 },
433 433
(...skipping 24 matching lines...) Expand all
458 }, 458 },
459 459
460 _toggleState: function() { 460 _toggleState: function() {
461 this.set("_show_state", !this._show_state); 461 this.set("_show_state", !this._show_state);
462 } 462 }
463 463
464 }); 464 });
465 })(); 465 })();
466 </script> 466 </script>
467 </dom-module> 467 </dom-module>
OLDNEW
« no previous file with comments | « appengine/swarming/elements/build/elements.html ('k') | appengine/swarming/elements/res/imp/common/single-page-style.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698