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