diff --git a/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 b/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 index 73cb79b..ed030f7 100644 --- a/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 +++ b/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6 @@ -55,10 +55,10 @@ export default Ember.Controller.extend({ }, @computed("selectedItem", "editing") - selectedGroupNames(selectedItem) { + selectedGroupNames() { const groupIds = this.selectedItem.group_ids || []; const groupNames = groupIds.map(id => { - return this.groupOptions.find(groupOption => groupOption.id == id).name; + return this.groupOptions.find(groupOption => groupOption.id === id).name; }); return groupNames.join(", "); }, @@ -97,7 +97,7 @@ export default Ember.Controller.extend({ this.set("loading", true); if (this.get("selectedItem.description") === "") this.set("selectedItem.description", ""); - + return this.selectedItem .save() .then(() => { diff --git a/assets/javascripts/discourse/controllers/group-reports-index.js.es6 b/assets/javascripts/discourse/controllers/group-reports-index.js.es6 index b2573e3..caa8ba1 100644 --- a/assets/javascripts/discourse/controllers/group-reports-index.js.es6 +++ b/assets/javascripts/discourse/controllers/group-reports-index.js.es6 @@ -1,10 +1,3 @@ -import Query from "discourse/plugins/discourse-data-explorer/discourse/models/query"; -import { ajax } from "discourse/lib/ajax"; -import { - default as computed, - observes -} from "ember-addons/ember-computed-decorators"; - export default Ember.Controller.extend({ queries: Ember.computed.alias("model.queries") }); diff --git a/assets/javascripts/discourse/controllers/group-reports-show.js.es6 b/assets/javascripts/discourse/controllers/group-reports-show.js.es6 index 02f7030..ed516b7 100644 --- a/assets/javascripts/discourse/controllers/group-reports-show.js.es6 +++ b/assets/javascripts/discourse/controllers/group-reports-show.js.es6 @@ -1,10 +1,5 @@ -import Query from "discourse/plugins/discourse-data-explorer/discourse/models/query"; import { popupAjaxError } from "discourse/lib/ajax-error"; import { ajax } from "discourse/lib/ajax"; -import { - default as computed, - observes -} from "ember-addons/ember-computed-decorators"; export default Ember.Controller.extend({ showResults: false, diff --git a/assets/javascripts/discourse/routes/admin-plugins-explorer.js.es6 b/assets/javascripts/discourse/routes/admin-plugins-explorer.js.es6 index f6db09c..a6a2291 100644 --- a/assets/javascripts/discourse/routes/admin-plugins-explorer.js.es6 +++ b/assets/javascripts/discourse/routes/admin-plugins-explorer.js.es6 @@ -5,7 +5,9 @@ export default Discourse.Route.extend({ model() { const groupPromise = this.store.findAll("group"); - const schemaPromise = ajax("/admin/plugins/explorer/schema.json", { cache: true }); + const schemaPromise = ajax("/admin/plugins/explorer/schema.json", { + cache: true + }); const queryPromise = this.store.findAll("query"); return groupPromise diff --git a/assets/javascripts/discourse/routes/group-reports-index.js.es6 b/assets/javascripts/discourse/routes/group-reports-index.js.es6 index 2bf6a40..a0d9a24 100644 --- a/assets/javascripts/discourse/routes/group-reports-index.js.es6 +++ b/assets/javascripts/discourse/routes/group-reports-index.js.es6 @@ -16,12 +16,13 @@ export default Discourse.Route.extend({ this.transitionTo("group.members", group); }); }, + afterModel(model) { if ( !model.group.get("is_group_user") && !(this.currentUser && this.currentUser.admin) ) { - this.transitionTo("group.members", group); + this.transitionTo("group.members", model.group); } }, diff --git a/assets/javascripts/discourse/routes/group-reports-show.js.es6 b/assets/javascripts/discourse/routes/group-reports-show.js.es6 index caf8e2b..3a23ed3 100644 --- a/assets/javascripts/discourse/routes/group-reports-show.js.es6 +++ b/assets/javascripts/discourse/routes/group-reports-show.js.es6 @@ -12,7 +12,7 @@ export default Discourse.Route.extend({ group: group }; }) - .catch(err => { + .catch(() => { this.transitionTo("group.members", group); }); }, diff --git a/assets/stylesheets/explorer.scss b/assets/stylesheets/explorer.scss index ae4d999..5b412c9 100644 --- a/assets/stylesheets/explorer.scss +++ b/assets/stylesheets/explorer.scss @@ -14,7 +14,7 @@ table.group-reports { } tbody { border-top: 3px solid #e3ebf2; - + tr { border-bottom: 1px solid #e3ebf2;