DEV: Remove ESLint warnings 🚨
This commit is contained in:
parent
77d603098f
commit
a96bfdf6d5
|
@ -2,7 +2,7 @@ export default Ember.Component.extend({
|
||||||
classNameBindings: [":schema-table", "open"],
|
classNameBindings: [":schema-table", "open"],
|
||||||
tagName: "li",
|
tagName: "li",
|
||||||
|
|
||||||
open: Em.computed.alias("table.open"),
|
open: Ember.computed.alias("table.open"),
|
||||||
|
|
||||||
_bindClicks: function() {
|
_bindClicks: function() {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
|
@ -52,7 +52,7 @@ export default Ember.Component.extend({
|
||||||
}.property("schema"),
|
}.property("schema"),
|
||||||
|
|
||||||
rfilter: function() {
|
rfilter: function() {
|
||||||
if (!Em.isBlank(this.get("filter"))) {
|
if (!Ember.isBlank(this.get("filter"))) {
|
||||||
return new RegExp(this.get("filter"));
|
return new RegExp(this.get("filter"));
|
||||||
}
|
}
|
||||||
}.property("filter"),
|
}.property("filter"),
|
||||||
|
@ -99,7 +99,7 @@ export default Ember.Component.extend({
|
||||||
filterCols.push(col);
|
filterCols.push(col);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!Em.isEmpty(filterCols)) {
|
if (!Ember.isEmpty(filterCols)) {
|
||||||
tables.push({
|
tables.push({
|
||||||
name: key,
|
name: key,
|
||||||
columns: filterCols,
|
columns: filterCols,
|
||||||
|
|
|
@ -66,7 +66,7 @@ export default Ember.Component.extend({
|
||||||
const type = this.get("info.type"),
|
const type = this.get("info.type"),
|
||||||
value = this.get("value");
|
value = this.get("value");
|
||||||
|
|
||||||
if (Em.isEmpty(this.get("value"))) {
|
if (Ember.isEmpty(this.get("value"))) {
|
||||||
return this.get("info.nullable");
|
return this.get("info.nullable");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,11 +26,11 @@ function transformedRelTable(table, modelClass) {
|
||||||
const QueryResultComponent = Ember.Component.extend({
|
const QueryResultComponent = Ember.Component.extend({
|
||||||
layoutName: "explorer-query-result",
|
layoutName: "explorer-query-result",
|
||||||
|
|
||||||
rows: Em.computed.alias("content.rows"),
|
rows: Ember.computed.alias("content.rows"),
|
||||||
columns: Em.computed.alias("content.columns"),
|
columns: Ember.computed.alias("content.columns"),
|
||||||
params: Em.computed.alias("content.params"),
|
params: Ember.computed.alias("content.params"),
|
||||||
explainText: Em.computed.alias("content.explain"),
|
explainText: Ember.computed.alias("content.explain"),
|
||||||
hasExplain: Em.computed.notEmpty("content.explain"),
|
hasExplain: Ember.computed.notEmpty("content.explain"),
|
||||||
|
|
||||||
@computed("content.result_count")
|
@computed("content.result_count")
|
||||||
resultCount: function(count) {
|
resultCount: function(count) {
|
||||||
|
@ -184,7 +184,7 @@ const QueryResultComponent = Ember.Component.extend({
|
||||||
|
|
||||||
document.body.appendChild(form);
|
document.body.appendChild(form);
|
||||||
form.submit();
|
form.submit();
|
||||||
Em.run.next("afterRender", function() {
|
Ember.run.next("afterRender", function() {
|
||||||
document.body.removeChild(form);
|
document.body.removeChild(form);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -84,7 +84,6 @@ const QueryRowContentComponent = Ember.Component.extend(
|
||||||
(t.template || fallback)(ctx, params)
|
(t.template || fallback)(ctx, params)
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
|
||||||
return "error";
|
return "error";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -17,7 +17,7 @@ export default Ember.Controller.extend({
|
||||||
|
|
||||||
saveDisabled: Ember.computed.not("selectedItem.dirty"),
|
saveDisabled: Ember.computed.not("selectedItem.dirty"),
|
||||||
runDisabled: Ember.computed.alias("selectedItem.dirty"),
|
runDisabled: Ember.computed.alias("selectedItem.dirty"),
|
||||||
results: Em.computed.alias("selectedItem.results"),
|
results: Ember.computed.alias("selectedItem.results"),
|
||||||
|
|
||||||
asc: null,
|
asc: null,
|
||||||
order: null,
|
order: null,
|
||||||
|
@ -25,10 +25,10 @@ export default Ember.Controller.extend({
|
||||||
everEditing: false,
|
everEditing: false,
|
||||||
showRecentQueries: true,
|
showRecentQueries: true,
|
||||||
sortBy: ["last_run_at:desc"],
|
sortBy: ["last_run_at:desc"],
|
||||||
sortedQueries: Em.computed.sort("model", "sortBy"),
|
sortedQueries: Ember.computed.sort("model", "sortBy"),
|
||||||
|
|
||||||
@computed("search", "sortBy")
|
@computed("search", "sortBy")
|
||||||
filteredContent(search) {
|
filteredContent() {
|
||||||
const regexp = new RegExp(this.get("search"), "i");
|
const regexp = new RegExp(this.get("search"), "i");
|
||||||
return this.get("sortedQueries").filter(function(result) {
|
return this.get("sortedQueries").filter(function(result) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -2,7 +2,7 @@ import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||||
|
|
||||||
export default Ember.Controller.extend(ModalFunctionality, {
|
export default Ember.Controller.extend(ModalFunctionality, {
|
||||||
notReady: Em.computed.not("ready"),
|
notReady: Ember.computed.not("ready"),
|
||||||
|
|
||||||
adminPluginsExplorer: Ember.inject.controller(),
|
adminPluginsExplorer: Ember.inject.controller(),
|
||||||
|
|
||||||
|
|
|
@ -12,10 +12,10 @@ export default function binarySearch(list, target, keyProp) {
|
||||||
while (min <= max) {
|
while (min <= max) {
|
||||||
guess = Math.floor((min + max) / 2);
|
guess = Math.floor((min + max) / 2);
|
||||||
|
|
||||||
if (Em.get(list[guess], keyProperty) === target) {
|
if (Ember.get(list[guess], keyProperty) === target) {
|
||||||
return guess;
|
return guess;
|
||||||
} else {
|
} else {
|
||||||
if (Em.get(list[guess], keyProperty) < target) {
|
if (Ember.get(list[guess], keyProperty) < target) {
|
||||||
min = guess + 1;
|
min = guess + 1;
|
||||||
} else {
|
} else {
|
||||||
max = guess - 1;
|
max = guess - 1;
|
||||||
|
|
Loading…
Reference in New Issue