1
0
mirror of synced 2026-05-22 22:13:19 +00:00

622 Commits

Author SHA1 Message Date
Jarek Radosz b61e81fb61 DEV: Deprecate the plugin (#382) 2025-07-14 15:09:46 +01:00
Linca 12a3fdc246 FIX: Don't add only: nil serializing options of data explorer results (#381)
`only: nil` will cause ArraySerializer to overwrite the default Serializer
settings, which will cause Topic, Post, etc. to be serialized as empty
`{}`. We need to exclude the configuration without only.

The current test case only ensures that no error is raised, but does not
guarantee the accuracy of the result, which indirectly introduces this
bug. Additional tests are added to ensure consistent results.
2025-07-07 08:46:49 +08:00
Linca 12a26cc821 FEATURE: Add tag group entity support to query results (#380)
The data explorer has special logic (“Automatic Entity Resolution”) to
show links to various objects whenever a column name is `user_id`,
`group_id`, `topic_id`, `category_id` or `badge_id`.

This commit adds the support for `tag_group_id`
2025-07-03 11:32:46 +08:00
dependabot[bot] d60c7acbe8 Build(deps-dev): Bump rack from 3.1.12 to 3.1.16 (#378)
Bumps [rack](https://github.com/rack/rack) from 3.1.12 to 3.1.16.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/v3.1.12...v3.1.16)

---
updated-dependencies:
- dependency-name: rack
  dependency-version: 3.1.16
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-21 17:46:50 +02:00
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
Yuriy Kurant 5a2bfcebff UX: category-id-input: allows no-category selection (#377)
The `category_id` parameter now includes the *(no category)* option, which allows clearing a previously selected category.

The *(no category)* option is selected by default.

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2025-06-04 21:40:29 +08:00
Natalie Tay a0a7f8d999 FIX: Add new attribute that is required when using the basic topic serializer (#375)
In discourse/discourse#32618 we added the dependency on locales to the basic topic serializer gated behind SiteSetting.experimental_content_localization. This is so that fancy_titles can be rendered in the language of the user.

Error: `ActiveModel::MissingAttributeError (missing attribute 'locale' for Topic)`
This commit adds that dependency to extra_data_pluck_fields which lists fields required from the serializer.
2025-05-20 18:54:58 +08:00
Discourse Translator Bot ca9f0e07cb Update translations (#373) 2025-05-07 15:17:34 +02:00
Discourse Translator Bot eee99d01e2 Update translations (#370) 2025-04-28 13:42:06 +02:00
David Battersby 9306bc2d04 DEV: improve group query access for report PM (#372)
This change updates the report generator script to handle groups first, that way when the option users_from_group: true is used we can determine query access based on the user rather than the whole group.
2025-04-28 12:12:20 +04:00
Krzysztof Kotlarek f3ecd52b94 FIX: allow query to be explained (#371)
Bug introduced during refactoring in this PR: https://github.com/discourse/discourse-data-explorer/pull/318

Explain parameter must be passed to `ResultFormatConverter`.
2025-04-23 14:02:20 +08:00
David Battersby 08a01b23fe FEATURE: add option to send individual report PM to group members (#369)
This change adds an option to the Schedule a PM with Data Explorer results script, which when selected will send individual PMs to each group member selected in the Send to User, Group or Email field.

When this field is not checked, the functionality for groups will work as it did before (ie. send a single PM to the group).
2025-04-18 15:50:57 +04:00
Loïc Guitaut 7922daf500 DEV: Add system spec to check core features are working fine (#368) 2025-04-09 14:22:19 +02:00
Kelv f31d7c3de3 DEV: update deprecated icon fa-user in test (#367) 2025-03-28 23:05:33 +08:00
Jarek Radosz 2c1861307d DEV: Update linting (#366) 2025-03-17 10:58:02 +00:00
Gary Pendergast 8589c56f19 FIX: Ensure dates passed in query params are parsed in the local timezone. (#365)
When passing date values for reports as URL parameters, they were being parsed by the standard JavaScript Date object, which due to legacy reasons parses date-only strings in UTC, all other date formats are assumed to be in the browser's local timezone.

This change switches to using moment's parser, which assumes that all strings passed to it are in the browser's local timezone.
2025-03-14 14:17:14 +11:00
Jarek Radosz e290d651f2 DEV: Update linting (#364) 2025-03-13 15:08:17 +00:00
Ted Johansson 41ee039443 FIX: Discourse automation reports with parameters (#363)
When setting up an automation to create a DM or a post with a report on a recurring basis, and using a Data Explorer query that has parameters, we encounter an error.

The `.params_to_hash` method currently expects an array of arrays for the parameters, but in reality they seem to be arrays of hashes.

This change makes `.params_to_hash` work with arrays of hashes. It also preserves the ability to work with nested arrays in case this is used somewhere else.
2025-03-13 17:50:16 +08:00
Jarek Radosz b21f5d15d8 DEV: Update license (#360) 2025-02-24 11:21:21 +08:00
dependabot[bot] 6cd9e22526 Build(deps-dev): Bump rack from 3.0.11 to 3.0.12 (#358)
Bumps [rack](https://github.com/rack/rack) from 3.0.11 to 3.0.12.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/commits/v3.0.12)

---
updated-dependencies:
- dependency-name: rack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-13 23:27:35 +00: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
Discourse Translator Bot 6dc695cced Update translations (#357) 2025-02-11 16:42:59 +01: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
David Taylor d4be33dcc4 DEV: Pin version for Discourse <3.5.0.beta1-dev (#354) 2025-02-05 20:00:03 +01:00
Renato Atilio 2ba204a1de FIX: boolean field default state mismatch (#353)
When reading an existing state from the params defaults or from URL params, the input elements weren't representing the right state for booleans and "3-state/null booleans".

internal /t/-/118495
2025-02-04 09:22:49 -03:00
Discourse Translator Bot bda0c29e7a Update translations (#352) 2025-01-31 10:48:32 +01:00
Discourse Translator Bot 7209f26af1 Update translations (#351) 2025-01-21 15:55:20 +01:00
David Taylor 5751283ec5 DEV: Colocate component templates (#350) 2025-01-09 13:26:13 +00: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
Discourse Translator Bot d961589f97 Update translations (#348) 2024-12-18 15:19:32 +01:00
Discourse Translator Bot 593da9223e Update translations (#347) 2024-12-10 20:16:29 +01:00
Joffrey JAFFEUX 504f46ba11 UX: clarify the need for authorized extension (#346)
When checking `attach_csv` in the `Schedule a PM with Data Explorer results`
 automation script, `csv` has to be added to the list of authorized extensions in the site settings. This will now raise an error if it's not the case.
2024-12-10 11:02:49 +01:00
Kelv 256ef27b85 DEV: Update more deprecated Font Awesome icon names (#345) 2024-12-06 20:45:09 +01:00
shuaib-swzd 2ea9951175 DEV: Safe navigation to handle to nil current_user class issue (#344)
Another private plugin is extending this plugin and the current_user check here is a problem -- adding safe navigation does not break any existing functionality but allows for future changes.
2024-12-05 08:47:44 -06:00
Discourse Translator Bot 04edc3776e Update translations (#342) 2024-12-04 11:59:18 +01:00
Kelv 4c8b164127 DEV: Update deprecated Font Awesome icon names (#343) 2024-12-04 02:37:51 +01:00
David Taylor bdff229ca0 DEV: Update linting (#341) 2024-11-28 15:51:12 +01:00
David Taylor e5d951c9a9 PERF: Remove dynamic use of <template> (#340)
Context: https://github.com/discourse/discourse/pull/29942
2024-11-26 19:10:23 +00:00
David Taylor b2ce8183c1 DEV: Update linting (#339) 2024-11-20 18:53:05 +01:00
David Taylor efb7f36a98 DEV: Update linting (#338) 2024-11-20 15:45:48 +01:00
dependabot[bot] 3a58ba6b47 Build(deps): Bump cross-spawn from 7.0.3 to 7.0.6 (#337)
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-19 10:47:40 +00:00
David Taylor e841ad40fa DEV: Update eslint config (#336) 2024-11-19 11:20:51 +01:00
dependabot[bot] f289194701 Build(deps-dev): Bump rexml from 3.3.6 to 3.3.9 (#335)
Bumps [rexml](https://github.com/ruby/rexml) from 3.3.6 to 3.3.9.
- [Release notes](https://github.com/ruby/rexml/releases)
- [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/rexml/compare/v3.3.6...v3.3.9)

---
updated-dependencies:
- dependency-name: rexml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-28 20:37:34 +01:00
Gabriel Grubba 66ea40fe3d DEV: Update plugin annotations (#334) 2024-10-25 09:42:37 +01:00
Jarek Radosz e1db1b0fe2 DEV: Remove deprecated use_redis_snapshotting (#333) 2024-10-21 15:27:37 +02:00
Discourse Translator Bot 88f18b8acd Update translations (#332) 2024-10-16 17:51:57 +09:00
Kelv d4f5257395 DEV: Switch to use pnpm (#331) 2024-10-14 13:39:24 +02:00
Martin Brennan 8d19a33250 FIX: Optionally linkify URL columns server-side (#330)
Followup da1c99ec2d

We already had the functionality to convert results like
this:

```
|blah_url|
|--------|
|3,https://test.com|
```

To a link clientside, so in the UI it looks like this:

```
<a href="https://test.com">3</a>
```

With the addition of the recurring report to post automation,
and the existing report to PM automation, we also need to be
able to do this server-side, so reports don't come out malformed
if they have these type of count + URL columns.
2024-10-14 16:33:13 +10:00