Commit 3fba94a9 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Display Software Installation nicely

Only few UI improvements
parent 0ce94a7b
......@@ -32,10 +32,15 @@
var gadget = this, data;
return new RSVP.Queue()
.push(function () {
return gadget.getDeclaredGadget('form_view');
})
.push(function (form_gadget) {
var editable = gadget.state.editable;
return RSVP.all([
gadget.getDeclaredGadget('form_view'),
gadget.getUrlFor({command: "change", options: {jio_key: gadget.state.doc.aggregate }})
]);
})
.push(function (result) {
var form_gadget = result[0],
computer_url = result[1],
editable = gadget.state.editable;
return form_gadget.render({
erp5_document: {
"_embedded": {"_view": {
......@@ -64,24 +69,26 @@
"my_aggregate_reference": {
"description": "",
"title": "Computer Reference",
"default": gadget.state.doc.aggregate_reference,
"default": "<a href=" + computer_url + ">" +
gadget.state.doc.aggregate_reference + "</a>",
"css_class": "",
"required": 1,
"editable": 0,
"key": "aggregate_reference",
"hidden": 0,
"type": "StringField"
"type": "EditorField"
},
"my_aggregate_title": {
"description": "",
"title": "Computer",
"default": gadget.state.doc.aggregate_title,
"default": "<a href=" + computer_url + ">" +
gadget.state.doc.aggregate_title + "</a>",
"css_class": "",
"required": 1,
"editable": 0,
"key": "aggregate_title",
"hidden": 0,
"type": "StringField"
"type": "EditorField"
},
"my_reference": {
"description": "",
......@@ -151,11 +158,15 @@
form_definition: {
group_list: [[
"left",
[['my_monitoring_status'], ["my_url_string"], ["my_reference"], ["my_aggregate_title"],
["my_aggregate_reference"], ["my_software_release_title"], ["my_software_release_version"],
["my_state"], ["my_usage"]]
], [ "center",
[]
[["my_software_release_title"], ["my_software_release_version"],
["my_reference"]
]
], [
"right",
[["my_aggregate_title"], ["my_aggregate_reference"], ["my_state"], ["my_usage"]]
], [
"center",
[["my_url_string"], ['my_monitoring_status']]
]]
}
});
......@@ -166,7 +177,7 @@
.push(function (url) {
var header_dict = {
page_title: "Software Installation : " + gadget.state.doc.software_release_title,
delete_url: url
destroy_url: url
};
return gadget.updateHeader(header_dict);
});
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.18663.3593.26999</string> </value>
<value> <string>965.22196.14970.20087</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1514293931.4</float>
<float>1518016877.37</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -102,6 +102,7 @@
<string>your_usage</string>
<string>my_reference</string>
<string>my_news</string>
<string>my_aggregate</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>css_class</string>
<string>default</string>
<string>display_width</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_aggregate</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>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </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>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>css_class</string> </key>
<value> <string>inline</string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </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>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Computer Reference</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>python: context.getAggregateReference(portal_type=\'Computer\')</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