mirror of
https://github.com/discourse/discourse-data-explorer.git
synced 2025-07-05 14:02:10 +00:00
FIX: Invalid use of controller in a component
This commit is contained in:
parent
8d72e979a5
commit
f9e1177981
@ -167,9 +167,7 @@ const QueryResultComponent = Ember.Component.extend({
|
|||||||
downloadResultCsv() {
|
downloadResultCsv() {
|
||||||
this.downloadResult('csv');
|
this.downloadResult('csv');
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
|
||||||
parent: function() { return this; }.property()
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -33,8 +33,8 @@ const QueryRowContentComponent = Ember.Component.extend(bufferedRender({
|
|||||||
buildBuffer(buffer) {
|
buildBuffer(buffer) {
|
||||||
const self = this;
|
const self = this;
|
||||||
const row = this.get('row');
|
const row = this.get('row');
|
||||||
const parent = self.get('parent');
|
const parentView = self.get('parentView');
|
||||||
const fallback = parent.get('fallbackTemplate');
|
const fallback = this.get('fallbackTemplate');
|
||||||
const helpers = {
|
const helpers = {
|
||||||
"icon-or-image": icon_or_image_replacement,
|
"icon-or-image": icon_or_image_replacement,
|
||||||
"category-link": category_badge_replacement,
|
"category-link": category_badge_replacement,
|
||||||
@ -54,9 +54,9 @@ const QueryRowContentComponent = Ember.Component.extend(bufferedRender({
|
|||||||
return esc(row[idx]);
|
return esc(row[idx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
const lookupFunc = parent[`lookup${t.name.capitalize()}`];
|
const lookupFunc = parentView[`lookup${t.name.capitalize()}`];
|
||||||
if (lookupFunc) {
|
if (lookupFunc) {
|
||||||
ctx[t.name] = parent[`lookup${t.name.capitalize()}`](id);
|
ctx[t.name] = parentView[`lookup${t.name.capitalize()}`](id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (t.name === "category" || t.name === "badge" || t.name === "reltime") {
|
if (t.name === "category" || t.name === "badge" || t.name === "reltime") {
|
||||||
|
@ -22,8 +22,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{~#each rows as |row|}}
|
{{#each rows as |row|}}
|
||||||
{{~query-row-content row=row columnTemplates=columnTemplates parent=controller}}
|
{{query-row-content
|
||||||
{{~/each}}
|
row=row
|
||||||
|
fallbackTemplate=fallbackTemplate
|
||||||
|
columnTemplates=columnTemplates}}
|
||||||
|
{{/each}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user