Observe change object to handle refresh The "ready()" function isn't quite right; it has been noted that when you navigate between changes the Zuul Summary tab isn't updating and you need a full refresh. I think what we should be doing is observing the change property and building the table in that handler. Change-Id: Id3410c28d2cd8fdb08fc14d755c43f1d2015eaa5
diff --git a/zuul-results-summary/zuul-results-summary.js b/zuul-results-summary/zuul-results-summary.js index 9e3f687..ec92202 100644 --- a/zuul-results-summary/zuul-results-summary.js +++ b/zuul-results-summary/zuul-results-summary.js
@@ -26,7 +26,10 @@ */ static get properties() { return { - change: Object, + change: { + type: Object, + observer: '_changeChanged' + }, revision: Object, }; } @@ -148,10 +151,8 @@ return [status, pipeline]; } - /** ready function */ - ready() { - super.ready(); - + /** Change Modified */ + _changeChanged(change, oldChange) { /* * change-view-tab-content gets passed ChangeInfo object [1], * registered in the property "change". We walk the list of @@ -180,7 +181,7 @@ * [1] https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#change-info */ this.__table = []; - this.change.messages.forEach(message => { + change.messages.forEach(message => { if (! (this._match_message_via_tag(message) || this._match_message_via_regex(message))) { return;