Commit a970c402 authored by Romain Courteaud's avatar Romain Courteaud

slapos_panel: fixup rebase

parent b1231fb2
......@@ -7,14 +7,16 @@ try:
instance_tree = context.getSpecialise()
connection_parameter_dict = instance_tree.InstanceTree_getMonitorParameterDict()
connection_url = '&url=%s'% connection_parameter_dict['url'] + '&username=%s'% connection_parameter_dict['username'] + '&password=%s'% connection_parameter_dict['password']
except (AttributeError, TypeError) as e:
except (AttributeError, TypeError) as _:
connection_url = ''
if context.getPortalType() == "Instance Tree":
for connection_parameter in context.InstanceTree_getConnectionParameterList(raw=True):
if connection_parameter['connection_key'] == "monitor-setup-url":
return connection_parameter['connection_value']
return base_url + '&query=portal_type:"Instance Tree" AND title:(%s)' % context.getTitle() + connection_url
# connection_parameter['connection_value'] looks like #page=settings_configurator&url=xx/public/feeds&username=admin&password=yy
# workaround until settings_configurator is c on software releases / buildout cfg files are updated
return connection_parameter['connection_value'].replace("settings_configurator", "ojsm_landing")
return base_url + '&query=portal_type:"Instance Tree" AND title:"%s"' % context.getTitle() + connection_url
if context.getPortalType() in ["Software Instance", "Slave Instance"]:
return base_url + '&query=portal_type:"Software Instance" AND title:"%s" AND ' % context.getTitle() + 'specialise_title:"%s"' % context.getSpecialiseTitle() + connection_url
......@@ -3,9 +3,12 @@ if context.getAggregate() is None:
partition = context.getAggregateValue(checked_permission="View")
if partition is not None:
return "%s (%s)" % (
allocation_information = "%s (%s)" % (
partition.getParentValue().getReference(),
partition.getReference())
network_title = partition.getParentValue().getSubordinationTitle(checked_permission="View")
if network_title is not None:
allocation_information += " - %s" % network_title
return allocation_information
return context.Base_translateString("Restricted information")
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