Commit 30dd982c authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Allow use restricted mode when request a specific portal type'

parent 34bc91ca
...@@ -202,6 +202,7 @@ ...@@ -202,6 +202,7 @@
</item> </item>
</dictionary> </dictionary>
</list> </list>
<none/>
</tuple> </tuple>
</pickle> </pickle>
</record> </record>
...@@ -261,6 +262,7 @@ ...@@ -261,6 +262,7 @@
</item> </item>
</dictionary> </dictionary>
</list> </list>
<none/>
</tuple> </tuple>
</pickle> </pickle>
</record> </record>
...@@ -318,6 +320,7 @@ ...@@ -318,6 +320,7 @@
</item> </item>
</dictionary> </dictionary>
</list> </list>
<none/>
</tuple> </tuple>
</pickle> </pickle>
</record> </record>
......
...@@ -82,6 +82,15 @@ ...@@ -82,6 +82,15 @@
'restricted_softwaretype': false 'restricted_softwaretype': false
} }
}; };
if (options.software_type) {
parameter_dict["parameter"]['restricted_softwaretype'] = true;
parameter_dict["parameter"]['softwaretype'] = options.software_type;
}
if (options.shared) {
parameter_dict["parameter"]['shared'] = true;
}
return result[0].render({ return result[0].render({
erp5_document: { erp5_document: {
"_embedded": {"_view": { "_embedded": {"_view": {
...@@ -129,9 +138,20 @@ ...@@ -129,9 +138,20 @@
"required": 0, "required": 0,
"editable": 1, "editable": 1,
"key": "computer_guid", "key": "computer_guid",
"hidden": 0, "hidden": options.sla_xml !== undefined ? 1 : 0,
"type": "ListField" "type": "ListField"
}, },
"your_sla_xml": {
"description": "The name of a document in ERP5",
"title": "SLA",
"default": options.sla_xml,
"css_class": "",
"required": 0,
"editable": 0,
"key": "sla_xml",
"hidden": options.sla_xml !== undefined ? 0 : 1,
"type": "StringField"
},
"my_relative_url": { "my_relative_url": {
"description": "", "description": "",
"title": "Parent Relative Url", "title": "Parent Relative Url",
...@@ -155,7 +175,7 @@ ...@@ -155,7 +175,7 @@
group_list: [[ group_list: [[
"center", "center",
[["my_url_string"], ["your_title"], ["your_text_content"], [["my_url_string"], ["your_title"], ["your_text_content"],
["your_computer_guid"], ["my_portal_type"], ["my_relative_url"]] ["your_computer_guid"],["your_sla_xml"], ["my_portal_type"], ["my_relative_url"]]
]] ]]
} }
}) })
......
...@@ -241,6 +241,7 @@ ...@@ -241,6 +241,7 @@
</item> </item>
</dictionary> </dictionary>
</list> </list>
<none/>
</tuple> </tuple>
</pickle> </pickle>
</record> </record>
...@@ -273,7 +274,7 @@ ...@@ -273,7 +274,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>976.9867.41515.40260</string> </value> <value> <string>981.35383.15103.35259</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -291,7 +292,7 @@ ...@@ -291,7 +292,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1561394238.54</float> <float>1580513887.37</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
...@@ -300,6 +301,7 @@ ...@@ -300,6 +301,7 @@
</item> </item>
</dictionary> </dictionary>
</list> </list>
<none/>
</tuple> </tuple>
</pickle> </pickle>
</record> </record>
...@@ -357,6 +359,7 @@ ...@@ -357,6 +359,7 @@
</item> </item>
</dictionary> </dictionary>
</list> </list>
<none/>
</tuple> </tuple>
</pickle> </pickle>
</record> </record>
......
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