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

feat: new metric widgets #2261

Merged
merged 18 commits into from
Oct 31, 2024
Merged

feat: new metric widgets #2261

merged 18 commits into from
Oct 31, 2024

Conversation

35C4n0r
Copy link
Contributor

@35C4n0r 35C4n0r commented Oct 22, 2024

Closes #1769
Closes #2262

πŸ“‘ Description

βœ… Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

β„Ή Additional Information

https://www.loom.com/share/aa665dee5b2c413dac14976ed62e90fe?sid=00b8c786-a87a-47d7-a17f-a6dbe74de11f

Copy link

vercel bot commented Oct 22, 2024

@35C4n0r is attempting to deploy a commit to the KeepHQ Team on Vercel.

A member of the Team first needs to authorize it.

Matvey-Kuk
Matvey-Kuk previously approved these changes Oct 22, 2024
Copy link
Contributor

@Matvey-Kuk Matvey-Kuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

@rajesh-jonnalagadda
Copy link
Contributor

@35C4n0r What if I want to see the previous day's data? how are we handling it
cc: @Matvey-Kuk

@rajesh-jonnalagadda
Copy link
Contributor

@35C4n0r What if I want to see the previous/particular day's data? how are we handling it
@Matvey-Kuk User might ask for it, right? I want to know your perspective.
cc: @talboren

Copy link
Member

@talboren talboren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@35C4n0r may I ask you to resolve the conflict, and run linter? For example, please note that every other component, the standard is using " instad of '.

May I also ask you to upload a video of how this feature looks like?

cc: @Matvey-Kuk - I know you approved but would love to see that ^ first.
re @rajeshj11: @Matvey-Kuk @35C4n0r I think it's a valid point. As a user I would like the dashboard to work with the timeframe I chose.

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Oct 24, 2024
@35C4n0r
Copy link
Contributor Author

35C4n0r commented Oct 24, 2024

@talboren

@35C4n0r may I ask you to resolve the conflict, and run linter?

Conflict Resolved, is the command for linter next lint ?

For example, please note that every other component, the standard is using " instad of '.

Didn't understand, can you clarify this.

May I also ask you to upload a video of how this feature looks like?

It's there in the description

cc: @Matvey-Kuk - I know you approved but would love to see that ^ first. re @rajeshj11: @Matvey-Kuk @35C4n0r I think it's a valid point. As a user I would like the dashboard to work with the timeframe I chose.

Ok, then instead of the past 24 hours, should we show the graph for per day? Thoughts?

@35C4n0r
Copy link
Contributor Author

35C4n0r commented Oct 24, 2024

πŸ˜…
Suddenly clicked what you're trying to say.

For example, please note that every other component, the standard is using " instad of '.

@rajesh-jonnalagadda
Copy link
Contributor

rajesh-jonnalagadda commented Oct 24, 2024

@talboren

@35C4n0r may I ask you to resolve the conflict, and run linter?

Conflict Resolved, is the command for linter next lint ?

For example, please note that every other component, the standard is using " instad of '.

Didn't understand, can you clarify this.

May I also ask you to upload a video of how this feature looks like?

It's there in the description

cc: @Matvey-Kuk - I know you approved but would love to see that ^ first. re @rajeshj11: @Matvey-Kuk @35C4n0r I think it's a valid point. As a user I would like the dashboard to work with the timeframe I chose.

Ok, then instead of the past 24 hours, should we show the graph for per day? Thoughts?

@35C4n0r
We can assume a similar approach. Pagination is necessary if the time frame is extensive to prevent overloading the component.
Screenshot from 2024-10-24 12-57-07

note: not certain. please get approval from @Matvey-Kuk @talboren before you even start devlopment. The above assumption is my perspective.

@35C4n0r
Copy link
Contributor Author

35C4n0r commented Oct 24, 2024

πŸ˜“ @rajeshj11 that's definitely not what I meant. Let me rephrase it a bit:
Instead of showing the data for the past 24 hours starting from the current timestamp, we should display a graph that spans the selected day.

@rajesh-jonnalagadda
Copy link
Contributor

rajesh-jonnalagadda commented Oct 24, 2024

πŸ˜“ @rajeshj11 that's definitely not what I meant. Let me rephrase it a bit: Instead of showing the data for the past 24 hours starting from the current timestamp, we should display a graph that spans the selected day.

I understand your point, and I see it from that perspective as well. I’ve also noted in my comments that this is based purely on my assumption as a user.

@rajesh-jonnalagadda
Copy link
Contributor

@35C4n0r Let @Matvey-Kuk and @talboren decide which one they want. If you're open to it, I'd like to collaborate with you to tackle this blocker together.

Copy link

codecov bot commented Oct 26, 2024

Codecov Report

Attention: Patch coverage is 19.44444% with 87 lines in your changes missing coverage. Please review.

Project coverage is 71.15%. Comparing base (7d90ae9) to head (0207516).
Report is 51 commits behind head on main.

Files with missing lines Patch % Lines
keep/api/core/db.py 16.66% 75 Missing ⚠️
keep/api/routes/dashboard.py 21.42% 11 Missing ⚠️
keep/api/routes/incidents.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2261      +/-   ##
==========================================
- Coverage   71.20%   71.15%   -0.06%     
==========================================
  Files         154      155       +1     
  Lines       14046    14476     +430     
==========================================
+ Hits        10002    10300     +298     
- Misses       4044     4176     +132     

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@rajesh-jonnalagadda
Copy link
Contributor

@35C4n0r if changes are done. Can you please add demo video if possible.

keep/api/routes/incidents.py Outdated Show resolved Hide resolved
@Matvey-Kuk Matvey-Kuk self-requested a review October 29, 2024 08:25
keep/api/core/db.py Outdated Show resolved Hide resolved
Matvey-Kuk
Matvey-Kuk previously approved these changes Oct 29, 2024
Copy link
Contributor

@Matvey-Kuk Matvey-Kuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's looking really good for me. I see tests are failing, please fix them :)

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 29, 2024
Copy link

gitguardian bot commented Oct 29, 2024

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

πŸ”Ž Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
8134198 Triggered Generic High Entropy Secret 9d3bab0 keep-ui/app/frigade-provider.tsx View secret
14332896 Triggered Generic Password 4adf359 keep/providers/graylog_provider/docker-compose.yml View secret
πŸ›  Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


πŸ¦‰ GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Signed-off-by: 35C4n0r <[email protected]>
@35C4n0r
Copy link
Contributor Author

35C4n0r commented Oct 29, 2024

It's looking really good for me. I see tests are failing, please fix them :)

@Matvey-Kuk tests were failing sporadically, they all pass now. I've updated the docs. Lemme know if any other changes are required and let's get this PR merged :)

Copy link

vercel bot commented Oct 29, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
keep βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Oct 31, 2024 10:40am

@talboren talboren self-requested a review October 29, 2024 15:00
Copy link
Contributor

@VladimirFilonov VladimirFilonov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's great!

@talboren talboren enabled auto-merge (squash) October 31, 2024 10:34
@talboren talboren dismissed their stale review October 31, 2024 10:35

not relevant anymore

@talboren talboren merged commit 72ed487 into keephq:main Oct 31, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
5 participants