461 Commits

Author SHA1 Message Date
Isaac Janzen
5a65c15463
DEV: Upgrade admin-plugins-explorer to Octane (#219) 2023-02-06 10:21:58 -06:00
Discourse Translator Bot
f51bc050a2
Update translations (#217) 2023-01-18 11:42:21 +01:00
Isaac Janzen
910b95bef8
FIX: Opening and closing of schema columns (#215)
Per: https://meta.discourse.org/t/cant-select-a-column-name-as-releasing-the-mouse-click-will-close-the-current-table-dropdown/250715/3

Fixed column toggling where columns should open and close when clicking column name, and not when clicking the column body.
2023-01-10 14:03:15 -06:00
Discourse Translator Bot
2b2e351331
Update translations (#214) 2023-01-10 20:54:37 +01:00
discoursebot
e9f132b0d7
DEV: Update CI workflows (#216)
Co-authored-by: discoursebuild <build@discourse.org>
2023-01-10 18:11:40 +00: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
27b30b5efb
FIX: Group reports downloads (#213)
We were not passing the correct arguments through in the group reports template causing the download url to default to an admin route. This made downloads unavailable to non-admin users. Fixed by passing the correct values through.
2022-12-30 10:26:14 -06:00
Isaac Janzen
f5cd03a451
FIX: Downloading query results (#211)
We were not passing the correct value from the `query-results-wrapper` to the `query-result` component causing downloads to fail.
2022-12-29 14:47:18 -06:00
dependabot[bot]
974be7d591
Build(deps): Bump json5 from 2.2.1 to 2.2.2 (#210)
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-29 12:22:49 -05:00
David Taylor
148d6c32a3
DEV: Introduce syntax_tree for ruby formatting (#208) 2022-12-29 13:31:29 +01:00
Isaac Janzen
ac6b0467a1
DEV: Update params for group reports (#207)
During the upgrade to Octane group reports did not have the necessary 'updateParams' function added to have the param input changes bubble up to the parent. This PR adds the missing function as well as a small test to check that params can be inputted as expected (inserting a param would error previously).
2022-12-28 09:50:55 -06: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
85c88c5d80
DEV: Better handling of no results (#205)
When there were no query results it would throw an error due to `this.resultCount` always passing as it is in the format of

```
"INTEGER - results returned"
```

so we need to grab the first index of the string and check if the integer is great than 0
2022-12-20 16:55:11 -06: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
cf365f7df2
Upgrade explorer-schema onetable/enum to Octane (#203)
* Upgrade explorer-schema onetable/enum to Octane
2022-12-20 10:30:43 -06:00
Isaac Janzen
147bfec207
Upgrade data-explorer-bar-chart to Octane (#201)
* Upgrade `data-explorer-bar-chart` to Octane
2022-12-16 11:52:00 -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
bd602b02a0
Add test for category result (#200) 2022-12-15 11:35:18 -06:00
Isaac Janzen
9025646dc9
Hotfix category_id lookup (#199)
74dfc39530/assets/javascripts/discourse/components/query-row-content.js (L34-L35)

needed to pass the site object to 'lookup' parent functions and was erroring on category lookup.
2022-12-15 08:26:40 -06:00
Isaac Janzen
479d51faf0
Add followup test for displaying post in query results (#198) 2022-12-14 12:09:25 -06:00
Isaac Janzen
2934cc2129
Hotfix displaying posts (#197) 2022-12-14 09:06:36 -06:00
Isaac Janzen
74dfc39530
Upgrade query-row-content to Octane (#194)
* Upgrade query-row-content to octane
2022-12-13 09:21:01 -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
Discourse Translator Bot
467b6c8a91
Update translations (#193) 2022-11-29 15:36:46 +01:00
Sam
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 <asooomaasoooma90@gmail.com>
2022-11-18 07:09:50 +11:00
discoursebot
41a5e0a27a
DEV: Update CI workflows (#192)
Co-authored-by: discoursebuild <build@discourse.org>
2022-11-07 12:32:48 -06:00
Martin Brennan
bf1a79c9ad
FIX: Click not opening query (#191)
Due to recent core changes for Ember in
0221855ba7
and 952b033165
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
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 a48b7d1ab5
2022-07-18 14:59:14 +03:00
Martin Brennan
a48b7d1ab5
DEV: Bookmarkable reminder refinement (#183)
Incorporates changes from core
 0ca1152c1c
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
discoursebot
00b669a37d
DEV: Update CI workflows (#180)
Co-authored-by: discoursebuild <build@discourse.org>
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
discoursebot
6223c2d8a5
DEV: Update CI workflows (#175)
Co-authored-by: discoursebuild <build@discourse.org>
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] <support@github.com>

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] <support@github.com>

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] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-12 12:18:25 +02:00