FIX: Return all groups instead of truncated list (#42)
This commit is contained in:
parent
33322598f9
commit
48f0e2b982
|
@ -70,7 +70,7 @@ export default Ember.Controller.extend({
|
||||||
|
|
||||||
@computed("groups")
|
@computed("groups")
|
||||||
groupOptions(groups) {
|
groupOptions(groups) {
|
||||||
return groups.arrangedContent.map(g => {
|
return groups.map(g => {
|
||||||
return { id: g.id.toString(), name: g.name };
|
return { id: g.id.toString(), name: g.name };
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,7 +4,7 @@ export default Discourse.Route.extend({
|
||||||
controllerName: "admin-plugins-explorer",
|
controllerName: "admin-plugins-explorer",
|
||||||
|
|
||||||
model() {
|
model() {
|
||||||
const groupPromise = this.store.findAll("group");
|
const groupPromise = ajax("/admin/plugins/explorer/groups.json");
|
||||||
const schemaPromise = ajax("/admin/plugins/explorer/schema.json", {
|
const schemaPromise = ajax("/admin/plugins/explorer/schema.json", {
|
||||||
cache: true
|
cache: true
|
||||||
});
|
});
|
||||||
|
|
|
@ -1032,6 +1032,10 @@ SQL
|
||||||
render_serialized query, DataExplorer::QuerySerializer, root: 'query'
|
render_serialized query, DataExplorer::QuerySerializer, root: 'query'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def groups
|
||||||
|
render_serialized(Group.all, BasicGroupSerializer)
|
||||||
|
end
|
||||||
|
|
||||||
def group_reports_index
|
def group_reports_index
|
||||||
return raise Discourse::NotFound unless guardian.user_is_a_member_of_group?(group)
|
return raise Discourse::NotFound unless guardian.user_is_a_member_of_group?(group)
|
||||||
|
|
||||||
|
@ -1239,6 +1243,7 @@ SQL
|
||||||
root to: "query#index"
|
root to: "query#index"
|
||||||
get 'schema' => "query#schema"
|
get 'schema' => "query#schema"
|
||||||
get 'queries' => "query#index"
|
get 'queries' => "query#index"
|
||||||
|
get 'groups' => "query#groups"
|
||||||
post 'queries' => "query#create"
|
post 'queries' => "query#create"
|
||||||
get 'queries/:id' => "query#show"
|
get 'queries/:id' => "query#show"
|
||||||
put 'queries/:id' => "query#update"
|
put 'queries/:id' => "query#update"
|
||||||
|
|
Loading…
Reference in New Issue