| 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-list-data> | 9 <bot-list-data> |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 Methods: | 35 Methods: |
| 36 signIn(): Force a signin of the user using OAuth. This happens | 36 signIn(): Force a signin of the user using OAuth. This happens |
| 37 automatically when auth_headers is set. | 37 automatically when auth_headers is set. |
| 38 | 38 |
| 39 Events: | 39 Events: |
| 40 None. | 40 None. |
| 41 --> | 41 --> |
| 42 | 42 |
| 43 <link rel="import" href="/res/imp/bower_components/iron-ajax/iron-ajax.html"> | 43 <link rel="import" href="/res/imp/bower_components/iron-ajax/iron-ajax.html"> |
| 44 <link rel="import" href="/res/imp/common/common-behavior.html"> |
| 44 | 45 |
| 45 <dom-module id="task-list-data"> | 46 <dom-module id="task-list-data"> |
| 46 <template> | 47 <template> |
| 47 <iron-ajax id="tasklist" | 48 <iron-ajax id="tasklist" |
| 48 url="/_ah/api/swarming/v1/tasks/list" | 49 url="/_ah/api/swarming/v1/tasks/list" |
| 49 headers="[[auth_headers]]" | 50 headers="[[auth_headers]]" |
| 50 params="[[query_params]]" | 51 params="[[query_params]]" |
| 51 handle-as="json" | 52 handle-as="json" |
| 52 last-response="{{_list}}" | 53 last-response="{{_list}}" |
| 53 loading="{{_busy1}}"> | 54 loading="{{_busy1}}"> |
| 54 </iron-ajax> | 55 </iron-ajax> |
| 55 <!-- TODO(kjlubick): Make more requests (like all tags) --> | 56 <!-- TODO(kjlubick): Make more requests (like all tags) --> |
| 56 | 57 |
| 57 </template> | 58 </template> |
| 58 <script> | 59 <script> |
| 59 (function(){ | 60 (function(){ |
| 60 Polymer({ | 61 Polymer({ |
| 61 is: 'task-list-data', | 62 is: 'task-list-data', |
| 62 | 63 |
| 63 behaviors: [SwarmingBehaviors.SwarmingBehavior], | 64 behaviors: [SwarmingBehaviors.CommonBehavior], |
| 64 | 65 |
| 65 properties: { | 66 properties: { |
| 66 // inputs | 67 // inputs |
| 67 auth_headers: { | 68 auth_headers: { |
| 68 type: Object, | 69 type: Object, |
| 69 observer: "signIn", | 70 observer: "signIn", |
| 70 }, | 71 }, |
| 71 query_params: { | 72 query_params: { |
| 72 type: Object, | 73 type: Object, |
| 73 }, | 74 }, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 96 if (!this._list || !this._list.items) { | 97 if (!this._list || !this._list.items) { |
| 97 return []; | 98 return []; |
| 98 } | 99 } |
| 99 // Do any preprocessing here | 100 // Do any preprocessing here |
| 100 return this._list.items; | 101 return this._list.items; |
| 101 } | 102 } |
| 102 }); | 103 }); |
| 103 })(); | 104 })(); |
| 104 </script> | 105 </script> |
| 105 </dom-module> | 106 </dom-module> |
| OLD | NEW |