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

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

Issue 476903003: Add a "Link Bug" button to associate a bug with a failure (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebasd Created 6 years, 4 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
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">
11 <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">
10 13
11 <polymer-element name="ct-failure-card" attributes="group commits tree"> 14 <polymer-element name="ct-failure-card" attributes="group commits tree bug">
12 <template> 15 <template>
13 <style> 16 <style>
14 :host { 17 :host {
15 display: flex; 18 display: flex;
16 } 19 }
17 20
18 /* FIXME: All this paper-button styling should go in a cr-button component so that 21 /* FIXME: All this paper-button styling should go in a cr-button component so that
19 we can use buttons in different places and have them all look the same. */ 22 we can use buttons in different places and have them all look the same. */
20 paper-button { 23 paper-button {
21 -webkit-user-select: none; 24 -webkit-user-select: none;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 <ct-commit-list commitList="{{ _commits() }}"></ct-commit-list> 71 <ct-commit-list commitList="{{ _commits() }}"></ct-commit-list>
69 </div> 72 </div>
70 <div id="buttons"> 73 <div id="buttons">
71 <paper-button id="examine" on-tap="{{ examine }}" label="Examine"></paper- button> 74 <paper-button id="examine" on-tap="{{ examine }}" label="Examine"></paper- button>
72 <template if="{{ !group.isSnoozed }}"> 75 <template if="{{ !group.isSnoozed }}">
73 <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>
74 </template> 77 </template>
75 <template if="{{ group.isSnoozed }}"> 78 <template if="{{ group.isSnoozed }}">
76 <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>
77 </template> 80 </template>
81 <paper-button id="link-bug" on-tap="{{ linkBug }}" label="Link Bug"></pape r-button>
82 <template if="{{ group.bug !== undefined }}">
83 <div>
84 <a href="{{ group.bug }}">
85 {{ group.bugLabel }}</a>
86 </div>
87 </template>
78 </div> 88 </div>
89
90 <paper-dialog heading="Enter bug number" transition="paper-transition-center " id="bugDialog">
91 <paper-input label="Bug# or URL" floatingLabel id="bug"></paper-input>
92 <paper-button label="OK" on-tap="{{ saveBug }}" affirmative autofocus id=" dialogOk"></paper-button>
93 </paper-dialog>
79 </template> 94 </template>
80 <script> 95 <script>
81 Polymer({ 96 Polymer({
82 group: null, 97 group: null,
83 commits: null, 98 commits: null,
84 tree: '', 99 tree: '',
85 100
86 examine: function() { 101 examine: function() {
87 this.fire('ct-examine-failures', this.group); 102 this.fire('ct-examine-failures', this.group);
88 }, 103 },
89 104
90 snooze: function() { 105 snooze: function() {
91 this.group.snoozeUntil(Date.now() + 60 * 60 * 1000); 106 this.group.snoozeUntil(Date.now() + 60 * 60 * 1000);
92 }, 107 },
93 108
94 unsnooze: function() { 109 unsnooze: function() {
95 this.group.unsnooze(); 110 this.group.unsnooze();
96 }, 111 },
97 112
98 _commits: function() { 113 _commits: function() {
99 if (!this.group) 114 if (!this.group)
100 return undefined; 115 return undefined;
101 return this.group.commitList(this.commits); 116 return this.group.commitList(this.commits);
102 } 117 },
118
119 linkBug: function() {
120 this.$.bug.value = this.group.bug;
121 this.$.bugDialog.toggle();
122 },
123
124 saveBug: function() {
125 this.group.setBug(this.$.bug.value);
126 },
103 }); 127 });
104 </script> 128 </script>
105 </polymer-element> 129 </polymer-element>
OLDNEW
« no previous file with comments | « Tools/GardeningServer/test/unit-tests.html ('k') | Tools/GardeningServer/ui/ct-failure-card-tests.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698