diff --git a/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 b/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 index 472f9f8..900c001 100644 --- a/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 +++ b/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 @@ -159,6 +159,10 @@ export default Ember.Controller.extend({ this.transitionToRoute("adminPlugins.explorer"); }, + showHelpModal() { + showModal("query-help"); + }, + resetParams() { this.selectedItem.resetParams(); }, diff --git a/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs b/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs index 5004eda..5502716 100644 --- a/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs +++ b/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs @@ -53,25 +53,29 @@ {{/if}} -
When your query returns an entity id, Data Explorer may automatically substitute it with + the entity name and other useful information in query results. Automatic resolution is available for + user_id, group_id, topic_id, category_id + and badge_id. To try this out run this query:
+SELECT user_id\nFROM posts
"
+ custom_params: "To create custom parameters for your queries, put this at the top of your query and follow the format:
+-- [params]\n-- int :num = 1\n\nSELECT :num
+ Note: the first line with [params] is required, along with two dashes preceding it and every + custom parameter you want to declare.
" + default_values: "You can declare parameters with or without default values. Default values will show up in a text field + below the query editor, which you can edit to your needs. Parameters declared without default values will + still generate a text field, but will be empty and highlighted red.
+-- [params]\n-- text :username = my_username\n-- int :age
"
+ data_types: "Here are common data types you can use:
+For more information on data types, visit + this website.
" schema: title: "Database Schema" filter: "Search..." sensitive: "The contents of this column may contain particularly sensitive or private information. Please exercise caution when using the contents of this column." - type_help: "Types" types: bool: yes: "Yes"