Commit e61e0c87 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Launcher: add getSettingList method

parent f17e1a44
......@@ -303,6 +303,24 @@
//////////////////////////////////////////
// Allow Acquisition
//////////////////////////////////////////
.allowPublicAcquisition("getSettingList",
function getSettingList(argument_list) {
var key_list = argument_list[0];
return route(this, 'setting_gadget', 'get', [this.props.setting_id])
.push(function (doc) {
var i,
result_list = [];
for (i = 0; i < key_list.length; i += 1) {
result_list[i] = doc[key_list[i]];
}
return result_list;
}, function (error) {
if (error.status_code === 404) {
return new Array(key_list.length);
}
throw error;
});
})
.allowPublicAcquisition("getSetting", function getSetting(argument_list) {
var gadget = this,
key = argument_list[0],
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>967.40872.33961.51165</string> </value>
<value> <string>968.42891.16664.21862</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1526655959.21</float>
<float>1530622785.99</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