Skip to content

Commit

Permalink
FE: watcher - remove 'top'
Browse files Browse the repository at this point in the history
  • Loading branch information
andreipradan committed Feb 19, 2025
1 parent ce161c2 commit 54ea1d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
15 changes: 0 additions & 15 deletions frontend/src/app/commands/Watchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const Watchers = () => {
const [logLevel, setLogLevel] = useState(null);
const [name, setName] = useState("");
const [selector, setSelector] = useState("");
const [top, setTop] = useState(selectedItem?.top || true);
const [url, setUrl] = useState("");

const [latest, setLatest] = useState(null);
Expand All @@ -55,7 +54,6 @@ const Watchers = () => {
setName(selectedItem.name)
setRequest(JSON.stringify(selectedItem.request, null, "\t"))
setSelector(selectedItem.selector)
setTop(selectedItem.top)
setUrl(selectedItem.url)
}
}, [selectedItem]);
Expand Down Expand Up @@ -95,7 +93,6 @@ const Watchers = () => {
setName("")
setRequest("{}")
setSelector("")
setTop(true)
setUrl("")
}
const closeModal = () => {
Expand All @@ -112,7 +109,6 @@ const Watchers = () => {
setName(watcher.name)
setRequest(JSON.stringify(watcher.request, null, "\t"))
setSelector(watcher.selector)
setTop(watcher.top)
setUrl(watcher.url)
}

Expand Down Expand Up @@ -414,15 +410,6 @@ const Watchers = () => {
onChange={e => setSelector(e.target.value)}
/>
</Form.Group>
<Form.Group className="mb-3">
<Form.Check
type="switch"
id="top-switch"
label="Top search"
checked={top}
onChange={() => {setTop(!top)}}
/>
</Form.Group>
<Form.Group className="mb-3">
<Form.Label>Latest data</Form.Label>
<AceEditor
Expand Down Expand Up @@ -520,7 +507,6 @@ const Watchers = () => {
name,
request: JSON.parse(request.replace(/[\r\n\t]/g, "")),
selector,
top,
url,
}))
}}>
Expand All @@ -539,7 +525,6 @@ const Watchers = () => {
name,
request: JSON.parse(request.replace(/[\r\n\t]/g, "")),
selector,
top,
url,
}))
}}>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/redux/authSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export const authSlice = createSlice({
},
logout: (state, action) => {
state.errors = null;
state.redirectUrl = window.location.pathname
if (window.location.pathname !== '/login')
state.redirectUrl = window.location.pathname
state.token = null;
state.user = null;
Cookie.remove('expires_at');
Expand Down

0 comments on commit 54ea1d5

Please sign in to comment.