improve frappy manager

- add functionality to guess combination of configurations from
  the running sea and frappy servers
- instead of the name only, the references to the config in
  the SeaClient modules are used
- make this information also visibible in frappy list
This commit is contained in:
2023-09-20 17:01:06 +02:00
parent 957a5f0b2c
commit fc364f0fc6
3 changed files with 148 additions and 80 deletions

View File

@ -118,7 +118,7 @@ class SeaManager(ServiceManager):
"""
if service != 'sea': # ignore when service == 'graph'
return ''
if 'sea' not in self.get_procs().get(ins):
if 'sea' not in self.get_procs().get(ins, ()):
return ''
try:
searoot = self.env[ins].get('SEA_ROOT', '')
@ -135,7 +135,7 @@ class SeaManager(ServiceManager):
if match:
key, dev, addon = match.groups()
if addon:
if addon != result[1]:
if addon != result[1]: # skip stick appearing also in addon_list
result.append(addon)
elif key == 'name':
result[0] = dev
@ -145,8 +145,9 @@ class SeaManager(ServiceManager):
confirmed = dev
if not result[-1]:
result.pop()
result = '/'.join(result)
return (result, confirmed) if addconfirmed else result
if addconfirmed:
result.insert(0, confirmed)
return '/'.join(result)
except Exception as e:
return repr(e)