mirror of
https://github.com/discourse/discourse-data-explorer.git
synced 2025-06-29 19:12:11 +00:00
FIX: Support raw templates in the latest discourse releases
This commit is contained in:
parent
e2ee693f64
commit
4b3e5d547d
@ -80,7 +80,13 @@ const QueryResultComponent = Ember.Component.extend({
|
|||||||
if (self.get('content.colrender')[idx]) {
|
if (self.get('content.colrender')[idx]) {
|
||||||
viewName = self.get('content.colrender')[idx];
|
viewName = self.get('content.colrender')[idx];
|
||||||
}
|
}
|
||||||
const template = getOwner(self).lookup('template:explorer/' + viewName + '.raw');
|
|
||||||
|
// After `findRawTemplates` is in stable this should be updated to use that
|
||||||
|
let template = getOwner(self).lookup('template:explorer/' + viewName + '.raw');
|
||||||
|
if (!template) {
|
||||||
|
template = Discourse.RAW_TEMPLATES[`javascripts/explorer/${viewName}`];
|
||||||
|
}
|
||||||
|
|
||||||
return {name: viewName, template };
|
return {name: viewName, template };
|
||||||
});
|
});
|
||||||
}.property('content', 'columns.@each'),
|
}.property('content', 'columns.@each'),
|
||||||
|
@ -68,7 +68,6 @@ const QueryRowContentComponent = Ember.Component.extend(bufferedRender({
|
|||||||
return new Handlebars.SafeString((t.template || fallback)(ctx, params));
|
return new Handlebars.SafeString((t.template || fallback)(ctx, params));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
debugger;
|
|
||||||
return "error";
|
return "error";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user