109 Commits
Author SHA1 Message Date
Krzysztof Kotlarek 6727e32874 FIX: edit button not working (#379)
After this PR <a> link stopped working correctly page started doing a full reload. <Button> component behaves correctly.

https://github.com/discourse/discourse-data-explorer/pull/376
2025-06-11 14:01:11 +08:00
Jarek Radosz 85b485e1bf DEV: Update linting config and run gjs-codemod (#376) 2025-06-05 11:36:14 +01:00
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
Ella E. 950246a946 UX: Apply admin table classes for consistent mobile styling on the recent queries page (#349)
* UX: Apply admin table classes for consistent mobile styling on the recent queries page

* DEV: Apply prettier
2024-12-23 08:41:46 -07:00
Kelv 256ef27b85 DEV: Update more deprecated Font Awesome icon names (#345) 2024-12-06 20:45:09 +01:00
Kelv 4c8b164127 DEV: Update deprecated Font Awesome icon names (#343) 2024-12-04 02:37:51 +01:00
David Taylor efb7f36a98 DEV: Update linting (#338) 2024-11-20 15:45:48 +01:00
Jarek Radosz d31d89942e DEV: Update ace-editor usage (#319)
AceEditor is now a glimmer component (see: https://github.com/discourse/discourse/pull/28492) and it follows the "data down, actions up" pattern.
2024-08-27 13:42:25 +02: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
锦心 6db96d6687 FEATURE: Add shortcut keys for save and execute for query editor (#299)
This is a very simple change that adds two shortcuts to the query editor
in Data Explorer: `ctrl+s` to save, and `ctrl+enter` to save and run the
query.

Related meta topic: https://meta.discourse.org/t/wishlist-ctrl-enter-to-run-the-data-explorer-query-im-editing/280564
2024-07-22 16:14:22 +08:00
Osama Sayegh 7d99c621a9 FIX: Use correct label for column header (#297)
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".
2024-07-02 00:13:04 +03:00
Jarek Radosz 31ebf69d81 DEV: Update linting (#276) 2024-01-15 11:17:19 +00:00
Jarek Radosz e067df0b43 DEV: Update linting (#267) 2023-12-01 16:47:54 +01: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
David Taylor b1df914549 DEV: Update eslint-config-discourse, use prettier for hbs (#212) 2023-01-04 13:36:14 +01: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 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 fea231f200 Upgrade share-report to Octane (#195)
* Upgrade share-report to Octane

* add requested changes
2022-12-13 08:49:39 -06:00
SamandOsama Sayegh 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 <[email protected]>
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
https://github.com/discourse/discourse/commit/0221855ba783c6d96d2dbf2ec9f7e92b5297499b
and https://github.com/discourse/discourse/commit/952b033165c2b77872d8cc79b0678dc4293c5ee1
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
Jarek Radosz 07e009e862 DEV: Update linting setup and fix issues (#179) 2022-06-17 15:01:34 +02:00
Gerhard Schlager 65a112c8d2 FIX: Edit button shouldn't be visible for seeded queries (#174) 2022-05-17 18:05:05 +02: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
Guhyoun NamandMark VanLandingham 286b5b5fe7 FEATURE: Add Data Explorer Params to the URL on run (#128)
Co-authored-by: Mark VanLandingham <[email protected]>
2021-09-14 10:10:16 -05:00
Penar Musaraj 0c9005513a UX: Fix button alignment following core changes (#137) 2021-09-14 09:44:32 -04:00
Andrei Prigorshnev 4a98cc8af8 FEATURE: get rid of the import a query modal (#127)
This is the new version of #126. Now the pick-files-button moved to core. To import a query into Data Explorer, you need to push the button and then deal with the import modal. Instead, we want just to be triggering a system file picker directly. This PR makes it happen.
2021-08-20 14:26:48 +04:00
Jarek Radosz cf2735162a DEV: Fix template linting issues (#124)
* Update test
* Remove the empty line in table
2021-07-05 23:15:57 +02:00
David Taylor 4354e1b766 DEV: Resolve some template linting issues (#123)
Some larger issues still remain, but this is a good first step
2021-07-02 16:35:50 +01:00
Mark VanLandingham f3b2011ae1 FIX: Translation of column headers in query table (#122) 2021-07-01 08:58:45 -05:00
Andrei Prigorshnev 782dc09d96 UX: Add a help modal dialog (#109) 2021-04-15 19:17:07 +04: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
Rishabh fe420931ba FIX: Use updated routes to link user profiles (#60)
FIX links to user profiles from the old route `/users/` to the new route `/u/`.
2020-08-18 11:31:05 +02:00
AndreaHabib 8bdfd845db UI: Fixed missing text above query list for sorting (#58)
* changed directory-toggle to table-header-toggle which fixed the issue
2020-08-11 12:17:36 -05:00
Joffrey JAFFEUX df9e21911e FIX: makes group selector works with sk2 (#46) 2020-02-10 08:37:20 +01:00
Penar Musaraj 86516dadbb DEV: replace "warning" icons with "exclamation-triangle" 2020-01-06 12:52:27 -05:00
Mark VanLandingham d811b0c7a3 FIX: Use i18n for allow groups label (#44) 2020-01-06 12:08:35 +01:00
Mark VanLandingham 446e6bf29c FEATURE: Popup to copy shareable links to reports (#41)
* FEATURE: Popup to copy shareable links to reports

* Only show created_at if it is non-empty

* remove unneeded dependencies in share-report

* Use Discourse.BaseUrl and i18n some text
2019-10-28 14:32:09 -05:00
Joffrey JAFFEUX 096ad2d62c FIX: do not allow to create groups from group selection (#38) 2019-10-16 12:43:23 +02: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
Osama Sayegh 859021bb3c UX: make SQL editor resizable (#33) 2019-04-07 09:05:43 +03:00
Rishabh 6a69daf39a UX: Clean up button styles for query pages
- Add a "play" glyph for the Run & SaveRun buttons
- ensure that there's only one primary button on the page i.e. Run
- Remove btn-danger from discard button
- remove redundant button class from create button
- Improve redundant copy by removing the word "Query"
2019-02-05 14:21:52 +05:30
Joffrey JAFFEUX 2b6357f8b4 FIX: ember 3 support 2018-12-16 15:22:23 +01:00
Penar Musaraj 061322e53a Finalize FA5 fixes 2018-11-15 11:12:32 -05:00