-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[dashboard] handle unlimited users condition in license page #9771
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not exactly sure how to test this but the changes seem to have good intentions! 🙂
Hi @nandajavarma, many thanks for this fix! 🙏 Happy to take a look today for team WebApp. The first thing will be for me to figure out how licenses work -- thanks also for linking to the relevant docs! 💯 |
Werft seems to have failed with:
Let's try this again: /werft run with-clean-slate-deployment 👍 started the job as gitpod-build-nvn-fix-9763.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me, thanks!
And phew, I was finally able to install a license into the preview environment, thanks to:
- the docs (slightly outdated)
- @mads-hartmann's help to adjust the docs for VMs 🙏
LIMITED | UNLIMITED |
---|---|
![]() |
![]() |
Looks good to me! 🚀
@@ -202,7 +203,8 @@ function communityPlan(userCount: number, seats: number, fallbackAllowed: boolea | |||
} | |||
}; | |||
|
|||
const aboveLimit: boolean = userCount > seats; | |||
// seats === 0 means unlimited number of users | |||
const aboveLimit: boolean = seats === 0 ? false : userCount > seats; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this could be de-duplicated as a single, isAboveLimit(userCount, seats)
function. 💭 But not very important.
@jankeromnes Thanks a lot for the thorough review!! <3 |
Description
In
gitpod.io
the unlimited number of users is specified byseats === 0
. Currently in the License dashboard, this condition is not handled properly and hence gives the wrong alert message. This PR fixes this issue.Related Issue(s)
Fixes #9763
How to test
Update the license to have user seats value
0
. I tested it by updating the user seats on a replicated license. One can ideally test it also on preview environment by updating the Werft secret for license.Release Notes
Documentation