Commit 92aef156 authored by Romain Courteaud's avatar Romain Courteaud

slapos_jio: accept parameters as provided by GadgetField

parent ce3425d8
......@@ -1076,24 +1076,24 @@
.declareMethod('render', function (options) {
var restricted_softwaretype = false,
software_type_list = [],
parameter_hash = options.value.parameter.parameter_hash,
parameter_hash = options.parameter_hash,
// XXX Do we directly get parameter_xml parameter?
parameter_xml = options.value.parameter.parameter_xml;
parameter_xml = options.parameter_xml;
if (parameter_hash !== undefined) {
// A JSON where provided via gadgetfield
parameter_xml = atob(parameter_hash);
}
if (options.value.parameter.software_type_list !== undefined) {
software_type_list = options.value.parameter.software_type_list;
if (options.software_type_list !== undefined) {
software_type_list = options.software_type_list;
}
if (options.value.parameter.softwaretype !== undefined) {
if (options.softwaretype !== undefined) {
restricted_softwaretype = true;
// exceptional situation where the default item must be in
// the list.
software_type_list.push(options.value.parameter.softwaretype);
software_type_list.push(options.softwaretype);
}
......@@ -1102,13 +1102,13 @@
// hidden: options.hidden,
// key: options.key,
serialisation: options.serialisation,
json_url: options.value.parameter.json_url,
json_url: options.json_url,
parameter_xml: parameter_xml,
restricted_softwaretype: restricted_softwaretype,
shared: options.value.parameter.shared,
softwaretype: options.value.parameter.softwaretype,
software_type_list: software_type_list,
softwareindex: options.value.parameter.softwareindex,
shared: options.shared,
softwaretype: options.softwaretype,
softwareindex: options.softwareindex,
editable: options.editable,
// Force refresh in any case
render_timestamp: new Date().getTime()
......
......@@ -280,7 +280,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1004.35604.19918.32529</string> </value>
<value> <string>1002.33873.60935.57582</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -298,7 +298,7 @@
</tuple>
<state>
<tuple>
<float>1669324961.21</float>
<float>1661442796.03</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