-
Notifications
You must be signed in to change notification settings - Fork 63
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
Added apps updates monitoring #99
Conversation
Signed-off-by: Patrik Kernstock <info@pkern.at>
Signed-off-by: Patrik Kernstock <info@pkern.at>
lib/SystemStatistics.php
Outdated
]; | ||
|
||
// load all apps | ||
$apps = (new OC_App())->listAllApps(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use \OCP\IAppManager::getInstalledApps()
instead? (https://github.com/nextcloud/server/blob/591e75df5c3acf51e6968f20b1856481ee56f4de/lib/public/App/IAppManager.php#L116-L116) It's a list of app ids. And then also the CI job succeeds, because you don't use private namespace anymore ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline comment
Removing 'num_enabled' key temporary as the new IAppManager-way seems not to provide any reliable way to tell all activated (or even the count) apps. May follow later. Signed-off-by: Patrik Kernstock <info@pkern.at>
Thanks a lot for your feedback! Was searching quite a while for the right way to get out all installed apps... couldn't find any. As I found the exact way, before my recent commit, in an other app, I've just used the same way. However, builds seems passing. Actually I got into one new issue that I was not able to find out the correct way to get all activated apps at all. Using
So I have just removed |
Okay for me for now 👍 |
What is the status of this PR? There are already conflicts preventing to merge this. Would be great to know if this is a wanted change that we can resolve the conflicts and merge it in. It's open for nearly a year. |
There is a conflict. |
Signed-off-by: Patrik Kernstock <info@pkern.at>
Conflict resolved. |
lib/SystemStatistics.php
Outdated
/** @var View view on data/ */ | ||
private $view; | ||
/** @var appFetcher */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppFetcher
lib/SystemStatistics.php
Outdated
/** @var View view on data/ */ | ||
private $view; | ||
/** @var appFetcher */ | ||
private $appFetcher; | ||
/** @var appManager */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IAppManager
lib/SystemStatistics.php
Outdated
|
||
/** | ||
* SystemStatistics constructor. | ||
* | ||
* @param IConfig $config | ||
* @param IConfig $config | ||
* @param IAppManager $appManager | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the doc block, just duplicating the method signature anyway.
Or you add the $appFetcher
Signed-off-by: Patrik Kernstock <info@pkern.at>
@nickvergessen Applied changes as requested. I've decided to just add the |
You probably want to merge this branch into master (not the other way round like your did in 13e5bd2 |
Adds apps updates monitoring to API endpoint, as requested in #86