nextcloud / nextcloud/serverinfo
Common interface for all statistic classes
Open
Nobody has claimed this yet.
technical debt
- Dominant language
- JavaScript
- Stars
- 130
- Forks
- 64
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 49
Description
- Write
IStatisticsProviderinterface-
getName()to retrieve the name of the key to publish the statistics under -
getGroup()to retrieve the name of the group key to publish the statistics under -
getStatistics()returns the stats to retrieve
-
- Write
StatisticsService-
registerStatisticsProvider(IStatisticsProvider) -
IStatisticsProvider[] getStatisticsProviders()
-
- adjust ApiController
- receive StatisticsProvider injected instead of all the custom classes
- query
StatisticsProvider->getStatisticsProviders()and iterate and compile the stats
- cleanup ApiControllerTest
- rewrite the custom classes to implement
IStatisticsProvider - register the custom classes in the application initialization
This cleantup and enhancement would also open the door to allowing third party apps to register their own statistics providers in the future.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing ApiController, ApiControllerTest, the existing custom statistic classes, and application initialization. Trace how current statistics providers are supplied and compiled, then define the shared interface and service, update registration and injection, and confirm the controller tests cover the new provider iteration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100