1 <!-- 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 4 found in the LICENSE file. 5 --> 6 7 <link href="../model/ct-builder-status.html" rel="import"> 8 9 <polymer-element name="ct-builder-status"> 10 <template> 11 <style> 12 li > a { display: inline-block; width: 40ex; } 13 li > span { display: inline-block; width: 20ex;} 14 .groups { 15 margin: 0; 16 padding: 0; 17 list-style: none; 18 } 19 .groups > li { 20 margin-bottom: 5px; 21 padding: 5px; 22 border-top: 1px solid lightgrey; 23 } 24 h2 { 25 font-size: 100%; 26 padding: 0 5px; 27 margin: 0; 28 } 29 p { 30 padding: 0 5px; 31 margin: 0; 32 } 33 </style> 34 35 <template if="{{ errorMessage }}"> 36 <h2>Failed to load and/or parse data.</h2> 37 <p>{{ errorMessage }}</p> 38 </template> 39 40 <template if="{{ groups.length && !errorMessage }}"> 41 <ul class="groups"> 42 <template repeat="{{ group in groups }}"> 43 <li> 44 <h2>{{ group.name }}</h2> 45 <ul class="builds"> 46 <template repeat="{{ builder in group.builders }}"> 47 <li> 48 <a href="{{builder.uri}}">{{ builder.name }}</a> 49 <template repeat="{{ repository in builder.repositories }}"> 50 <span> 51 {{ repository.name }}: 52 <template if="{{ repository.uri }}"> 53 <a href="{{repository.uri}}">{{ repository.revision }}</a> 54 </template> 55 <template if="{{ !repository.uri }}"> 56 {{ repository.revision }} 57 </template> 58 </span> 59 </template> 60 </li> 61 </template> 62 </ul> 63 </li> 64 </template> 65 </ul> 66 </template> 67 </template> 68 69 <script> 70 Polymer('ct-builder-status', { 71 ready: function() { 72 this.groups = []; 73 this.errorMessage = ''; 74 } 75 }); 76 </script> 77 </polymer-element> 78