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

Unified Diff: go/src/infra/appengine/sheriff-o-matic/elements/som-app.html

Issue 2094343004: SoM: Fixed unwanted autorefreshing bug. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698