Skip to content

Commit

Permalink
Change prefix links to new prefix details page.
Browse files Browse the repository at this point in the history
fixes #1479
  • Loading branch information
lunkwill42 committed Mar 10, 2017
1 parent 998e611 commit 1cfcd9a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions python/nav/netmap/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,7 @@ def to_json(self):
if self.layer == 3:
json.update({'prefix': {
'net_address': unicode(self.prefix.net_address),
'report_link': reverse('report-prefix-prefix',
kwargs={'prefix_id': self.prefix.id})
'report_link': self.prefix.get_absolute_url(),
}})
json.update({'vlan': self.prefix.vlan.id})
elif self.layer == 2:
Expand Down
2 changes: 1 addition & 1 deletion templates/info/vlan/vlandetails.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h3>Vlan details</h3>
{% for prefix in prefixes %}
<tr>
<td>
<a href="{% url 'report-prefix-prefix' prefix.id %}">
<a href="{% url 'prefix-details' prefix.id %}">
{{ prefix.net_address }}
</a>
</td>
Expand Down
4 changes: 2 additions & 2 deletions templates/ipdevinfo/frag-ipdevinfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<td>
{% with netbox.get_filtered_prefix as prefix %}
{% if prefix %}
<a href="{% url 'report-prefix-prefix' prefix.id %}">
<a href="{% url 'prefix-details' prefix.id %}">
{{ prefix }}</a>
{% else %}
N/A
Expand Down Expand Up @@ -479,7 +479,7 @@
<td>
{% with no_netbox.prefix as prefix %}
{% if prefix %}
<a href="{% url 'report-prefix-prefix' prefix.id %}">
<a href="{% url 'prefix-details' prefix.id %}">
{{ prefix.net_address }}
</a>
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion templates/ipdevinfo/port-details-vlan-frag.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
<tr>
<td>{{ gwprefix.gw_ip }}</td>
<td>
<a href="{% url 'report-prefix-prefix' gwprefix.prefix.id %}">{{ gwprefix.prefix.net_address }}</a>
<a href="{% url 'prefix-details' gwprefix.prefix.id %}">{{ gwprefix.prefix.net_address }}</a>
</td>
</tr>
{% endfor %}
Expand Down

0 comments on commit 1cfcd9a

Please sign in to comment.