Commit 1ea9782c authored by Jérome Perrin's avatar Jérome Perrin

update static version

parent ad912437
......@@ -22,8 +22,8 @@
_id: gadget.props.jio_key,
_attachment: "body.json"
}).push(function(result_json) {
var jsonTextArea = gadget.props.element.querySelector(".json"), document = JSON.parse(result_json);
jsonTextArea.textContent = JSON.stringify(document, undefined, " ");
var jsonTextArea = gadget.props.element.querySelector(".json");
jsonTextArea.textContent = result_json;
gadget.props.codemirror = CodeMirror.fromTextArea(jsonTextArea, {
lineNumbers: true,
mode: {
......
......@@ -258,7 +258,20 @@
}).push(function(result) {
var data;
if (result) {
data = JSON.parse(result);
try {
data = JSON.parse(result);
} catch (error) {
portal_type = "Input";
options.action = "debug";
portal_types.Input = {
debug: {
gadget: "Input_viewDebugJson",
type: "object_view",
title: "Emergency Mode, JSON cannot be parsed"
}
};
return gadget.declareGadget("Input_viewDebugJson.html");
}
gadget.props.data = data;
portal_types.Input = data.application_configuration.input;
portal_types.Output = data.application_configuration.output;
......
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