Fix dashboard not to show JSON as '[object Object]' (#5126)
This commit is contained in:
parent
babbd21814
commit
32b662c896
@ -89,7 +89,7 @@
|
|||||||
{{#each this}}
|
{{#each this}}
|
||||||
<tr>
|
<tr>
|
||||||
{{#each this}}
|
{{#each this}}
|
||||||
<td>{{@key}}: {{this}}</td>
|
<td>{{@key}}: {{{json this}}}</td>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</tr>
|
</tr>
|
||||||
{{else}}
|
{{else}}
|
||||||
@ -152,7 +152,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function (){
|
$(document).ready(function (){
|
||||||
|
Handlebars.registerHelper("json", function (context) {
|
||||||
|
return JSON.stringify(context);
|
||||||
|
});
|
||||||
$.getJSON("/moto-api/data.json", function(data) {
|
$.getJSON("/moto-api/data.json", function(data) {
|
||||||
var source = $('#template').html();
|
var source = $('#template').html();
|
||||||
var template = Handlebars.compile(source);
|
var template = Handlebars.compile(source);
|
||||||
|
Loading…
Reference in New Issue
Block a user