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 32e63b5957b575f938526b39f8fc86ddf5654c18..6d3f37de2b439a97a7fefc96f45bd4e458c0508f 100644 |
--- a/Tools/GardeningServer/ui/ct-failure-card.html |
+++ b/Tools/GardeningServer/ui/ct-failure-card.html |
@@ -7,8 +7,11 @@ found in the LICENSE file. |
<link rel="import" href="ct-builder-grid.html"> |
<link rel="import" href="ct-commit-list.html"> |
<link rel="import" href="ct-test-list.html"> |
+<link rel="import" href="../bower_components/paper-dialog/paper-dialog.html"> |
+<link rel="import" href="../bower_components/paper-dialog/paper-dialog-transition.html"> |
+<link rel="import" href="../bower_components/paper-input/paper-input.html"> |
-<polymer-element name="ct-failure-card" attributes="group commits tree"> |
+<polymer-element name="ct-failure-card" attributes="group commits tree bug"> |
<template> |
<style> |
:host { |
@@ -44,7 +47,7 @@ found in the LICENSE file. |
color: #222; |
} |
- ct-builder-grid { |
+ #builder-column { |
margin-right: 10px; |
width: 250px; |
} |
@@ -62,7 +65,9 @@ found in the LICENSE file. |
opacity: 0.5; |
} |
</style> |
- <ct-builder-grid failures="{{ group.failures }}"></ct-builder-grid> |
+ <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.
|
+ <ct-builder-grid failures="{{ group.failures }}"></ct-builder-grid> |
+ </div> |
<div id="failure" class="{{ { snoozed: group.isSnoozed } | tokenList }}"> |
<ct-test-list tests="{{ group.failures }}" tree="{{ tree }}"></ct-test-list> |
<ct-commit-list first="{{ group.failures[0].lastPassingRevisions }}" |
@@ -77,7 +82,19 @@ found in the LICENSE file. |
<template if="{{ group.isSnoozed }}"> |
<paper-button id="snooze" on-tap="{{ unsnooze }}" label="Unsnooze"></paper-button> |
</template> |
+ <paper-button id="link-bug" on-tap="{{ linkBug }}" label="Link Bug"></paper-button> |
+ <template if="{{ group.hasBug }}"> |
+ <div> |
+ <a href="http://crbug.com/{{ group.annotation.bugNumber }}"> |
+ Bug {{ group.annotation.bugNumber }}</a> |
+ </div> |
+ </template> |
</div> |
+ |
+ <paper-dialog heading="Enter bug number" transition="paper-transition-center" id="bugDialog"> |
+ <paper-input label="Bug#" type="number" floatingLabel min="10000" id="bugNumber"></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
|
+ <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.
|
+ </paper-dialog> |
</template> |
<script> |
Polymer({ |
@@ -96,6 +113,15 @@ found in the LICENSE file. |
unsnooze: function() { |
this.group.unsnooze(); |
}, |
+ |
+ linkBug: function() { |
+ this.$.bugNumber.value = this.group.annotation.bugNumber; |
+ this.$.bugDialog.toggle(); |
+ }, |
+ |
+ saveBug: function() { |
+ this.group.setBug(this.$.bugNumber.value); |
+ }, |
}); |
</script> |
</polymer-element> |