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

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: 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 15 matching lines...) Expand all
37 box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3); 40 box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
38 } 41 }
39 42
40 paper-button:active, paper-button:hover { 43 paper-button:active, paper-button:hover {
41 background: #f8f8f8; 44 background: #f8f8f8;
42 border-color: #c6c6c6; 45 border-color: #c6c6c6;
43 box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.1); 46 box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.1);
44 color: #222; 47 color: #222;
45 } 48 }
46 49
47 ct-builder-grid { 50 #builder-column {
48 margin-right: 10px; 51 margin-right: 10px;
49 width: 250px; 52 width: 250px;
50 } 53 }
51 54
52 #failure { 55 #failure {
53 flex: 1; 56 flex: 1;
54 } 57 }
55 58
56 #buttons { 59 #buttons {
57 display: flex; 60 display: flex;
58 flex-direction: column; 61 flex-direction: column;
59 } 62 }
60 63
61 .snoozed { 64 .snoozed {
62 opacity: 0.5; 65 opacity: 0.5;
63 } 66 }
64 </style> 67 </style>
65 <ct-builder-grid failures="{{ group.failures }}"></ct-builder-grid> 68 <div id="builder-column">
ojan 2014/08/15 04:53:39 This is leftover from a previous iteration of the
cbiesinger 2014/08/16 00:46:15 Yes, changed back.
69 <ct-builder-grid failures="{{ group.failures }}"></ct-builder-grid>
70 </div>
66 <div id="failure" class="{{ { snoozed: group.isSnoozed } | tokenList }}"> 71 <div id="failure" class="{{ { snoozed: group.isSnoozed } | tokenList }}">
67 <ct-test-list tests="{{ group.failures }}" tree="{{ tree }}"></ct-test-lis t> 72 <ct-test-list tests="{{ group.failures }}" tree="{{ tree }}"></ct-test-lis t>
68 <ct-commit-list first="{{ group.failures[0].lastPassingRevisions }}" 73 <ct-commit-list first="{{ group.failures[0].lastPassingRevisions }}"
69 last="{{ group.failures[0].firstFailingRevisions }}" 74 last="{{ group.failures[0].firstFailingRevisions }}"
70 commits="{{ commits }}"></ct-commit-list> 75 commits="{{ commits }}"></ct-commit-list>
71 </div> 76 </div>
72 <div id="buttons"> 77 <div id="buttons">
73 <paper-button id="examine" on-tap="{{ examine }}" label="Examine"></paper- button> 78 <paper-button id="examine" on-tap="{{ examine }}" label="Examine"></paper- button>
74 <template if="{{ !group.isSnoozed }}"> 79 <template if="{{ !group.isSnoozed }}">
75 <paper-button id="snooze" on-tap="{{ snooze }}" label="Snooze"></paper-b utton> 80 <paper-button id="snooze" on-tap="{{ snooze }}" label="Snooze"></paper-b utton>
76 </template> 81 </template>
77 <template if="{{ group.isSnoozed }}"> 82 <template if="{{ group.isSnoozed }}">
78 <paper-button id="snooze" on-tap="{{ unsnooze }}" label="Unsnooze"></pap er-button> 83 <paper-button id="snooze" on-tap="{{ unsnooze }}" label="Unsnooze"></pap er-button>
79 </template> 84 </template>
85 <paper-button id="link-bug" on-tap="{{ linkBug }}" label="Link Bug"></pape r-button>
86 <template if="{{ group.hasBug }}">
87 <div>
88 <a href="http://crbug.com/{{ group.annotation.bugNumber }}">
89 Bug {{ group.annotation.bugNumber }}</a>
90 </div>
91 </template>
80 </div> 92 </div>
93
94 <paper-dialog heading="Enter bug number" transition="paper-transition-center " id="bugDialog">
95 <paper-input label="Bug#" type="number" floatingLabel min="10000" id="bugN umber"></paper-input>
ojan 2014/08/15 04:53:39 Why have a min?
cbiesinger 2014/08/16 00:46:15 To make sure that people use stuff that looks like
96 <paper-button label="OK" on-tap="{{ saveBug }}" affirmative autofocus id=" dialogOK"></paper-button>
ojan 2014/08/15 04:53:39 Nit: I prefer the dialogOk style to avoid abominat
ojan 2014/08/15 04:53:40 Nit: I prefer the dialogOk style to avoid abominat
cbiesinger 2014/08/16 00:46:15 Done.
97 </paper-dialog>
81 </template> 98 </template>
82 <script> 99 <script>
83 Polymer({ 100 Polymer({
84 group: null, 101 group: null,
85 commits: {}, 102 commits: {},
86 tree: '', 103 tree: '',
87 104
88 examine: function() { 105 examine: function() {
89 this.fire('ct-examine-failures', this.group); 106 this.fire('ct-examine-failures', this.group);
90 }, 107 },
91 108
92 snooze: function() { 109 snooze: function() {
93 this.group.snoozeUntil(Date.now() + 60 * 60 * 1000); 110 this.group.snoozeUntil(Date.now() + 60 * 60 * 1000);
94 }, 111 },
95 112
96 unsnooze: function() { 113 unsnooze: function() {
97 this.group.unsnooze(); 114 this.group.unsnooze();
98 }, 115 },
116
117 linkBug: function() {
118 this.$.bugNumber.value = this.group.annotation.bugNumber;
119 this.$.bugDialog.toggle();
120 },
121
122 saveBug: function() {
123 this.group.setBug(this.$.bugNumber.value);
124 },
99 }); 125 });
100 </script> 126 </script>
101 </polymer-element> 127 </polymer-element>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698