Commit Graph

242 Commits

Author SHA1 Message Date
Kris 6b9bb24880
DEV: update box-shadow definition (#248) 2023-06-15 10:17:45 -04:00
Isaac Janzen c31d33a50c
DEV: Use angle bracket syntax (#246) 2023-05-26 14:27:40 -05:00
Canapin 6e8aeff437
UX: fix parameters inputs spacing (#245)
* UX: fix parameters inputs spacing

* trying to fix the linting errror 😬
2023-05-25 22:59:59 +02:00
Jan Cernik 2144e7b3ba
FIX: Show "false" and "0" in query result (#244) 2023-05-04 19:45:43 -03:00
Penar Musaraj 3907c49263
FIX: Reduce issues when debouncing schema search (#241)
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.
2023-04-18 10:33:25 -04:00
Joffrey JAFFEUX 97d60de92a
FIX: ensures explorer is using default values when provided (#240) 2023-04-17 09:06:27 -05:00
Isaac Janzen a208c1b054
FIX: Reset results on query redirect (#236)
# Problem

When switching group reports it was possible to have the `results` from a previous run (of a query) pass over to the rendering of a different query.

# Fix

Set the controllers `results` to `null` when first rendering the query

https://user-images.githubusercontent.com/50783505/228050384-5231f004-1dc2-4867-8d57-9db7706bb65f.mov
2023-03-28 11:01:47 -05:00
Bianca Nenciu 206d937a78
DEV: Update plugin to match latest guidelines (#229)
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.
2023-03-22 23:29:08 +02:00
Isaac Janzen 075a508e52
FIX: Special attributes not working (#232)
# 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`
2023-03-10 11:41:59 -06:00
Krzysztof Kotlarek 466d4bb00c
FIX: clear state when reports are changed (#226)
When show report page is left, results should be cleared to not interfere with next report.
2023-02-22 16:25:33 +11:00
Isaac Janzen 556d12ac50
FIX: Maintain editing state after saving query changes (#223)
In the widget version of the data-explorer we would maintain the `editing` state after saving query changes. This was lost in upgrade to glimmer. 

# Current State
https://user-images.githubusercontent.com/50783505/217622464-79adaab6-84ed-4b64-93ae-c889aa8fb1bd.mp4

# Updated State
https://user-images.githubusercontent.com/50783505/217623475-1998fab6-0b70-42d2-923d-574efb9d5601.mov

# Other Changes
- `createProperties` was added back to the `query` model as it is being utilized in the creation of a new data explorer query. This was accidentally removed and was causing errors when trying to create a new query.
- Add new-query test
2023-02-08 13:40:53 -06:00
Isaac Janzen 04b2177749
DEV: Upgrade `query` model to Octane (#221)
- Upgrade `query` model to Octane
- Update `assets/javascripts/discourse/templates/admin/plugins-explorer.hbs` to access values via `this.`
2023-02-07 12:44:38 -06:00
Isaac Janzen 29cfa6383c
DEV: Convert raw-hbs to view only components (#222)
- Convert raw.hbs files to co-located view only components
2023-02-07 12:26:47 -06:00
Isaac Janzen 332ae394e8
DEV: Upgrade `group-reports` to Octane (#218) 2023-02-06 11:20:03 -06:00
Canapin d6b94706a0
UX: Reduce the table height (#220)
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.
2023-02-06 18:05:17 +01:00
Isaac Janzen 5a65c15463
DEV: Upgrade admin-plugins-explorer to Octane (#219) 2023-02-06 10:21:58 -06:00
Isaac Janzen 910b95bef8
FIX: Opening and closing of schema columns (#215)
Per: https://meta.discourse.org/t/cant-select-a-column-name-as-releasing-the-mouse-click-will-close-the-current-table-dropdown/250715/3

Fixed column toggling where columns should open and close when clicking column name, and not when clicking the column body.
2023-01-10 14:03:15 -06:00
Isaac Janzen 4d26cf78f0
DEV: Upgrade `admin-plugins-explorer` to Octane (#209)
- Drop `explorer-container` and move its logic to `admin-plugin-explorer` container
- Convert resizing of the query edit pane from jquery -> draggable modifier
2023-01-05 09:27:10 -06:00
David Taylor b1df914549
DEV: Update eslint-config-discourse, use prettier for hbs (#212) 2023-01-04 13:36:14 +01:00
Isaac Janzen 27b30b5efb
FIX: Group reports downloads (#213)
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.
2022-12-30 10:26:14 -06:00
Isaac Janzen f5cd03a451
FIX: Downloading query results (#211)
We were not passing the correct value from the `query-results-wrapper` to the `query-result` component causing downloads to fail.
2022-12-29 14:47:18 -06:00
Isaac Janzen ac6b0467a1
DEV: Update params for group reports (#207)
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).
2022-12-28 09:50:55 -06:00
Isaac Janzen 3e7605d8a0
DEV: Update params to use previously ran values on reload (#206)
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
2022-12-27 12:10:29 -06:00
Isaac Janzen 85c88c5d80
DEV: Better handling of no results (#205)
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
2022-12-20 16:55:11 -06:00
Isaac Janzen 4c70cfa100
Upgrade `query-result` to Octane (#204)
* Upgrade query-result to Octane
2022-12-20 12:09:37 -06:00
Isaac Janzen cf365f7df2
Upgrade explorer-schema onetable/enum to Octane (#203)
* Upgrade explorer-schema onetable/enum to Octane
2022-12-20 10:30:43 -06:00
Isaac Janzen 147bfec207
Upgrade `data-explorer-bar-chart` to Octane (#201)
* Upgrade `data-explorer-bar-chart` to Octane
2022-12-16 11:52:00 -06:00
Isaac Janzen 7d1a9d487d
Upgrade `explorer-schema` to Octane (#202)
* Upgrade `explorer-schema` to Octane
2022-12-16 11:51:36 -06:00
Isaac Janzen 8028b9f16a
Upgrade `param-input` to Octane (#196)
* Convert `param-input` to glimmer components
2022-12-16 11:41:03 -06:00
Isaac Janzen 9025646dc9
Hotfix category_id lookup (#199)
74dfc39530/assets/javascripts/discourse/components/query-row-content.js (L34-L35)

needed to pass the site object to 'lookup' parent functions and was erroring on category lookup.
2022-12-15 08:26:40 -06:00
Isaac Janzen 2934cc2129
Hotfix displaying posts (#197) 2022-12-14 09:06:36 -06:00
Isaac Janzen 74dfc39530
Upgrade query-row-content to Octane (#194)
* Upgrade query-row-content to octane
2022-12-13 09:21:01 -06:00
Isaac Janzen fea231f200
Upgrade share-report to Octane (#195)
* Upgrade share-report to Octane

* add requested changes
2022-12-13 08:49:39 -06:00
Sam 2313237a95
FIX: better handling of edge cases (#187)
- Require query name is present
- Ensure all routes are treated by default as .json, so errors flow correctly
- Remove superflous save/cancel controls from group settings
- Remove group control when item is destroyed
- Disable editing of query when it is deleted

Co-authored-by: Osama Sayegh <asooomaasoooma90@gmail.com>
2022-11-18 07:09:50 +11:00
Martin Brennan bf1a79c9ad
FIX: Click not opening query (#191)
Due to recent core changes for Ember in
0221855ba7
and 952b033165
the correct way of calling these actions must be observed,
otherwise clicking on a query did nothing.

This commit fixes the click and also makes scrollTop
work with the new {{on X}} Ember syntax.
2022-10-28 14:56:01 +10:00
Penar Musaraj 0deecbe2ae
DEV: Replace bootbox alert dialogs (#190) 2022-10-18 14:13:00 -04:00
Frank 82ec10d844
FIX: fixed the blueing of the bookmark icon (#186) 2022-08-19 00:07:35 +08:00
Constanza 272e9dd760
UX: Making the headers of the query results table sticky (#182) 2022-07-06 19:08:37 -04:00
Jarek Radosz 07e009e862
DEV: Update linting setup and fix issues (#179) 2022-06-17 15:01:34 +02:00
Isaac Janzen 780232c902
DEV: Remove use of run-loop-and-computed-dot-access (#178)
Context: https://deprecations.emberjs.com/v3.x/#toc_deprecated-run-loop-and-computed-dot-access
2022-06-17 14:18:36 +02:00
Frank 45b6e7eb4f
FEATURE: Bookmarkable QueryGroups. (#177)
Adds the ability for non-Admin users to bookmark Queries from inside Group > Reports > Query view.
2022-06-14 23:07:02 +08:00
Isaac Janzen 92bdea38b2
DEV: Remove 'htmlSafe' string prototype extensions (#176)
Context: https://deprecations.emberjs.com/v3.x/#toc_ember-string-prototype_extensions
2022-06-01 11:42:50 -05:00
Gerhard Schlager 65a112c8d2
FIX: Edit button shouldn't be visible for seeded queries (#174) 2022-05-17 18:05:05 +02:00
Isaac Janzen 01f52dc5c5
DEV: Remove 'dasherize' string prototype extensions (#173)
Context: https://deprecations.emberjs.com/v3.x/#toc_ember-string-prototype_extensions
2022-05-13 12:43:37 -05:00
Isaac Janzen d5e11a2c65
DEV: Remove 'capitalize' string prototype extensions (#172)
Context: https://deprecations.emberjs.com/v3.x/#toc_ember-string-prototype_extensions
2022-05-13 12:33:38 -05:00
Martin Brennan 50e9242d61
FIX: Use new properties for pick-files-button (#167)
Companion commit to core discourse/discourse#16375
2022-04-06 12:48:02 +10:00
Jarek Radosz 86cda5f213
DEV: Lose the es6 suffix (#165) 2022-03-05 17:21:01 +01:00
David Taylor 2a17f49f66 DEV: Bump eslint-config-discourse and correct violations 2022-01-26 14:44:10 +00:00
Bianca Nenciu c6dd79c805
FIX: Do not stringify null parameters (#151)
Sometimes the query page did not load if one of the query was null
because it called null.toString() and raised an exception.
2022-01-17 13:45:40 +02:00
Andrei Prigorshnev 58cfe737f7
DEV: migrate routes to the new @action pattern (#149) 2022-01-06 15:16:51 +04:00