-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[F] SummitData provider and basic flux query #333
Conversation
|
||
const { temperature0: temperature, relativeHumidity, windSpeed } = data; | ||
|
||
const temperatureData = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data that will need to be converted is grouped together
lib/api/efd.js
Outdated
queryApi.queryRows( | ||
flux`from(bucket: "${bucket}") | ||
|> range(start: -60s) | ||
|> filter(fn: (r) => r["_measurement"] == "lsst.sal.ESS.temperature" or r["_measurement"] == "lsst.sal.ESS.relativeHumidity" or r["_measurement"] == "lsst.sal.ESS.airFlow") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trimmed down to just the current data that we need: temperature, humidity, wind, and need to get precipitation
A preview of this PR will be available at https://epo8108-dot-skyviewer.appspot.com until the request is closed. |
contexts/SummitData.js
Outdated
useEffect(() => { | ||
setLoading(true); | ||
|
||
Promise.allSettled([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use Promise.allSettled so that one single failure won't disrupt the entire parallel fetch and we can keep it in loading
status while they all catch up
const { tempUnit, windspeedUnit } = useWeatherUnit(); | ||
const { currentData: data, loading = true } = useSummitData(); | ||
|
||
if (loading && !data) return <Loader isVisible={true} />; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since loading
won't go to false
until all complete, we'll need to check in each container if the provider is loading and the data hasn't been set yet. Or we could go to individualized loading statuses but I think this is ok as-is
A preview of this PR will be available at https://epo8108-dot-skyviewer.appspot.com until the request is closed. |
1 similar comment
A preview of this PR will be available at https://epo8108-dot-skyviewer.appspot.com until the request is closed. |
A preview of this PR will be available at https://epo8108-dot-skyviewer.appspot.com until the request is closed. |
A preview of this PR will be available at https://epo8108-dot-skyviewer.appspot.com until the request is closed. |
3 similar comments
A preview of this PR will be available at https://epo8108-dot-skyviewer.appspot.com until the request is closed. |
A preview of this PR will be available at https://epo8108-dot-skyviewer.appspot.com until the request is closed. |
A preview of this PR will be available at https://epo8108-dot-skyviewer.appspot.com until the request is closed. |
A preview of this PR will be available at https://epo8108-dot-skyviewer.appspot.com until the request is closed. |
c39e0ea
to
a340e73
Compare
de9c6d4
to
f00a16e
Compare
A preview of this PR will be available at https://epo8108-dot-skyviewer.appspot.com until the request is closed. |
1 similar comment
A preview of this PR will be available at https://epo8108-dot-skyviewer.appspot.com until the request is closed. |
A preview of this PR will be available at https://epo8108-dot-skyviewer.appspot.com until the request is closed. |
A preview of this PR will be available at https://epo8108-dot-skyviewer.appspot.com until the request is closed. |
A preview of this PR will be available at https://epo8108-dot-skyviewer.appspot.com until the request is closed. |
A preview of this PR will be available at https://epo8108-dot-skyviewer.appspot.com until the request is closed. |
ee4b4b8
to
54844f9
Compare
A preview of this PR will be available at https://epo8108-dot-skyviewer.appspot.com until the request is closed. |
a9a2f62
to
9eb4e22
Compare
A preview of this PR will be available at https://epo8108-dot-skyviewer.appspot.com until the request is closed. |
1 similar comment
A preview of this PR will be available at https://epo8108-dot-skyviewer.appspot.com until the request is closed. |
A preview of this PR will be available at https://epo8108-dot-skyviewer.appspot.com until the request is closed. |
No description provided.