Make data explorer available to moderators

This is looking great! :clap:

Can you confirm params are working as well?

5개의 좋아요

Yes, they show up in the UI if the query takes params

5개의 좋아요

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?

2개의 좋아요

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.

3개의 좋아요

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?

3개의 좋아요

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

4개의 좋아요

Try LOAD_PLUGINS=1 RAILS_ENV=test bundle exec rspec

5개의 좋아요

Yep, that does it. Thanks!

5개의 좋아요

Note I usually just use bin/rake autospec it does that automatically, all you need to do is save plugin.rb or something.

5개의 좋아요

@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?

5개의 좋아요

Agree this is info they don’t really need

6개의 좋아요

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 :man_shrugging:

5개의 좋아요

Absolutely welcome!! We will be reviewing it shortly, thanks for the awesome work.

3개의 좋아요

이 기능을 사용하려고 하는데, 폼에 추가한 그룹이 유지되지 않는 것 같습니다. 즉, 폼을 저장할 방법이 없습니다.

모더레이터와 공유하고 싶은 쿼리의 스크린샷입니다.

이렇게 그룹을 추가합니다:

그런데 페이지를 새로고침하면 그룹이 사라져 있습니다:

새로고침 전에 쿼리를 편집하고 "저장"해도 이 문제에 아무런 영향이 없습니다. 또한 시스템 기본 설정을 포함한 다른 쿼리를 공유해 보았지만, 결과는 마찬가지였습니다.

1개의 좋아요

간단한 업데이트입니다 – 이 문제가 해결된 다른 사이트가 하나 더 있어서, 사이트별로 발생하는 문제인 것 같습니다.

어쨌든, UI가 당신에게도 깨져 있다면 우회 방법을 찾았습니다. https://example.com/admin/plugins/explorer/queries/<query_id>로 POST 요청을 보내 쿼리에 그룹을 추가할 수 있습니다.

헤더를 설정하고 관리자 사용자의 API 키를 사용하세요.

  • Api-Username
  • Api-Key
  • Content-Type – application/json

요청 본문을 설정하세요.

  • query[group_ids][] – 이 쿼리에 대한 액세스를 허용할 그룹 ID의 쉼표로 구분된 문자열
1개의 좋아요

오늘이나 월요일에 확인해볼게요.

6개의 좋아요

긴급하지 않아요,
@j.jaffeux 감사합니다!

1개의 좋아요

다음 내용으로 수정해야 합니다:

보고해 주셔서 감사합니다.

7개의 좋아요

이 주제는 마지막 답변 후 2일이 지나면 자동으로 닫힙니다. 더 이상 새 답변을 작성할 수 없습니다.