Commit Graph
41 Commits
Author SHA1 Message Date
Gary Pendergast d726c4889e DEV: Split the Query Listing and Query Editing code (#356)
The code for listing all of the defined queries is mixed together with the code for editing a single query. Notably, this results in large amounts of unnecessary data being loaded for the list view, which causes substantial rendering slowdowns.

To address this issue, we now only load the necessary data for the list view, and load the full data when it's actually needed (any endpoint that returns a single query). The primary changes that achieve this are:

- Create a new `QueryDetailsSerializer` serialiser, which includes all of the query info, and change the existing `QuerySerializer` serialiser to only include the necessary attributes of each query for generating a list of them all.
- Split the monolith `/plugins/explorer` route into `/plugins/explorer` for showing just the list of queries, and `/plugins/explorer/queries/:query_id`, for showing/editing/running a specific query.
2025-02-10 14:54:01 +11:00
David Taylor bd6263e9b8 DEV: Bump dependencies and fix linting (#355) 2025-02-06 17:45:00 +01:00
David Taylor efb7f36a98 DEV: Update linting (#338) 2024-11-20 15:45:48 +01:00
锦心 5080ce9b1f UX: Rewrite param-input using FormKit (#307)
What does this PR do?
=====================

This PR refactors param-input to use FormKit. FormKit is a structured
form tool in the core. After the rewrite, we will be able to get semantic 
parameter error prompts, etc.

meta link: https://meta.discourse.org/t/wishlist-param-dropdown-for-data-explorer-query/253883/28?u=lhc_fl
2024-08-20 09:42:50 +08:00
锦心 e0bfa66f5f FIX: Create parameter input boxes after save (#303)
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
2024-08-05 15:58:51 +08:00
Penar Musaraj 2f1044820c FEATURE: Add group_list parameter type (#283)
This allows admins to select multiple groups from a dropdown list and
filter results using that parameter.
2024-03-12 12:06:01 -04:00
Jarek Radosz e067df0b43 DEV: Update linting (#267) 2023-12-01 16:47:54 +01: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 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
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
Jarek Radosz 86cda5f213 DEV: Lose the es6 suffix (#165) 2022-03-05 17:21:01 +01:00
Osama Sayegh 8ef3fa38d6 Revert "Revert "DEV: Migrate from {{user-selector}} to {{email-group-user-chooser}} (#94)" (#102)" (#103)
Follow-up to https://github.com/discourse/discourse-data-explorer/pull/102. This is essentially a revert of that PR, the only difference is that the `.discourse-compatibility` file now pins the plugin to https://github.com/discourse/discourse-data-explorer/commit/60ffd4bc4d357b365cdb8a6764cec621f2edcf81 for sites ≤ `2.7.0.beta3`.
2021-03-06 20:16:49 +03:00
Osama Sayegh 60ffd4bc4d Revert "DEV: Migrate from {{user-selector}} to {{email-group-user-chooser}} (#94)" (#102)
The reverted commit pinned the plugin version on stable because the changes in that commit aren't compatible with stable. However, the version that we pinned the plugin to has a bug on stable and https://github.com/discourse/discourse-data-explorer/commit/50e62d84e854b8980e2201f729573f5ce5a8d2fc fixes that bug. So we need to temporarily revert https://github.com/discourse/discourse-data-explorer/commit/5e24556b24f76fe664a732339c773d58ab106fbe to unpin the plugin and I'll create another PR to undo this revert and re-pin the plugin version to this commit for sites on stable.

Meta topic: https://meta.discourse.org/t/data-explorer-editing-broken-on-stable/181274/11?u=osama.
2021-03-06 14:48:58 +03:00
Osama Sayegh 5e24556b24 DEV: Migrate from {{user-selector}} to {{email-group-user-chooser}} (#94) 2021-02-16 13:37:30 +03:00
Joffrey JAFFEUX 8ab94e334c DEV: prettier 2.2.1 (#89) 2021-01-27 10:38:56 +01:00
Martin Brennan a4665c27e8 Revert "Import getURL to fix deprecation warnings (#52)"
This reverts commit d643cf742e.

A previous change was already made in this repo to import getURL,
this causes a double import which breaks the build.
2020-10-07 13:13:38 +10:00
Mark VanLandingham d643cf742e Import getURL to fix deprecation warnings (#52) 2020-10-07 12:58:52 +11:00
Joffrey JAFFEUX e0a3ad12a6 DEV: apply coding standards (#66) 2020-09-04 13:23:11 +02:00
Krzysztof Kotlarek fe0806eb2a FEATURE: introduce data-explorer tables (#61)
Instead of using `PluginStoreRow` we should use plugin-specific models like `DataExplorer::Query` and `DataExplorer::QueryGroup`
2020-08-27 10:29:57 +10:00
Robin Ward 0c1a9aa4bc FIX: deprecations 2020-07-06 15:25:19 -04:00
Penar Musaraj 277346b097 DEV: Find/replace deprecated decorators 2020-02-19 11:57:59 -05:00
Mark VanLandinghamandRobin Ward 30fe9289b8 Allow groups to access queries (#36)
* [WIP] group ids saving on new reports

* Add groups to default queries, and added tab connector

* group_ids set to empty array for default queries

* group reports route (in & and) action

* [WIP] created group reports show route/controller

* Find correct query in show route

* Removed empty array for group_ids in query file

* Add report show view, where users can run queries

* Removed unneeded commas from queries.rb

* Allow non-admin group members to access reports

* query-result component dynamic download url based on location

* Removed accidental changes, and corrected tab size

* Group members can add params to queries

* Specs for new QueryController actions

* remove "Inlude query plan" from group reports

* Run prettier

* return and return -> return render

Co-Authored-By: Robin Ward <[email protected]>

* [WIP] changes from review

* Remove weird [-1] group_ids logic, for a simply check for [] in query update action

* Added integration tests for group report access

* Using guardian for securing endpoints, and much improved specs

* Update assets/javascripts/discourse/components/group-reports-nav-item.js.es6

Co-Authored-By: Robin Ward <[email protected]>
2019-09-11 10:09:41 -04:00
Joffrey JAFFEUX b9169ec28e REFACTOR: old patterns, deprecations and dead code (#35) 2019-07-16 12:46:32 +02:00
Penar Musaraj ed2e0b8c13 Run Prettier 2019-06-14 13:27:41 -04:00
Rishabh 13ab013df2 FIX: Ensure that all query information persists after delete/un-delete operations
https://meta.discourse.org/t/data-explorer-created-by-missing/107195
2019-01-28 12:30:17 +05:30
Rishabh 344f6e357d FEATURE: Replace combo-box with search filter (#28)
* FEATURE: Replace combo-box with search filter
* Delete unused listname property and css fixes
* Use ES6 syntax and `@computed` decorator
2018-11-02 18:11:20 +05:30
Rishabh Nambiar 9d7db064af run Prettier 2018-10-10 17:31:14 +05:30
Guo Xiang Tan bcdff915dc Make eslint happy. 2017-08-02 18:05:33 +09:00
Kane York 45c2636ea0 Fix boolean parameters 2015-07-15 11:00:31 -07:00
Kane York 0672e99da2 Work on new parameter model 2015-07-14 16:01:38 -07:00
Kane York a0f38a2d17 Preserve pre-typed query parameters 2015-07-02 09:19:30 -07:00
Kane York d9dbfc8408 Add text for no queries, keep results in query object 2015-07-02 09:15:55 -07:00
Kane York 1ea74847ae Display errors, convert integers 2015-06-30 19:51:38 -07:00
Kane York c56a40cacd Import the result table and we're live 2015-06-30 15:12:12 -07:00
Kane York dba181d92e Bunch of progress. Tuesday 1PM 2015-06-30 12:52:17 -07:00
Kane York ee1cc2d96d Tuesday morning, 10AM 2015-06-30 10:20:22 -07:00
Kane York a12c906c9a mostly styling change 2015-06-29 12:10:24 -07:00
Kane York c52ac59eee Missed description sections, try to get model to work 2015-06-26 09:16:09 -07:00
Kane York 2c71bc11aa More work on interface, fixes for backend 2015-06-25 14:53:03 -07:00