Index: Tools/GardeningServer/ui/ct-failure-card.html |
diff --git a/Tools/GardeningServer/ui/ct-failure-card.html b/Tools/GardeningServer/ui/ct-failure-card.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7621927ab42a6085791ec443d3040f847606bcc4 |
--- /dev/null |
+++ b/Tools/GardeningServer/ui/ct-failure-card.html |
@@ -0,0 +1,52 @@ |
+<!-- |
+Copyright 2014 The Chromium Authors. All rights reserved. |
+Use of this source code is governed by a BSD-style license that can be |
+found in the LICENSE file. |
+--> |
+ |
+<link rel="import" href="ct-commit-list.html"> |
+<link rel="import" href="ct-test-list.html"> |
+ |
+<polymer-element name="ct-failure-card" attributes="failures"> |
+ <template> |
+ <style> |
+ :host { |
+ display: block; |
+ margin: 5px; |
+ padding: 5px; |
+ border-top: 1px solid lightgrey; |
+ min-height: 30px; |
+ } |
+ |
+ :host(:hover) > #examine { |
+ display: initial; |
+ } |
+ |
+ #examine { |
+ display: none; |
+ float: right; |
+ } |
+ |
+ paper-button { |
+ background: #4285f4; |
+ color: #fff; |
+ } |
+ </style> |
+ <paper-button id="examine" on-tap="{{examine}}">Examine</paper-button> |
+ <ct-test-list tests="{{failures|testNames}}"></ct-test-list> |
+ <ct-commit-list first="{{failures[0].newestPassingRevision + 1}}" |
+ last="{{failures[0].oldestFailingRevision}}"></ct-commits> |
+ </template> |
+ <script> |
+ Polymer({ |
+ failures: [], |
michaelpg
2014/06/29 23:58:32
The Polymer docs emphasize that object and array m
abarth-chromium
2014/06/30 00:43:29
It doesn't actually matter because we don't mutate
|
+ |
+ testNames: function(failures) { |
+ return failures.map(function(failureAnalysis) { return failureAnalysis.testName }); |
+ }, |
+ examine: function() { |
+ this.fire('ct-examine-failures', this.failures); |
+ }, |
+ }); |
+ </script> |
+</polymer-element> |