Commit 77322d78 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Allow set monitoring scope on hosting subscription

parent 98c3bf52
......@@ -257,7 +257,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>969.62484.48542.9284</string> </value>
<value> <string>971.7562.16184.25378</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -275,7 +275,7 @@
</tuple>
<state>
<tuple>
<float>1540213094.51</float>
<float>1540214800.54</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -137,6 +137,9 @@
['reference', 'Reference'],
['portal_type', 'Type'],
['computer_monitoring_status', 'Status']
], monitor_scope_list = [['', ''],
['Enabled', 'enable'],
['Disabled', 'disable']
], ticket_column_list = [
['title', 'Title'],
['reference', 'Reference'],
......@@ -268,6 +271,18 @@
"hidden": gadget.state.doc.root_slave === 1,
"type": "GadgetField"
},
"my_monitor_scope": {
"description": "",
"title": "Monitoring",
"default": gadget.state.doc.monitor_scope,
"css_class": "",
"items": monitor_scope_list,
"required": 1,
"editable": 1,
"key": "monitor_scope",
"hidden": 0,
"type": "ListField"
},
"connection_listbox": {
"column_list": connection_column_list,
"show_anchor": 0,
......@@ -340,11 +355,11 @@
form_definition: {
group_list: [[
"left",
[["my_title"], ["my_reference"],["my_short_title"], ["my_description"]]
[["my_title"], ["my_reference"], ["my_short_title"], ["my_description"]]
], [
"right",
[["my_slap_state_title"], ['my_monitoring_status']]
[["my_slap_state_title"], ['my_monitoring_status'], ['my_monitor_scope']]
], ["center",
[["my_source_reference"], ["my_url_string"], ["my_text_content"]]
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.58216.33748.42820</string> </value>
<value> <string>971.11856.29335.23364</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1519918943.19</float>
<float>1540470762.22</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -2,6 +2,10 @@ request = context.REQUEST
edit_kw = {}
if monitor_scope is not None and monitor_scope != context.getMonitorScope():
edit_kw["monitor_scope"] = monitor_scope
if short_title != context.getShortTitle():
edit_kw["short_title"] = short_title
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>text_content, short_title, description</string> </value>
<value> <string>text_content, short_title, description, monitor_scope=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -104,6 +104,7 @@
<string>my_short_title</string>
<string>my_description</string>
<string>my_root_slave</string>
<string>my_monitor_scope</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>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_monitor_scope</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>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>values</string> </key>
<value>
<dictionary>
<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>Monitor Scope</string> </value>
</item>
</dictionary>
</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