Introduce array_to_string() utility function; add port_list property to Service

This commit is contained in:
Jeremy Stretch
2020-09-21 13:31:38 -04:00
parent 816238c72e
commit de4ac2935a
5 changed files with 24 additions and 18 deletions

View File

@@ -1,13 +1,10 @@
<tr>
<td>
<a href="{{ service.get_absolute_url }}">{{ service.name }}</a>
</td>
<td>
{{ service.get_protocol_display }}/{{ service.port }}
</td>
<td><a href="{{ service.get_absolute_url }}">{{ service.name }}</a></td>
<td>{{ service.get_protocol_display }}</td>
<td>{{ service.port_list }}</td>
<td>
{% for ip in service.ipaddresses.all %}
<span>{{ ip.address.ip }}</span><br />
<a href="{{ ip.get_absolute_url }}">{{ ip.address.ip }}</a><br />
{% empty %}
<span class="text-muted">All IPs</span>
{% endfor %}

View File

@@ -63,7 +63,7 @@
</tr>
<tr>
<td>Ports</td>
<td>{{ service.ports|join:", " }}</td>
<td>{{ service.port_list }}</td>
</tr>
<tr>
<td>IP Addresses</td>