-
Notifications
You must be signed in to change notification settings - Fork 40
Extend utility scripts to find out quota and its usage #5359
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
Comments
Hiya @carmenfan, I'd love to make a PR for this. Just wanted to check a few things over. For a given teamspace, do you want to include the data available and the data used? (maybe using these functions quota.js#26 and quota.js#61), and also the total number of licenses regardless of whether they're expired or active? Maybe writing the results to a json file with the following format: [
{
"teamspaceId": "abc123",
"dataMB": {
"available": 100,
"used": 20
},
"totalLicenses": 10,
"expiredLicenses": [
{
"type": "enterprise",
"dataMB": 50,
"collaborators": "unlimited",
"expiryDate": "2025-01-30T00:00:00Z"
}
]
}
] Apologies if I've misunderstood what you're trying to achieve here. I'm just getting to grips with the codebase. Also I think I've found a bug with the current implementation. If a teamspace has a single expired license it will include all of that teamspace's licenses, even ones that are active. Thanks, |
Hi @jacobcons, Thank you for your interest in contributing to the project! The task in question here is regarding the 2 scripts in https://github.com/3drepo/3drepo.io/tree/master/backend/src/scripts/utility/teamspaces They are suppose to be utility command line scripts that operates on demand, (see more info here ) So the solution is probably a bit simpler than you think. There's already code that puts some data out in the form of a csv, and we're just looking at adding some columns in it 😄 |
Yeah I understand that, I was just thinking maybe you wanted to write to a .json file to avoid redundantly repeating rows and represent the hierarchical structure of it. So you want some columns for data quota usage and number of licenses assigned to a given teamspace (which will naturally repeat those values for each license in the same teamspace)? Happy to add that along with fixing that bug I mentioned 😊 |
Hi @jacobcons ,
Not sure I follow on this bug you mentioned. Do you mean on calculating the quota size we're counting all the active licenses even if one of them expired? If that's the case that is the desired behaviour |
@carmenfan No I mean in the current state of the allExpiredLicenses script (not to do with calculating quota size) it will actually list active licenses in the CSV as long as it belongs to a teamspace with at least one expired license. This is intentional? |
oh no, definitely not. In which case you 100% found a bug 😆 |
Okay cool 😊 |
…ses to a given teamspace
…es, fixed bug where active licenses are displayed if a single license is expired, ensure calculated quota only includes licenses of a valid type
…compare expected expired licenses against the actual ones
…ExpiredLicenses, added some common abstractions between them
…ave a valid format by including subscriptions type
…scriptions and defaults, add tests for full coverage, refactoring of teamspacesetting license functions to be a bit more efficient
Description
For
allExpiredLicenses
andallActiveLicenses
script, we want to extend the output to contain the following:Goals
Tasks
TBC by the developer
The text was updated successfully, but these errors were encountered: