ml-tooling / contaxy

MIT License
10 stars 8 forks source link

Feature: Implement statistics endpoint #7

Open JNKielmann opened 3 years ago

JNKielmann commented 3 years ago

The statistics endpoint was not yet implemented, so I though it would be a good task to get more familiar with the code base.

I call the list method of the respective manager and count the result to get the number of projects, users, service, ... To list all projects (and not just the ones the user has access to) I used a workaround setting authorized_access to None. Is there a better way to do it?

Happy for any feedback on the implementation :)

raethlein commented 3 years ago

Hey @JNKielmann, thanks for the contribution 🙂 This looks good to me! Though I think it would be good to have also a test written for that endpoint. Hence, for now I would keep the PR open so that a test can directly committed into the PR.

lukasmasuch commented 3 years ago

This looks good for me as well. It might need some caching in the future, but I think this is not necessary for the current state.