-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fixed the issues with columns in trajectory table. #71
Conversation
I am not able to make filter by date range yet , i will try it in morning again. |
@achasmita I think that the code to filter by date range is fairly simple - you should be able to copy it from the trip code op-admin-dashboard/utils/db_utils.py Line 51 in 35fc91d
Let's try to get it in before merging because people may want to filter by a date range given how slow the data load is. |
I am using the same code, and as table is loaded only when tab is selected, I am still figuring out on making both thing works. |
Is it ok if we load a recent week data at first and then allow user to load data based on the date range they select. Instead of loading data only when trajectory table is selected ? |
@achasmita are you proposing to roll in the scalability fixes (#51)? As I said before, please record what you tried in the issue and how it failed |
@achasmita it will also give me a sense of how complicated the problem is, and whether we should go ahead with pushing this change |
Yes it will work for both. I tried to pass the date range to filter trajectory table but the table was not loading as expected. It was loading all data everytime. I saw the date range change when i select different date range #72 but the data remains |
Yes it will work for both. I tried to filter the trajectory table in previous code by date range but there was no change in data even after filter is provided. Everytime all the data is loadaed in table so last time I filed the issue. |
Ok I figured it out, I was doing sth wrong while passing the date, now it works both the way either we can load trajectory tab when respective tab is selected and apply filter range or we can load data for current week and use date range to load data as needed. |
@@ -4,7 +4,7 @@ | |||
The workaround is to check if the input value is None. | |||
""" | |||
from dash import dcc, html, Input, Output, callback, register_page, dash_table | |||
|
|||
from datetime import date |
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.
I am merging this for now, but we should revisit the time handling in general since datetime does not handle timezones very well. We should use arrow
like the rest of the e-mission codebase, and also consider date formatting etc.
Can you please file a follow-up issue for this?
No description provided.