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 rel="import" href="ct-builder-failure-card.html"> 8 <link rel="import" href="ct-failure-card-buttons.html"> 9 <link rel="import" href="ct-step-failure-card.html"> 10 <link rel="import" href="ct-trooper-card.html"> 11 12 <polymer-element name="ct-failure-stream" attributes="groups commitLog category title" noscript> 13 <template> 14 <style> 15 :host { 16 display: block; 17 word-wrap: break-word; 18 } 19 20 .bugs { 21 margin-bottom: 10px; 22 min-height: 24px; 23 } 24 25 .card { 26 padding: 10px 5px 0; 27 border-bottom: 1px solid lightgrey; 28 display: flex; 29 } 30 31 .card > * { 32 flex: 1; 33 min-width: 120px; 34 } 35 36 .card > ct-failure-card-buttons { 37 flex: 0 1 auto; 38 margin-right: 10px; 39 margin-bottom: 10px; 40 } 41 42 /* FIXME: Don't use before hax to add labels */ 43 :host > div:first-of-type::before { 44 content: "{{ title }}:"; 45 display: block; 46 font-weight: bold; 47 font-size: 18px; 48 padding: 5px; 49 background-color: #f5f5f5; 50 margin-bottom: 5px; 51 } 52 53 .snoozed { 54 opacity: 0.5; 55 } 56 57 @media (max-width: 1200px) { 58 .card > ct-failure-card-buttons { 59 margin-right: 0px; 60 } 61 62 .card { 63 flex-direction: column; 64 } 65 } 66 </style> 67 <template repeat="{{ group in groups }}"> 68 <template if="{{ group.category == category }}"> 69 <div> <!-- FIXME: Remove when we have a better title solution. --> 70 <div class="card"> 71 <ct-failure-card-buttons group="{{ group }}" bug="{{ bug }}"></ct-failure-card-buttons> 72 <div> 73 <template if="{{ group.bug }}"> 74 <div class="bugs"> 75 <span style="font-weight: bold">Bugs:</span> 76 <a href="{{ group.bug }}">{{ group.bugLabel }}</a> 77 </div> 78 </template> 79 80 <template if="{{ group.data.category == 'step' }}"> 81 <ct-step-failure-card class='{{ { snoozed: group.isSnoozed } | tokenList }}' group="{{ group.data }}" commitLog="{{ commitLog }}"></ct-step-failure-card> 82 </template> 83 <template if="{{ group.data.category == 'builder' }}"> 84 <ct-builder-failure-card class='{{ { snoozed: group.isSnoozed } | tokenList }}' group="{{ group.data }}"></ct-builder-failure-card> 85 </template> 86 <template if="{{ group.data.category == 'trooper' }}"> 87 <ct-trooper-card class='{{ { snoozed: group.isSnoozed } | tokenList }}' group="{{ group.data }}"></ct-trooper-card> 88 </template> 89 </div> 90 </div> 91 </div> 92 </template> 93 </template> 94 </template> 95 </polymer-element> 96