Commit 5e26669c authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Use parameter_xml directly rather them hash

parent 44e98efe
......@@ -116,7 +116,7 @@
var doc = result[1],
parameter_dict = {
'json_url': doc.url_string.split('?')[0] + ".json",
'parameter_hash': btoa('<?xml version="1.0" encoding="utf-8" ?><instance/>')
'parameter_xml': '<?xml version="1.0" encoding="utf-8" ?><instance/>'
};
if (options.software_type) {
parameter_dict['softwaretype'] = options.software_type;
......
......@@ -269,7 +269,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <unicode>zope</unicode> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -283,7 +283,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1010.44014.55766.17408</string> </value>
<value> <string>1013.8728.41822.8550</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -303,7 +303,7 @@
</tuple>
<state>
<tuple>
<float>1692989933.58</float>
<float>1709839049.13</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -231,10 +231,10 @@
'json_url': gadget.state.doc.url_string.split('?')[0] + ".json",
'softwaretype': gadget.state.doc.source_reference,
'shared': gadget.state.doc.root_slave ? 1 : 0,
'parameter_hash': btoa('<?xml version="1.0" encoding="utf-8" ?><instance></instance>')
'parameter_xml': '<?xml version="1.0" encoding="utf-8" ?><instance></instance>'
};
if (gadget.state.doc.text_content !== undefined) {
parameter_dict.parameter_hash = btoa(gadget.state.doc.text_content);
parameter_dict.parameter_xml = gadget.state.doc.text_content;
}
return gadget.getSetting("hateoas_url")
.push(function (url) {
......
......@@ -224,7 +224,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <unicode>zope</unicode> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1010.44015.51861.27016</string> </value>
<value> <string>1013.8728.41822.8550</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -258,7 +258,7 @@
</tuple>
<state>
<tuple>
<float>1692924255.67</float>
<float>1709839708.45</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -91,7 +91,7 @@
]);
})
.push(function (result) {
var parameter_hash,
var parameter_xml,
parameter_dict,
default_url;
......@@ -101,13 +101,14 @@
default_url = gadget.state.url_string;
}
if (gadget.state.parameter_output === undefined) {
parameter_hash = btoa('<?xml version="1.0" encoding="utf-8" ?><instance></instance>');
parameter_xml = '<?xml version="1.0" encoding="utf-8" ?><instance></instance>';
} else {
parameter_hash = btoa(gadget.state.parameter_output);
parameter_xml = gadget.state.parameter_output;
}
parameter_dict = {
'json_url': gadget.state.url_string.split('?')[0] + ".json",
'parameter_hash': parameter_hash
'parameter_xml': parameter_xml,
'software_type_list': []
};
if (gadget.state.software_type_list) {
parameter_dict.software_type_list = gadget.state.software_type_list.split(',');
......@@ -167,7 +168,7 @@
"your_parameter_hash": {
"description": "",
"title": "Parameters Hash",
"default": parameter_hash,
"default": btoa(parameter_xml),
"css_class": "",
"required": 0,
"editable": 0,
......
......@@ -267,7 +267,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <unicode>zope</unicode> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -281,7 +281,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1010.42602.14389.54903</string> </value>
<value> <string>1013.8728.41822.8550</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -301,7 +301,7 @@
</tuple>
<state>
<tuple>
<float>1692903464.84</float>
<float>1709840043.97</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -97,7 +97,7 @@
]);
})
.push(function (result) {
var parameter_hash,
var parameter_xml,
parameter_dict,
default_url;
......@@ -107,13 +107,13 @@
default_url = gadget.state.url_string;
}
if (gadget.state.parameter_output === undefined) {
parameter_hash = btoa('<?xml version="1.0" encoding="utf-8" ?><instance></instance>');
parameter_xml = '<?xml version="1.0" encoding="utf-8" ?><instance></instance>';
} else {
parameter_hash = btoa(gadget.state.parameter_output);
parameter_xml = gadget.state.parameter_output;
}
parameter_dict = {
'json_url': gadget.state.url_string.split('?')[0] + ".json",
'parameter_hash': parameter_hash,
'parameter_xml': parameter_xml,
'softwaretype': gadget.state.software_type,
'restricted_softwaretype': false
};
......
......@@ -267,7 +267,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <unicode>zope</unicode> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -281,7 +281,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1010.44012.38164.19575</string> </value>
<value> <string>1015.4369.46609.36078</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -301,7 +301,7 @@
</tuple>
<state>
<tuple>
<float>1692982452.93</float>
<float>1709839844.0</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