The `onSubmit` hook will only be triggered when the form is valid, so we
need to clear the contents of `serializedData` in advance in `submit`.
Otherwise, it may not throw a validation error.
* FIX: Wrong type in category_id param input
We will dasherize category_id. The dasherize function accepts a string,
but we don't type-check it, so the default null may be passed in. This
will cause a type error and crash the front-end.
What does this fix?
===================
When creating a data explorer query that includes parameters, the
parameter input boxes don’t display until the page is refreshed.
After this commit, when the query is saved, the input boxes will appear.
ref: t/113297
This commit changes the header for the first column of the queries table to have the correct label. Currently it says "Created by", but it should be "Query".
Since 67a8080e33
in core, the functionality to bookmark a report from the group
Reports tab has been broken. This commit fixes the issue and adds
system spec coverage to prevent regression.
If a column is payload or contains _payload it will be assumed
it has JSON data in it, then we will show the truncated JSON in the
result column with a button to show the full-screen formatted
JSON using our full-screen code viewer. We also do the same if
the column is the `json` postgres data type.
Previously the debounced value was both setting the filter value and
updating the input's text value. This causes visible UI issues, because
the debounce updating the input's text value would sometimes reset it,
especially if/when typing quickly.
This PR also uses sticky positioning for the search form, so that it
stays visible even when scrolling the list of schema tables.
This commit updates the plugin to the latest guidelines, as shown in
discourse-plugin-skeleton, which involves moving a lot of the code to
dedicated files, use proper namespaces, use the autoloader as much as
possible, etc.
# Context
Data explorer gives you the ability to use special attributes such as 👇
> SELECT TIMESTAMP 'yesterday' as reltime$time
# Problem
During the upgrade to ember octane these were neglected and did not work. This PR updates them to working condition.
# Additional
- Drop unused action of `saveDefaults`
Prevent the table to have a fixed 1000px height with the horizontal scrollbar at the bottom of a mostly blank section when we have only a few results.
This change doesn't interfere with the sticky header.
- Drop `explorer-container` and move its logic to `admin-plugin-explorer` container
- Convert resizing of the query edit pane from jquery -> draggable modifier
We were not passing the correct arguments through in the group reports template causing the download url to default to an admin route. This made downloads unavailable to non-admin users. Fixed by passing the correct values through.
During the upgrade to Octane group reports did not have the necessary 'updateParams' function added to have the param input changes bubble up to the parent. This PR adds the missing function as well as a small test to check that params can be inputted as expected (inserting a param would error previously).
After running a query with a non-default query param (inserting the new param into the url) we want to have the same params available after reloading the page. To do this we need to pass the updated params back up to the parent due to Octane's one direction data stream. I went over this with @pmusaraj and we both agreed this was extremely difficult to test due to needing to reload the page in a test, so we opted to move forward without one. A system test could be helpful in this case... I will investigate in a follow up PR.
- Move param-input tests to a dedicated file
When there were no query results it would throw an error due to `this.resultCount` always passing as it is in the format of
```
"INTEGER - results returned"
```
so we need to grab the first index of the string and check if the integer is great than 0