Skip to content
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

Merged
merged 7 commits into from
Aug 30, 2018
Merged

Added apps updates monitoring #99

merged 7 commits into from
Aug 30, 2018

Conversation

patschi
Copy link
Member

@patschi patschi commented Jun 12, 2017

Adds apps updates monitoring to API endpoint, as requested in #86

Signed-off-by: Patrik Kernstock <info@pkern.at>
Signed-off-by: Patrik Kernstock <info@pkern.at>
];

// load all apps
$apps = (new OC_App())->listAllApps();
Copy link
Member

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 ;)

Copy link
Member

@MorrisJobke MorrisJobke left a 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>
@patschi
Copy link
Member Author

patschi commented Jul 5, 2017

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 IAppManager I just found the following and closest ways:

  • getAlwaysEnabledApps(), which are forced-online apps which are required like files app
  • and getEnabledAppsForUser(IUser $user) for getting activated apps depending on the user. But the monitoring endpoint is userless?

So I have just removed num_enabled count for now. Either we'll find a better way and implement that, or we just add it someday later back.

@MorrisJobke
Copy link
Member

So I have just removed num_enabled count for now. Either we'll find a better way and implement that, or we just add it someday later back.

Okay for me for now 👍

@tflidd
Copy link
Contributor

tflidd commented Jun 6, 2018

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.

@MorrisJobke
Copy link
Member

Makes sense to add it IMO 👍

cc @blizzz @rullzer

@rullzer
Copy link
Member

rullzer commented Jun 7, 2018

There is a conflict.
But in general sure lets do this!

patschi added 2 commits July 18, 2018 22:14
@patschi
Copy link
Member Author

patschi commented Jul 18, 2018

Conflict resolved.
@MorrisJobke @rullzer

Probably also worth checking other PRs, like #98 and #97?

@MorrisJobke MorrisJobke added this to the Nextcloud 14 milestone Aug 20, 2018
/** @var View view on data/ */
private $view;
/** @var appFetcher */
Copy link
Member

Choose a reason for hiding this comment

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

AppFetcher

/** @var View view on data/ */
private $view;
/** @var appFetcher */
private $appFetcher;
/** @var appManager */
Copy link
Member

Choose a reason for hiding this comment

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

IAppManager


/**
* SystemStatistics constructor.
*
* @param IConfig $config
* @param IConfig $config
* @param IAppManager $appManager
*/
Copy link
Member

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>
@patschi
Copy link
Member Author

patschi commented Aug 23, 2018

@nickvergessen Applied changes as requested. I've decided to just add the $appFetcher line within the constructor.

@tflidd
Copy link
Contributor

tflidd commented Aug 27, 2018

You probably want to merge this branch into master (not the other way round like your did in 13e5bd2

@MorrisJobke MorrisJobke mentioned this pull request Aug 30, 2018
6 tasks
@MorrisJobke MorrisJobke merged commit 1e20926 into nextcloud:master Aug 30, 2018
@joshtrichards joshtrichards mentioned this pull request Nov 21, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants