Commit e1a131c1 authored by Jérome Perrin's avatar Jérome Perrin

debug json widget: indent json

parent 7327a128
......@@ -25,9 +25,9 @@
.push(function (result_json) {
var result = JSON.parse(result_json);
gadget.props.element.querySelector(".json_input").textContent =
JSON.stringify(result[gadget.props.result].input);
JSON.stringify(result[gadget.props.result].input, undefined, " ");
gadget.props.element.querySelector(".json_output").textContent =
JSON.stringify(result[gadget.props.result].result);
JSON.stringify(result[gadget.props.result].result, undefined, " ");
});
});
......
......@@ -12,8 +12,8 @@
_attachment: "simulation.json"
}).push(function(result_json) {
var result = JSON.parse(result_json);
gadget.props.element.querySelector(".json_input").textContent = JSON.stringify(result[gadget.props.result].input);
gadget.props.element.querySelector(".json_output").textContent = JSON.stringify(result[gadget.props.result].result);
gadget.props.element.querySelector(".json_input").textContent = JSON.stringify(result[gadget.props.result].input, undefined, " ");
gadget.props.element.querySelector(".json_output").textContent = JSON.stringify(result[gadget.props.result].result, undefined, " ");
});
});
})(window, rJS, initGadgetMixin);
\ No newline at end of file
})(window, rJS, initGadgetMixin);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment