SQL Queries for admins in Discourse
Go to file
锦心 760667d744
FIX: Param should be displayed when the default value is invalid (#313)
What's the problem?
===================

TL;DR: When the user enters an incorrect default value, its
corresponding param-input will disappear

When creating a parameter from SQL, we perform cast_to_ruby, which means
that if the default value given by the user is invalid, the entire
parameter will not be added to the param_list of the query.
This behavior is very confusing, and users will not understand why an
incorrect initial value will cause the param-input to disappear.

What's the fix?
================

The cast_to_ruby process is canceled in create_from_sql, so that
param-input with incorrect default value will still be displayed.
We have a simple validation process on the front end, which is enough to
prompt whether some default inputs are incorrect.
2024-08-21 12:03:11 +08:00
.github/workflows DEV: Update CI workflows (#216) 2023-01-10 18:11:40 +00:00
app UX: Rewrite param-input using FormKit (#307) 2024-08-20 09:42:50 +08:00
assets FIX: Empty param-inout form should reject submit (#309) 2024-08-20 10:09:48 +08:00
config Update translations (#311) 2024-08-20 17:54:06 +02:00
db/migrate DEV: Update plugin to match latest guidelines (#229) 2023-03-22 23:29:08 +02:00
lib FIX: Param should be displayed when the default value is invalid (#313) 2024-08-21 12:03:11 +08:00
spec FIX: Param should be displayed when the default value is invalid (#313) 2024-08-21 12:03:11 +08:00
test/javascripts FIX: Empty param-inout form should reject submit (#309) 2024-08-20 10:09:48 +08:00
.discourse-compatibility DEV: Pin plugin for Discourse < 3.4.0.beta1-dev (#301) 2024-08-02 17:05:41 +08:00
.eslintrc.cjs DEV: Update linting (#267) 2023-12-01 16:47:54 +01:00
.gitignore DEV: Update linting setup and fix issues (#179) 2022-06-17 15:01:34 +02:00
.prettierrc.cjs DEV: Update linting (#267) 2023-12-01 16:47:54 +01: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.cjs DEV: Update linting (#267) 2023-12-01 16:47:54 +01:00
Gemfile DEV: Introduce syntax_tree for ruby formatting (#208) 2022-12-29 13:31:29 +01:00
Gemfile.lock Build(deps-dev): Bump rexml from 3.2.8 to 3.3.3 (#302) 2024-08-05 13:13:55 +02: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: Update rubocop-discourse to version 3.8.0 (#292) 2024-05-28 11:16:14 +02:00
plugin.rb DEV: Update rubocop-discourse to version 3.8.0 (#292) 2024-05-28 11:16:14 +02:00
translator.yml DEV: Upgrade `admin-plugins-explorer` to Octane (#209) 2023-01-05 09:27:10 -06:00
yarn.lock Build(deps): Bump braces from 3.0.2 to 3.0.3 (#295) 2024-06-16 22:30:36 +02: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