Skip to content

feat: add space-report extension - #607

Merged
LukasHirt merged 1 commit into
owncloud:mainfrom
blicknix:feat/space-report
Nov 18, 2026
Merged

LukasHirt merged 1 commit into
owncloud:mainfrom
blicknix:feat/space-report

Conversation

@blicknix

Copy link
Copy Markdown
Contributor

I'd like to contribute an admin extension, "Space report". It shows:

  • counts of personal, project and Vault spaces
  • total used and assigned quota, spaces near or over quota, top lists
  • orphaned spaces: personal spaces whose owner no longer exists in the user backend, and projects without (live) members

Reports can be exported as PDF, Markdown and CSV, or saved to the admin's personal space. It uses only existing Graph endpoints (/graph/v1beta1/drives, /graph/v1.0/users, /graph/v1.0/groups) and needs no server changes.

New dependencies: jspdf (MIT) and jspdf-autotable (MIT) generate the PDF in the browser. The bundle grows to about 460 kB (150 kB gzip). It is a single file, because Web loads extensions via requirejs. The alternative would be dropping PDF and keeping only Markdown, CSV and browser print. Is adding these OK?
#606

Note for oCIS: GET /graph/v1.0/users and /groups are read without paging. With an LDAP size limit the lists come back truncated without any indication. The extension works around this by confirming every missing ID with GET /users/{id}. Proper paging or a truncation flag in Graph would help other admin tools too.

Implementation is ready (lint, types, unit and e2e tests pass); happy to open the PR once the dependency question is settled.

@blicknix
blicknix requested a review from a team as a code owner October 19, 2026 15:13
@kw-security

kw-security commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@blicknix

Copy link
Copy Markdown
Contributor Author

@LukasHirt Could you have a look and give some feedback on this?

@LukasHirt

LukasHirt commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Thank you @blicknix looks like a great and useful extension! Before I dive deeper into the review, I'd like to address two topics first.

1. New dependencies

A few quick notes:

  • the size is a bit heavy but I would not consider this specifically as a blocker since it's accessible only by admins.
  • seems like the used jspdf version is having some CVEs, though it looks like they wouldn't be exploitable in our env, it would still get marked by scanners - if they would stay, I would see it as requirement to use the latest major version (but still, it seems that the lib is having CVEs quite often…)
  • lockfile is not updated
  • covering only Latin-1 via pdfSafe feels rather limiting and report for specific languages would feel very broken and embedding fonts that would fix it would grow the size even more

I would personally suggest to omit these dependencies for the first version. However, I am open to discussing this in case there is a specific reasoning/use case behind it.

2. Custom code to call APIs

Is there any specific reason for not using web-client to call the APIs? I would strongly advise on using it. If there is something that prevents it (lack of specific functionality or bug) I would propose to have that first solved and then use it in this PR.

@blicknix

Copy link
Copy Markdown
Contributor Author

good points.

I will remove the pdf dependencies and just make it markdown. PDF can then be handled through the browser via printing. The reason was to be able to share the report within ocis as a pdf and save an extra step to do so.

The own API calls where created to be able to make a report for all storage providers. I think the use case is 99% only for non vault spaces anyway, so I will change that for easier maintainability.

@blicknix

blicknix commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

@LukasHirt Can you check gain. I updated the extension

@mmattel

mmattel commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

@blicknix not a blocker but it would be informative if you could post as comment:

  • a/some screenshots of the UI change (what does the admin see when adding the extension) and
  • an example of a space report?

@blicknix

Copy link
Copy Markdown
Contributor Author

New Menu

new_menu_darkmode The Admin will have a new entry for Space Report

Space Report

space_report_darkmode

@LukasHirt

Copy link
Copy Markdown
Collaborator

@blicknix the last commit is not following the conventional commits format. The merge commit is fine, that should be excluded from the check.

@blicknix

Copy link
Copy Markdown
Contributor Author

@LukasHirt
Sorry for the confusion. I think the commits should now be clean.

@blicknix blicknix reopened this Nov 17, 2026
@LukasHirt

Copy link
Copy Markdown
Collaborator

There are errors with packages installation popping up in the CI. Can you please check them @blicknix ?

@LukasHirt LukasHirt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Awesome, thank you very much @blicknix !

@LukasHirt

Copy link
Copy Markdown
Collaborator

Commits must have verified signatures.

One last thing.

Signed-off-by: Samuel Schumacher <schumacher@b1-systems.de>
@blicknix

Copy link
Copy Markdown
Contributor Author

@LukasHirt Signed again. Don't know what happened there.

@LukasHirt
LukasHirt merged commit 0193f88 into owncloud:main Nov 18, 2026
37 checks passed
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.

4 participants