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-builder-grid.html"> |
8 <link rel="import" href="ct-commit-list.html"> | 8 <link rel="import" href="ct-commit-list.html"> |
9 <link rel="import" href="ct-test-list.html"> | 9 <link rel="import" href="ct-test-list.html"> |
10 <link rel="import" href="../bower_components/paper-dialog/paper-dialog.html"> | 10 <link rel="import" href="../bower_components/paper-dialog/paper-dialog.html"> |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 flex-direction: column; | 61 flex-direction: column; |
62 } | 62 } |
63 | 63 |
64 .snoozed { | 64 .snoozed { |
65 opacity: 0.5; | 65 opacity: 0.5; |
66 } | 66 } |
67 </style> | 67 </style> |
68 <ct-builder-grid failures="{{ group.failures }}"></ct-builder-grid> | 68 <ct-builder-grid failures="{{ group.failures }}"></ct-builder-grid> |
69 <div id="failure" class="{{ { snoozed: group.isSnoozed } | tokenList }}"> | 69 <div id="failure" class="{{ { snoozed: group.isSnoozed } | tokenList }}"> |
70 <ct-test-list tests="{{ group.failures }}" tree="{{ tree }}"></ct-test-lis
t> | 70 <ct-test-list tests="{{ group.failures }}" tree="{{ tree }}"></ct-test-lis
t> |
71 <ct-commit-list commitList="{{ _commitList }}"></ct-commit-list> | 71 <ct-commit-list commitList="{{ group.commitList }}"></ct-commit-list> |
72 </div> | 72 </div> |
73 <div id="buttons"> | 73 <div id="buttons"> |
74 <paper-button id="examine" on-tap="{{ examine }}" label="Examine"></paper-
button> | 74 <paper-button id="examine" on-tap="{{ examine }}" label="Examine"></paper-
button> |
75 <template if="{{ !group.isSnoozed }}"> | 75 <template if="{{ !group.isSnoozed }}"> |
76 <paper-button id="snooze" on-tap="{{ snooze }}" label="Snooze"></paper-b
utton> | 76 <paper-button id="snooze" on-tap="{{ snooze }}" label="Snooze"></paper-b
utton> |
77 </template> | 77 </template> |
78 <template if="{{ group.isSnoozed }}"> | 78 <template if="{{ group.isSnoozed }}"> |
79 <paper-button id="snooze" on-tap="{{ unsnooze }}" label="Unsnooze"></pap
er-button> | 79 <paper-button id="snooze" on-tap="{{ unsnooze }}" label="Unsnooze"></pap
er-button> |
80 </template> | 80 </template> |
81 <paper-button id="link-bug" on-tap="{{ linkBug }}" label="Link Bug"></pape
r-button> | 81 <paper-button id="link-bug" on-tap="{{ linkBug }}" label="Link Bug"></pape
r-button> |
82 <template if="{{ group.bug !== undefined }}"> | 82 <template if="{{ group.bug !== undefined }}"> |
83 <div> | 83 <div> |
84 <a href="{{ group.bug }}"> | 84 <a href="{{ group.bug }}"> |
85 {{ group.bugLabel }}</a> | 85 {{ group.bugLabel }}</a> |
86 </div> | 86 </div> |
87 </template> | 87 </template> |
88 </div> | 88 </div> |
89 | 89 |
90 <paper-dialog heading="Enter bug number" transition="paper-transition-center
" id="bugDialog"> | 90 <paper-dialog heading="Enter bug number" transition="paper-transition-center
" id="bugDialog"> |
91 <paper-input label="Bug# or URL" floatingLabel autofocus id="bug"></paper-
input> | 91 <paper-input label="Bug# or URL" floatingLabel autofocus id="bug"></paper-
input> |
92 <paper-button label="Remove bug link" on-tap="{{ removeBug }}" dismissive
id="dialogRemoveBug"></paper-button> | 92 <paper-button label="Remove bug link" on-tap="{{ removeBug }}" dismissive
id="dialogRemoveBug"></paper-button> |
93 <paper-button label="OK" on-tap="{{ saveBug }}" affirmative id="dialogOk">
</paper-button> | 93 <paper-button label="OK" on-tap="{{ saveBug }}" affirmative id="dialogOk">
</paper-button> |
94 </paper-dialog> | 94 </paper-dialog> |
95 </template> | 95 </template> |
96 <script> | 96 <script> |
97 Polymer({ | 97 Polymer({ |
98 group: null, | 98 group: null, |
99 commitLog: null, | 99 commitLog: null, |
100 tree: '', | 100 tree: '', |
101 _commitList: null, | |
102 | 101 |
103 observe: { | 102 observe: { |
104 group: '_updateCommitList', | 103 group: '_updateCommitList', |
105 commitLog: '_updateCommitList' | 104 commitLog: '_updateCommitList' |
106 }, | 105 }, |
107 | 106 |
108 examine: function() { | 107 examine: function() { |
109 this.fire('ct-examine-failures', this.group); | 108 this.fire('ct-examine-failures', this.group); |
110 }, | 109 }, |
111 | 110 |
112 snooze: function() { | 111 snooze: function() { |
113 this.group.snoozeUntil(Date.now() + 60 * 60 * 1000); | 112 this.group.snoozeUntil(Date.now() + 60 * 60 * 1000); |
114 }, | 113 }, |
115 | 114 |
116 unsnooze: function() { | 115 unsnooze: function() { |
117 this.group.unsnooze(); | 116 this.group.unsnooze(); |
118 }, | 117 }, |
119 | 118 |
120 _updateCommitList: function() { | 119 _updateCommitList: function() { |
121 this._commitList = this.group ? | 120 if (this.group && this.commitLog) |
122 this.group.commitList(this.commitLog) : undefined; | 121 this.group.commitList.update(this.commitLog); |
123 }, | 122 }, |
124 | 123 |
125 linkBug: function() { | 124 linkBug: function() { |
126 this.$.bug.value = this.group.bug; | 125 this.$.bug.value = this.group.bug; |
127 this.$.bugDialog.toggle(); | 126 this.$.bugDialog.toggle(); |
128 }, | 127 }, |
129 | 128 |
130 saveBug: function() { | 129 saveBug: function() { |
131 this.group.setBug(this.$.bug.value); | 130 this.group.setBug(this.$.bug.value); |
132 }, | 131 }, |
133 | 132 |
134 removeBug: function() { | 133 removeBug: function() { |
135 this.group.clearBug(); | 134 this.group.clearBug(); |
136 }, | 135 }, |
137 }); | 136 }); |
138 </script> | 137 </script> |
139 </polymer-element> | 138 </polymer-element> |
OLD | NEW |