Commit d66ce607 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Fix intent to support shared and sla

parent bc2a8c17
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
url_string: software_release.url_string, url_string: software_release.url_string,
title: options.software_title ? options.software_title: "Instance {uid}", title: options.software_title ? options.software_title: "Instance {uid}",
relative_url: options.jio_key relative_url: options.jio_key
}; };
if (options.software_type) { if (options.software_type) {
doc.software_type = options.software_type; doc.software_type = options.software_type;
} }
...@@ -106,6 +106,9 @@ ...@@ -106,6 +106,9 @@
if (options.shared) { if (options.shared) {
doc.shared = options.shared; doc.shared = options.shared;
} }
if (options.sla_xml) {
doc.sla_xml = options.sla_xml;
}
return gadget.notifySubmitting() return gadget.notifySubmitting()
.push(function () { .push(function () {
var query = []; var query = [];
...@@ -115,11 +118,14 @@ ...@@ -115,11 +118,14 @@
query.push("software_type=" + encodeURIComponent(doc.software_type)); query.push("software_type=" + encodeURIComponent(doc.software_type));
} }
if (doc.shared) { if (doc.shared) {
query.push("shared=" + encodeURIComponent(doc.shared)); query.push("shared:int=" + encodeURIComponent(doc.shared));
} }
if (doc.text_content) { if (doc.text_content) {
query.push("text_content=" + encodeURIComponent(doc.text_content)); query.push("text_content=" + encodeURIComponent(doc.text_content));
} }
if (doc.sla_xml) {
query.push("sla_xml=" + encodeURIComponent(doc.sla_xml));
}
return gadget.jio_getAttachment(doc.relative_url, return gadget.jio_getAttachment(doc.relative_url,
url + doc.relative_url + "/SoftwareRelease_requestHostingSubscription?" + query.join("&")); url + doc.relative_url + "/SoftwareRelease_requestHostingSubscription?" + query.join("&"));
}) })
...@@ -128,7 +134,7 @@ ...@@ -128,7 +134,7 @@
.push(function () { .push(function () {
// Workaround, find a way to open document without break gadget. // Workaround, find a way to open document without break gadget.
return gadget.redirect({"command": "change", return gadget.redirect({"command": "change",
"options": {"jio_key": "/", "page": "slap_service_list"}}); "options": {"jio_key": key, "page": "slap_controller"}});
}); });
}); });
}); });
......
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>965.43749.35238.39116</string> </value> <value> <string>965.43754.24433.51490</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -291,7 +291,7 @@ ...@@ -291,7 +291,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1519310062.31</float> <float>1519405132.53</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </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