Commit Graph

14 Commits

Author SHA1 Message Date
Vinoth Kannan cfe6452d11 SPEC: limit maximum number of rows correctly.
96a8d1862e
2020-02-26 16:00:15 +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
Guo Xiang Tan 817a233cef Add frozen string literal comment to files. 2019-05-13 10:42:48 +08: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
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
Gerhard Schlager 4de3b1dcb9 Sort queries alphabetically 2018-02-23 15:01:50 +01:00
Arpit Jalan 07cb0005b0 FIX: exporting result in CSV format was broken 2017-10-04 17:50:14 +05:30
Guo Xiang Tan 60cf29ded8 Fix tests to work with Rails 5.1. 2017-09-04 14:07:22 +08:00
Guo Xiang Tan cc379ab757 Fix rubocop offenses. 2017-08-02 14:42:49 +09:00
Guo Xiang Tan 891be329d7 Fix specs. 2016-08-19 16:46:03 +08:00
Guo Xiang Tan e1475f4c5c FIX: Use `rails_helper`. 2016-04-12 05:13:51 +08:00
Kane York 090f3cbc64 Add Ruby tests 2015-07-15 13:20:42 -07:00
Kane York 6a61f694ee Fix float type checks 2015-07-15 12:23:56 -07:00