Chromium Code Reviews| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 58 | 58 |
| 59 #buttons { | 59 #buttons { |
| 60 display: flex; | 60 display: flex; |
| 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 builderList="{{ _builderList }}"></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="{{ group.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 }}"> |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 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 builderList: null, | |
| 100 tree: '', | 101 tree: '', |
| 101 | 102 |
| 102 observe: { | 103 observe: { |
| 103 group: '_updateCommitList', | 104 group: '_updateCommitList', |
| 104 commitLog: '_updateCommitList' | 105 commitLog: '_updateCommitList', |
| 106 'group.failures': '_updateBuilderList', | |
|
ojan
2014/09/05 01:18:04
Woah. Didn't realize you could do this.
cbiesinger
2014/09/06 00:25:56
Yeah, also $.foo.bar for polymer elements in your
| |
| 105 }, | 107 }, |
| 106 | 108 |
| 107 examine: function() { | 109 examine: function() { |
| 108 this.fire('ct-examine-failures', this.group); | 110 this.fire('ct-examine-failures', this.group); |
| 109 }, | 111 }, |
| 110 | 112 |
| 111 snooze: function() { | 113 snooze: function() { |
| 112 this.group.snoozeUntil(Date.now() + 60 * 60 * 1000); | 114 this.group.snoozeUntil(Date.now() + 60 * 60 * 1000); |
| 113 }, | 115 }, |
| 114 | 116 |
| 115 unsnooze: function() { | 117 unsnooze: function() { |
| 116 this.group.unsnooze(); | 118 this.group.unsnooze(); |
| 117 }, | 119 }, |
| 118 | 120 |
| 119 _updateCommitList: function() { | 121 _updateCommitList: function() { |
| 120 if (this.group && this.commitLog) | 122 if (this.group && this.commitLog) |
| 121 this.group.commitList.update(this.commitLog); | 123 this.group.commitList.update(this.commitLog); |
| 122 }, | 124 }, |
| 123 | 125 |
| 126 _updateBuilderList: function() { | |
| 127 this._builderList = new CTBuilderList(this.group.failures); | |
|
ojan
2014/09/05 01:18:04
I think we still have a bug where we won't update
cbiesinger
2014/09/06 00:25:56
Oy, that's true, but I have no idea how to fix tha
| |
| 128 }, | |
| 129 | |
| 124 linkBug: function() { | 130 linkBug: function() { |
| 125 this.$.bug.value = this.group.bug; | 131 this.$.bug.value = this.group.bug; |
| 126 this.$.bugDialog.toggle(); | 132 this.$.bugDialog.toggle(); |
| 127 }, | 133 }, |
| 128 | 134 |
| 129 saveBug: function() { | 135 saveBug: function() { |
| 130 this.group.setBug(this.$.bug.value); | 136 this.group.setBug(this.$.bug.value); |
| 131 }, | 137 }, |
| 132 | 138 |
| 133 removeBug: function() { | 139 removeBug: function() { |
| 134 this.group.clearBug(); | 140 this.group.clearBug(); |
| 135 }, | 141 }, |
| 136 }); | 142 }); |
| 137 </script> | 143 </script> |
| 138 </polymer-element> | 144 </polymer-element> |
| OLD | NEW |