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

[Improvement] Custom Reports tree endpoint #665

Open
wants to merge 17 commits into
base: 1.x
Choose a base branch
from

Conversation

mcop1
Copy link
Contributor

@mcop1 mcop1 commented Jan 9, 2025

Changes in this pull request

Resolves #660
Resolves #661

Additional info

Added 2 endpoints:

1.) Get reports to display in a tree, that is used to actually display the reports
2.) Get reports to display in a tree, that is used for configuring the reports

@mcop1 mcop1 changed the title [Improvement] Custom Reports endpoint [Improvement] Custom Reports tree endpoint Jan 9, 2025
@mcop1 mcop1 self-assigned this Jan 9, 2025
@mcop1 mcop1 marked this pull request as ready for review January 9, 2025 14:53
* @throws InvalidQueryTypeException
*/
#[Route('/custom-reports/config/tree', name: 'pimcore_studio_api_report', methods: ['GET'])]
#[IsGranted(UserPermissions::TAGS_SEARCH->value)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the correct permission?

* @throws InvalidQueryTypeException
*/
#[Route('/custom-reports/tree', name: 'pimcore_studio_api_report', methods: ['GET'])]
#[IsGranted(UserPermissions::TAGS_SEARCH->value)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the correct permission?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Obviously not, had some questions about how permissions are working and wanted to add more endpoints first. But thanks for reminding me.

*/
#[Schema(
title: 'Custom Report',
type: 'object'
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add the required fields here. Like every field that is not nullable is required basically

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What does required in case of strings mean? Null or empty?

*/
#[Schema(
title: 'Custom Report',
type: 'object'
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

translations/studio_api_docs.en.yaml Show resolved Hide resolved
@mcop1
Copy link
Contributor Author

mcop1 commented Jan 10, 2025

Thanks for reviewing, in general I would prefer reviews after a pull request is done and I "request" an review. Should we, for the future, use the draft option for that?

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 New Major Issues (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

[Task] Load chart data for custom reports [Task] Custom reports tree listing endpoint
2 participants