linting
This commit is contained in:
parent
51a0b9318a
commit
a3ae064654
|
@ -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(() => {
|
||||
|
|
|
@ -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")
|
||||
});
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ export default Discourse.Route.extend({
|
|||
group: group
|
||||
};
|
||||
})
|
||||
.catch(err => {
|
||||
.catch(() => {
|
||||
this.transitionTo("group.members", group);
|
||||
});
|
||||
},
|
||||
|
|
|
@ -14,7 +14,7 @@ table.group-reports {
|
|||
}
|
||||
tbody {
|
||||
border-top: 3px solid #e3ebf2;
|
||||
|
||||
|
||||
tr {
|
||||
border-bottom: 1px solid #e3ebf2;
|
||||
|
||||
|
|
Loading…
Reference in New Issue