Commit e589d112 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_web: Catch failures from while getContent

This is had to be be reviewed in future in order to handle network temporary problems.
parent cfcba0d0
......@@ -483,9 +483,10 @@
\n
.fail(function (error) {\n
console.log("FAIL CALLED");\n
console.error(error.stack);\n
console.log(error.stack);\n
return g.renderFailoverTextArea(\'\', error.toString())\n
.push(function() {\n
error = undefined;\n
return g;\n
});\n
});\n
......@@ -655,7 +656,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>941.48752.57599.9267</string> </value>
<value> <string>941.49037.51985.358</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -673,7 +674,7 @@
</tuple>
<state>
<tuple>
<float>1426707039.92</float>
<float>1426725080.91</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -118,6 +118,9 @@
})\n
.push(function (xml_result) {\n
return {"field_your_instance_xml": xml_result};\n
})\n
.fail(function (e) {\n
return {};\n
});\n
});\n
\n
......@@ -151,7 +154,7 @@
return gadget.render(options);\n
}).push(function (gadget) {\n
var div = g.__element.querySelector(".parameter");\n
$(div).replaceWith(gadget.__element)\n
$(div).replaceWith(gadget.__element);\n
return gadget;\n
});\n
});\n
......@@ -291,7 +294,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>941.48482.37552.4164</string> </value>
<value> <string>941.49054.39000.10274</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -309,7 +312,7 @@
</tuple>
<state>
<tuple>
<float>1426698399.78</float>
<float>1426725223.8</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