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

Unified Diff: Tools/GardeningServer/model/ct-failure-group.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/model/ct-failure-group.html
diff --git a/Tools/GardeningServer/model/ct-failure-group.html b/Tools/GardeningServer/model/ct-failure-group.html
new file mode 100644
index 0000000000000000000000000000000000000000..9642d2f0de0c53659b01c3cd5d8cd2224a0e9e0f
--- /dev/null
+++ b/Tools/GardeningServer/model/ct-failure-group.html
@@ -0,0 +1,28 @@
+<!--
+Copyright 2014 The Chromium Authors. All rights reserved.
+Use of this source code is governed by a BSD-style license that can be
+found in the LICENSE file.
+-->
+
+<script>
+function CTFailureGroup(key, failures, snoozeTime) {
+ this.key = key;
+ this.failures = failures;
+ this.snoozeTime = snoozeTime;
+}
+
+
ojan 2014/08/06 04:03:01 Just one line break
dstockwell 2014/08/06 06:55:12 Done.
+CTFailureGroup.prototype = {
ojan 2014/08/06 04:03:01 For better or worse, we've been using the style wh
dstockwell 2014/08/06 06:55:12 Done.
+ get isSnoozed() {
ojan 2014/08/06 04:03:01 IMO getters make for confusing code. More importan
dstockwell 2014/08/06 06:55:13 Done.
+ return Date.now() < this.snoozeTime;
+ },
+ snoozeUntil: function(time) {
+ // FIXME: Post snooze message to frontend.
+ this.snoozeTime = time;
ojan 2014/08/06 04:03:01 I think it makes sense to implement this increment
dstockwell 2014/08/06 06:55:13 Done.
+ Object.getNotifier(this).notify({
ojan 2014/08/06 04:03:01 Why did you need to do this? This might be working
dstockwell 2014/08/06 06:55:13 Yes, this allows the binding to the getter to be r
+ type: 'updated',
+ name: 'isSnoozed',
+ });
+ }
+};
+</script>
« no previous file with comments | « no previous file | Tools/GardeningServer/ui/ct-failure-analyzer.html » ('j') | Tools/GardeningServer/ui/ct-failure-stream.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698