Commit a667f10e authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Add fast input option for Instance Tree

   This fast input option aims to allow certain sites, request "related" slaves
   from an Instance Tree.

   The script  InstanceTree_getFastInputDict is used to custom the feature to
   specific software releases, since depends which one is used, and it cannot
   be generalized for now.
parent 47ff8c75
......@@ -490,6 +490,18 @@
});
})
.push(function () {
var fast_input_dict = {
command: "display",
options: {
page: "slap_intent",
intent: "request",
shared: 1,
sofware_type: gadget.state.doc.source_reference,
software_release: gadget.state.doc.url_string,
sla_xml: gadget.state.doc.fast_input_dict.sla_xml,
strict: "True"
}
};
return RSVP.all([
gadget.getUrlFor({command: "change", options: {editable: true}}),
gadget.getUrlFor({command: "change", options: {"page": "slap_add_related_ticket"}}),
......@@ -498,7 +510,8 @@
gadget.getUrlFor({command: "change", options: {"page": "slap_destroy_instance_tree"}}),
gadget.getUrlFor({command: "change", options: {page: "slap_rss_ticket"}}),
gadget.getUrlFor({command: 'history_previous'}),
gadget.getUrlFor({command: "change", options: {page: "slap_transfer_instance_tree"}})
gadget.getUrlFor({command: "change", options: {page: "slap_transfer_instance_tree"}}),
gadget.getUrlFor(fast_input_dict)
]);
})
.push(function (url_list) {
......@@ -517,6 +530,9 @@
if (gadget.state.doc.slap_state === "stop_requested") {
header_dict.start_url = url_list[2];
}
if (gadget.state.doc.fast_input_dict.enabled !== undefined) {
header_dict.fast_input_url = url_list[8];
}
if (!gadget.state.editable) {
header_dict.edit_content = url_list[0];
}
......
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1004.26872.6486.682</string> </value>
<value> <string>1007.21760.63093.46916</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -258,7 +258,7 @@
</tuple>
<state>
<tuple>
<float>1669310224.29</float>
<float>1679945002.44</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -114,6 +114,7 @@
<string>my_source_project_title</string>
<string>my_source_title</string>
<string>my_list_image</string>
<string>my_fast_input_dict</string>
</list>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_fast_input_dict</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Fast Input Dict</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>here/InstanceTree_getFastInputDict</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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