Commit b721dfa0 authored by Rafael Monnerat's avatar Rafael Monnerat

Improve and speedup transfer actions on panel

See merge request !534
parents 4ba8324e ece0f1de
Pipeline #28390 failed with stage
in 0 seconds
"""
Create an internal Packing List and attach the compute_node
"""
context.requestTransfer(
tag = "transfer_compute_node_%s" % context.getUid()
context.activate(activity="SQLQueue", tag=tag).requestTransfer(
destination=destination,
destination_project=destination_project,
destination_section=destination_section
......
"""
Create an internal Packing List and attach the compute_node
Create an internal Packing List and attach the computer network
"""
context.requestTransfer(
tag = "transfer_compute_network_%s" % context.getUid()
context.activate(activity="SQLQueue", tag=tag).requestTransfer(
destination_project=destination_project,
destination_section=destination_section
)
"""
Create an internal Packing List and attach the compute_node
"""
context.requestTransfer(
tag = "transfer_instance_tree_%s" % context.getUid()
context.activate(activity="SQLQueue",tag=tag).requestTransfer(
destination=destination,
destination_project=destination_project
)
......@@ -214,7 +214,7 @@
"title": results[2][4],
"default": gadget.state.doc.title,
"css_class": "",
"required": 1,
"required": 0,
"editable": 0,
"key": "title",
"hidden": 0,
......@@ -225,7 +225,7 @@
"title": results[2][5],
"default": gadget.state.doc.reference,
"css_class": "",
"required": 1,
"required": 0,
"editable": 0,
"key": "reference",
"hidden": 0,
......@@ -237,7 +237,7 @@
"default": gadget.state.doc.subordination,
"css_class": "",
"items": computer_network_list,
"required": 1,
"required": 0,
"editable": 1,
"key": "subordination",
"hidden": 0,
......@@ -249,7 +249,7 @@
"default": gadget.state.doc.allocation_scope,
"css_class": "",
"items": allocation_scope_list,
"required": 1,
"required": 0,
"editable": 1,
"key": "allocation_scope",
"hidden": 0,
......@@ -261,7 +261,7 @@
"default": gadget.state.doc.monitor_scope,
"css_class": "",
"items": monitor_scope_list,
"required": 1,
"required": 0,
"editable": 1,
"key": "monitor_scope",
"hidden": 0,
......@@ -273,7 +273,7 @@
"default": gadget.state.doc.upgrade_scope,
"css_class": "",
"items": upgrade_scope_list,
"required": 1,
"required": 0,
"editable": 1,
"key": "upgrade_scope",
"hidden": 0,
......@@ -284,10 +284,10 @@
"title": results[2][27],
"default": gadget.state.doc.source_title,
"css_class": "",
"required": 1,
"required": 0,
"editable": 0,
"key": "",
"hidden": 0,
"hidden": gadget.state.doc.source_title ? 0 : 1,
"type": "StringField"
},
"my_source_project": {
......@@ -295,10 +295,10 @@
"title": results[2][28],
"default": gadget.state.doc.source_project_title,
"css_class": "",
"required": 1,
"required": 0,
"editable": 0,
"key": "",
"hidden": 0,
"hidden": gadget.state.doc.source_project_title ? 0 : 1,
"type": "StringField"
},
"my_monitoring_status": {
......@@ -308,7 +308,7 @@
result: gadget.state.doc.news,
portal_type: "Compute Node"},
"css_class": "",
"required": 1,
"required": 0,
"editable": 0,
"url": "gadget_slapos_status.html",
"sandbox": "",
......
......@@ -267,7 +267,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1006.58340.40727.23620</string> </value>
<value> <string>1008.49947.49157.41540</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -287,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>1680014283.61</float>
<float>1685554088.09</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -131,7 +131,7 @@
"title": result[1][1],
"default": gadget.state.doc.title,
"css_class": "",
"required": 1,
"required": 0,
"editable": editable,
"key": "title",
"hidden": 0,
......@@ -142,7 +142,7 @@
"title": result[1][2],
"default": gadget.state.doc.reference,
"css_class": "",
"required": 1,
"required": 0,
"editable": 0,
"key": "reference",
"hidden": 0,
......@@ -154,7 +154,7 @@
"default": {jio_key: gadget.state.jio_key,
result: gadget.state.doc.news},
"css_class": "",
"required": 1,
"required": 0,
"editable": 0,
"url": "gadget_slapos_status.html",
"sandbox": "",
......@@ -170,7 +170,7 @@
"required": 0,
"editable": 0,
"key": "",
"hidden": 0,
"hidden": gadget.state.doc.source_project_title ? 0 : 1,
"type": "StringField"
},
"my_source_section": {
......@@ -178,10 +178,10 @@
"title": result[1][8],
"default": gadget.state.doc.source_section_title,
"css_class": "",
"required": 1,
"required": 0,
"editable": 0,
"key": "",
"hidden": 0,
"hidden": gadget.state.doc.source_section_title ? 0 : 1,
"type": "StringField"
},
"listbox": {
......
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1001.44818.54264.13038</string> </value>
<value> <string>1008.49948.50158.41267</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -258,7 +258,7 @@
</tuple>
<state>
<tuple>
<float>1658167069.0</float>
<float>1685554128.59</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -244,7 +244,7 @@
"title": result[1][3],
"default": gadget.state.doc.title,
"css_class": "",
"required": 1,
"required": 0,
"editable": 0,
"key": "title",
"hidden": 0,
......@@ -255,7 +255,7 @@
"title": result[1][15],
"default": gadget.state.doc.short_title,
"css_class": "",
"required": 1,
"required": 0,
"editable": 1,
"key": "short_title",
"hidden": 0,
......@@ -266,7 +266,7 @@
"title": result[1][16],
"default": gadget.state.doc.description,
"css_class": "",
"required": 1,
"required": 0,
"editable": 1,
"key": "description",
"hidden": 0,
......@@ -277,7 +277,7 @@
"title": result[1][4],
"default": gadget.state.doc.reference,
"css_class": "",
"required": 1,
"required": 0,
"editable": 0,
"key": "reference",
"hidden": 0,
......@@ -288,7 +288,7 @@
"title": result[1][11],
"default": gadget.state.doc.slap_state_title,
"css_class": "",
"required": 1,
"required": 0,
"editable": 0,
"key": "slap_state_title",
"hidden": 0,
......@@ -301,7 +301,7 @@
"<a target=_blank href=" + gadget.state.doc.url_string + ">" +
gadget.state.doc.url_string + "</a>",
"css_class": "",
"required": 1,
"required": 0,
"editable": 0,
"key": "url_string",
"hidden": 0,
......@@ -312,7 +312,7 @@
"title": result[1][19],
"default": parameter_dict,
"css_class": "",
"required": 1,
"required": 0,
"editable": 1,
"url": "gadget_erp5_page_slap_parameter_form.html",
"sandbox": "",
......@@ -325,10 +325,10 @@
"title": result[1][21],
"default": gadget.state.doc.source_project_title,
"css_class": "",
"required": 1,
"required": 0,
"editable": 0,
"key": "source_project_title",
"hidden": 0,
"hidden": gadget.state.doc.source_project_title ? 0 : 1,
"type": "StringField"
},
"my_source": {
......@@ -339,7 +339,7 @@
"required": 0,
"editable": 0,
"key": "source_title",
"hidden": 0,
"hidden": gadget.state.doc.source_title ? 0 : 1,
"type": "StringField"
},
"my_monitoring_status": {
......
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1008.19588.59182.15291</string> </value>
<value> <string>1008.49946.40563.64597</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -258,7 +258,7 @@
</tuple>
<state>
<tuple>
<float>1683727059.58</float>
<float>1685554267.16</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -48,7 +48,8 @@
.push(function () {
// Workaround, find a way to open document without break gadget.
return gadget.redirect({"command": "change",
"options": {"jio_key": doc.relative_url, "page": "slap_controller"}});
"options": {"jio_key": doc.relative_url,
"page": "slap_controller"}});
});
});
});
......@@ -62,7 +63,7 @@
var gadget = this,
page_translation,
translation_list = [
"Compute Node is transferred.",
"Compute Node will be transferred soon.",
"The name of a document in ERP5",
"Title",
"Reference",
......
......@@ -283,7 +283,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1008.21059.49463.39441</string> </value>
<value> <string>1008.51243.24992.18807</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -303,7 +303,7 @@
</tuple>
<state>
<tuple>
<float>1683828388.72</float>
<float>1685561703.38</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -67,7 +67,7 @@
"Organisation",
"Parent Relative Url",
"Transfer Computer Network",
"Computer Network is transferred."
"Computer Network will be transferred soon."
];
return new RSVP.Queue()
......@@ -125,7 +125,7 @@
}
for (i = 0; i < organisation_len; i += 1) {
if (result[3].data.rows[i].value.title === doc.source_project_title) {
if (result[3].data.rows[i].value.title === doc.source_section_title) {
default_organisation = result[3].data.rows[i].id;
}
organisation_list.push([
......
......@@ -281,7 +281,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1008.22397.35734.62054</string> </value>
<value> <string>1008.51185.52212.36676</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -301,7 +301,7 @@
</tuple>
<state>
<tuple>
<float>1683828480.9</float>
<float>1685559938.59</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -43,7 +43,7 @@
url + doc.relative_url + "/InstanceTree_createMovement", doc);
})
.push(function () {
return gadget.notifySubmitted({message: 'Service is transferred.', status: 'success'})
return gadget.notifySubmitted({message: gadget.message_translation, status: 'success'})
.push(function () {
// Workaround, find a way to open document without break gadget.
return gadget.redirect({"command": "change",
......@@ -66,7 +66,8 @@
"Project",
"Organisation",
"Parent Relative Url",
"Transfer Service"
"Transfer Service",
"Service will be transferred soon."
];
return new RSVP.Queue()
.push(function () {
......@@ -101,6 +102,7 @@
]);
})
.push(function (result) {
gadget.message_translation = result[4][7];
gadget.page_title_translation = result[4][6];
var doc = result[1],
default_organisation = "",
......
......@@ -281,7 +281,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1008.21052.42055.18432</string> </value>
<value> <string>1008.51256.61372.5495</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -301,7 +301,7 @@
</tuple>
<state>
<tuple>
<float>1683829095.25</float>
<float>1685561516.62</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -94,7 +94,7 @@
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Computer Network is transferred.'}">
'text': 'Computer Network will be transferred soon.'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification" />
</tal:block>
......
......@@ -94,7 +94,7 @@
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Computer Network is transferred.'}">
'text': 'Computer Network will be transferred soon.'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification" />
</tal:block>
......
......@@ -152,7 +152,7 @@
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Compute Node is transferred.'}">
'text': 'Compute Node will be transferred soon.'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification" />
</tal:block>
......
......@@ -97,7 +97,7 @@
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Compute Node is transferred.'}">
'text': 'Compute Node will be transferred soon.'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification" />
</tal:block>
......
......@@ -60,7 +60,7 @@
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Compute Node is transferred.'}">
'text': 'Compute Node will be transferred soon.'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification" />
</tal:block>
......
......@@ -260,7 +260,7 @@
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Service is transferred.'}">
'text': 'Service will be transferred soon.'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification" />
</tal:block>
......
......@@ -260,7 +260,7 @@
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Service is transferred.'}">
'text': 'Service will be transferred soon.'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification" />
</tal:block>
......
......@@ -158,7 +158,7 @@
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Compute Node is transferred.'}">
'text': 'Compute Node will be transferred soon.'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification" />
</tal:block>
......
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