Chromium Code Reviews| Index: go/src/infra/appengine/sheriff-o-matic/elements/som-app.html |
| diff --git a/go/src/infra/appengine/sheriff-o-matic/elements/som-app.html b/go/src/infra/appengine/sheriff-o-matic/elements/som-app.html |
| index d51c993027408ddbf265bdb579ec4da8f9d59d8a..c9929fc6aa21c2f7eb9d64902d2bcd7ffa4bdb31 100644 |
| --- a/go/src/infra/appengine/sheriff-o-matic/elements/som-app.html |
| +++ b/go/src/infra/appengine/sheriff-o-matic/elements/som-app.html |
| @@ -259,6 +259,10 @@ |
| _path: { |
| type: String, |
| }, |
| + _refreshEnabled: { |
| + type: Boolean, |
| + computed: '_computeRefreshEnabled(_path)', |
| + }, |
| _refreshPosition: { |
| type: Number, |
| value: function() { return 0; }, |
| @@ -295,6 +299,9 @@ |
| ////////////////////// Refresh /////////////////////////// |
| _refresh: function() { |
| + if (!this._refreshEnabled) { |
| + return; |
| + } |
| this._refreshPosition = this.$.mainHeaderPanel.$.mainContainer.scrollTop; |
| this.$.annotations.generateRequest(); |
| this._alertsGroupsChanged(this._alertsGroups); |
| @@ -329,6 +336,10 @@ |
| return [tree]; |
| }, |
| + _computeRefreshEnabled: function(path) { |
| + return this._computeSelectedPage(path) == "alertsList"; |
|
martiniss
2016/06/27 23:40:13
why don't you just depend on the selected page, in
|
| + }, |
| + |
| _computeSelectedPage: function(path) { |
| let pathParts = path.split('/'); |
| if (pathParts.length < 2) { |