Chromium Code Reviews| Index: Tools/GardeningServer/ui/ct-failure-card.html |
| diff --git a/Tools/GardeningServer/ui/ct-failure-card.html b/Tools/GardeningServer/ui/ct-failure-card.html |
| index d2c82dd98852c53ae2c7a54c57c8630007b86d28..efdb781fd73742b179e95272554156cbbb529c4d 100644 |
| --- a/Tools/GardeningServer/ui/ct-failure-card.html |
| +++ b/Tools/GardeningServer/ui/ct-failure-card.html |
| @@ -61,11 +61,16 @@ found in the LICENSE file. |
| flex-direction: column; |
| } |
| + #bugReminder { |
| + font-size: large; |
| + color: red; |
| + } |
| + |
| .snoozed { |
| opacity: 0.5; |
| } |
| </style> |
| - <ct-builder-grid failures="{{ group.failures }}"></ct-builder-grid> |
| + <ct-builder-grid failures="{{ group.failures }}" id="builderGrid"></ct-builder-grid> |
| <div id="failure" class="{{ { snoozed: group.isSnoozed } | tokenList }}"> |
| <ct-test-list tests="{{ group.failures }}" tree="{{ tree }}"></ct-test-list> |
| <ct-commit-list commitList="{{ _commitList }}"></ct-commit-list> |
| @@ -89,6 +94,10 @@ found in the LICENSE file. |
| <paper-dialog heading="Enter bug number" transition="paper-transition-center" id="bugDialog"> |
| <paper-input label="Bug# or URL" floatingLabel autofocus id="bug"></paper-input> |
| + <div><a id="fileBugLink" target="_new" on-click="{{ fileBugClicked }}">File bug</a></div> |
|
ojan
2014/08/26 03:14:17
What's _new do? I've always done _blank.
cbiesinger
2014/09/11 06:24:34
Sigh, I misremembered the name. Fixed.
|
| + <div style="display: hidden" id="bugReminder"> |
|
ojan
2014/08/26 03:14:17
Instead of toggling display with script, just wrap
cbiesinger
2014/09/11 06:24:34
Done.
cbiesinger
2014/09/29 21:18:06
FYI I did this but had to move the template inside
|
| + Remember to enter the new bug number above! |
| + </div> |
| <paper-button label="Remove bug link" on-tap="{{ removeBug }}" dismissive id="dialogRemoveBug"></paper-button> |
| <paper-button label="OK" on-tap="{{ saveBug }}" affirmative id="dialogOk"></paper-button> |
| </paper-dialog> |
| @@ -99,6 +108,9 @@ found in the LICENSE file. |
| commitLog: null, |
| tree: '', |
| _commitList: null, |
| + _fileBugUrl: 'https://code.google.com/p/chromium/issues/entry?' + |
| + 'status=Available&labels=Pri-2,gardening-blink&' + |
| + 'summary=Build%20failure&comment=Build%20is%20broken:%0a', |
|
ojan
2014/08/26 03:14:17
Lets leave the summary out of this. google code ha
cbiesinger
2014/09/11 06:24:34
Done.
|
| observe: { |
| group: '_updateCommitList', |
| @@ -123,7 +135,31 @@ found in the LICENSE file. |
| }, |
| linkBug: function() { |
| + var message = ''; |
|
ojan
2014/08/26 03:14:17
Can you move the function that generates this url
cbiesinger
2014/09/11 06:24:34
I thought about that, but I'm really not sure that
ojan
2014/09/11 23:44:25
Maybe you don't need to move the url generation to
|
| + for (var i = 0; i < this.group.failures.length; ++i) { |
|
ojan
2014/08/26 03:14:17
Here and below, use forEach?
cbiesinger
2014/09/11 06:24:34
Done.
|
| + var failure = this.group.failures[i]; |
| + message += failure.step; |
| + if (failure.testName) { |
| + message += ' ' + failure.testName + '\n'; |
| + message += failure.flakinessDashboardURL(this.tree); |
| + } |
| + message += '\n'; |
| + } |
| + message += '\nRevision range:\n'; |
| + for (i = 0; i < this._commitList.repositories.length; ++i) { |
| + var repository = this._commitList.repositories[i]; |
| + message += repository.name + ' ' + repository.range + '\n'; |
| + } |
| + message += '\nFailing builders:\n'; |
| + for (i = 0; i < this.$.builderGrid.builders.length; ++i) { |
| + var builder = this.$.builderGrid.builders[i]; |
| + message += builder.builder + ': ' + builder.buildUrl + '\n'; |
| + } |
| + |
| this.$.bug.value = this.group.bug; |
| + this.$.fileBugLink.href = this._fileBugUrl + encodeURIComponent(message); |
| + this.$.bugReminder.style.display = 'none'; |
| + this.$.fileBugLink.style.display = ''; |
| this.$.bugDialog.toggle(); |
| }, |
| @@ -134,6 +170,11 @@ found in the LICENSE file. |
| removeBug: function() { |
| this.group.clearBug(); |
| }, |
| + |
| + fileBugClicked: function() { |
| + this.$.bugReminder.style.display = ''; |
| + this.$.fileBugLink.style.display = 'none'; |
| + }, |
| }); |
| </script> |
| </polymer-element> |