Add link with stack details in service details
Change-Id: Ic3e34c9d341309ffd005a5479b2a6ef12b3bfe05 Implements: blueprint add-stack-link
This commit is contained in:
parent
e21ba67818
commit
a873447045
@ -20,6 +20,7 @@ from horizon import tabs
|
||||
from muranodashboard.environments.consts import LOG_LEVEL_TO_COLOR
|
||||
from muranodashboard.environments.consts import LOG_LEVEL_TO_TEXT
|
||||
from openstack_dashboard.api import nova as nova_api
|
||||
from openstack_dashboard.api import heat as heat_api
|
||||
|
||||
from muranodashboard.environments import api
|
||||
from muranodashboard.environments.tables import STATUS_DISPLAY_CHOICES
|
||||
@ -97,6 +98,17 @@ class OverviewTab(tabs.Tab):
|
||||
}
|
||||
break
|
||||
|
||||
# add stack info
|
||||
stack_name = 'e' + environment_id
|
||||
existing_stacks = heat_api.stacks_list(request)
|
||||
for stack in existing_stacks:
|
||||
if stack.stack_name == stack_name:
|
||||
unit_detail['stack'] = {
|
||||
'id': stack.id,
|
||||
'name': stack.stack_name
|
||||
}
|
||||
break
|
||||
|
||||
if len(service_data.units) > 1:
|
||||
units.append(unit_detail)
|
||||
else:
|
||||
|
@ -13,6 +13,13 @@
|
||||
{{ value.name }}
|
||||
</a>
|
||||
</dd><br>
|
||||
{% elif key == 'stack'%}
|
||||
<dt>Heat stack name</dt>
|
||||
<dd>
|
||||
<a href=" {% url 'horizon:project:stacks:detail' value.id %}">
|
||||
{{ value.name }}
|
||||
</a>
|
||||
</dd><br>
|
||||
{% else %}
|
||||
<dt>{% blocktrans %} {{ key }} {% endblocktrans %}</dt>
|
||||
<dd>{% blocktrans %} {{ value }} {% endblocktrans %}</dd>
|
||||
@ -35,6 +42,13 @@
|
||||
{{ value.name }}
|
||||
</a>
|
||||
</dd><br>
|
||||
{% elif key == 'stack'%}
|
||||
<dt>Heat stack name</dt>
|
||||
<dd>
|
||||
<a href=" {% url 'horizon:project:stacks:detail' value.id %}">
|
||||
{{ value.name }}
|
||||
</a>
|
||||
</dd><br>
|
||||
{% else %}
|
||||
<dt>{% blocktrans %} {{ key }} {% endblocktrans %}</dt>
|
||||
<dd>{% blocktrans %} {{ value }} {% endblocktrans %}</dd>
|
||||
|
Loading…
Reference in New Issue
Block a user