Skip to content
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

Advanced > Logs: Date filter is not working #3573

Open
qaxlyka opened this issue Jan 20, 2025 · 5 comments
Open

Advanced > Logs: Date filter is not working #3573

qaxlyka opened this issue Jan 20, 2025 · 5 comments
Assignees
Labels
Milestone

Comments

@qaxlyka
Copy link

qaxlyka commented Jan 20, 2025

malfunctioning.date.filter.mp4

Steps to replicate:

  1. Navigate to Advanced > Logs
  2. Play around with the date filter
@ifarzana ifarzana added the bug label Jan 21, 2025
@ifarzana ifarzana added this to the 4.2.0 milestone Jan 21, 2025
@PeterMis
Copy link
Member

Just to add some context and explain how it currently works.

The Interval and duration back is key here, as we care about them with and without the date filter set.

Say interval is hours and duration back is 2 ( ie 2h back )

Without Date filter set : 
toDt = now 
fromDt ( now - interval ) ie last 2 hours of logs

e.g.
toDt = 2025-01-24 12:26:18
fromDt = 2025-01-24 10:26:18

With Date set : 
toDo - Date set in filter at midnight
fromDt - Date - interval ie date - 2h

e.g.
2025-01-24 in date filter

toDt = 2025-01-24 00:00:00
fromDt = 2025-01-23 22:00:00

In regards to changes, I think my suggestion would be :

  • Change the date filter label to To Date
  • Add time picker to this input

Would that make it easier to understand and use?
Or do we think more changes might be needed?

@maurofmferrao maurofmferrao removed this from the 4.2.0 milestone Jan 29, 2025
@maurofmferrao maurofmferrao added this to the 4.3.0-alpha milestone Feb 10, 2025
@dasgarner
Copy link
Member

@qaxlyka what do you think of Peter's suggestion?

@qaxlyka
Copy link
Author

qaxlyka commented Feb 18, 2025

It took me a while to understand the flow. Actually, I had to go through each explanation just to see the whole picture and apparently suggest of what I think a better, more intuitive and flexible approach.

Although, Peter's point is already on point(and thanks for the explanation btw!), I thought if we could let the user select both a Date and a Time instead, it would be more straightforward.

How It Would Work:
1. If no date is selected → Use the last X hours from the current time.

Example:
Time (currently): 12:26 PM
Duration: last 2 hours → It automatically pulls logs from 10:26 AM – 12:26 PM

2.	If a date is selected 

Example:
Date: Jan 24
Time: 3:00 PM
Duration: last 2 hours → It pulls logs from 1:00 PM – 3:00 PM for Jan 24.

Logic: just subtract the duration from the selected date & time

Let me know if it's not clear. Otherwise, let's just go with Peter's 😄

@dasgarner dasgarner assigned mgbaybay and unassigned PeterMis Feb 25, 2025
@dasgarner
Copy link
Member

So in summary the change here is to make the date field a date/time picker?

@maurofmferrao
Copy link
Member

So in summary the change here is to make the date field a date/time picker?

I think that would solve it, yeah. That way it would be easier to understand what's happening with the filters.
Should we also change the name from From Date to To Date like Peter suggested, since that date is the final date and not the start ( date - delta time )?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants