Chromium Code Reviews| 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> |