mirror of
https://github.com/openziti/zrok.git
synced 2025-01-08 23:20:04 +01:00
always instantly load the overview (#14)
This commit is contained in:
parent
5a007f2401
commit
d6cad21f18
@ -13,13 +13,28 @@ const Network = () => {
|
||||
|
||||
useEffect(() => {
|
||||
let mounted = true
|
||||
let interval = setInterval(() => {
|
||||
metadata.overview().then(resp => {
|
||||
metadata.overview().then(resp => {
|
||||
if(mounted) {
|
||||
setOverview(resp.data)
|
||||
|
||||
let g = buildGraph(resp.data)
|
||||
setNodes(getLayout(g))
|
||||
setEdges(g.edges)
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
let mounted = true
|
||||
let interval = setInterval(() => {
|
||||
metadata.overview().then(resp => {
|
||||
if(mounted) {
|
||||
setOverview(resp.data)
|
||||
|
||||
let g = buildGraph(resp.data)
|
||||
setNodes(getLayout(g))
|
||||
setEdges(g.edges)
|
||||
}
|
||||
})
|
||||
}, 1000)
|
||||
return () => {
|
||||
|
Loading…
Reference in New Issue
Block a user