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.
我尝试使用此功能,但似乎添加到表单中的组无法保留,也就是说无法保存表单。
在刷新之前编辑并“保存”查询对此也没有任何影响。此外,我还尝试分享其他查询,包括一些系统默认查询,但均无济于事。
更新一下:我发现另一个网站也能正常运行,看来问题与特定站点有关。
无论如何,如果 UI 也出现异常,我找到了一个变通方案:通过 API 向 https://example.com/admin/plugins/explorer/queries/<query_id> 发送 POST 请求,将组添加到查询中。
设置请求头,使用管理员用户的 API 密钥:
Api-UsernameApi-KeyContent-Type – application/json设置请求体:
query[group_ids][] – 允许访问此查询的组 ID 列表,以逗号分隔的字符串形式提供今天或周一会看一下
不紧急,
谢谢 @j.jaffeux!
这应该通过以下方式修复:
感谢您的报告。
此主题在最后一次回复后 2 天自动关闭。不再允许新回复。