Task #3054
closedImplement generic SQL report
100%
Description
Allow the user to get result of an SQL querry. Needs to be sanitized and only the admin can run this report.
Updated by Tomáš Doischer almost 3 years ago
- Sprint set to Sprint 12.2-1 (úno 18 - bře 02)
Updated by Tomáš Doischer almost 3 years ago
- Sprint changed from Sprint 12.2-1 (úno 18 - bře 02) to Sprint 12.2-2 (bře 02 - bře 16)
Updated by Roman Kučera almost 3 years ago
- Assignee changed from Tomáš Doischer to Roman Kučera
Updated by Roman Kučera almost 3 years ago
- Status changed from New to In Progress
Updated by Roman Kučera almost 3 years ago
- % Done changed from 0 to 60
First implementation is done.
Report is working.
You can fill in table/view name and then you will get data based on that table/view
you can fill some sql code in so then you get data based on that sql code.
Next thing which I want to improve is sql syntax highlight. I will look into if is something simple or not.
implemented in https://git.bcvsolutions.eu/modules/reports/-/commits/kucerar/3054-generic-sql-report
Updated by Roman Kučera over 2 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Roman Kučera to Tomáš Doischer
- % Done changed from 60 to 90
Syntax highlight will not be support right now.
I added description to params, so now it's obvious how to use this report even without documentation or without trying it out.
PR https://git.bcvsolutions.eu/modules/reports/-/merge_requests/3
@doischert can you do a review please?
Updated by Roman Kučera over 2 years ago
- Status changed from Needs feedback to In Progress
- Assignee changed from Tomáš Doischer to Roman Kučera
We are waiting for multiple datasource support in product
Updated by Roman Kučera over 2 years ago
added check, so the report can be executed only uf you are super admin
Updated by Roman Kučera over 2 years ago
Connection was not closed, so I fixed it.
Added configuration for datasource
Add this to IdM property file
spring.reports-datasource.jdbcUrl=jdbc:postgresql://localhost:5432/hr spring.reports-datasource.username=postgres spring.reports-datasource.password=pass spring.reports-datasource.driver-class-name=org.postgresql.Driver spring.reports-datasource.testOnBorrow=true spring.reports-datasource.validationQuery=SELECT 1 spring.reports-datasource.maximum-pool-size=1 spring.reports-datasource.read-only=true
Updated by Tomáš Doischer over 2 years ago
- % Done changed from 90 to 70
I reviewed the feature, the selects work well, well done.
I have a couple of notes in the gitlab review (they're all minor). However, during testing, I found that you can run delete and update queries as well. The report will fail because no data was returned but the query is executed anyway.
Also, documentation is needed.
Updated by Roman Kučera over 2 years ago
- % Done changed from 70 to 80
I improved the mentioned things.
Next I will write documentation.
Updated by Roman Kučera over 2 years ago
Updated by Tomáš Doischer over 2 years ago
- Status changed from In Progress to Resolved
- Assignee changed from Roman Kučera to Tomáš Doischer
- % Done changed from 80 to 100
Thank you, LGTM, merged to develop. I slightly touched the documentation, added some warnings and some explanation to the configuration properties.
Updated by Tomáš Doischer over 2 years ago
- Status changed from Resolved to Closed
- Assignee changed from Tomáš Doischer to Roman Kučera