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

Filtering feature for logs #309

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Filtering feature for logs #309

wants to merge 7 commits into from

Conversation

4rjunc
Copy link
Contributor

@4rjunc 4rjunc commented Jul 28, 2024

🔍 Overview

This initial PR for the issue #129 has the UI update for the filtering feature of logs

💡 Proposed Changes

Detail the proposed changes, including new features, bug fixes, or improvements. Explain how these changes impact the project, including any internal structure alterations or refactorings.

🖼️ Screenshots or Demo

Screen.Recording.2024-07-28.at.11.24.31.mov

📝 Release Notes

Summarize the changes in a user-friendly manner. Highlight new features, bug fixes, and any breaking changes, including migration steps or deprecated functionalities.

❓ Open Questions

If there are aspects of the changes that you're unsure about or would like feedback on, list them here.

🧪 Testing

Describe the testing strategy. List new tests added, existing tests modified, and any testing gaps.

🎯 Reviewer Focus

This PR only contains the UI part of the filter for logs. Please verify the UI.

Things left in this

  • A Dropdown view for the user selection similar to this
    Screenshot 2024-07-28 at 11 33 14

  • To add Datepicker

➕ Additional Context

Provide any additional information that might be helpful for reviewers and future contributors, such as links to related issues, discussions, or resources.

✨ How to Test the Changes Locally

Give clear instructions on how to test the changes locally, including setting up the environment, any necessary commands, or external dependencies.

💚 Did You...

  • Ensure linting passes (code style checks)?
  • Update dependencies and lockfiles (if required)
  • Regenerate graphql schema and types (if required)
  • Verify the app builds locally?
  • Manually test the changes on different browsers/devices?

@rohan-chaturvedi
Copy link
Member

This looks awesome! Only thing missing in the date picker. You can use a standard html calendar input for now, no need for anything fancy. Also we might need to allow filtering by a specific time range too. There could be a large number of logs generated in a 24hr period, and it would be useful to be able to narrow it down.

@4rjunc
Copy link
Contributor Author

4rjunc commented Jul 28, 2024

Screenshot 2024-07-29 at 01 45 21

Added the fields for selecting time intervels

@4rjunc
Copy link
Contributor Author

4rjunc commented Jul 31, 2024

Should I do filtering action on the data from the front end itself or does it need to write new APIs for the filtering?

@rohan-chaturvedi
Copy link
Member

Should I do filtering action on the data from the front end itself or does it need to write new APIs for the filtering?

We definitely need to apply filtering logic on the backend, since log data is likely to be very large. Let's extend the existing query resolver for logs with arguments required for these filters. Lmk if you want some help deciding on the spec for these arguments. Remember to keep things modular and allow the frontend to query things in a flexible way.

@4rjunc
Copy link
Contributor Author

4rjunc commented Aug 2, 2024

All the APIs are defined in schema.py right?

@rohan-chaturvedi
Copy link
Member

All the APIs are defined in schema.py right?

Yep, the logs resolver is here:

def resolve_logs(root, info, app_id, start=0, end=0):

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

Successfully merging this pull request may close these issues.

2 participants