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="ct-builder-grid.html"> | 7 <link rel="import" href="ct-sheriff-card.html"> |
8 <link rel="import" href="ct-commit-list.html"> | 8 <link rel="import" href="ct-cq-latency-card.html"> |
9 <link rel="import" href="ct-test-list.html"> | 9 <link rel="import" href="ct-tree-status-card.html"> |
10 <link rel="import" href="ct-cycle-time-card.html"> | |
10 <link rel="import" href="../bower_components/paper-dialog/paper-dialog.html"> | 11 <link rel="import" href="../bower_components/paper-dialog/paper-dialog.html"> |
11 <link rel="import" href="../bower_components/paper-dialog/paper-dialog-transitio n.html"> | 12 <link rel="import" href="../bower_components/paper-dialog/paper-dialog-transitio n.html"> |
12 <link rel="import" href="../bower_components/paper-input/paper-input.html"> | 13 <link rel="import" href="../bower_components/paper-input/paper-input.html"> |
13 | 14 |
14 <polymer-element name="ct-failure-card" attributes="group commitLog tree bug"> | 15 <polymer-element name="ct-failure-card" attributes="group commitLog tree bug"> |
15 <template> | 16 <template> |
16 <style> | 17 <style> |
17 :host { | 18 :host { |
18 display: flex; | 19 display: flex; |
19 } | 20 } |
(...skipping 20 matching lines...) Expand all Loading... | |
40 box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3); | 41 box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3); |
41 } | 42 } |
42 | 43 |
43 paper-button:active, paper-button:hover { | 44 paper-button:active, paper-button:hover { |
44 background: #f8f8f8; | 45 background: #f8f8f8; |
45 border-color: #c6c6c6; | 46 border-color: #c6c6c6; |
46 box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.1); | 47 box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.1); |
47 color: #222; | 48 color: #222; |
48 } | 49 } |
49 | 50 |
50 ct-builder-grid { | |
51 margin-right: 10px; | |
52 width: 250px; | |
53 } | |
54 | |
55 #failure { | |
56 flex: 1; | |
57 } | |
58 | |
59 #buttons { | 51 #buttons { |
60 display: flex; | 52 display: flex; |
61 flex-direction: column; | 53 flex-direction: column; |
62 } | 54 } |
63 | 55 |
64 .snoozed { | 56 .card { |
ojan
2014/09/02 02:35:11
Let's put the snoozed out here and put it on a div
shans
2014/09/04 01:59:43
Done.
| |
65 opacity: 0.5; | 57 flex: 1; |
66 } | 58 } |
67 </style> | 59 </style> |
68 <ct-builder-grid failures="{{ group.failures }}"></ct-builder-grid> | 60 <template if="{{ group.type == 'sheriff' }}"> |
ojan
2014/09/02 02:35:11
Instead of ct-failure-card containing different ty
shans
2014/09/04 01:59:43
I think the spirit of this is done now (ct-trooper
| |
69 <div id="failure" class="{{ { snoozed: group.isSnoozed } | tokenList }}"> | 61 <ct-sheriff-card class='card' group="{{ group }}"></ct-sheriff-card> |
70 <ct-test-list tests="{{ group.failures }}" tree="{{ tree }}"></ct-test-lis t> | 62 </template> |
71 <ct-commit-list commitList="{{ group.commitList }}"></ct-commit-list> | 63 <template if="{{ group.type == 'cq_latency' }}"> |
72 </div> | 64 <ct-cq-latency-card class='card' group="{{ group }}"></ct-cq-latency-card> |
65 </template> | |
66 <template if="{{ group.type == 'tree_status' }}"> | |
67 <ct-tree-status-card class='card' group="{{ group }}"></ct-tree-status-car d> | |
68 </template> | |
69 <template if="{{ group.type == 'cycle_time' }}"> | |
70 <ct-cycle-time-card class='card' group="{{ group }}"></ct-cycle-time-card> | |
71 </template> | |
73 <div id="buttons"> | 72 <div id="buttons"> |
74 <paper-button id="examine" on-tap="{{ examine }}" label="Examine"></paper- button> | 73 <paper-button id="examine" on-tap="{{ examine }}" label="Examine"></paper- button> |
75 <template if="{{ !group.isSnoozed }}"> | 74 <template if="{{ !group.isSnoozed }}"> |
76 <paper-button id="snooze" on-tap="{{ snooze }}" label="Snooze"></paper-b utton> | 75 <paper-button id="snooze" on-tap="{{ snooze }}" label="Snooze"></paper-b utton> |
77 </template> | 76 </template> |
78 <template if="{{ group.isSnoozed }}"> | 77 <template if="{{ group.isSnoozed }}"> |
79 <paper-button id="snooze" on-tap="{{ unsnooze }}" label="Unsnooze"></pap er-button> | 78 <paper-button id="snooze" on-tap="{{ unsnooze }}" label="Unsnooze"></pap er-button> |
80 </template> | 79 </template> |
81 <paper-button id="link-bug" on-tap="{{ linkBug }}" label="Link Bug"></pape r-button> | 80 <paper-button id="link-bug" on-tap="{{ linkBug }}" label="Link Bug"></pape r-button> |
82 <template if="{{ group.bug !== undefined }}"> | 81 <template if="{{ group.bug !== undefined }}"> |
(...skipping 27 matching lines...) Expand all Loading... | |
110 | 109 |
111 snooze: function() { | 110 snooze: function() { |
112 this.group.snoozeUntil(Date.now() + 60 * 60 * 1000); | 111 this.group.snoozeUntil(Date.now() + 60 * 60 * 1000); |
113 }, | 112 }, |
114 | 113 |
115 unsnooze: function() { | 114 unsnooze: function() { |
116 this.group.unsnooze(); | 115 this.group.unsnooze(); |
117 }, | 116 }, |
118 | 117 |
119 _updateCommitList: function() { | 118 _updateCommitList: function() { |
120 if (this.group && this.commitLog) | 119 if (this.group && this.group.commitList && this.commitLog) |
121 this.group.commitList.update(this.commitLog); | 120 this.group.commitList.update(this.commitLog); |
122 }, | 121 }, |
123 | 122 |
124 linkBug: function() { | 123 linkBug: function() { |
125 this.$.bug.value = this.group.bug; | 124 this.$.bug.value = this.group.bug; |
126 this.$.bugDialog.toggle(); | 125 this.$.bugDialog.toggle(); |
127 }, | 126 }, |
128 | 127 |
129 saveBug: function() { | 128 saveBug: function() { |
130 this.group.setBug(this.$.bug.value); | 129 this.group.setBug(this.$.bug.value); |
131 }, | 130 }, |
132 | 131 |
133 removeBug: function() { | 132 removeBug: function() { |
134 this.group.clearBug(); | 133 this.group.clearBug(); |
135 }, | 134 }, |
136 }); | 135 }); |
137 </script> | 136 </script> |
138 </polymer-element> | 137 </polymer-element> |
OLD | NEW |