| OLD | NEW |
| 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 16 matching lines...) Expand all Loading... |
| 27 <link rel="import" href="/res/imp/bower_components/iron-collapse/iron-collapse.h
tml"> | 27 <link rel="import" href="/res/imp/bower_components/iron-collapse/iron-collapse.h
tml"> |
| 28 <link rel="import" href="/res/imp/bower_components/iron-icon/iron-icon.html"> | 28 <link rel="import" href="/res/imp/bower_components/iron-icon/iron-icon.html"> |
| 29 <link rel="import" href="/res/imp/bower_components/iron-icons/iron-icons.html"> | 29 <link rel="import" href="/res/imp/bower_components/iron-icons/iron-icons.html"> |
| 30 <link rel="import" href="/res/imp/bower_components/paper-button/paper-button.htm
l"> | 30 <link rel="import" href="/res/imp/bower_components/paper-button/paper-button.htm
l"> |
| 31 <link rel="import" href="/res/imp/bower_components/paper-checkbox/paper-checkbox
.html"> | 31 <link rel="import" href="/res/imp/bower_components/paper-checkbox/paper-checkbox
.html"> |
| 32 <link rel="import" href="/res/imp/bower_components/paper-dialog/paper-dialog.htm
l"> | 32 <link rel="import" href="/res/imp/bower_components/paper-dialog/paper-dialog.htm
l"> |
| 33 <link rel="import" href="/res/imp/bower_components/paper-input/paper-input.html"
> | 33 <link rel="import" href="/res/imp/bower_components/paper-input/paper-input.html"
> |
| 34 <link rel="import" href="/res/imp/bower_components/paper-tabs/paper-tabs.html"> | 34 <link rel="import" href="/res/imp/bower_components/paper-tabs/paper-tabs.html"> |
| 35 <link rel="import" href="/res/imp/bower_components/polymer/polymer.html"> | 35 <link rel="import" href="/res/imp/bower_components/polymer/polymer.html"> |
| 36 | 36 |
| 37 <link rel="import" href="/res/imp/common/error-toast.html"> |
| 38 <link rel="import" href="/res/imp/common/single-page-style.html"> |
| 37 <link rel="import" href="/res/imp/common/swarming-app.html"> | 39 <link rel="import" href="/res/imp/common/swarming-app.html"> |
| 38 <link rel="import" href="/res/imp/common/url-param.html"> | 40 <link rel="import" href="/res/imp/common/url-param.html"> |
| 39 <link rel="import" href="/res/imp/common/error-toast.html"> | |
| 40 | 41 |
| 41 <link rel="import" href="bot-page-data.html"> | 42 <link rel="import" href="bot-page-data.html"> |
| 42 <link rel="import" href="bot-page-shared-behavior.html"> | 43 <link rel="import" href="bot-page-shared-behavior.html"> |
| 43 | 44 |
| 44 | 45 |
| 45 <dom-module id="bot-page"> | 46 <dom-module id="bot-page"> |
| 46 <template> | 47 <template> |
| 47 <style include="iron-flex iron-flex-alignment iron-positioning swarming-app-
style"> | 48 <style include="iron-flex iron-flex-alignment iron-positioning swarming-app-
style single-page-style"> |
| 49 .message { |
| 50 white-space: pre-line; |
| 51 font-family: monospace; |
| 52 } |
| 48 | 53 |
| 49 .header { | 54 .bot_state { |
| 50 max-width: 450px; | 55 white-space: pre; |
| 51 } | 56 font-family: monospace; |
| 57 margin-bottom: 10px; |
| 58 } |
| 52 | 59 |
| 53 .title { | 60 .tasks_table, |
| 54 font-size: 1.5em; | 61 .events_table { |
| 55 font-weight: bold; | 62 border: 3px solid #1F78B4; |
| 56 margin-bottom: 5px; | 63 } |
| 57 } | |
| 58 .id_input { | |
| 59 --paper-input-container-input: { | |
| 60 font-size: 2em; | |
| 61 }; | |
| 62 } | |
| 63 .refresh { | |
| 64 max-width: 50px; | |
| 65 max-height: 50px; | |
| 66 width: initial; | |
| 67 height: initial; | |
| 68 } | |
| 69 | 64 |
| 70 table { | 65 paper-checkbox { |
| 71 border-collapse: collapse; | 66 --paper-checkbox-label-color: #fff; |
| 72 margin-left: 5px; | 67 --paper-checkbox-checked-color: #fff; |
| 73 margin-bottom: 5px; | 68 --paper-checkbox-checkmark-color: #000; |
| 74 } | 69 --paper-checkbox-unchecked-color: #fff; |
| 75 td, | 70 padding: 3px; |
| 76 th { | 71 } |
| 77 border: 1px solid #BBB; | |
| 78 padding: 5px; | |
| 79 } | |
| 80 | 72 |
| 81 .quarantined, | 73 paper-dialog { |
| 82 .failed_task { | 74 border-radius: 6px; |
| 83 background-color: #ffdddd; | 75 } |
| 84 } | |
| 85 .dead, | |
| 86 .bot_died { | |
| 87 background-color: #cccccc; | |
| 88 } | |
| 89 | |
| 90 .message { | |
| 91 white-space: pre-line; | |
| 92 font-family: monospace; | |
| 93 } | |
| 94 | |
| 95 .bot_state { | |
| 96 white-space: pre; | |
| 97 font-family: monospace; | |
| 98 margin-bottom: 10px; | |
| 99 } | |
| 100 | |
| 101 .tabs { | |
| 102 background-color: #1F78B4; | |
| 103 color: #fff; | |
| 104 max-width: 600px; | |
| 105 --paper-checkbox-label-color: #fff; | |
| 106 margin-left: 5px; | |
| 107 } | |
| 108 | |
| 109 .tasks_table, | |
| 110 .events_table { | |
| 111 border: 3px solid #1F78B4; | |
| 112 } | |
| 113 | |
| 114 paper-checkbox { | |
| 115 --paper-checkbox-label-color: #fff; | |
| 116 --paper-checkbox-checked-color: #fff; | |
| 117 --paper-checkbox-checkmark-color: #000; | |
| 118 --paper-checkbox-unchecked-color: #fff; | |
| 119 padding: 3px; | |
| 120 } | |
| 121 | |
| 122 paper-tab.iron-selected { | |
| 123 background-color: #A6CEE3; | |
| 124 border: 3px solid #1F78B4; | |
| 125 color: #000; | |
| 126 font-weight: bold; | |
| 127 text-decoration: underline; | |
| 128 } | |
| 129 | |
| 130 paper-dialog { | |
| 131 border-radius: 6px; | |
| 132 } | |
| 133 | |
| 134 </style> | 76 </style> |
| 135 | 77 |
| 136 <url-param name="id" | 78 <url-param name="id" |
| 137 value="{{bot_id}}"> | 79 value="{{bot_id}}"> |
| 138 </url-param> | 80 </url-param> |
| 139 <url-param name="show_all_events" | 81 <url-param name="show_all_events" |
| 140 value="{{_show_all}}"> | 82 value="{{_show_all}}"> |
| 141 </url-param> | 83 </url-param> |
| 142 <url-param name="selected" | 84 <url-param name="selected" |
| 143 value="{{_selected}}"> | 85 value="{{_selected}}"> |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 <paper-button dialog-confirm>Yes</paper-button> | 291 <paper-button dialog-confirm>Yes</paper-button> |
| 350 </div> | 292 </div> |
| 351 </paper-dialog> | 293 </paper-dialog> |
| 352 | 294 |
| 353 <error-toast></error-toast> | 295 <error-toast></error-toast> |
| 354 | 296 |
| 355 </template> | 297 </template> |
| 356 <script> | 298 <script> |
| 357 (function(){ | 299 (function(){ |
| 358 | 300 |
| 359 | |
| 360 Polymer({ | 301 Polymer({ |
| 361 is: 'bot-page', | 302 is: 'bot-page', |
| 362 | 303 |
| 363 behaviors: [ | 304 behaviors: [ |
| 364 SwarmingBehaviors.BotPageBehavior, | 305 SwarmingBehaviors.BotPageBehavior, |
| 365 ], | 306 ], |
| 366 | 307 |
| 367 properties: { | 308 properties: { |
| 368 bot_id: { | 309 bot_id: { |
| 369 type: String, | 310 type: String, |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 _taskClass: function(task) { | 450 _taskClass: function(task) { |
| 510 if (task && task.internal_failure) { | 451 if (task && task.internal_failure) { |
| 511 return "bot_died"; | 452 return "bot_died"; |
| 512 } | 453 } |
| 513 if (task && task.failure) { | 454 if (task && task.failure) { |
| 514 return "failed_task"; | 455 return "failed_task"; |
| 515 } | 456 } |
| 516 return ""; | 457 return ""; |
| 517 }, | 458 }, |
| 518 | 459 |
| 519 _taskLink: function(task_id) { | |
| 520 // TODO(kjlubick): Migrate this to /newui/ when ready | |
| 521 if (task_id) { | |
| 522 return "/user/task/" + task_id; | |
| 523 } | |
| 524 return undefined; | |
| 525 }, | |
| 526 | |
| 527 _toggleState: function() { | 460 _toggleState: function() { |
| 528 this.set("_show_state", !this._show_state); | 461 this.set("_show_state", !this._show_state); |
| 529 } | 462 } |
| 530 | 463 |
| 531 }); | 464 }); |
| 532 })(); | 465 })(); |
| 533 </script> | 466 </script> |
| 534 </dom-module> | 467 </dom-module> |
| OLD | NEW |