Skip to content

Feat: quota report download - #257

Merged
lukasdotcom merged 2 commits into
mainfrom
feat/usage-export
Sep 10, 2025
Merged

Feat: quota report download#257
lukasdotcom merged 2 commits into
mainfrom
feat/usage-export

Conversation

@lukasdotcom

@lukasdotcom lukasdotcom commented Aug 20, 2025

Copy link
Copy Markdown
Member

Resolves: #250
image
Currently downloads a csv that looks like the sample below sorted by usage which is why it currently requires filtering the category:
quota_usage.csv
Also does double count usage if used in a pool then it counts for the user and the pool in the report. Ex: users alice and bob are in a pool. Alice used 20 tokens, bob 300 tokens. The csv would look like this

User Usage
Pool for Rule 1 320
Bob 300
Alice 20
  • Use as default start and end date the current quota period

@lukasdotcom lukasdotcom changed the title Feat/usage export Feat: quota report download Aug 20, 2025
@lukasdotcom
lukasdotcom force-pushed the feat/usage-export branch 2 times, most recently from a06f5b8 to 6df00da Compare August 29, 2025 15:56
@lukasdotcom
lukasdotcom marked this pull request as ready for review August 29, 2025 15:57
@kyteinsky
kyteinsky changed the base branch from main to feat/quota-rules September 2, 2025 09:14
@kyteinsky

Copy link
Copy Markdown
Contributor

Note this is built of #255. The only commit this adds is the newest one.

changed the base to feat/quota-rules so it is cleaner

@lukasdotcom
lukasdotcom force-pushed the feat/quota-rules branch 2 times, most recently from f4323a8 to 9e30765 Compare September 3, 2025 12:37
Base automatically changed from feat/quota-rules to main September 3, 2025 12:52
Comment thread lib/Controller/QuotaRuleController.php
Comment thread lib/Controller/QuotaRuleController.php Outdated
Comment thread lib/Controller/QuotaRuleController.php Outdated
Comment thread lib/Db/QuotaUsageMapper.php Outdated
Comment thread lib/Db/QuotaUsageMapper.php Outdated
Comment thread lib/Service/QuotaRuleService.php Outdated
Comment thread lib/Service/QuotaRuleService.php Outdated
Comment thread src/components/AdminSettings.vue Outdated
Comment thread src/components/AdminSettings.vue Outdated
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
@lukasdotcom
lukasdotcom force-pushed the feat/usage-export branch 3 times, most recently from 319d47c to c34f0d9 Compare September 5, 2025 17:19
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
@lukasdotcom

Copy link
Copy Markdown
Member Author

I realized that it might look weird if you change the download dates to the past and you are missing usage data, so I added a config to allow you to store the usage data for longer.

@kyteinsky kyteinsky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚀

Comment thread lib/Controller/QuotaRuleController.php

@kyteinsky kyteinsky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

sorry for the noise, all looks good!

@lukasdotcom
lukasdotcom merged commit 9260711 into main Sep 10, 2025
29 checks passed
@lukasdotcom
lukasdotcom deleted the feat/usage-export branch September 10, 2025 13:24
@kyteinsky kyteinsky mentioned this pull request Oct 6, 2025
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.

Define quota period in dates and add usage report generation

2 participants