This is looking great!
Can you confirm params are working as well?
This is looking great!
Can you confirm params are working as well?
Yes, they show up in the UI if the query takes params
I was wrong; params are not currently working. I will look into that today.
The adapter for queries is an admin adapter, so non-admin users cannot access the query store. I added endpoints that non-admins can hit to get the query JSON, but it looks like that JSON is not being converted into Query models (of course, how would they be), and so the params logic is not being run. I am assuming I need a non-admin adapter for queries?
I see an issue in screenshot #3: you may want to bring back the “save without running” button, now that there’s meaningful non-query data to be saved.
Ah, didn’t spot that you had imported the green confirm button as well.
The green confirm button saves without running, and I would think that having the “Save Changes and Run” button should do exactly that.
Are you saying that the “Save Changes and Run” behavior should change, and not run the query?
Group members can now run queries that take params!
I am not able to run the specs (with bundle exec rspec
), and thus have not written any tests for the new actions I created. Can anyone point me to what I am missing? The error message is uninitialized constant DataExplorer
Try LOAD_PLUGINS=1 RAILS_ENV=test bundle exec rspec
Yep, that does it. Thanks!
Note I usually just use bin/rake autospec
it does that automatically, all you need to do is save plugin.rb or something.
@sam ,
What do you think about the Include query plan?
checkbox for group reports?
It seems like something that group members would not need to have access to, and should be removed. Is that a correct assumption?
Agree this is info they don’t really need
This has been removed, and the PR is ready for review.
2 specs fail, but they fail on master as well. I could look into fixing those in this PR if it would be appreciated
Absolutely welcome!! We will be reviewing it shortly, thanks for the awesome work.
I’m trying to use this feature, and it seems the groups that I add to the form do not persist, i.e. there’s no way to save the form.
Here’s a screenshot of the Query I’d like to share with moderators.
And when I refresh the page, the group has disappeared:
Editing and “saving” the query before refreshing has no effect on this either. Also, I tried sharing other queries, including some of the system defaults, to no avail.
Just an update – I’ve got another site that this is working for so it seems site specific.
Regardless, I found a workaround if the UI is broken for you as well, you can add a group to the query via the API with a POST request to https://example.com/admin/plugins/explorer/queries/<query_id>
.
Set your headers, use an api key for an admin user
Api-Username
Api-Key
Content-Type
– application/jsonSet your request body
query[group_ids][]
– comma separated string of group ids to allow access to this queryWill have a look today or Monday
Not urgent,
Thanks @joffreyjaffeux!
This should be fixed by:
https://github.com/discourse/discourse-data-explorer/commit/df9e21911e6ee3145d56b25f377218f59df0e471
Thanks for report.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.