| OLD | NEW |
| (Empty) | |
| 1 <!-- |
| 2 This in an HTML Import-able file that contains the definition |
| 3 of the following elements: |
| 4 |
| 5 <swarming-index> |
| 6 |
| 7 Usage: |
| 8 |
| 9 <swarming-index></swarming-index> |
| 10 |
| 11 Properties: |
| 12 None. |
| 13 |
| 14 Methods: |
| 15 None. |
| 16 |
| 17 Events: |
| 18 None. |
| 19 --> |
| 20 |
| 21 <link rel="import" href="../bower_components/polymer/polymer.html"> |
| 22 <link rel="import" href="../bower_components/iron-ajax/iron-ajax.html"> |
| 23 |
| 24 <link rel="import" href="../common/auth-signin.html"> |
| 25 |
| 26 <dom-module id="swarming-index"> |
| 27 <template> |
| 28 <style> |
| 29 :host { |
| 30 display: block; |
| 31 } |
| 32 </style> |
| 33 |
| 34 <h1>HELLO WORLD<h1> |
| 35 |
| 36 <!-- TODO(kjlubick) Remove this hard-coded client-id.--> |
| 37 <auth-signin |
| 38 auth-headers="{{auth}}" |
| 39 client-id="20770472288-t5smpbpjptka4nd888fv0ctd23ftba2o.apps.googleusercon
tent.com" |
| 40 on-auth-signin="signIn"> |
| 41 </auth-signin> |
| 42 |
| 43 <iron-ajax id="request" |
| 44 url="/_ah/api/swarming/v1/server/details" |
| 45 headers="[[auth]]" |
| 46 handle-as="json" |
| 47 on-response="handleResponse"> |
| 48 </iron-ajax> |
| 49 |
| 50 </template> |
| 51 <script> |
| 52 Polymer({ |
| 53 is: 'swarming-index', |
| 54 |
| 55 signIn: function(){ |
| 56 this.$.request.generateRequest(); |
| 57 }, |
| 58 |
| 59 handleResponse: function(a,b){ |
| 60 console.log(this.$.request.lastResponse); |
| 61 } |
| 62 }); |
| 63 </script> |
| 64 </dom-module> |
| OLD | NEW |