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 <link rel="import" href="../bower_components/paper-button/paper-button.html"> | 7 <link rel="import" href="../bower_components/paper-button/paper-button.html"> |
8 <link rel="import" href="../model/tree-status.html"> | 8 <link rel="import" href="../model/tree-status.html"> |
9 <link rel="import" href="ct-failure-stream.html"> | 9 <link rel="import" href="ct-failure-stream.html"> |
10 <link rel="import" href="ct-last-updated.html"> | 10 <link rel="import" href="ct-last-updated.html"> |
(...skipping 23 matching lines...) Expand all Loading... | |
34 align-items: baseline; | 34 align-items: baseline; |
35 padding: 0 5px; | 35 padding: 0 5px; |
36 } | 36 } |
37 </style> | 37 </style> |
38 <div class="toolbar"> | 38 <div class="toolbar"> |
39 <ct-revision-details id="revisionDetails" builderLatestRevisions="{{ failu res.builderLatestRevisions }}" commitLog="{{ commitLog }}" tree="{{ tree }}"></c t-revision-details> | 39 <ct-revision-details id="revisionDetails" builderLatestRevisions="{{ failu res.builderLatestRevisions }}" commitLog="{{ commitLog }}" tree="{{ tree }}"></c t-revision-details> |
40 <a href="https://code.google.com/p/chromium/wiki/UsefulURLs">Useful URLs</ a> | 40 <a href="https://code.google.com/p/chromium/wiki/UsefulURLs">Useful URLs</ a> |
41 </div> | 41 </div> |
42 <ct-tree-status status="{{ treeStatuses['chromium'] }}" state="{{ treeStatus es['chromium'].status }}"></ct-tree-status> | 42 <ct-tree-status status="{{ treeStatuses['chromium'] }}" state="{{ treeStatus es['chromium'].status }}"></ct-tree-status> |
43 <ct-tree-status status="{{ treeStatuses['blink'] }}" state="{{ treeStatuses[ 'blink'].status }}"></ct-tree-status> | 43 <ct-tree-status status="{{ treeStatuses['blink'] }}" state="{{ treeStatuses[ 'blink'].status }}"></ct-tree-status> |
44 <ct-party-time failures="{{ failures.failures[tree].length == 0 }}"></ct-par ty-time> | 44 <ct-party-time partytime="{{ !failures || !failures.failures[tree] || failur es.failures[tree].length == 0 }}"></ct-party-time> |
Jeffrey Yasskin
2014/09/02 18:34:52
I keep assuming that Polymer's templates parse the
michaelpg
2014/09/02 21:57:33
I feel like this would be better as a conditional
ojan
2014/09/11 03:04:47
Yeah, that's much better. Done.
| |
45 <ct-failure-stream category="default" groups="{{ failures.failures[tree] }}" commitLog="{{ commitLog }}" tree="{{ tree }}"></ct-failure-stream> | 45 <ct-failure-stream category="default" groups="{{ failures && failures.failur es[tree] }}" commitLog="{{ commitLog }}" tree="{{ tree }}"></ct-failure-stream> |
46 <ct-failure-stream category="snoozed" groups="{{ failures.failures[tree] }}" commitLog="{{ commitLog }}" tree="{{ tree }}"></ct-failure-stream> | 46 <ct-failure-stream category="snoozed" groups="{{ failures && failures.failur es[tree] }}" commitLog="{{ commitLog }}" tree="{{ tree }}"></ct-failure-stream> |
ojan
2014/09/01 00:31:15
These changes are to make createElement(ct-unexpec
| |
47 </template> | 47 </template> |
48 <script> | 48 <script> |
49 (function() { | 49 (function() { |
50 Polymer({ | 50 Polymer({ |
51 tree: '', | 51 tree: '', |
52 | 52 |
53 created: function() { | 53 created: function() { |
54 this.treeStatuses = {}; | 54 this.treeStatuses = {}; |
55 var projects = ['chromium', 'blink']; | 55 var projects = ['chromium', 'blink']; |
56 for (var i = 0; i < projects.length; i++) { | 56 for (var i = 0; i < projects.length; i++) { |
57 this.treeStatuses[projects[i]] = new TreeStatus(projects[i]); | 57 this.treeStatuses[projects[i]] = new TreeStatus(projects[i]); |
58 } | 58 } |
59 }, | 59 }, |
60 | 60 |
61 attached: function() { | 61 attached: function() { |
62 this.update(); | 62 this.update(); |
63 }, | 63 }, |
64 | 64 |
65 update: function() { | 65 update: function() { |
66 // FIXME: These shouldn't update if there's already an update in progres s. | 66 // FIXME: These shouldn't update if there's already an update in progres s. |
67 Object.keys(this.treeStatuses, function(tree, status) { | 67 Object.keys(this.treeStatuses, function(tree, status) { |
68 status.update(); | 68 status.update(); |
69 }); | 69 }); |
70 }, | 70 }, |
71 }); | 71 }); |
72 })(); | 72 })(); |
73 </script> | 73 </script> |
74 </polymer-element> | 74 </polymer-element> |
OLD | NEW |