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
This commit is contained in:
parent
29cdcf147d
commit
72625b9af8
|
@ -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 = () => {
|
||||
|
|
Loading…
Reference in New Issue