Commit Graph
432 Commits
Author SHA1 Message Date
Penar Musaraj 0deecbe2ae DEV: Replace bootbox alert dialogs (#190) 2022-10-18 14:13:00 -04:00
Alan Guo Xiang Tan 4236689d27 FIX: Errors when running query due to PG template patterns or comments (#189)
Before this fix, the use of PG template patterns containing ":" or the
use of "?" in comments in the SQL will result in an error being raised
because `DB.param_encoder.encode` calls ActiveRecord's `sanitize_sql_array` which is
meant for SQL fragments and not an entire SQL string.

Instead we change data-explorer to use `MiniSql::InlineParamEncoder`
instead which takes into account of template patterns and does not trip
on `?` which is a special param encoding character used by ActiveRecord.
2022-10-10 09:03:37 +08:00
David Taylor 729e5a2add DEV: Bump rubocop-discourse (#188)
* DEV: Bump rubocop-discourse

* Fix rubocop violations
2022-10-03 22:20:04 +02:00
Frank 16bb6a946c FIX: Allow groups to access system queries (#185)
* FIX: allow groups to access system queries (without having to run the query once first)

Bug is: Trying to allow a group to access a system query results in a Discourse::NotFound unless the query is run first.

Cause:

 - System queries don't exist in the database by default
 - update calls set_query before action
 - set_query searches the database for the system query with Query.find_by(:id), which will not exist by default.
 - running system queries first fixes this because Query.find is overridden to include system queries (Queries.default) in its results, avoiding the Discourse::NotFound.

Solution: use the overridden Query.find in set_query to include system queries in the search, instead of Query.find_by(:id)

* Added test for fixing allowing groups to access system query.

* Fixed test formatting.
2022-08-19 00:14:07 +08:00
Frank 82ec10d844 FIX: fixed the blueing of the bookmark icon (#186) 2022-08-19 00:07:35 +08:00
Osama Sayegh bf56ab3559 DEV: Update last .discourse-compatibility entry's target to 2.9.0.beta6
We can't target 2.9.0.beta7 because it pins the plugin version on installed on `tests-passed` site because the Discourse version in `tests-passed` is 2.9.0.beta7.

Follow-up to https://github.com/discourse/discourse-data-explorer/commit/a48b7d1ab53937cb1edf4ba0c22d72bca31082e4
2022-07-18 14:59:14 +03:00
Martin Brennan a48b7d1ab5 DEV: Bookmarkable reminder refinement (#183)
Incorporates changes from core
 https://github.com/discourse/discourse/commit/0ca1152c1cc36f5fb23af1ccedfb6678fea1f8f3
2022-07-18 13:40:24 +10:00
Constanza 272e9dd760 UX: Making the headers of the query results table sticky (#182) 2022-07-06 19:08:37 -04:00
Discourse Translator Bot 8a1bdb5759 Update translations (#181) 2022-06-21 15:27:08 +02:00
discoursebotanddiscoursebuild 00b669a37d DEV: Update CI workflows (#180)
Co-authored-by: discoursebuild <[email protected]>
2022-06-17 21:34:29 +02: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
discoursebotanddiscoursebuild 6223c2d8a5 DEV: Update CI workflows (#175)
Co-authored-by: discoursebuild <[email protected]>
2022-05-23 17:00:09 +02: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
dependabot[bot] 9d9bf9051f Build(deps): Bump async from 2.6.3 to 2.6.4 (#171)
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

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

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-29 18:04:10 +02:00
dependabot[bot] baaac7ce67 Build(deps): Bump ansi-regex from 4.1.0 to 4.1.1 (#170)
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-12 12:33:07 +02:00
dependabot[bot] fd30b4c7ab Build(deps): Bump minimist from 1.2.5 to 1.2.6 (#169)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

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

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-12 12:18:25 +02:00
Osama Sayegh 43d699769a DEV: Lock plugin version to beta2 instead of beta3 (#168)
Follow-up to https://github.com/discourse/discourse-data-explorer/commit/50e9242d61349b296660211dd4eafe5c7622bdf7

Discourse `main` branch is currently on beta3 so we can't lock the plugin version against that because otherwise the plugin would be locked at e7c19ac107 until core's bumped to beta4.
2022-04-06 15:32:40 +03: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
discoursebotanddiscoursebuild e7c19ac107 DEV: Update CI workflows (#166)
Co-authored-by: discoursebuild <[email protected]>
2022-03-22 14:03:16 +01:00
Jarek Radosz 86cda5f213 DEV: Lose the es6 suffix (#165) 2022-03-05 17:21:01 +01:00
Gavin 9f7d4a6f0c DEV: Update README.md (#164) 2022-02-21 20:59:32 +01:00
Discourse Translator Bot 2c6cde8eea Update translations (#163) 2022-02-15 15:10:05 +01:00
Discourse Translator Bot 4ecbca8fe3 Update translations (#162) 2022-02-08 14:13:10 +01:00
Jarek Radosz a9403561ef DEV: Fix specs flakyness (#160) 2022-02-01 21:38:31 +01:00
Jarek Radosz bac43572cb DEV: Clean up some specs code (#161) 2022-02-01 21:38:24 +01:00
Discourse Translator Bot 4813615488 Update translations (#159) 2022-02-01 16:15:13 +01:00
David Taylor 2a17f49f66 DEV: Bump eslint-config-discourse and correct violations 2022-01-26 14:44:10 +00:00
discoursebuild 2881aa771f DEV: Update CI workflows 2022-01-26 14:44:10 +00:00
Discourse Translator Bot 45f1a04ca5 Update translations (#158) 2022-01-25 14:27:01 +01:00
Gerhard Schlager b6dadcae54 Update client.en.yml (#156) 2022-01-24 16:02:42 +01:00
Osama Sayegh 8464d517b2 DEV: Improve tests (#155) 2022-01-21 07:15:23 +03:00
Osama Sayegh ea66bcdc75 FEATURE: Add an API scope for running queries (#154) 2022-01-21 07:15:04 +03:00
Martin Brennan 70b973ea9a FEATURE: Move query limit to hidden site setting (#153)
Previously the `QUERY_RESULT_DEFAULT_LIMIT` const was used
to limit the number of query results. This commit adds the
`data_explorer_query_result_limit` site setting which defaults
to 1000 and has a max of 10000 which matches the const
`QUERY_RESULT_MAX_LIMIT`.
2022-01-19 12:27:21 +10:00
Discourse Translator Bot 8aca7767e2 Update translations (#152) 2022-01-18 14:41:37 +01: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
Discourse Translator Bot b8763be6d6 Update translations (#150) 2022-01-04 17:39:28 +01:00
Discourse Translator Bot a8f4b9ea7c Update translations (#148) 2021-12-28 14:13:54 +01:00
discoursebotanddavidtaylorhq f77f599906 DEV: Update CI workflows (#147)
Co-authored-by: davidtaylorhq <[email protected]>
2021-12-16 16:18:12 +00:00
Discourse Translator Bot cf8a1b0a7f Update translations (#146) 2021-12-14 14:53:31 +01:00
Jarek Radosz 3ce778ec6d DEV: Fix store:main deprecation (#145) 2021-11-24 15:28:12 +01:00
Jarek Radosz 545fb426f3 DEV: Make frontend tests work with ember-cli (#144) 2021-09-22 11:13:32 +02:00
Jarek Radosz 4626483514 DEV: Don't explicitly load files (#143)
1. It doesn't seem to be necessary?
2. It looks like it was triggering some warnings (`Creating scope :for_group. Overwriting existing method DataExplorer::Query.for_group.`)
2021-09-22 11:13:19 +02:00
Discourse Translator Bot ee2ff2361d Update translations (#142) 2021-09-21 15:11:41 +02:00
Martin Brennan a61551b005 DEV: Remove bookmark reminder_type reference (#141)
See https://github.com/discourse/discourse/commit/41e19adb0d7685303009650efec3ebec0319c577
2021-09-16 10:47:42 +10:00