Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!-- | 1 <!-- |
| 2 Copyright 2014 The Chromium Authors. All rights reserved. | 2 Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 Use of this source code is governed by a BSD-style license that can be | 3 Use of this source code is governed by a BSD-style license that can be |
| 4 found in the LICENSE file. | 4 found in the LICENSE file. |
| 5 --> | 5 --> |
| 6 | 6 |
| 7 <!-- | 7 <!-- |
| 8 Styled link to a builder composed of the version and architecture, or the | 8 Styled link to a builder composed of the version and architecture, or the |
| 9 builder name if the builder is unknown. If an array is passed to |steps|, the | 9 builder name if the builder is unknown. If an array is passed to |steps|, the |
| 10 link will show the builder name and architecture followed by the steps instead. | 10 link will show the builder name and architecture followed by the steps instead. |
| 11 --> | 11 --> |
| 12 <polymer-element name="ct-builder" attributes="builderName steps"> | 12 <polymer-element name="ct-builder" attributes="builder steps"> |
| 13 <template> | 13 <template> |
| 14 <style> | 14 <style> |
| 15 a { | 15 a { |
| 16 border: 1px solid gray; | 16 border: 1px solid gray; |
| 17 color: black; | 17 color: black; |
| 18 display: inline-block; | 18 display: inline-block; |
| 19 font-size: 0px; | 19 font-size: 11px; |
| 20 margin-bottom: 2px; | 20 margin-bottom: 2px; |
| 21 padding: 1px; | 21 padding: 1px; |
| 22 text-decoration: none; | 22 text-decoration: none; |
| 23 } | 23 } |
| 24 | 24 |
| 25 span { | 25 span { |
| 26 font-size: 11px; | |
| 27 padding: 0 2px; | 26 padding: 0 2px; |
| 28 } | 27 } |
| 29 | 28 |
| 30 .version { | 29 .builder { |
| 31 background-color: #555; | 30 background-color: #555; |
| 32 color: white; | 31 color: white; |
| 33 } | 32 } |
| 34 | |
| 35 .version:not(.architecture) { | |
| 36 text-transform: uppercase; | |
| 37 } | |
| 38 | |
| 39 .details { | |
| 40 padding-left: 3px; | |
| 41 } | |
| 42 </style> | 33 </style> |
| 43 <a href="{{ builderName|builderURL }}"> | 34 <a href="{{ builder|builderURL }}"> |
| 44 <template if="{{ configuration }}"> | 35 <span class="builder">{{ builder }}</span> |
| 45 <span class="version">{{ configuration.version }}</span> | |
| 46 <template if="{{ configuration.is64bit }}"> | |
| 47 <template if="{{ stepList }}"> | |
| 48 <span class="version architecture">64-bit</span> | |
| 49 </template> | |
| 50 <template if="{{ !stepList }}"> | |
| 51 <span>64-bit</span> | |
| 52 </template> | |
| 53 </template> | |
| 54 </template> | |
| 55 <template if="{{ !configuration }}"> | |
| 56 <span class="version">{{ builderName }}</span> | |
| 57 </template> | |
| 58 <template if="{{ stepList }}"> | 36 <template if="{{ stepList }}"> |
| 59 <span class="details">{{ stepList }}</span> | 37 <span class="details">{{ stepList }}</span> |
| 60 </template> | 38 </template> |
| 61 </a> | 39 </a> |
| 62 </template> | 40 </template> |
| 63 <script> | 41 <script> |
| 64 Polymer({ | 42 Polymer({ |
| 65 steps: [], | 43 steps: [], |
| 66 | 44 |
| 67 ready: function() { | |
| 68 this.configuration = config.builders[this.builderName]; | |
| 69 }, | |
| 70 | |
| 71 stepsChanged: function() { | 45 stepsChanged: function() { |
| 72 this.stepList = this.steps.join(', '); | 46 this.stepList = this.steps.join(', '); |
| 73 }, | 47 }, |
| 74 | 48 |
| 75 builderURL: function() { | 49 builderURL: function() { |
| 76 return config.waterfallURL + '?builder=' + | 50 // FIXME: Pass in the waterfall URL instead so this can work with differ ent waterfalls. |
|
michaelpg
2014/07/22 05:58:23
why not just do this now?
ojan
2014/07/22 06:08:50
We need to plumb the waterfall url all the way fro
| |
| 77 encodeURIComponent(this.builderName); | 51 var waterfall = 'http://build.chromium.org/p/chromium.webkit'; |
| 52 return waterfall + '/waterfall?' + Object.toQueryString({ | |
| 53 builder: this.builder, | |
| 54 }); | |
| 78 }, | 55 }, |
| 79 }); | 56 }); |
| 80 </script> | 57 </script> |
| 81 </polymer-element> | 58 </polymer-element> |
| OLD | NEW |