Commit 3a436f56 authored by Gabriel Monnerat's avatar Gabriel Monnerat

fixup! erp5_forge: Add new console gadget to run command lines from ERP5JS UI

parent a13605b6
......@@ -4,6 +4,7 @@
(function (window, rJS, jIO, convertOriginalErrorToErrorDataList,
buildErrorElementFromErrorText) {
"use strict";
rJS(window)
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", "notifySubmitted")
......@@ -34,11 +35,18 @@
});
})
.push(function (response) {
var content_type = response.target.getResponseHeader("Content-Type");
if (content_type.indexOf("text/html") !== -1) {
output.innerHTML = response.target.responseText;
var content_type = response.target.getResponseHeader("Content-Type"),
response_text = response.target.responseText;
if (response_text) {
if (content_type.indexOf("text/html") !== -1) {
output.innerHTML = response_text;
} else {
output.innerText = response_text;
}
} else {
output.value = response.target.responseText;
// XXX - when response is empty, what we should display?
output.innerText = "Status: " + response.target.status;
}
})
.push(undefined, function (error) {
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1007.4613.18008.17937</string> </value>
<value> <string>1007.4672.15553.53981</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1678917327.99</float>
<float>1678919733.96</float>
<string>UTC</string>
</tuple>
</state>
......
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