Commit 17715694 authored by Xiaowu Zhang's avatar Xiaowu Zhang

ors_wendelin: add action to restart ingestion

it should be removed later once kpi calculation is improved
parent 0c5d77ce
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
<value> <float>2.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_jio_action</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jio_action</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>XXXXXX Remove later</string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>restart_ingestion</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>3.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Restart Ingestion</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/DataAcquisionUnit_restartIngestion</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
data_ingestion_id_list = []
data_analysis_id_list = []
data_array_id_list = []
data_stream_id_list = []
progress_indicator_id_list = []
for i in context.getAggregateRelatedValueList(portal_type='Data Ingestion Line'):
data_stream = i.getAggregateValue(portal_type='Data Stream')
if data_stream:
if data_stream.getId() not in data_stream_id_list:
data_stream_id_list.append(data_stream.getId())
if i.getParentId() not in data_ingestion_id_list:
data_ingestion_id_list.append(i.getParentId())
for i in context.getAggregateRelatedValueList(portal_type='Data Analysis Line'):
data_array = i.getAggregateValue(portal_type='Data Array')
if data_array:
if data_array.getId() not in data_array_id_list:
data_array_id_list.append(data_array.getId())
indicator = i.getAggregateValue(portal_type='Progress Indicator')
if indicator:
if indicator.getId() not in progress_indicator_id_list:
progress_indicator_id_list.append(indicator.getId())
if i.getParentId() not in data_analysis_id_list:
data_analysis_id_list.append(i.getParentId())
context.data_stream_module.manage_delObjects(ids=data_stream_id_list)
context.data_ingestion_module.manage_delObjects(ids=data_ingestion_id_list)
context.data_array_module.manage_delObjects(ids=data_array_id_list)
context.data_analysis_module.manage_delObjects(ids=data_analysis_id_list)
context.progress_indicator_module.manage_delObjects(ids=progress_indicator_id_list)
context.Base_redirect('view',keep_items={'portal_status_message': 'Ingestion Restarted'})
<?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>DataAcquisionUnit_restartIngestion</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Data Acquisition Unit | create_ors_data_supply
Data Acquisition Unit | restart_ingestion
Data Acquisition Unit | view_e-rab_accessibility_kpi
Data Acquisition Unit | view_e-utran-ip-throughput_kpi
\ No newline at end of file
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