added component info (from SECoP description)
+ add target update for modules block
This commit is contained in:
6
secop.py
6
secop.py
@ -16,6 +16,8 @@ def convert_par(module, name, par):
|
|||||||
result['type'] = 'enum'
|
result['type'] = 'enum'
|
||||||
elif par['datainfo']['type'] == 'bool':
|
elif par['datainfo']['type'] == 'bool':
|
||||||
result['type'] = 'checkbox'
|
result['type'] = 'checkbox'
|
||||||
|
if par['description']:
|
||||||
|
result['info'] = par['description']
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
@ -38,9 +40,13 @@ class SecopInteractor(SecopClient):
|
|||||||
component = dict(type='rdlink', name=f'{name}:value', title=name)
|
component = dict(type='rdlink', name=f'{name}:value', title=name)
|
||||||
if 'status' in desc['parameters']:
|
if 'status' in desc['parameters']:
|
||||||
component['statusname'] = f'{name}:status'
|
component['statusname'] = f'{name}:status'
|
||||||
|
info = desc['properties'].get('description')
|
||||||
|
if info:
|
||||||
|
component['info'] = info
|
||||||
components.append(component)
|
components.append(component)
|
||||||
self.param_updates.add('value')
|
self.param_updates.add('value')
|
||||||
self.param_updates.add('status')
|
self.param_updates.add('status')
|
||||||
|
self.param_updates.add('target')
|
||||||
|
|
||||||
def get_components(self, path):
|
def get_components(self, path):
|
||||||
module = self.modules[path]
|
module = self.modules[path]
|
||||||
|
Reference in New Issue
Block a user