-
Notifications
You must be signed in to change notification settings - Fork 133
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
Remove selectedEndTime.max #201
Remove selectedEndTime.max #201
Conversation
@ryanbrainard thanks for the contribution! could you please attach screenshot or describe the effect after your change(removing maxTime)? It would be great if we have the final fix before we approve/merge anything, only removing maxTime wouldn't fix the issue described, right? |
@mengyaoyang11 Thanks for the quick response.
The effect is that a max end time is no longer enforced. This means that the error reported in #194 no longer happens. There's not really anything to screenshot in the UI since it's removing the error, but here it is in the HTML at runtime: Before: After: Note, I believe the reason there was difficulty consistently reproducing #194 and #167 is because of timezones. For users in the western hemisphere (UTC-), the max would have been in the future so they would not see the problem, but for users (like me and @xcrezd) in the eastern hemisphere (UTC+) the max would be in the past causing the problem reported. As I mentioned above, while we could fix the timezone offset problem, having a max time isn't really needed, and even if we did, it doesn't make sense to do on the client side. If a user chooses a time in the future, then the query should still work. In fact this could be helpful to do on purpose to avoid having to click "Now" to get the latest data.
This is the final fix and should address the issue. The issue was happening client side with browser field validation. |
I noticed the Updating webfiles folder section of the readme that says to run
cc: @annelausf (last edit to |
@ryanbrainard got it, thanks for the explanation, ran locally and the fix removed maxTime totally, so I am okay to approve/merge your changes, Thanks! For updating bindata.go file, I think all you need to do is to run |
Thanks for trying it out!
Yes, that's what I did, and it does seem ok for this PR. My concern was that there are multiple forks and versions of go-bindata all with different formats, so wanted to make I was using the right one. |
@ryanbrainard thanks for looking into this. Context for the feature: To reiterate that we do not store data longer than 2 weeks, as a result of which that avoids allowing customers to even select a range outside of that. Having said that catering to different time zones is something we will need to look into. If it is possible to account for the above context in your changes, that would be great. Wrt to the go-bindata version, |
Thanks, that help; however, in that case, wouldn't we want a min end time, not a max end time?
While we could move it to a |
Logged #203 for this. |
I agree @ryanbrainard |
As submitted in #194 and #167, users are running into issues with the max end time. I ran into this too and it makes the app unusable. I looked into this, and there are three issues:
iso
is adjusted fromutcNow
, but then callingtoISOString()
, so essentially double offsetelem.max
is only set on$(document).ready
, which means if a user presses the "Now" button, it ends up after the maxelem.value
is set twiceI started to fix these, but stepping back, I don't understand why we need a max at all. It really should be just "now" when the server accepts the request, not when the page first (or even subsequently) loaded on the client side. As such, this drops the setting of
elem.max
. It also cleaned up the unused vars and the double setting ofelem.value
.Fixes #167
Fixes #194
cc: @mengyaoyang11