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 @@ ...@@ -227,12 +227,16 @@
}) })
.declareMethod("render", function (options) { .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') && if (!(options.hasOwnProperty('jio_key') &&
options.hasOwnProperty('result'))) { options.hasOwnProperty('result'))) {
throw new Error( return domsugar(this.element);
'status gadget did not receive jio_key and result values' }
); 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 // Save will force the gadget to be updated so
// result is empty. // 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