Commit 992b1053 authored by Romain Courteaud's avatar Romain Courteaud

slapos_panel: improve node's usage informations

- directly show the software_release and sofware_type informations
- instance title is meaningless on this view, as admin want to get an understanding of which kind of software are instanciated
- drop creation_date, image columns
parent 4104c858
for si in context.getAggregateRelatedValueList(portal_type=["Software Instance"]):
obj = si.getObject()
if obj.getValidationState() != "validated":
continue
if obj.getSlapState() == "destroy_requested":
continue
return obj.getLastAccessDate()
return ""
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ComputePartition_getLastestContactedDate</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -86,7 +86,6 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
'slapos_cloud/InstanceTree_updateParameterAndRequest',
'slapos_cloud/RemoteNode_init',
'slapos_cloud/ComputePartition_getAvailableSoftwareReleaseUrlStringList',
'slapos_cloud/ComputePartition_getLastestContactedDate',
'slapos_cloud/ComputePartition_getOwnerName',
'slapos_cloud/ComputePartition_getRelatedImageAbsoluteUrl',
'slapos_cloud/ComputePartition_getRelatedInstanceCreationDate',
......@@ -215,7 +214,6 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
'slapos_panel/Base_getPaymentModeForCurrency',
'slapos_panel/Base_getStatusMonitorUrl',
'slapos_panel/CertificateLogin_invalidateOnSlaposPanel',
'slapos_panel/ComputeNode_getBusyComputePartitionList',
'slapos_panel/ComputeNode_requestCertificate',
'slapos_panel/ComputeNode_revokeCertificate',
'slapos_panel/ComputeNode_selectSupplySoftwareProduct',
......@@ -280,9 +278,6 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
'slapos_panel/InstanceTree_proposeUpgradeDecision',
'slapos_panel/InstanceTree_searchUpgradableSoftwareReleaseList',
'slapos_panel/PaymentTransaction_triggerPaymentCheckAlarmAndRedirectToPanel',
'slapos_panel/ComputePartition_getInstanceTreeUrlString',
'slapos_panel/ComputePartition_getInstanceUrlString',
'slapos_panel/ComputePartition_getOwnerUrl',
'slapos_panel/SoftwareInstance_getComputeNodeUrl',
'slapos_panel_compatibility/Base_getComputerToken',
'slapos_parameter_editor/SoftwareProductModule_updateParameterEditorTestDialog',
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ComputeNode_getBusyComputePartitionList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -98,12 +98,8 @@
<key> <string>hidden</string> </key>
<value>
<list>
<string>my_busy_compute_partition_list_image</string>
<string>listbox_installation_state</string>
<string>listbox_usage</string>
<string>my_busy_compute_partition_list_creation_date</string>
<string>my_busy_compute_partition_list_instance_tree_title</string>
<string>my_busy_compute_partition_list_instance_title</string>
<string>listbox_image</string>
<string>listbox_software_release</string>
<string>my_busy_compute_partition_list_status</string>
......
......@@ -14,6 +14,7 @@
<string>count_method</string>
<string>default_params</string>
<string>hide_rows_on_no_search_criterion</string>
<string>lines</string>
<string>list_method</string>
<string>portal_types</string>
<string>select</string>
......@@ -88,6 +89,10 @@
<key> <string>hide_rows_on_no_search_criterion</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>lines</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>list_method</string> </key>
<value> <string></string> </value>
......@@ -106,6 +111,10 @@
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>sort</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
......@@ -129,10 +138,6 @@
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>software_release</string>
<string>Title</string>
</tuple>
<tuple>
<string>url_string</string>
<string>URL</string>
......@@ -180,6 +185,10 @@
<key> <string>hide_rows_on_no_search_criterion</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>lines</string> </key>
<value> <int>50</int> </value>
</item>
<item>
<key> <string>list_method</string> </key>
<value>
......
......@@ -398,31 +398,23 @@
<value>
<list>
<tuple>
<string>reference</string>
<string>aggregate_title</string>
<string>Title</string>
</tuple>
<tuple>
<string>instance_title</string>
<string>Instance</string>
<string>url_string</string>
<string>Software Release</string>
</tuple>
<tuple>
<string>instance_tree_title</string>
<string>Instance Tree</string>
</tuple>
<tuple>
<string>image</string>
<string>Image</string>
</tuple>
<tuple>
<string>ComputePartition_getOwnerName</string>
<string>Owner</string>
<string>source_reference</string>
<string>Software Type</string>
</tuple>
<tuple>
<string>creation_date</string>
<string>Instance Creation Date</string>
<string>specialise_title</string>
<string>Instance Tree</string>
</tuple>
<tuple>
<string>ComputePartition_getLastestContactedDate</string>
<string>getLastAccessDate</string>
<string>Latest Contact Date</string>
</tuple>
<tuple>
......@@ -451,12 +443,7 @@
<item>
<key> <string>default_params</string> </key>
<value>
<list>
<tuple>
<string>slap_state</string>
<string>busy</string>
</tuple>
</list>
<list/>
</value>
</item>
<item>
......@@ -486,24 +473,7 @@
<item>
<key> <string>editable_columns</string> </key>
<value>
<list>
<tuple>
<string>instance_title</string>
<string>Instance Title</string>
</tuple>
<tuple>
<string>image</string>
<string>Image</string>
</tuple>
<tuple>
<string>creation_date</string>
<string>Instance Creation Date</string>
</tuple>
<tuple>
<string>ComputePartition_getLastestContactedDate</string>
<string>Latest Contact Date</string>
</tuple>
</list>
<list/>
</value>
</item>
<item>
......@@ -534,7 +504,7 @@
</item>
<item>
<key> <string>lines</string> </key>
<value> <int>10</int> </value>
<value> <int>100</int> </value>
</item>
<item>
<key> <string>list_action</string> </key>
......@@ -565,8 +535,8 @@
<value>
<list>
<tuple>
<string>Compute Partition</string>
<string>Compute Partition</string>
<string>Software Instance</string>
<string>Software Instance</string>
</tuple>
</list>
</value>
......@@ -608,7 +578,7 @@
<value>
<list>
<tuple>
<string>title</string>
<string>source_reference</string>
<string>ASC</string>
</tuple>
</list>
......@@ -617,7 +587,24 @@
<item>
<key> <string>sort_columns</string> </key>
<value>
<list/>
<list>
<tuple>
<string>aggregate_title</string>
<string>Title</string>
</tuple>
<tuple>
<string>source_reference</string>
<string>Software Type</string>
</tuple>
<tuple>
<string>specialise_title</string>
<string>Instance Tree</string>
</tuple>
<tuple>
<string>creation_date</string>
<string>Creation Date</string>
</tuple>
</list>
</value>
</item>
<item>
......@@ -638,7 +625,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Compute Partition State</string> </value>
<value> <string>Instances</string> </value>
</item>
<item>
<key> <string>untranslatable_columns</string> </key>
......@@ -649,36 +636,7 @@
<item>
<key> <string>url_columns</string> </key>
<value>
<list>
<tuple>
<string>instance_title</string>
<string>ComputePartition_getInstanceUrlString</string>
</tuple>
<tuple>
<string>instance_tree_title</string>
<string>ComputePartition_getInstanceTreeUrlString</string>
</tuple>
<tuple>
<string>creation_date</string>
<string>ComputePartition_getInstanceUrlString</string>
</tuple>
<tuple>
<string>image</string>
<string>ComputePartition_getInstanceUrlString</string>
</tuple>
<tuple>
<string>ComputePartition_getOwnerName</string>
<string>ComputePartition_getOwnerUrl</string>
</tuple>
<tuple>
<string>ComputePartition_getLastestContactedDate</string>
<string>ComputePartition_getInstanceUrlString</string>
</tuple>
<tuple>
<string>status</string>
<string></string>
</tuple>
</list>
<list/>
</value>
</item>
</dictionary>
......@@ -695,7 +653,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>ComputeNode_getBusyComputePartitionList</string> </value>
<value> <string>portal_catalog</string> </value>
</item>
</dictionary>
</pickle>
......
<?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>editable</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_busy_compute_partition_list_creation_date</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>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>editable</string> </key>
<value> <int>0</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>Instance creation date</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>cell/ComputePartition_getRelatedInstanceCreationDate</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -113,7 +113,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: cell.getAggregateRelatedValue(portal_type="Software Instance").SoftwareInstance_getReportedErrorDict()[\'message\']</string> </value>
<value> <string>python: cell.SoftwareInstance_getReportedErrorDict()[\'message\']</string> </value>
</item>
</dictionary>
</pickle>
......
<?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>editable</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_busy_compute_partition_list_instance_title</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>editable</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>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_editor_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>Software Instance Title</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: cell.getAggregateRelatedTitle(portal_type=["Software Instance"])</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>editable</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_busy_compute_partition_list_instance_tree_title</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>editable</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>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_editor_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>Software Instance Title</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: cell.getAggregateRelatedTitle(portal_type=["Software Instance"]) is not None and cell.getAggregateRelatedValue(portal_type=["Software Instance"]).getSpecialiseTitle()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -126,9 +126,7 @@
</item>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
......@@ -153,7 +151,7 @@
<item>
<key> <string>renderjs_extra</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
......@@ -255,20 +253,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: cell.getAggregateRelated(portal_type="Software Instance") is not None</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [(\'jio_key\', cell.getAggregateRelated(portal_type="Software Instance")), (\'result\', cell.getAggregateRelatedValue(portal_type="Software Instance").getAccessStatus())]</string> </value>
<value> <string>python: [(\'portal_type\', cell.getPortalType()), (\'jio_key\', cell.getRelativeUrl()), (\'result\', cell.SoftwareInstance_getNewsDict())]</string> </value>
</item>
</dictionary>
</pickle>
......
if brain is None:
brain = context
software_instance = brain.getAggregateRelatedValue(portal_type=["Software Instance"])
if software_instance is None:
return None
instance_tree = software_instance.getSpecialiseValue()
if url_dict: # If RenderJS UI
jio_key = instance_tree.getRelativeUrl()
return {
'command': 'push_history',
'view_kw': {
'view': 'slapos_panel_view',
'jio_key': jio_key,
},
'options': {
'jio_key': jio_key
},
}
else:
return instance_tree.absolute_url()
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>url_dict=False, brain=None, selection=None, selection_name=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ComputePartition_getInstanceTreeUrlString</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
if brain is None:
brain = context
software_instance = brain.getAggregateRelatedValue(portal_type=["Software Instance"])
if software_instance is None:
return None
if url_dict: # If RenderJS UI
jio_key = software_instance.getRelativeUrl()
return {
'command': 'push_history',
'view_kw': {
'view': 'slapos_panel_view',
'jio_key': jio_key,
'editable': 'true',
},
'options': {
'jio_key': jio_key
},
}
else:
return software_instance.absolute_url()
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>url_dict=False, brain=None, selection=None, selection_name=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ComputePartition_getInstanceUrlString</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
if brain is None:
brain = context
instance = brain.getAggregateRelatedValue(portal_type=["Software Instance"])
if instance is None:
return None
owner = instance.getSpecialiseValue().getDestinationSectionValue()
if url_dict: # If RenderJS UI
jio_key = owner.getRelativeUrl()
return {
'command': 'push_history',
'view_kw': {
'view': 'slapos_panel_view',
'jio_key': jio_key,
},
'options': {
'jio_key': jio_key
},
}
else:
return owner.absolute_url()
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>url_dict=False, brain=None, selection=None, selection_name=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ComputePartition_getOwnerUrl</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -10,12 +10,14 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>all_columns</string>
<string>columns</string>
<string>default_params</string>
<string>list_method</string>
<string>portal_types</string>
<string>selection_name</string>
<string>sort</string>
<string>sort_columns</string>
<string>title</string>
</list>
</value>
......@@ -96,17 +98,13 @@
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<key> <string>all_columns</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>specialise_title</string>
<string>Instance Tree</string>
</tuple>
<tuple>
<string>image</string>
<string>Image</string>
......@@ -115,6 +113,25 @@
<string>destination_section_title</string>
<string>Owner</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>url_string</string>
<string>Software Release</string>
</tuple>
<tuple>
<string>source_reference</string>
<string>Software Type</string>
</tuple>
<tuple>
<string>specialise_title</string>
<string>Instance Tree</string>
</tuple>
<tuple>
<string>creation_date</string>
<string>Creation Date</string>
......@@ -167,12 +184,31 @@
<value>
<list>
<tuple>
<string>title</string>
<string>source_reference</string>
<string>ASC</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>sort_columns</string> </key>
<value>
<list>
<tuple>
<string>source_reference</string>
<string>Software Type</string>
</tuple>
<tuple>
<string>specialise_title</string>
<string>Instance Tree</string>
</tuple>
<tuple>
<string>creation_date</string>
<string>Creation Date</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Instances</string> </value>
......
......@@ -16,6 +16,7 @@
<string>portal_types</string>
<string>selection_name</string>
<string>sort</string>
<string>sort_columns</string>
<string>title</string>
</list>
</value>
......@@ -54,6 +55,10 @@
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default_params</string> </key>
<value>
......@@ -68,6 +73,26 @@
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>list_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>portal_types</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>sort</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
......@@ -80,20 +105,16 @@
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>specialise_title</string>
<string>Instance Tree</string>
<string>url_string</string>
<string>Software Release</string>
</tuple>
<tuple>
<string>image</string>
<string>Image</string>
<string>source_reference</string>
<string>Software Type</string>
</tuple>
<tuple>
<string>destination_section_title</string>
<string>Owner</string>
<string>specialise_title</string>
<string>Instance Tree</string>
</tuple>
<tuple>
<string>creation_date</string>
......@@ -151,12 +172,31 @@
<value>
<list>
<tuple>
<string>title</string>
<string>source_reference</string>
<string>ASC</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>sort_columns</string> </key>
<value>
<list>
<tuple>
<string>source_reference</string>
<string>Software Type</string>
</tuple>
<tuple>
<string>specialise_title</string>
<string>Instance Tree</string>
</tuple>
<tuple>
<string>creation_date</string>
<string>Creation Date</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Instances</string> </value>
......@@ -175,7 +215,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [(\'aggregate__uid\', [x.getUid() for x in here.contentValues(portal_type=\'Compute Partition\')])]</string> </value>
<value> <string>python: [(\'aggregate__uid\', [x.getUid() for x in here.contentValues(portal_type=\'Compute Partition\')] or [-1])]</string> </value>
</item>
</dictionary>
</pickle>
......
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