summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2020-05-06 07:59:59 -0500
committerMonty Taylor <mordred@inaugust.com>2020-05-06 08:02:46 -0500
commit72625b9af8140e85e8295ca331d40f2c09aceb90 (patch)
treeb837d79d5ff95fd1621c784c69f59f551ed2a3aa
parent29cdcf147d8ed18c0f87231455595cf987e674b8 (diff)
downloadzuul-72625b9af8140e85e8295ca331d40f2c09aceb90.tar.gz
Tie status filter text to pathname
When switching between https://zuul.opendev.org/t/zuul/status and https://zuul.opendev.org/t/openstack/status, the filter-text comes with me. However, the zuul tenant does not have a system-config repo nor does the openstack tenant have a nodepool repo, so it's a little silly. We don't use these values anywhere else, so scope them to a path. Change-Id: I8eeb3132298d4803481388ed7f4200cbb003b990
-rw-r--r--web/src/pages/Status.jsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/web/src/pages/Status.jsx b/web/src/pages/Status.jsx
index 2328ccadb..ad169e556 100644
--- a/web/src/pages/Status.jsx
+++ b/web/src/pages/Status.jsx
@@ -77,8 +77,8 @@ class StatusPage extends Refreshable {
this.visibilityChangeEvent, this.visibilityListener, false)
}
- setCookie (name, value) {
- document.cookie = name + '=' + value + '; path=/'
+ setCookie (name, value, pathname) {
+ document.cookie = name + '=' + value + '; path=' + pathname
}
updateData = (force) => {
@@ -114,7 +114,7 @@ class StatusPage extends Refreshable {
setFilter = (filter) => {
this.filter.value = filter
this.setState({filter: filter})
- this.setCookie('zuul_filter_string', filter)
+ this.setCookie('zuul_filter_string', filter, window.location.pathname)
}
handleKeyPress = (e) => {
@@ -127,7 +127,7 @@ class StatusPage extends Refreshable {
handleCheckBox = (e) => {
this.setState({expanded: e.target.checked})
- this.setCookie('zuul_expand_by_default', e.target.checked)
+ this.setCookie('zuul_expand_by_default', e.target.checked, '/')
}
loadState = () => {