SQL Queries for admins in Discourse
Go to file
David Battersby ee308c637c
FIX: Scheduled PM with Data Explorer Results not sending PM (#250)
This PR fixes 2 issues that were picked up by users for the Scheduled Data Explorer Report automation script and a couple of small improvements to better match the format of manual data explorer query results.

The first issue is that within result_to_markdown the colrender contains null values, and we are currently checking length (previously treated as a packed array but it is actually a sparse array). Therefore we can check if the current index of the array is null rather than checking the size of the array.

The second issue addresses the blank query_params field. When the data explorer script does not require any params to be passed in via the automation script then it will have a nil value, however it should be defaulted to {} within the plugin.

To improve formatting the markdown table for PMs is now aligned to left and where values are substituted (for example user_id becomes username) we then include the id within brackets, for example:
user_id becomes username (user_id)
2023-07-04 14:18:56 +08:00
.github/workflows DEV: Update CI workflows (#216) 2023-01-10 18:11:40 +00:00
app DEV: Add configurable rate limit for Data Explorer API query runs (#238) 2023-04-03 13:46:35 +08:00
assets DEV: update box-shadow definition (#248) 2023-06-15 10:17:45 -04:00
config DEV: Fix Zeitwerk reloading error (#249) 2023-06-16 13:38:56 +01:00
db/migrate DEV: Update plugin to match latest guidelines (#229) 2023-03-22 23:29:08 +02:00
lib FIX: Scheduled PM with Data Explorer Results not sending PM (#250) 2023-07-04 14:18:56 +08:00
spec FIX: Scheduled PM with Data Explorer Results not sending PM (#250) 2023-07-04 14:18:56 +08:00
test/javascripts FIX: Show "false" and "0" in query result (#244) 2023-05-04 19:45:43 -03:00
.discourse-compatibility DEV: Resolve add_to_serializer deprecations (#243) 2023-04-24 15:45:36 +01:00
.eslintrc DEV: apply coding standards (#66) 2020-09-04 13:23:11 +02:00
.gitignore DEV: Update linting setup and fix issues (#179) 2022-06-17 15:01:34 +02:00
.prettierrc DEV: Minor clean-up (#119) 2021-07-02 10:31:16 +02:00
.rubocop.yml DEV: Introduce syntax_tree for ruby formatting (#208) 2022-12-29 13:31:29 +01:00
.streerc DEV: Introduce syntax_tree for ruby formatting (#208) 2022-12-29 13:31:29 +01:00
.template-lintrc.js DEV: apply coding standards (#66) 2020-09-04 13:23:11 +02:00
Gemfile DEV: Introduce syntax_tree for ruby formatting (#208) 2022-12-29 13:31:29 +01:00
Gemfile.lock DEV: Introduce syntax_tree for ruby formatting (#208) 2022-12-29 13:31:29 +01:00
LICENSE Initial commit as a clone of discourse-tagging 2015-06-25 09:25:15 -07:00
README.md DEV: Update README.md (#164) 2022-02-21 20:59:32 +01:00
about.json FEATURE: Allow data explorer query result to be sent as recurring PM (#233) 2023-03-24 16:38:42 +08:00
package.json DEV: Use angle bracket syntax (#246) 2023-05-26 14:27:40 -05:00
plugin.rb FIX: Scheduled PM with Data Explorer Results not sending PM (#250) 2023-07-04 14:18:56 +08:00
translator.yml DEV: Upgrade `admin-plugins-explorer` to Octane (#209) 2023-01-05 09:27:10 -06:00
yarn.lock DEV: Use angle bracket syntax (#246) 2023-05-26 14:27:40 -05:00

README.md

Data Explorer Plugin

This plugin allows admins to run SQL queries against the live Discourse database, including parameterized queries and formatting for several common column types.

For more information, please see: https://meta.discourse.org/t/data-explorer-plugin/32566