Fix the attribute to look up security group ids of a port (3)

... to fix the "Edit Port" functionality.

Closes-Bug: #2092276
Change-Id: I815a558e87fef2474eed42cfb175b753ad61713a
This commit is contained in:
Takashi Kajinami 2024-12-25 12:13:14 +09:00
parent c2cce40257
commit 53bba73b5c
2 changed files with 3 additions and 2 deletions
openstack_dashboard/dashboards/project/networks
ports
templates/networks/ports

@ -123,7 +123,7 @@ class DetailView(tabs.TabbedTableView):
results = futurist_utils.call_functions_parallel(
(get_network, [port.network_id]),
(get_security_groups, [tuple(port.security_group_ids)]))
network, port.security_groups = results
network, security_groups = results
port.network_name = network.get('name')
port.network_url = reverse(network_url, args=[port.network_id])
@ -138,6 +138,7 @@ class DetailView(tabs.TabbedTableView):
]
context["custom_breadcrumb"] = breadcrumb
context["port"] = port
context["security_groups"] = security_groups
context["url"] = reverse(
'horizon:project:networks:ports_tab', args=[port.network_id])
context["actions"] = table.render_row_actions(port)

@ -86,7 +86,7 @@
<h4>{% trans "Security Groups" %}</h4>
<hr class="header_rule">
<dl class="dl-horizontal">
{% for group in port.security_groups %}
{% for group in security_groups %}
<dt class="word-wrap">{{ group.name }}</dt>
<dd>
<ul class="list-unstyled">