-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Provide json output of console command plugin:list
#20744
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
Provide json output of console command plugin:list
#20744
Conversation
Hi @ziegenberg, I wonder though whether we should provide the same data in both the tabular and JSON output, mainly now thinking about the What do you think about that? I will also suggest a few minor code-style tweaks that you can bulk-commit directly from Github's interface. |
plugin:list
Hi @michalkleiner, I incorporated the proposed style changes (is there an automatic style checker I missed?). Regarding the differences in tabular and JSON output: On the one side I didn't want to change the table headers for the tabular output and on the other side If you like, I can extend the description of the new |
Thanks @ziegenberg, you didn't miss a checker, we are slowly implementing CS changes and in the end there will be one. With that, I'm happy to approve this, I'd ask @sgiehl for his opinion and then we might be able to merge that in. |
One point I'd make is that in the long-term, we might want to add a |
Personally I wouldn't see it as part of a console command to support different return types at all. That is what our API is meant for and is able to handle automatically. So if something is needed in different formats, I would suggest to add an API method for that instead. |
Aside from the changes discussed above, I pulled up the static function |
Having low-level access to certain information makes automation very easy and convenient. The |
f34ec50
to
fd811db
Compare
I rebased onto the current |
fd811db
to
0aa81ca
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Add a new option `--json` to the console command plugin:list and output the information as json instead of a rendered table. This helps with automation when managing Matomo installs. Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
…ake it available to other Commands Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
0aa81ca
to
5a5e3e4
Compare
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.
Thanks @ziegenberg for the contribution.
The changes in this PR are looking fine to me.
I'll merge this one. We can have further thoughts if moving that to API might make more sense later as well.
Description:
Add a new option
--json
to the console command plugin:list and output the information as json instead of a rendered table. This helps with automation when managing Matomo installs.Review