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

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

Issue 448503003: Adds a snooze button to the sheriff-o-matic ui (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 side-by-side diff with in-line comments
Download patch
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 dedd6d9cdc9585687a3b360765e3cb8a4e5c6968..8c97f93bb4eaa84060e37d1173b68a8da4e5eb6d 100644
--- a/Tools/GardeningServer/ui/ct-failure-card.html
+++ b/Tools/GardeningServer/ui/ct-failure-card.html
@@ -8,7 +8,7 @@ found in the LICENSE file.
<link rel="import" href="ct-commit-list.html">
<link rel="import" href="ct-test-list.html">
-<polymer-element name="ct-failure-card" attributes="failures commits tree">
+<polymer-element name="ct-failure-card" attributes="group commits tree">
<template>
<style>
:host {
@@ -52,27 +52,41 @@ found in the LICENSE file.
flex: 1;
}
- #examine {
+ #examine, #snooze {
align-self: flex-start;
}
</style>
- <ct-builder-grid failures="{{ failures }}"></ct-builder-grid>
+ <ct-builder-grid failures="{{ group.failures }}"></ct-builder-grid>
<div class="failure">
- <ct-test-list tests="{{ failures }}" tree="{{ tree }}"></ct-test-list>
- <ct-commit-list first="{{ failures[0].lastPassingRevisions }}"
- last="{{ failures[0].firstFailingRevisions }}"
+ <ct-test-list tests="{{ group.failures }}" tree="{{ tree }}"></ct-test-list>
+ <ct-commit-list first="{{ group.failures[0].lastPassingRevisions }}"
+ last="{{ group.failures[0].firstFailingRevisions }}"
commits="{{ commits }}"></ct-commit-list>
</div>
<paper-button id="examine" on-tap="{{ examine }}">Examine</paper-button>
+ <template if="{{ !group.isSnoozed }}">
+ <paper-button id="snooze" on-tap="{{ snooze }}">Snooze</paper-button>
+ </template>
+ <template if="{{ group.isSnoozed }}">
+ <paper-button id="snooze" on-tap="{{ unsnooze }}">Unsnooze</paper-button>
+ </template>
</template>
<script>
Polymer({
- failures: [],
+ group: null,
commits: {},
tree: '',
examine: function() {
- this.fire('ct-examine-failures', this.failures);
+ this.fire('ct-examine-failures', this.group);
+ },
+
+ snooze: function() {
+ this.group.snoozeUntil(Date.now() + 60 * 60 * 1000);
+ },
+
+ unsnooze: function() {
+ this.group.snoozeUntil(null);
},
});
</script>

Powered by Google App Engine
This is Rietveld 408576698