Commit 390187bc authored by Romain Courteaud's avatar Romain Courteaud

slapos_parameter_editor: coding style

parent 675cdf27
......@@ -17,16 +17,13 @@
};
}
}
return new RSVP.Queue()
.push(function () {
return jIO.util.ajax({
return new RSVP.Queue(jIO.util.ajax({
url: url,
headers: headers
})
.then(function (evt) {
}))
.push(function (evt) {
return evt.target.responseText;
});
});
}
rJS(window)
......@@ -42,10 +39,7 @@
}
return getJSON(meta_schema_url)
.push(function (meta_schema) {
return new RSVP.Queue()
.push(function () {
return $RefParser.dereference(url);
})
return new RSVP.Queue($RefParser.dereference(url))
.push(function (schema) {
var validator = new Validator(JSON.parse(meta_schema), '7');
if (!validator.validate(schema)) {
......@@ -58,11 +52,9 @@
.declareMethod("loadSoftwareJSON", function (url) {
return getJSON(url)
.push(function (software_cfg_json) {
return new RSVP.Queue()
.push(function () {
return $RefParser
.dereference("slapos_load_software_schema.json");
})
return new RSVP.Queue($RefParser
.dereference("slapos_load_software_schema.json")
)
.push(function (software_schema) {
var software_json = JSON.parse(software_cfg_json),
validator = new Validator(software_schema, '7');
......
......@@ -462,7 +462,7 @@
show_form_button.classList.add("ui-icon-th-list");
return changed;
})
.fail(function (error) {
.push(undefined, function (error) {
console.warn(error);
console.log(error.stack);
show_form_button.classList.remove("ui-icon-spinner");
......
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