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

Remove Output_viewDebugJson, we now have Input_viewDebugJson instead

parent 608b84b9
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Debug JSON</title>
<script src="../<%= copy.rsvp.relative_dest %>" type="text/javascript"></script>
<script src="../<%= copy.renderjs.relative_dest %>" type="text/javascript"></script>
<script src="mixin_gadget.js" type="text/javascript"></script>
<script src="Output_viewDebugJson.js" type="text/javascript"></script>
</head>
<body>
<label for="json_input">Input</label>
<textarea spellcheck="false" rows="20" name="json_input" class="json_input"></textarea>
<label for="json_output">Output</label>
<textarea spellcheck="false" rows="20" name="json_output" class="json_output"></textarea>
<label for="json_output">Configuration</label>
<textarea spellcheck="false" rows="20" name="json_configuration" class="json_configuration"></textarea>
</body>
</html>
/*global rJS, initGadgetMixin */
(function (window, rJS, initGadgetMixin) {
"use strict";
var gadget_klass = rJS(window);
initGadgetMixin(gadget_klass);
gadget_klass
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("aq_getAttachment", "jio_getAttachment")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod("render", function (options) {
var gadget = this;
this.props.jio_key = options.id;
this.props.result = options.result;
return gadget.aq_getAttachment({
"_id": gadget.props.jio_key,
"_attachment": "simulation.json"
})
.push(function (result_json) {
var document = JSON.parse(result_json),
result = document.result.result_list,
input = {"input" : document.input,
"graph" : document.graph,
"general" : document.general},
configuration = {"application_configuration" :
document.application_configuration,
"class_definition" : document.class_definition,
"constrains" : document.constrains};
gadget.props.element.querySelector(".json_input").textContent =
JSON.stringify(input, undefined, " ");
gadget.props.element.querySelector(".json_output").textContent =
JSON.stringify(result[gadget.props.result], undefined, " ");
gadget.props.element
.querySelector(".json_configuration").textContent =
JSON.stringify(configuration, undefined, " ");
});
});
}(window, rJS, initGadgetMixin));
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Debug JSON</title>
<script src="../lib/rsvp.min.js" type="text/javascript"></script>
<script src="../lib/renderjs.min.js" type="text/javascript"></script>
<script src="mixin_gadget.js" type="text/javascript"></script>
<script src="Output_viewDebugJson.js" type="text/javascript"></script>
</head>
<body>
<label for="json_input">Input</label>
<textarea spellcheck="false" rows="20" name="json_input" class="json_input"></textarea>
<label for="json_output">Output</label>
<textarea spellcheck="false" rows="20" name="json_output" class="json_output"></textarea>
<label for="json_output">Configuration</label>
<textarea spellcheck="false" rows="20" name="json_configuration" class="json_configuration"></textarea>
</body>
</html>
/*global rJS, initGadgetMixin */
(function(window, rJS, initGadgetMixin) {
"use strict";
var gadget_klass = rJS(window);
initGadgetMixin(gadget_klass);
gadget_klass.declareAcquiredMethod("aq_getAttachment", "jio_getAttachment").declareMethod("render", function(options) {
var gadget = this;
this.props.jio_key = options.id;
this.props.result = options.result;
return gadget.aq_getAttachment({
_id: gadget.props.jio_key,
_attachment: "simulation.json"
}).push(function(result_json) {
var document = JSON.parse(result_json), result = document.result.result_list, input = {
input: document.input,
graph: document.graph,
general: document.general
}, configuration = {
application_configuration: document.application_configuration,
class_definition: document.class_definition,
constrains: document.constrains
};
gadget.props.element.querySelector(".json_input").textContent = JSON.stringify(input, undefined, " ");
gadget.props.element.querySelector(".json_output").textContent = JSON.stringify(result[gadget.props.result], undefined, " ");
gadget.props.element.querySelector(".json_configuration").textContent = JSON.stringify(configuration, undefined, " ");
});
});
})(window, rJS, initGadgetMixin);
\ No newline at end of file
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