Commit Graph

82 Commits

Author SHA1 Message Date
tshenry 6393831b0b FEATURE: Additional enums (#45)
Data explorer displays special information about various enums, this flags more fields that we know are enums leading to a clearer UX.
2019-12-09 14:20:34 +11:00
Penar Musaraj ffe315c4a2 Rubocop redundant return fix 2019-11-14 15:07:58 -05:00
Justin DiRose 48f0e2b982
FIX: Return all groups instead of truncated list (#42) 2019-11-14 12:39:55 -06:00
Joffrey JAFFEUX 4196321e41
FIX: ensures group_ids are not "" or nil (#39) 2019-10-16 12:43:10 +02:00
Arpit Jalan 2acab3ba89 FIX: do not raise error if query does not have group_ids 2019-09-13 12:00:29 +05:30
romanrizzi 588391cb2f Fix broken spec and linting errors 2019-09-11 11:52:06 -03:00
Mark VanLandingham 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 <robin.ward@gmail.com>

* [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 <robin.ward@gmail.com>
2019-09-11 10:09:41 -04:00
Sam Saffron 29862defaa FEATURE: add support for _url to link to a url
This new feature means that if you name a column `xyz_url` then the return
value will be treated as a URL.

If you would like to name the link use the format `name,https://cnn.com`
2019-05-13 14:44:51 +10:00
Guo Xiang Tan 817a233cef Add frozen string literal comment to files. 2019-05-13 10:42:48 +08:00
Robin Ward 53ec9262a8 FIX: Support new Reviewable API if present 2019-03-13 11:14:01 -04:00
Rishabh 13ab013df2 FIX: Ensure that all query information persists after delete/un-delete operations
https://meta.discourse.org/t/data-explorer-created-by-missing/107195
2019-01-28 12:30:17 +05:30
Rishabh a3c9cd7363 FIX: Don't send extra_data when exporting results to JSON
The extra data is needed to render avatars and user metadata when rendering results in the browser,
we can skip this data for JSON exports to reduce bloat
2019-01-24 12:46:02 +05:30
Rishabh a285a38e9c FIX: Allow the Data Explorer API to set LIMIT to "ALL"
Fixes a bug that prevented returning unlimited rows.

Example request:
{{base_url}}/admin/plugins/explorer/queries/6/run?api_key={{api_key}}&api_username={{api_username}}&limit=ALL

From the PostgreSQL docs: "LIMIT ALL" is treated as no limit
https://www.postgresql.org/docs/current/static/sql-select.html#SQL-LIMIT
2019-01-23 16:18:06 +05:30
Rishabh 77d603098f DEV: rubocop improvements for plugin.rb 2019-01-21 15:54:21 +05:30
Rishabh 8720c2cd5c DEV: Replace hardcoded result limit with a module constant 2019-01-21 14:21:53 +05:30
Penar Musaraj 061322e53a Finalize FA5 fixes 2018-11-15 11:12:32 -05:00
Penar Musaraj 3d6743dd14 Add another FA5 icon 2018-11-08 12:01:50 -05:00
Penar Musaraj d05fb698d6 FA5 icon fix 2018-11-08 11:37:23 -05:00
David Taylor 17e649d645 DEV: Rename shadowed variable 2018-10-22 21:24:55 +01:00
Rishabh b352e747c7
FEATURE: Ship default queries with the Data Explorer
Load default queries from queries.rb and save when run.
Each time a query is run, it picks up changes from queries.rb.
2018-10-10 16:59:13 +05:30
Rishabh Nambiar f876cf66f1 Increase result limit from 250 to 1000 2018-09-18 11:24:37 +05:30
Rishabh Nambiar 316923f190 FEATURE: Show the number of results after running a query (limit 250) 2018-09-18 11:15:31 +05:30
Rishabh Nambiar 1b68847d21 FEATURE: Sort queries by last_run_at as default 2018-08-27 20:10:25 +05:30
Rishabh Nambiar 42b6dbbae2 FIX: Remove bad default query description and add placeholder instead 2018-08-19 10:24:53 +05:30
Arpit Jalan d9e7b438b4 do not save username since we are already saving user_id 2018-08-14 18:13:30 +05:30
Rishabh Nambiar 83b1fcb54b Added User.find() & fixed scroll history bug 2018-08-14 17:38:08 +05:30
Rishabh Nambiar 6e806cc1df Added clickable rows, default query sorting by id and clickable usernames 2018-08-14 17:38:08 +05:30
Rishabh Nambiar e341d5a6fa List all previous queries on Data Explorer homepage 2018-08-14 17:38:08 +05:30
Sam 37be7a54f0 FEATURE: Upgrade to mini_sql
WARNING if you are on the stable branch of Discourse use the stable
branch of data explorer
2018-07-13 12:42:11 +10:00
Régis Hanol 7c94f98436 FIX: prevent creation of query with an empty name 2018-05-09 22:23:56 +02:00
Gerhard Schlager 4de3b1dcb9 Sort queries alphabetically 2018-02-23 15:01:50 +01:00
Gerhard Schlager bd28b6bbf2 FIX: CR LF prevented type validation for ints 2017-12-18 13:46:02 +01:00
Stephen Chung 0607abe2fd
Avoid exception when object.user is nil 2017-12-07 15:08:44 +08:00
Arpit Jalan 07cb0005b0 FIX: exporting result in CSV format was broken 2017-10-04 17:50:14 +05:30
Guo Xiang Tan dd6ed13a9a Remove use of deprecated `Fixnum`. 2017-09-04 14:06:19 +08:00
Guo Xiang Tan 6bb3d86d55 Use `before_action` for Rails 5 compatibility. 2017-09-04 13:59:06 +08:00
Guo Xiang Tan cc379ab757 Fix rubocop offenses. 2017-08-02 14:42:49 +09:00
Guo Xiang Tan 195931c6ba FIX: Avoid checking for a template when setting an etag. 2016-03-26 13:48:57 +08:00
Kane York 9956b9833e Add topic,category,group,reltime rendering 2015-09-21 14:43:23 -07:00
Kane York d4d541747e Add a statement timeout so you can't tie up the serve 2015-09-14 16:08:30 -07:00
Kane York 86a3d16ad4 Deprecations fixes 2015-09-14 15:34:57 -07:00
Kane York 7d50fbbdae Merge branch 'refactor' into 'master'
Conflicts:
	renamed assets/javascripts/discourse/adapters/query.js.es6
2015-08-25 21:39:22 -07:00
Kane York 7f96ea5632 Looks like it's working 2015-08-25 21:36:39 -07:00
Kane York e0e7022538 WIP commit 2015-08-25 20:48:19 -07:00
Kane York c4789df9e7 Re-add relations rendering 2015-08-05 16:41:51 -07:00
Régis Hanol 434122f9f5 FIX: remove limit when exporting to CSV 2015-08-04 19:23:50 +02:00
Kane York 329ba57fba Fix untested code path 2015-08-03 23:35:02 -07:00
Kane York 1601f4f269 Add 'download results as CSV' 2015-08-03 15:07:29 -07:00
Kane York d1a58e83a2 Data-explorer fix 2015-07-28 15:19:09 -07:00
Kane York fb42dc483c Add denormalized column info 2015-07-28 11:18:22 -07:00