FIX: deprecations
This commit is contained in:
parent
fc041d8b4a
commit
0c1a9aa4bc
|
@ -1,4 +1,5 @@
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
|
import getURL from "discourse-common/lib/get-url";
|
||||||
import Badge from "discourse/models/badge";
|
import Badge from "discourse/models/badge";
|
||||||
import { default as computed } from "discourse-common/utils/decorators";
|
import { default as computed } from "discourse-common/utils/decorators";
|
||||||
|
|
||||||
|
@ -177,7 +178,7 @@ const QueryResultComponent = Ember.Component.extend({
|
||||||
form.setAttribute("method", "post");
|
form.setAttribute("method", "post");
|
||||||
form.setAttribute(
|
form.setAttribute(
|
||||||
"action",
|
"action",
|
||||||
Discourse.getURL(
|
getURL(
|
||||||
this.download_url() +
|
this.download_url() +
|
||||||
this.get("query.id") +
|
this.get("query.id") +
|
||||||
"/run." +
|
"/run." +
|
||||||
|
|
|
@ -3,6 +3,7 @@ import {
|
||||||
on,
|
on,
|
||||||
observes
|
observes
|
||||||
} from "discourse-common/utils/decorators";
|
} from "discourse-common/utils/decorators";
|
||||||
|
import getURL from "discourse-common/lib/get-url";
|
||||||
import RestModel from "discourse/models/rest";
|
import RestModel from "discourse/models/rest";
|
||||||
|
|
||||||
const Query = RestModel.extend({
|
const Query = RestModel.extend({
|
||||||
|
@ -56,9 +57,7 @@ const Query = RestModel.extend({
|
||||||
@computed("id")
|
@computed("id")
|
||||||
downloadUrl(id) {
|
downloadUrl(id) {
|
||||||
// TODO - can we change this to use the store/adapter?
|
// TODO - can we change this to use the store/adapter?
|
||||||
return Discourse.getURL(
|
return getURL(`/admin/plugins/explorer/queries/${id}.json?export=1`);
|
||||||
`/admin/plugins/explorer/queries/${id}.json?export=1`
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
createProperties() {
|
createProperties() {
|
||||||
|
|
Loading…
Reference in New Issue