FIX: Return all groups instead of truncated list (#42)

This commit is contained in:
Justin DiRose 2019-11-14 12:39:55 -06:00 committed by GitHub
parent 33322598f9
commit 48f0e2b982
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View File

@ -70,7 +70,7 @@ export default Ember.Controller.extend({
@computed("groups")
groupOptions(groups) {
return groups.arrangedContent.map(g => {
return groups.map(g => {
return { id: g.id.toString(), name: g.name };
});
},

View File

@ -4,7 +4,7 @@ export default Discourse.Route.extend({
controllerName: "admin-plugins-explorer",
model() {
const groupPromise = this.store.findAll("group");
const groupPromise = ajax("/admin/plugins/explorer/groups.json");
const schemaPromise = ajax("/admin/plugins/explorer/schema.json", {
cache: true
});

View File

@ -1032,6 +1032,10 @@ SQL
render_serialized query, DataExplorer::QuerySerializer, root: 'query'
end
def groups
render_serialized(Group.all, BasicGroupSerializer)
end
def group_reports_index
return raise Discourse::NotFound unless guardian.user_is_a_member_of_group?(group)
@ -1239,6 +1243,7 @@ SQL
root to: "query#index"
get 'schema' => "query#schema"
get 'queries' => "query#index"
get 'groups' => "query#groups"
post 'queries' => "query#create"
get 'queries/:id' => "query#show"
put 'queries/:id' => "query#update"