Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Side by Side Diff: Tools/GardeningServer/ui/ct-failure-card.html

Issue 541123002: Move builderList creation to ct-failure-card (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: re-add builderList to Polymer() Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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>
OLDNEW
« no previous file with comments | « Tools/GardeningServer/ui/ct-builder-grid.html ('k') | Tools/GardeningServer/ui/test/ct-builder-grid-tests.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698