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: project usage limits #3313

Merged
merged 9 commits into from
Feb 15, 2024

Conversation

MatheusLasserre
Copy link
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have run pre-commit to check linting
  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

How did you test this code?

I've run Flasgsmith Frontend locally with npm run dev, opened the Settings page and went to the new Usage tab.
Also checked console and network to see if any error occurred.

Other:
I've kept the design pretty simple. Let me know if you want it more elaborated. Any visual reference will be appreciated.
image

Copy link

vercel bot commented Jan 23, 2024

@MatheusLasserre is attempting to deploy a commit to the Flagsmith Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Jan 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 14, 2024 5:22pm
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 14, 2024 5:22pm

@github-actions github-actions bot added the front-end Issue related to the React Front End Dashboard label Jan 23, 2024
Copy link
Contributor

github-actions bot commented Jan 23, 2024

Uffizzi Preview deployment-44909 was deleted.

@dabeeeenster
Copy link
Contributor

Thanks for this! Could we add a link to the docs here: https://docs.flagsmith.com/system-administration/system-limits with the text:

In order to ensure consistent performance, Flagsmith has some System Limits

@MatheusLasserre
Copy link
Contributor Author

@dabeeeenster done!

image

…ded Project Type to Responses object; Added getProject to Requests
@MatheusLasserre
Copy link
Contributor Author

MatheusLasserre commented Jan 31, 2024

@kyle-ssg I've done almost all the changes you suggested, except the useGetEnvironmentQuery() one.

I need a bit of a help here. As far as i know, there is not a endpoint that I can pass an array of ApiKeys, and it returns me an array of Environments. And if I use the useGetEnvironmentQuery hook, it will not scale based on the number of apiKeys returned by useGetEnvironmentsQuery. How should I proceed on this one?

For now, I've kept the previous forEach logic.

@kyle-ssg
Copy link
Member

kyle-ssg commented Feb 7, 2024

@MatheusLasserre Awesome!

Ok gotcha, yep I see, so we have to fetch a collection of environments. In that case leave this however you can replace "getEnvironmentResType" with Environment I believe

@kyle-ssg kyle-ssg mentioned this pull request Feb 7, 2024
5 tasks
<Row>
<InfoMessage>
In order to ensure consistent performance, Flagsmith has some{' '}
<a
Copy link
Member

Choose a reason for hiding this comment

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

In order to ensure consistent performance, Flagsmith has the following usage limits. <a ...>Check the Docs for more details

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@MatheusLasserre
Copy link
Contributor Author

however you can replace "getEnvironmentResType" with Environment I believe

Yep, that's what I did. In the end, the only type created was for the ProjectUsage. All the other stuff already had one.

Should i do anything else?

frontend/web/components/ProjectUsage.tsx Outdated Show resolved Hide resolved
frontend/web/components/ProjectUsage.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@matthewelwell matthewelwell left a comment

Choose a reason for hiding this comment

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

This looks good to me now. @kyle-ssg can you do another review?

@kyle-ssg
Copy link
Member

Looking way neater now, awesome stuff. Thank you so much!

@kyle-ssg kyle-ssg added this pull request to the merge queue Feb 15, 2024
Merged via the queue into Flagsmith:main with commit 87501f5 Feb 15, 2024
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
front-end Issue related to the React Front End Dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Surface Segment/Feature/Segment override limits
5 participants