Commit 19903d3e authored by Romain Courteaud's avatar Romain Courteaud

slapos_parameter_editor: stop crashing early, as it occurs too often and make the panel unusable

parent 6b53d073
......@@ -227,12 +227,16 @@
})
.declareMethod("render", function (options) {
// crash as soon as possible to detect wrong configuration
// wrong configuration, which can occurs in many places
// for example, "new" portal type like "Remote Node" are
// not handled at all
if (!(options.hasOwnProperty('jio_key') &&
options.hasOwnProperty('result'))) {
throw new Error(
'status gadget did not receive jio_key and result values'
);
return domsugar(this.element);
}
if (options.result.hasOwnProperty('monitor_url')) {
options.result.monitor_url +=
'&slapos_master_url=' + window.location.host;
}
// Save will force the gadget to be updated so
// result is empty.
......
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