Merge branch 'main' of github.com:Pwnzer0tt1/firegex
This commit is contained in:
@@ -45,6 +45,8 @@ Heres a brief description about the firegex structure:
|
||||
- [Frontend (React)](frontend/README.md)
|
||||
- [Backend (FastAPI + C++)](backend/README.md)
|
||||
|
||||
More specific information about how Firegex works, and in particular about the nfproxy module, are available here (in italian only): [https://github.com/domysh/engineering-thesis](https://github.com/domysh/engineering-thesis) (PDF in the release attachments)
|
||||
|
||||

|
||||
|
||||
### Main Points of Firegex
|
||||
|
||||
@@ -21,7 +21,25 @@ function App() {
|
||||
const [reqError, setReqError] = useState<undefined|string>()
|
||||
const [error, setError] = useState<string|null>()
|
||||
const [loadinBtn, setLoadingBtn] = useState(false);
|
||||
|
||||
const queryClient = useQueryClient()
|
||||
|
||||
useEffect(()=>{
|
||||
socketio.auth = { token: localStorage.getItem("access_token") }
|
||||
socketio.connect()
|
||||
getStatus()
|
||||
socketio.on("update", (data) => {
|
||||
queryClient.invalidateQueries({ queryKey: data })
|
||||
})
|
||||
socketio.on("connect_error", (err) => {
|
||||
errorNotify("Socket.Io connection failed! ",`Error message: [${err.message}]`)
|
||||
getStatus()
|
||||
});
|
||||
return () => {
|
||||
socketio.off("update")
|
||||
socketio.off("connect_error")
|
||||
socketio.disconnect()
|
||||
}
|
||||
},[])
|
||||
|
||||
const getStatus = () =>{
|
||||
getstatus().then( res =>{
|
||||
@@ -140,26 +158,6 @@ function App() {
|
||||
|
||||
const PageRouting = ({ getStatus }:{ getStatus:()=>void }) => {
|
||||
|
||||
const queryClient = useQueryClient()
|
||||
|
||||
useEffect(()=>{
|
||||
socketio.auth = { token: localStorage.getItem("access_token") }
|
||||
socketio.connect()
|
||||
getStatus()
|
||||
socketio.on("update", (data) => {
|
||||
queryClient.invalidateQueries({ queryKey: data })
|
||||
})
|
||||
socketio.on("connect_error", (err) => {
|
||||
errorNotify("Socket.Io connection failed! ",`Error message: [${err.message}]`)
|
||||
getStatus()
|
||||
});
|
||||
return () => {
|
||||
socketio.off("update")
|
||||
socketio.off("connect_error")
|
||||
socketio.disconnect()
|
||||
}
|
||||
},[])
|
||||
|
||||
return <Routes>
|
||||
<Route element={<MainLayout><Outlet /></MainLayout>}>
|
||||
<Route path="nfregex" element={<NFRegex><Outlet /></NFRegex>} >
|
||||
|
||||
Reference in New Issue
Block a user