e-mission / op-admin-dashboard

An admin/deployer dashboard for the NREL OpenPATH platform
0 stars 8 forks source link

Fixed the issues with columns in trajectory table. #71

Closed achasmita closed 10 months ago

achasmita commented 10 months ago

Testing is done and table is loading fine now. Screen Shot 2023-09-29 at 12 24 06 AM Screen Shot 2023-09-29 at 12 24 39 AM Screen Shot 2023-09-29 at 12 25 19 AM Screen Shot 2023-09-29 at 12 26 28 AM Screen Shot 2023-09-29 at 12 26 49 AM

achasmita commented 10 months ago

I am not able to make filter by date range yet , i will try it in morning again.

shankari commented 10 months ago

@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 https://github.com/e-mission/op-admin-dashboard/blob/35fc91dd245e65f086b2a9af4f6a4711cfaec659/utils/db_utils.py#L51

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.

achasmita commented 10 months ago

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.

achasmita commented 10 months ago

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 ?

shankari commented 10 months ago

@achasmita are you proposing to roll in the scalability fixes (https://github.com/e-mission/op-admin-dashboard/issues/51)? I have no objections to that approach, but would like to understand why it is needed.

As I said before, please record what you tried in the issue and how it failed "The goal is not just to get things to work, but to get them to work right". https://github.com/e-mission/op-admin-dashboard/issues/70#issuecomment-1740268393

shankari commented 10 months ago

@achasmita it will also give me a sense of how complicated the problem is, and whether we should go ahead with pushing this change

achasmita commented 10 months ago

@achasmita are you proposing to roll in the scalability fixes (#51)? I have no objections to that approach, but would like to understand why it is needed.

As I said before, please record what you tried in the issue and how it failed "The goal is not just to get things to work, but to get them to work right". #70 (comment)

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 same.

achasmita commented 10 months ago

@achasmita are you proposing to roll in the scalability fixes (#51)? I have no objections to that approach, but would like to understand why it is needed.

As I said before, please record what you tried in the issue and how it failed "The goal is not just to get things to work, but to get them to work right". #70 (comment)

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.

achasmita commented 10 months ago

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.