Commit Graph
11 Commits
Author SHA1 Message Date
Gary Pendergast c13e79d21b FIX: Query downloads were being passed an incorrect query object. (#359)
This is a follow-up to d726c4889e.

The previous change missed changing the name of the query object when passing it to QueryResultsWrapper, which resulted in the download links not working properly after a query was run.

This change fixes that bug, and includes an acceptance test to ensure it stays fixed during future work on this plugin.
2025-02-14 10:11:32 +11:00
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
Jarek Radosz f62d8cc8a2 DEV: Update tests (#323)
new imports, resolved deprecations, qunit-dom, strict assertions, fixed flakes, migrated the legacy component test, typos, gjs
2024-08-28 13:51:37 +02:00
Jarek Radosz e067df0b43 DEV: Update linting (#267) 2023-12-01 16:47:54 +01:00
Jarek Radosz e468cf8ab0 DEV: Update visit paths in tests (#265)
Omitting `/` prefix was incorrect and could break in the future (see: https://github.com/discourse/discourse/pull/24445)
2023-11-21 22:23:35 +01:00
Jan Cernik 2144e7b3ba FIX: Show "false" and "0" in query result (#244) 2023-05-04 19:45:43 -03: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 4c70cfa100 Upgrade query-result to Octane (#204)
* Upgrade query-result to Octane
2022-12-20 12:09:37 -06:00
Jarek Radosz 07e009e862 DEV: Update linting setup and fix issues (#179) 2022-06-17 15:01:34 +02:00
Jarek Radosz 86cda5f213 DEV: Lose the es6 suffix (#165) 2022-03-05 17:21:01 +01:00