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

Unified Diff: golden/res/imp/failures-sk.html

Issue 1401563003: Enable clear/purge for failed digests (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Added unit test to FileDiffStore Created 5 years, 2 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
« no previous file with comments | « golden/go/skiacorrectness/main2.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: golden/res/imp/failures-sk.html
diff --git a/golden/res/imp/failures-sk.html b/golden/res/imp/failures-sk.html
index 03f4f7d73fce7daa22b8702f5904bf402e5549a1..93af272d4514db08110f003ec9c69c10f31ae392 100644
--- a/golden/res/imp/failures-sk.html
+++ b/golden/res/imp/failures-sk.html
@@ -54,8 +54,8 @@
<td class="dateTimeValue">{{entry.ts | _toLocalDate}}</td>
<td class="digestValue"><a href="/img/images/{{entry.digest}}.png" target="_blank">{{entry.digest}}</a></td>
<td class="reasonValue">{{entry.reason}}</td>
- <td><paper-button on-click="{{clearHandler}}" data-entryid="{{entry.id}}" title="Remove from server cache">Clear</paper-button></td>
- <td><paper-button on-click="{{purgeHandler}}" data-entryid="{{entry.id}}" title="Remove from cache and Google storage">Purge</paper-button></td>
+ <td><paper-button on-click="{{clearHandler}}" data-digestid="{{entry.digest}}" title="Remove from server cache">Clear</paper-button></td>
+ <td><paper-button on-click="{{purgeHandler}}" data-digestid="{{entry.digest}}" title="Remove from cache and Google storage">Purge</paper-button></td>
</tr>
</template>
</table>
@@ -74,12 +74,24 @@
// Load or reload the listing.
// TODO(stephana): _reload will be called after a clear/purge to refresh
- // the list of failures.
+ // the list of failures.
_reload: function() {
var URL = '_/failure';
this._handleServerResponse(sk.get(URL));
},
+ _clear: function(event, gsPurge) {
+ var URL = '_/failure/clear';
+ if (gsPurge) {
+ URL += "?purge=true"
+ }
+ var digests = [ event.target.dataset.digestid ];
+ this._handleServerResponse(sk.post(URL, JSON.stringify(digests)));
+ },
+
+ clearHandler: function(event) { this._clear(event, false); },
+ purgeHandler: function(event) { this._clear(event, true); },
+
_handleServerResponse: function(promise) {
promise.then(JSON.parse).then(function(json) {
this.failureEntries = json.failures;
« no previous file with comments | « golden/go/skiacorrectness/main2.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698