yogeshsd / query2report

Query2Report is a simple open source business intelligence platform that allows users to build report/dashboard for business analytics or enterprise reporting
https://sourceforge.net/projects/query2report/
GNU General Public License v3.0
51 stars 23 forks source link

Request to hide the SQL Queries in case of any error #9

Closed sabahat11 closed 5 years ago

sabahat11 commented 5 years ago

Can we have a debug switch (true/false) option to show/hide the SQL Queries in our graph region? Currently it is showing the SQL queries as error message in case of an error.

yogeshsd commented 5 years ago

Property called "send_sql_to_ui" has been introduced to prevent SQL queries being shown in UI when the SQL query has failed execution. This property is "false" by default, which means dont show the SQL query in UI. However, you will continue to see the full query getting logged in {CATALINA_BASE}/logs/q2r.log file.

To turn this property on, follow the below steps

  1. Login in as admin user
  2. Click on user icon drop down menu
  3. Select "Update Global Config"
  4. Change value of property named "send_sql_to_ui" from false to true
  5. Click on submit to save the property value.
  6. Logout and login back to verify

To verify, you should have a erroneous SQL query in one of the element.