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

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: Changed to use variable directly. 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..81d653669736f398f67f7279cd39599ab053c231 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(_selectedPage)',
+ },
_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(selectedPage) {
+ return selectedPage == "alertsList";
+ },
+
_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