Skip to content

Commit

Permalink
Add clarification on no data error message
Browse files Browse the repository at this point in the history
  • Loading branch information
haoming29 committed Jan 10, 2024
1 parent fb07787 commit d7c7344
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web_ui/frontend/components/graphs/Graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default function Graph({getData, options, boxProps, drawer}: GraphProps)
setLoading(false)
if(response.datasets[0].data.length == 0){
let date = new Date(Date.now()).toLocaleTimeString()
setError(`No data returned by database as of ${date}; Plot will auto-refresh`)
setError(`No data returned by database as of ${date}; Plot will auto-refresh. Adjust Graph Settings to set a lower Rate Time Range and Resolution.`)
} else {
setError("")
}
Expand Down Expand Up @@ -130,8 +130,8 @@ export default function Graph({getData, options, boxProps, drawer}: GraphProps)
</Box>
</>
}
<Box display={"flex"} pt={1}>
<Typography m={"auto"} color={"red"} variant={"body2"}>{error}</Typography>
<Box display={"flex"} flexDirection={"column"} pt={1}>
<Typography m={"auto"} color={"red"} variant={"body2"} textAlign={"center"}>{error}</Typography>
</Box>
</Box>
)
Expand Down

0 comments on commit d7c7344

Please sign in to comment.