mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
Update templates to use "object" context var
This commit is contained in:
parent
3e7cf416f1
commit
d5d87e0fdd
@ -45,7 +45,7 @@ class ProviderView(generic.ObjectView):
|
||||
RequestConfig(request, paginate).configure(circuits_table)
|
||||
|
||||
return render(request, 'circuits/provider.html', {
|
||||
'provider': provider,
|
||||
'object': provider,
|
||||
'circuits_table': circuits_table,
|
||||
})
|
||||
|
||||
@ -144,7 +144,7 @@ class CircuitView(generic.ObjectView):
|
||||
termination_z.ip_addresses = termination_z.connected_endpoint.ip_addresses.restrict(request.user, 'view')
|
||||
|
||||
return render(request, 'circuits/circuit.html', {
|
||||
'circuit': circuit,
|
||||
'object': circuit,
|
||||
'termination_a': termination_a,
|
||||
'termination_z': termination_z,
|
||||
})
|
||||
|
@ -172,7 +172,7 @@ class SiteView(generic.ObjectView):
|
||||
).restrict(request.user, 'view').filter(site=site)
|
||||
|
||||
return render(request, 'dcim/site.html', {
|
||||
'site': site,
|
||||
'object': site,
|
||||
'stats': stats,
|
||||
'rack_groups': rack_groups,
|
||||
})
|
||||
@ -360,7 +360,7 @@ class RackView(generic.ObjectView):
|
||||
power_feeds = PowerFeed.objects.restrict(request.user, 'view').filter(rack=rack).prefetch_related('power_panel')
|
||||
|
||||
return render(request, 'dcim/rack.html', {
|
||||
'rack': rack,
|
||||
'object': rack,
|
||||
'device_count': Device.objects.restrict(request.user, 'view').filter(rack=rack).count(),
|
||||
'reservations': reservations,
|
||||
'power_feeds': power_feeds,
|
||||
@ -2335,7 +2335,7 @@ class VirtualChassisView(generic.ObjectView):
|
||||
members = Device.objects.restrict(request.user).filter(virtual_chassis=virtualchassis)
|
||||
|
||||
return render(request, 'dcim/virtualchassis.html', {
|
||||
'virtualchassis': virtualchassis,
|
||||
'object': virtualchassis,
|
||||
'members': members,
|
||||
})
|
||||
|
||||
|
@ -109,7 +109,7 @@ class ConfigContextView(generic.ObjectView):
|
||||
format = 'json'
|
||||
|
||||
return render(request, 'extras/configcontext.html', {
|
||||
'configcontext': configcontext,
|
||||
'object': configcontext,
|
||||
'format': format,
|
||||
})
|
||||
|
||||
@ -215,7 +215,7 @@ class ObjectChangeView(generic.ObjectView):
|
||||
diff_added = diff_removed = objectchange.object_data
|
||||
|
||||
return render(request, 'extras/objectchange.html', {
|
||||
'objectchange': objectchange,
|
||||
'object': objectchange,
|
||||
'diff_added': diff_added,
|
||||
'diff_removed': diff_removed,
|
||||
'next_change': next_change,
|
||||
|
@ -43,7 +43,7 @@ class VRFView(generic.ObjectView):
|
||||
)
|
||||
|
||||
return render(request, 'ipam/vrf.html', {
|
||||
'vrf': vrf,
|
||||
'object': vrf,
|
||||
'prefix_count': prefix_count,
|
||||
'import_targets_table': import_targets_table,
|
||||
'export_targets_table': export_targets_table,
|
||||
@ -106,7 +106,7 @@ class RouteTargetView(generic.ObjectView):
|
||||
)
|
||||
|
||||
return render(request, 'ipam/routetarget.html', {
|
||||
'routetarget': routetarget,
|
||||
'object': routetarget,
|
||||
'importing_vrfs_table': importing_vrfs_table,
|
||||
'exporting_vrfs_table': exporting_vrfs_table,
|
||||
})
|
||||
@ -241,7 +241,7 @@ class AggregateView(generic.ObjectView):
|
||||
}
|
||||
|
||||
return render(request, 'ipam/aggregate.html', {
|
||||
'aggregate': aggregate,
|
||||
'object': aggregate,
|
||||
'prefix_table': prefix_table,
|
||||
'permissions': permissions,
|
||||
'show_available': request.GET.get('show_available', 'true') == 'true',
|
||||
@ -358,7 +358,7 @@ class PrefixView(generic.ObjectView):
|
||||
duplicate_prefix_table.exclude = ('vrf',)
|
||||
|
||||
return render(request, 'ipam/prefix.html', {
|
||||
'prefix': prefix,
|
||||
'object': prefix,
|
||||
'aggregate': aggregate,
|
||||
'parent_prefix_table': parent_prefix_table,
|
||||
'duplicate_prefix_table': duplicate_prefix_table,
|
||||
@ -399,7 +399,7 @@ class PrefixPrefixesView(generic.ObjectView):
|
||||
}
|
||||
|
||||
return render(request, 'ipam/prefix_prefixes.html', {
|
||||
'prefix': prefix,
|
||||
'object': prefix,
|
||||
'first_available_prefix': prefix.get_first_available_prefix(),
|
||||
'prefix_table': prefix_table,
|
||||
'permissions': permissions,
|
||||
@ -443,7 +443,7 @@ class PrefixIPAddressesView(generic.ObjectView):
|
||||
}
|
||||
|
||||
return render(request, 'ipam/prefix_ipaddresses.html', {
|
||||
'prefix': prefix,
|
||||
'object': prefix,
|
||||
'first_available_ip': prefix.get_first_available_ip(),
|
||||
'ip_table': ip_table,
|
||||
'permissions': permissions,
|
||||
@ -539,7 +539,7 @@ class IPAddressView(generic.ObjectView):
|
||||
RequestConfig(request, paginate).configure(related_ips_table)
|
||||
|
||||
return render(request, 'ipam/ipaddress.html', {
|
||||
'ipaddress': ipaddress,
|
||||
'object': ipaddress,
|
||||
'parent_prefixes_table': parent_prefixes_table,
|
||||
'duplicate_ips_table': duplicate_ips_table,
|
||||
'more_duplicate_ips': duplicate_ips.count() > 10,
|
||||
@ -739,7 +739,7 @@ class VLANView(generic.ObjectView):
|
||||
prefix_table.exclude = ('vlan',)
|
||||
|
||||
return render(request, 'ipam/vlan.html', {
|
||||
'vlan': vlan,
|
||||
'object': vlan,
|
||||
'prefix_table': prefix_table,
|
||||
})
|
||||
|
||||
@ -759,7 +759,7 @@ class VLANInterfacesView(generic.ObjectView):
|
||||
RequestConfig(request, paginate).configure(members_table)
|
||||
|
||||
return render(request, 'ipam/vlan_interfaces.html', {
|
||||
'vlan': vlan,
|
||||
'object': vlan,
|
||||
'members_table': members_table,
|
||||
'active_tab': 'interfaces',
|
||||
})
|
||||
@ -780,7 +780,7 @@ class VLANVMInterfacesView(generic.ObjectView):
|
||||
RequestConfig(request, paginate).configure(members_table)
|
||||
|
||||
return render(request, 'ipam/vlan_vminterfaces.html', {
|
||||
'vlan': vlan,
|
||||
'object': vlan,
|
||||
'members_table': members_table,
|
||||
'active_tab': 'vminterfaces',
|
||||
})
|
||||
|
@ -4,15 +4,15 @@
|
||||
{% load helpers %}
|
||||
{% load plugins %}
|
||||
|
||||
{% block title %}{{ circuit }}{% endblock %}
|
||||
{% block title %}{{ object }}{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
<div class="row noprint">
|
||||
<div class="col-sm-8 col-md-9">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'circuits:circuit_list' %}">Circuits</a></li>
|
||||
<li><a href="{% url 'circuits:circuit_list' %}?provider={{ circuit.provider.slug }}">{{ circuit.provider }}</a></li>
|
||||
<li>{{ circuit.cid }}</li>
|
||||
<li><a href="{% url 'circuits:circuit_list' %}?provider={{ object.provider.slug }}">{{ object.provider }}</a></li>
|
||||
<li>{{ object.cid }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-sm-4 col-md-3">
|
||||
@ -29,29 +29,29 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right noprint">
|
||||
{% plugin_buttons circuit %}
|
||||
{% plugin_buttons object %}
|
||||
{% if perms.circuits.add_circuit %}
|
||||
{% clone_button circuit %}
|
||||
{% clone_button object %}
|
||||
{% endif %}
|
||||
{% if perms.circuits.change_circuit %}
|
||||
{% edit_button circuit %}
|
||||
{% edit_button object %}
|
||||
{% endif %}
|
||||
{% if perms.circuits.delete_circuit %}
|
||||
{% delete_button circuit %}
|
||||
{% delete_button object %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{{ circuit }}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=circuit %}
|
||||
<h1>{{ object }}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=object %}
|
||||
<div class="pull-right noprint">
|
||||
{% custom_links circuit %}
|
||||
{% custom_links object %}
|
||||
</div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||
<a href="{{ circuit.get_absolute_url }}">Circuit</a>
|
||||
<a href="{{ object.get_absolute_url }}">Circuit</a>
|
||||
</li>
|
||||
{% if perms.extras.view_objectchange %}
|
||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||
<a href="{% url 'circuits:circuit_changelog' pk=circuit.pk %}">Change Log</a>
|
||||
<a href="{% url 'circuits:circuit_changelog' pk=object.pk %}">Change Log</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@ -68,31 +68,31 @@
|
||||
<tr>
|
||||
<td>Status</td>
|
||||
<td>
|
||||
<span class="label label-{{ circuit.get_status_class }}">{{ circuit.get_status_display }}</span>
|
||||
<span class="label label-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Provider</td>
|
||||
<td>
|
||||
<a href="{% url 'circuits:provider' slug=circuit.provider.slug %}">{{ circuit.provider }}</a>
|
||||
<a href="{% url 'circuits:provider' slug=object.provider.slug %}">{{ object.provider }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Circuit ID</td>
|
||||
<td>{{ circuit.cid }}</td>
|
||||
<td>{{ object.cid }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Type</td>
|
||||
<td><a href="{{ circuit.type.get_absolute_url }}">{{ circuit.type }}</a></td>
|
||||
<td><a href="{{ object.type.get_absolute_url }}">{{ object.type }}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tenant</td>
|
||||
<td>
|
||||
{% if circuit.tenant %}
|
||||
{% if circuit.tenant.group %}
|
||||
<a href="{{ circuit.tenant.group.get_absolute_url }}">{{ circuit.tenant.group }}</a> /
|
||||
{% if object.tenant %}
|
||||
{% if object.tenant.group %}
|
||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
||||
{% endif %}
|
||||
<a href="{{ circuit.tenant.get_absolute_url }}">{{ circuit.tenant }}</a>
|
||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -100,43 +100,43 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Install Date</td>
|
||||
<td>{{ circuit.install_date|placeholder }}</td>
|
||||
<td>{{ object.install_date|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Commit Rate</td>
|
||||
<td>{{ circuit.commit_rate|humanize_speed|placeholder }}</td>
|
||||
<td>{{ object.commit_rate|humanize_speed|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>{{ circuit.description|placeholder }}</td>
|
||||
<td>{{ object.description|placeholder }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% include 'inc/custom_fields_panel.html' with obj=circuit %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=circuit.tags.all url='circuits:circuit_list' %}
|
||||
{% include 'inc/custom_fields_panel.html' with obj=object %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='circuits:circuit_list' %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Comments</strong>
|
||||
</div>
|
||||
<div class="panel-body rendered-markdown">
|
||||
{% if circuit.comments %}
|
||||
{{ circuit.comments|render_markdown }}
|
||||
{% if object.comments %}
|
||||
{{ object.comments|render_markdown }}
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% plugin_left_page circuit %}
|
||||
{% plugin_left_page object %}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{% include 'circuits/inc/circuit_termination.html' with termination=termination_a side='A' %}
|
||||
{% include 'circuits/inc/circuit_termination.html' with termination=termination_z side='Z' %}
|
||||
{% plugin_right_page circuit %}
|
||||
{% plugin_right_page object %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% plugin_full_width_page circuit %}
|
||||
{% plugin_full_width_page object %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -4,7 +4,7 @@
|
||||
<div class="panel-heading">
|
||||
<div class="pull-right">
|
||||
{% if not termination and perms.circuits.add_circuittermination %}
|
||||
<a href="{% url 'circuits:circuittermination_add' circuit=circuit.pk %}?term_side={{ side }}" class="btn btn-xs btn-success">
|
||||
<a href="{% url 'circuits:circuittermination_add' circuit=object.pk %}?term_side={{ side }}" class="btn btn-xs btn-success">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add
|
||||
</a>
|
||||
{% endif %}
|
||||
@ -12,12 +12,12 @@
|
||||
<a href="{% url 'circuits:circuittermination_edit' pk=termination.pk %}" class="btn btn-xs btn-warning">
|
||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
||||
</a>
|
||||
<a href="{% url 'circuits:circuit_terminations_swap' pk=circuit.pk %}" class="btn btn-xs btn-primary">
|
||||
<a href="{% url 'circuits:circuit_terminations_swap' pk=object.pk %}" class="btn btn-xs btn-primary">
|
||||
<span class="mdi mdi-swap-vertical" aria-hidden="true"></span> Swap
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if termination and perms.circuits.delete_circuittermination %}
|
||||
<a href="{% url 'circuits:circuittermination_delete' pk=termination.pk %}?return_url={{ circuit.get_absolute_url }}" class="btn btn-xs btn-danger">
|
||||
<a href="{% url 'circuits:circuittermination_delete' pk=termination.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-xs btn-danger">
|
||||
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
||||
</a>
|
||||
{% endif %}
|
||||
@ -67,10 +67,10 @@
|
||||
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> Connect
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="{% url 'circuits:circuittermination_connect' termination_a_id=termination.pk termination_b_type='interface' %}?termination_b_site={{ termination.site.pk }}&return_url={{ circuit.get_absolute_url }}">Interface</a></li>
|
||||
<li><a href="{% url 'circuits:circuittermination_connect' termination_a_id=termination.pk termination_b_type='front-port' %}?termination_b_site={{ termination.site.pk }}&return_url={{ circuit.get_absolute_url }}">Front Port</a></li>
|
||||
<li><a href="{% url 'circuits:circuittermination_connect' termination_a_id=termination.pk termination_b_type='rear-port' %}?termination_b_site={{ termination.site.pk }}&return_url={{ circuit.get_absolute_url }}">Rear Port</a></li>
|
||||
<li><a href="{% url 'circuits:circuittermination_connect' termination_a_id=termination.pk termination_b_type='circuit-termination' %}?termination_b_site={{ termination.site.pk }}&return_url={{ circuit.get_absolute_url }}">Circuit Termination</a></li>
|
||||
<li><a href="{% url 'circuits:circuittermination_connect' termination_a_id=termination.pk termination_b_type='interface' %}?termination_b_site={{ termination.site.pk }}&return_url={{ object.get_absolute_url }}">Interface</a></li>
|
||||
<li><a href="{% url 'circuits:circuittermination_connect' termination_a_id=termination.pk termination_b_type='front-port' %}?termination_b_site={{ termination.site.pk }}&return_url={{ object.get_absolute_url }}">Front Port</a></li>
|
||||
<li><a href="{% url 'circuits:circuittermination_connect' termination_a_id=termination.pk termination_b_type='rear-port' %}?termination_b_site={{ termination.site.pk }}&return_url={{ object.get_absolute_url }}">Rear Port</a></li>
|
||||
<li><a href="{% url 'circuits:circuittermination_connect' termination_a_id=termination.pk termination_b_type='circuit-termination' %}?termination_b_site={{ termination.site.pk }}&return_url={{ object.get_absolute_url }}">Circuit Termination</a></li>
|
||||
</ul>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -5,14 +5,14 @@
|
||||
{% load helpers %}
|
||||
{% load plugins %}
|
||||
|
||||
{% block title %}{{ provider }}{% endblock %}
|
||||
{% block title %}{{ object }}{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
<div class="row noprint">
|
||||
<div class="col-sm-8 col-md-9">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'circuits:provider_list' %}">Providers</a></li>
|
||||
<li>{{ provider }}</li>
|
||||
<li>{{ object }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-sm-4 col-md-3">
|
||||
@ -29,29 +29,29 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right noprint">
|
||||
{% plugin_buttons provider %}
|
||||
{% plugin_buttons object %}
|
||||
{% if perms.circuits.add_provider %}
|
||||
{% clone_button provider %}
|
||||
{% clone_button object %}
|
||||
{% endif %}
|
||||
{% if perms.circuits.change_provider %}
|
||||
{% edit_button provider %}
|
||||
{% edit_button object %}
|
||||
{% endif %}
|
||||
{% if perms.circuits.delete_provider %}
|
||||
{% delete_button provider %}
|
||||
{% delete_button object %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{{ provider }}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=provider %}
|
||||
<h1>{{ object }}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=object %}
|
||||
<div class="pull-right noprint">
|
||||
{% custom_links provider %}
|
||||
{% custom_links object %}
|
||||
</div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||
<a href="{{ provider.get_absolute_url }}">Provider</a>
|
||||
<a href="{{ object.get_absolute_url }}">Provider</a>
|
||||
</li>
|
||||
{% if perms.extras.view_objectchange %}
|
||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||
<a href="{% url 'circuits:provider_changelog' slug=provider.slug %}">Change Log</a>
|
||||
<a href="{% url 'circuits:provider_changelog' slug=object.slug %}">Change Log</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@ -67,17 +67,17 @@
|
||||
<table class="table table-hover panel-body attr-table">
|
||||
<tr>
|
||||
<td>ASN</td>
|
||||
<td>{{ provider.asn|placeholder }}</td>
|
||||
<td>{{ object.asn|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Account</td>
|
||||
<td>{{ provider.account|placeholder }}</td>
|
||||
<td>{{ object.account|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Customer Portal</td>
|
||||
<td>
|
||||
{% if provider.portal_url %}
|
||||
<a href="{{ provider.portal_url }}">{{ provider.portal_url }}</a>
|
||||
{% if object.portal_url %}
|
||||
<a href="{{ object.portal_url }}">{{ object.portal_url }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
@ -85,35 +85,35 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>NOC Contact</td>
|
||||
<td class="rendered-markdown">{{ provider.noc_contact|render_markdown|placeholder }}</td>
|
||||
<td class="rendered-markdown">{{ object.noc_contact|render_markdown|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Admin Contact</td>
|
||||
<td class="rendered-markdown">{{ provider.admin_contact|render_markdown|placeholder }}</td>
|
||||
<td class="rendered-markdown">{{ object.admin_contact|render_markdown|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Circuits</td>
|
||||
<td>
|
||||
<a href="{% url 'circuits:circuit_list' %}?provider={{ provider.slug }}">{{ circuits_table.rows|length }}</a>
|
||||
<a href="{% url 'circuits:circuit_list' %}?provider={{ object.slug }}">{{ circuits_table.rows|length }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% include 'inc/custom_fields_panel.html' with obj=provider %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=provider.tags.all url='circuits:provider_list' %}
|
||||
{% include 'inc/custom_fields_panel.html' with obj=object %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='circuits:object_list' %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Comments</strong>
|
||||
</div>
|
||||
<div class="panel-body rendered-markdown">
|
||||
{% if provider.comments %}
|
||||
{{ provider.comments|render_markdown }}
|
||||
{% if object.comments %}
|
||||
{{ object.comments|render_markdown }}
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% plugin_left_page provider %}
|
||||
{% plugin_left_page object %}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="panel panel-default">
|
||||
@ -123,19 +123,19 @@
|
||||
{% include 'inc/table.html' with table=circuits_table %}
|
||||
{% if perms.circuits.add_circuit %}
|
||||
<div class="panel-footer text-right noprint">
|
||||
<a href="{% url 'circuits:circuit_add' %}?provider={{ provider.pk }}" class="btn btn-xs btn-primary">
|
||||
<a href="{% url 'circuits:circuit_add' %}?provider={{ object.pk }}" class="btn btn-xs btn-primary">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add circuit
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% include 'inc/paginator.html' with paginator=circuits_table.paginator page=circuits_table.page %}
|
||||
{% plugin_right_page provider %}
|
||||
{% plugin_right_page object %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% plugin_full_width_page provider %}
|
||||
{% plugin_full_width_page object %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -17,7 +17,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right noprint">
|
||||
{% plugin_buttons devicetype %}
|
||||
{% plugin_buttons object %}
|
||||
{% if perms.dcim.change_devicetype %}
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
@ -52,19 +52,19 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if perms.dcim.add_devicetype %}
|
||||
{% clone_button devicetype %}
|
||||
{% clone_button object %}
|
||||
{% endif %}
|
||||
{% if perms.dcim.change_devicetype %}
|
||||
{% edit_button devicetype use_pk=True %}
|
||||
{% edit_button object use_pk=True %}
|
||||
{% endif %}
|
||||
{% if perms.dcim.delete_devicetype %}
|
||||
{% delete_button devicetype use_pk=True %}
|
||||
{% delete_button object use_pk=True %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{{ object.manufacturer }} {{ object.model }}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=devicetype %}
|
||||
{% include 'inc/created_updated.html' with obj=object %}
|
||||
<div class="pull-right noprint">
|
||||
{% custom_links devicetype %}
|
||||
{% custom_links object %}
|
||||
</div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||
@ -151,10 +151,10 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% plugin_left_page devicetype %}
|
||||
{% plugin_left_page object %}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{% include 'inc/custom_fields_panel.html' with obj=devicetype %}
|
||||
{% include 'inc/custom_fields_panel.html' with obj=object %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='dcim:devicetype_list' %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
@ -168,12 +168,12 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% plugin_right_page devicetype %}
|
||||
{% plugin_right_page object %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% plugin_full_width_page devicetype %}
|
||||
{% plugin_full_width_page object %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
@ -1,8 +1,8 @@
|
||||
<div style="margin-left: -30px">
|
||||
<object data="{% url 'dcim-api:rack-elevation' pk=rack.pk %}?face={{face}}&render=svg" class="rack_elevation"></object>
|
||||
<object data="{% url 'dcim-api:rack-elevation' pk=object.pk %}?face={{face}}&render=svg" class="rack_elevation"></object>
|
||||
</div>
|
||||
<div class="text-center text-small">
|
||||
<a href="{% url 'dcim-api:rack-elevation' pk=rack.pk %}?face={{face}}&render=svg">
|
||||
<a href="{% url 'dcim-api:rack-elevation' pk=object.pk %}?face={{face}}&render=svg">
|
||||
<i class="mdi mdi-content-save-outline"></i> Save SVG
|
||||
</a>
|
||||
</div>
|
||||
|
@ -10,14 +10,14 @@
|
||||
<div class="col-sm-8 col-md-9">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'dcim:rack_list' %}">Racks</a></li>
|
||||
<li><a href="{% url 'dcim:rack_list' %}?site={{ rack.site.slug }}">{{ rack.site }}</a></li>
|
||||
{% if rack.group %}
|
||||
{% for group in rack.group.get_ancestors %}
|
||||
<li><a href="{% url 'dcim:rack_list' %}?site={{ object.site.slug }}">{{ object.site }}</a></li>
|
||||
{% if object.group %}
|
||||
{% for group in object.group.get_ancestors %}
|
||||
<li><a href="{{ group.get_absolute_url }}">{{ group }}</a></li>
|
||||
{% endfor %}
|
||||
<li><a href="{{ rack.group.get_absolute_url }}">{{ rack.group }}</a></li>
|
||||
<li><a href="{{ object.group.get_absolute_url }}">{{ object.group }}</a></li>
|
||||
{% endif %}
|
||||
<li>{{ rack }}</li>
|
||||
<li>{{ object }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-sm-4 col-md-3">
|
||||
@ -34,7 +34,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right noprint">
|
||||
{% plugin_buttons rack %}
|
||||
{% plugin_buttons object %}
|
||||
<a {% if prev_rack %}href="{% url 'dcim:rack' pk=prev_rack.pk %}"{% else %}disabled="disabled"{% endif %} class="btn btn-primary">
|
||||
<span class="mdi mdi-chevron-left" aria-hidden="true"></span> Previous Rack
|
||||
</a>
|
||||
@ -42,30 +42,30 @@
|
||||
<span class="mdi mdi-chevron-right" aria-hidden="true"></span> Next Rack
|
||||
</a>
|
||||
{% if perms.dcim.add_rack %}
|
||||
{% clone_button rack %}
|
||||
{% clone_button object %}
|
||||
{% endif %}
|
||||
{% if perms.dcim.change_rack %}
|
||||
{% edit_button rack %}
|
||||
{% edit_button object %}
|
||||
{% endif %}
|
||||
{% if perms.dcim.delete_rack %}
|
||||
{% delete_button rack %}
|
||||
{% delete_button object %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{% block title %}Rack {{ rack }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=rack %}
|
||||
<h1>{% block title %}Rack {{ object }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=object %}
|
||||
<div class="pull-right noprint">
|
||||
<button class="btn btn-sm btn-default toggle-images" selected="selected">
|
||||
<span class="mdi mdi-checkbox-marked-circle-outline" aria-hidden="true"></span> Show Images
|
||||
</button>
|
||||
{% custom_links rack %}
|
||||
{% custom_links object %}
|
||||
</div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||
<a href="{{ rack.get_absolute_url }}">Rack</a>
|
||||
<a href="{{ object.get_absolute_url }}">Rack</a>
|
||||
</li>
|
||||
{% if perms.extras.view_objectchange %}
|
||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||
<a href="{% url 'dcim:rack_changelog' pk=rack.pk %}">Change Log</a>
|
||||
<a href="{% url 'dcim:rack_changelog' pk=object.pk %}">Change Log</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@ -82,20 +82,20 @@
|
||||
<tr>
|
||||
<td>Site</td>
|
||||
<td>
|
||||
{% if rack.site.region %}
|
||||
<a href="{{ rack.site.region.get_absolute_url }}">{{ rack.site.region }}</a> /
|
||||
{% if object.site.region %}
|
||||
<a href="{{ object.site.region.get_absolute_url }}">{{ object.site.region }}</a> /
|
||||
{% endif %}
|
||||
<a href="{% url 'dcim:site' slug=rack.site.slug %}">{{ rack.site }}</a>
|
||||
<a href="{% url 'dcim:site' slug=object.site.slug %}">{{ object.site }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Group</td>
|
||||
<td>
|
||||
{% if rack.group %}
|
||||
{% for group in rack.group.get_ancestors %}
|
||||
{% if object.group %}
|
||||
{% for group in object.group.get_ancestors %}
|
||||
<a href="{{ group.get_absolute_url }}">{{ group }}</a> /
|
||||
{% endfor %}
|
||||
<a href="{{ rack.group.get_absolute_url }}">{{ rack.group }}</a>
|
||||
<a href="{{ object.group.get_absolute_url }}">{{ object.group }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -103,16 +103,16 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Facility ID</td>
|
||||
<td>{{ rack.facility_id|placeholder }}</td>
|
||||
<td>{{ object.facility_id|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tenant</td>
|
||||
<td>
|
||||
{% if rack.tenant %}
|
||||
{% if rack.tenant.group %}
|
||||
<a href="{{ rack.tenant.group.get_absolute_url }}">{{ rack.tenant.group }}</a> /
|
||||
{% if object.tenant %}
|
||||
{% if object.tenant.group %}
|
||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
||||
{% endif %}
|
||||
<a href="{{ rack.tenant.get_absolute_url }}">{{ rack.tenant }}</a>
|
||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -121,14 +121,14 @@
|
||||
<tr>
|
||||
<td>Status</td>
|
||||
<td>
|
||||
{{ rack.get_status_display }}
|
||||
{{ object.get_status_display }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Role</td>
|
||||
<td>
|
||||
{% if rack.role %}
|
||||
<a href="{{ rack.role.get_absolute_url }}">{{ rack.role }}</a>
|
||||
{% if object.role %}
|
||||
<a href="{{ object.role.get_absolute_url }}">{{ object.role }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -136,25 +136,25 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Serial Number</td>
|
||||
<td>{{ rack.serial|placeholder }}</td>
|
||||
<td>{{ object.serial|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Asset Tag</td>
|
||||
<td>{{ rack.asset_tag|placeholder }}</td>
|
||||
<td>{{ object.asset_tag|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Devices</td>
|
||||
<td>
|
||||
<a href="{% url 'dcim:device_list' %}?rack_id={{ rack.id }}">{{ device_count }}</a>
|
||||
<a href="{% url 'dcim:device_list' %}?rack_id={{ object.id }}">{{ device_count }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Space Utilization</td>
|
||||
<td>{% utilization_graph rack.get_utilization %}</td>
|
||||
<td>{% utilization_graph object.get_utilization %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Power Utilization</td>
|
||||
<td>{% utilization_graph rack.get_power_utilization %}</td>
|
||||
<td>{% utilization_graph object.get_power_utilization %}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@ -166,8 +166,8 @@
|
||||
<tr>
|
||||
<td>Type</td>
|
||||
<td>
|
||||
{% if rack.type %}
|
||||
{{ rack.get_type_display }}
|
||||
{% if object.type %}
|
||||
{{ object.get_type_display }}
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -175,17 +175,17 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Width</td>
|
||||
<td>{{ rack.get_width_display }}</td>
|
||||
<td>{{ object.get_width_display }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Height</td>
|
||||
<td>{{ rack.u_height }}U ({% if rack.desc_units %}descending{% else %}ascending{% endif %})</td>
|
||||
<td>{{ object.u_height }}U ({% if object.desc_units %}descending{% else %}ascending{% endif %})</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Outer Width</td>
|
||||
<td>
|
||||
{% if rack.outer_width %}
|
||||
<span>{{ rack.outer_width }} {{ rack.get_outer_unit_display }}</span>
|
||||
{% if object.outer_width %}
|
||||
<span>{{ object.outer_width }} {{ object.get_outer_unit_display }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
@ -194,8 +194,8 @@
|
||||
<tr>
|
||||
<td>Outer Depth</td>
|
||||
<td>
|
||||
{% if rack.outer_depth %}
|
||||
<span>{{ rack.outer_depth }} {{ rack.get_outer_unit_display }}</span>
|
||||
{% if object.outer_depth %}
|
||||
<span>{{ object.outer_depth }} {{ object.get_outer_unit_display }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
@ -203,15 +203,15 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% include 'inc/custom_fields_panel.html' with obj=rack %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=rack.tags.all url='dcim:rack_list' %}
|
||||
{% include 'inc/custom_fields_panel.html' with obj=object %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='dcim:rack_list' %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Comments</strong>
|
||||
</div>
|
||||
<div class="panel-body rendered-markdown">
|
||||
{% if rack.comments %}
|
||||
{{ rack.comments|render_markdown }}
|
||||
{% if object.comments %}
|
||||
{{ object.comments|render_markdown }}
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -260,10 +260,10 @@
|
||||
<div class="panel-heading">
|
||||
<strong>Images</strong>
|
||||
</div>
|
||||
{% include 'inc/image_attachments.html' with images=rack.images.all %}
|
||||
{% include 'inc/image_attachments.html' with images=object.images.all %}
|
||||
{% if perms.extras.add_imageattachment %}
|
||||
<div class="panel-footer text-right noprint">
|
||||
<a href="{% url 'dcim:rack_add_image' object_id=rack.pk %}" class="btn btn-primary btn-xs">
|
||||
<a href="{% url 'dcim:rack_add_image' object_id=object.pk %}" class="btn btn-primary btn-xs">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span>
|
||||
Attach an image
|
||||
</a>
|
||||
@ -300,12 +300,12 @@
|
||||
</td>
|
||||
<td class="text-right noprint">
|
||||
{% if perms.dcim.change_rackreservation %}
|
||||
<a href="{% url 'dcim:rackreservation_edit' pk=resv.pk %}?return_url={{ rack.get_absolute_url }}" class="btn btn-warning btn-xs" title="Edit reservation">
|
||||
<a href="{% url 'dcim:rackreservation_edit' pk=resv.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-warning btn-xs" title="Edit reservation">
|
||||
<i class="mdi mdi-pencil" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.dcim.delete_rackreservation %}
|
||||
<a href="{% url 'dcim:rackreservation_delete' pk=resv.pk %}?return_url={{ rack.get_absolute_url }}" class="btn btn-danger btn-xs" title="Delete reservation">
|
||||
<a href="{% url 'dcim:rackreservation_delete' pk=resv.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-danger btn-xs" title="Delete reservation">
|
||||
<i class="mdi mdi-trash-can-outline" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
@ -318,14 +318,14 @@
|
||||
{% endif %}
|
||||
{% if perms.dcim.add_rackreservation %}
|
||||
<div class="panel-footer text-right noprint">
|
||||
<a href="{% url 'dcim:rackreservation_add' %}?rack={{ rack.pk }}&return_url={{ rack.get_absolute_url }}" class="btn btn-primary btn-xs">
|
||||
<a href="{% url 'dcim:rackreservation_add' %}?rack={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary btn-xs">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span>
|
||||
Add a reservation
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% plugin_left_page rack %}
|
||||
{% plugin_left_page object %}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="row" style="margin-bottom: 20px">
|
||||
@ -371,19 +371,19 @@
|
||||
{% endif %}
|
||||
{% if perms.dcim.add_device %}
|
||||
<div class="panel-footer text-right noprint">
|
||||
<a href="{% url 'dcim:device_add' %}?site={{ rack.site.pk }}&rack={{ rack.pk }}" class="btn btn-primary btn-xs">
|
||||
<a href="{% url 'dcim:device_add' %}?site={{ object.site.pk }}&rack={{ object.pk }}" class="btn btn-primary btn-xs">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span>
|
||||
Add a non-racked device
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% plugin_right_page rack %}
|
||||
{% plugin_right_page object %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% plugin_full_width_page rack %}
|
||||
{% plugin_full_width_page object %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -11,13 +11,13 @@
|
||||
<div class="col-sm-8 col-md-9">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'dcim:site_list' %}">Sites</a></li>
|
||||
{% if site.region %}
|
||||
{% for region in site.region.get_ancestors %}
|
||||
{% if object.region %}
|
||||
{% for region in object.region.get_ancestors %}
|
||||
<li><a href="{{ region.get_absolute_url }}">{{ region }}</a></li>
|
||||
{% endfor %}
|
||||
<li><a href="{{ site.region.get_absolute_url }}">{{ site.region }}</a></li>
|
||||
<li><a href="{{ object.region.get_absolute_url }}">{{ object.region }}</a></li>
|
||||
{% endif %}
|
||||
<li>{{ site }}</li>
|
||||
<li>{{ object }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-sm-4 col-md-3">
|
||||
@ -34,29 +34,29 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right noprint">
|
||||
{% plugin_buttons site %}
|
||||
{% plugin_buttons object %}
|
||||
{% if perms.dcim.add_site %}
|
||||
{% clone_button site %}
|
||||
{% clone_button object %}
|
||||
{% endif %}
|
||||
{% if perms.dcim.change_site %}
|
||||
{% edit_button site %}
|
||||
{% edit_button object %}
|
||||
{% endif %}
|
||||
{% if perms.dcim.delete_site %}
|
||||
{% delete_button site %}
|
||||
{% delete_button object %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{% block title %}{{ site }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=site %}
|
||||
<h1>{% block title %}{{ object }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=object %}
|
||||
<div class="pull-right noprint">
|
||||
{% custom_links site %}
|
||||
{% custom_links object %}
|
||||
</div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||
<a href="{{ site.get_absolute_url }}">Site</a>
|
||||
<a href="{{ object.get_absolute_url }}">Site</a>
|
||||
</li>
|
||||
{% if perms.extras.view_objectchange %}
|
||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||
<a href="{% url 'dcim:site_changelog' slug=site.slug %}">Change Log</a>
|
||||
<a href="{% url 'dcim:site_changelog' slug=object.slug %}">Change Log</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@ -73,17 +73,17 @@
|
||||
<tr>
|
||||
<td>Status</td>
|
||||
<td>
|
||||
<span class="label label-{{ site.get_status_class }}">{{ site.get_status_display }}</span>
|
||||
<span class="label label-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Region</td>
|
||||
<td>
|
||||
{% if site.region %}
|
||||
{% for region in site.region.get_ancestors %}
|
||||
{% if object.region %}
|
||||
{% for region in object.region.get_ancestors %}
|
||||
<a href="{{ region.get_absolute_url }}">{{ region }}</a> /
|
||||
{% endfor %}
|
||||
<a href="{{ site.region.get_absolute_url }}">{{ site.region }}</a>
|
||||
<a href="{{ object.region.get_absolute_url }}">{{ object.region }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -92,11 +92,11 @@
|
||||
<tr>
|
||||
<td>Tenant</td>
|
||||
<td>
|
||||
{% if site.tenant %}
|
||||
{% if site.tenant.group %}
|
||||
<a href="{{ site.tenant.group.get_absolute_url }}">{{ site.tenant.group }}</a> /
|
||||
{% if object.tenant %}
|
||||
{% if object.tenant.group %}
|
||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
||||
{% endif %}
|
||||
<a href="{{ site.tenant.get_absolute_url }}">{{ site.tenant }}</a>
|
||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -104,18 +104,18 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Facility</td>
|
||||
<td>{{ site.facility|placeholder }}</td>
|
||||
<td>{{ object.facility|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>AS Number</td>
|
||||
<td>{{ site.asn|placeholder }}</td>
|
||||
<td>{{ object.asn|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Time Zone</td>
|
||||
<td>
|
||||
{% if site.time_zone %}
|
||||
{{ site.time_zone }} (UTC {{ site.time_zone|tzoffset }})<br />
|
||||
<small class="text-muted">Site time: {% timezone site.time_zone %}{% now "SHORT_DATETIME_FORMAT" %}{% endtimezone %}</small>
|
||||
{% if object.time_zone %}
|
||||
{{ object.time_zone }} (UTC {{ object.time_zone|tzoffset }})<br />
|
||||
<small class="text-muted">Site time: {% timezone object.time_zone %}{% now "SHORT_DATETIME_FORMAT" %}{% endtimezone %}</small>
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
@ -123,7 +123,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>{{ site.description|placeholder }}</td>
|
||||
<td>{{ object.description|placeholder }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@ -135,13 +135,13 @@
|
||||
<tr>
|
||||
<td>Physical Address</td>
|
||||
<td>
|
||||
{% if site.physical_address %}
|
||||
{% if object.physical_address %}
|
||||
<div class="pull-right noprint">
|
||||
<a href="http://maps.google.com/?q={{ site.physical_address|urlencode }}" target="_blank" class="btn btn-primary btn-xs">
|
||||
<a href="http://maps.google.com/?q={{ object.physical_address|urlencode }}" target="_blank" class="btn btn-primary btn-xs">
|
||||
<i class="mdi mdi-map-marker"></i> Map it
|
||||
</a>
|
||||
</div>
|
||||
<span>{{ site.physical_address|linebreaksbr }}</span>
|
||||
<span>{{ object.physical_address|linebreaksbr }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
@ -149,18 +149,18 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Shipping Address</td>
|
||||
<td>{{ site.shipping_address|linebreaksbr|placeholder }}</td>
|
||||
<td>{{ object.shipping_address|linebreaksbr|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GPS Coordinates</td>
|
||||
<td>
|
||||
{% if site.latitude and site.longitude %}
|
||||
{% if object.latitude and object.longitude %}
|
||||
<div class="pull-right noprint">
|
||||
<a href="http://maps.google.com/?q={{ site.latitude }},{{ site.longitude }}" target="_blank" class="btn btn-primary btn-xs">
|
||||
<a href="http://maps.google.com/?q={{ object.latitude }},{{ object.longitude }}" target="_blank" class="btn btn-primary btn-xs">
|
||||
<i class="mdi mdi-map-marker"></i> Map it
|
||||
</a>
|
||||
</div>
|
||||
<span>{{ site.latitude }}, {{ site.longitude }}</span>
|
||||
<span>{{ object.latitude }}, {{ object.longitude }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
@ -168,13 +168,13 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Contact Name</td>
|
||||
<td>{{ site.contact_name|placeholder }}</td>
|
||||
<td>{{ object.contact_name|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Contact Phone</td>
|
||||
<td>
|
||||
{% if site.contact_phone %}
|
||||
<a href="tel:{{ site.contact_phone }}">{{ site.contact_phone }}</a>
|
||||
{% if object.contact_phone %}
|
||||
<a href="tel:{{ object.contact_phone }}">{{ object.contact_phone }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
@ -183,8 +183,8 @@
|
||||
<tr>
|
||||
<td>Contact E-Mail</td>
|
||||
<td>
|
||||
{% if site.contact_email %}
|
||||
<a href="mailto:{{ site.contact_email }}">{{ site.contact_email }}</a>
|
||||
{% if object.contact_email %}
|
||||
<a href="mailto:{{ object.contact_email }}">{{ object.contact_email }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
@ -192,21 +192,21 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% include 'inc/custom_fields_panel.html' with obj=site %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=site.tags.all url='dcim:site_list' %}
|
||||
{% include 'inc/custom_fields_panel.html' with obj=object %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='dcim:site_list' %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Comments</strong>
|
||||
</div>
|
||||
<div class="panel-body rendered-markdown">
|
||||
{% if site.comments %}
|
||||
{{ site.comments|render_markdown }}
|
||||
{% if object.comments %}
|
||||
{{ object.comments|render_markdown }}
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% plugin_left_page site %}
|
||||
{% plugin_left_page object %}
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="panel panel-default">
|
||||
@ -215,27 +215,27 @@
|
||||
</div>
|
||||
<div class="row panel-body">
|
||||
<div class="col-md-4 text-center">
|
||||
<h2><a href="{% url 'dcim:rack_list' %}?site={{ site.slug }}" class="btn {% if stats.rack_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.rack_count }}</a></h2>
|
||||
<h2><a href="{% url 'dcim:rack_list' %}?site={{ object.slug }}" class="btn {% if stats.rack_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.rack_count }}</a></h2>
|
||||
<p>Racks</p>
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
<h2><a href="{% url 'dcim:device_list' %}?site={{ site.slug }}" class="btn {% if stats.device_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.device_count }}</a></h2>
|
||||
<h2><a href="{% url 'dcim:device_list' %}?site={{ object.slug }}" class="btn {% if stats.device_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.device_count }}</a></h2>
|
||||
<p>Devices</p>
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
<h2><a href="{% url 'ipam:prefix_list' %}?site={{ site.slug }}" class="btn {% if stats.prefix_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.prefix_count }}</a></h2>
|
||||
<h2><a href="{% url 'ipam:prefix_list' %}?site={{ object.slug }}" class="btn {% if stats.prefix_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.prefix_count }}</a></h2>
|
||||
<p>Prefixes</p>
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
<h2><a href="{% url 'ipam:vlan_list' %}?site={{ site.slug }}" class="btn {% if stats.vlan_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.vlan_count }}</a></h2>
|
||||
<h2><a href="{% url 'ipam:vlan_list' %}?site={{ object.slug }}" class="btn {% if stats.vlan_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.vlan_count }}</a></h2>
|
||||
<p>VLANs</p>
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
<h2><a href="{% url 'circuits:circuit_list' %}?site={{ site.slug }}" class="btn {% if stats.circuit_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.circuit_count }}</a></h2>
|
||||
<h2><a href="{% url 'circuits:circuit_list' %}?site={{ object.slug }}" class="btn {% if stats.circuit_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.circuit_count }}</a></h2>
|
||||
<p>Circuits</p>
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
<h2><a href="{% url 'virtualization:virtualmachine_list' %}?site={{ site.slug }}" class="btn {% if stats.vm_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.vm_count }}</a></h2>
|
||||
<h2><a href="{% url 'virtualization:virtualmachine_list' %}?site={{ object.slug }}" class="btn {% if stats.vm_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.vm_count }}</a></h2>
|
||||
<p>Virtual Machines</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -260,7 +260,7 @@
|
||||
<td><i class="mdi mdi-folder-open"></i> All racks</td>
|
||||
<td>{{ stats.rack_count }}</td>
|
||||
<td class="text-right noprint">
|
||||
<a href="{% url 'dcim:rack_elevation_list' %}?site={{ site.slug }}" class="btn btn-xs btn-primary" title="View elevations">
|
||||
<a href="{% url 'dcim:rack_elevation_list' %}?site={{ object.slug }}" class="btn btn-xs btn-primary" title="View elevations">
|
||||
<i class="mdi mdi-server"></i>
|
||||
</a>
|
||||
</td>
|
||||
@ -271,22 +271,22 @@
|
||||
<div class="panel-heading">
|
||||
<strong>Images</strong>
|
||||
</div>
|
||||
{% include 'inc/image_attachments.html' with images=site.images.all %}
|
||||
{% include 'inc/image_attachments.html' with images=object.images.all %}
|
||||
{% if perms.extras.add_imageattachment %}
|
||||
<div class="panel-footer text-right noprint">
|
||||
<a href="{% url 'dcim:site_add_image' object_id=site.pk %}" class="btn btn-primary btn-xs">
|
||||
<a href="{% url 'dcim:site_add_image' object_id=object.pk %}" class="btn btn-primary btn-xs">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span>
|
||||
Attach an image
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% plugin_right_page site %}
|
||||
{% plugin_right_page object %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% plugin_full_width_page site %}
|
||||
{% plugin_full_width_page object %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -9,10 +9,10 @@
|
||||
<div class="col-sm-8 col-md-9">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'dcim:virtualchassis_list' %}">Virtual Chassis</a></li>
|
||||
{% if virtualchassis.master %}
|
||||
<li><a href="{% url 'dcim:virtualchassis_list' %}?site={{ virtualchassis.master.site.slug }}">{{ virtualchassis.master.site }}</a></li>
|
||||
{% if object.master %}
|
||||
<li><a href="{% url 'dcim:virtualchassis_list' %}?site={{ object.master.site.slug }}">{{ object.master.site }}</a></li>
|
||||
{% endif %}
|
||||
<li>{{ virtualchassis }}</li>
|
||||
<li>{{ object }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-sm-4 col-md-3">
|
||||
@ -29,26 +29,26 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right noprint">
|
||||
{% plugin_buttons virtualchassis %}
|
||||
{% plugin_buttons object %}
|
||||
{% if perms.dcim.change_virtualchassis %}
|
||||
{% edit_button virtualchassis %}
|
||||
{% edit_button object %}
|
||||
{% endif %}
|
||||
{% if perms.dcim.delete_virtualchassis %}
|
||||
{% delete_button virtualchassis %}
|
||||
{% delete_button object %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{% block title %}{{ virtualchassis }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=virtualchassis %}
|
||||
<h1>{% block title %}{{ object }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=object %}
|
||||
<div class="pull-right noprint">
|
||||
{% custom_links virtualchassis %}
|
||||
{% custom_links object %}
|
||||
</div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||
<a href="{{ virtualchassis.get_absolute_url }}">Virtual Chassis</a>
|
||||
<a href="{{ object.get_absolute_url }}">Virtual Chassis</a>
|
||||
</li>
|
||||
{% if perms.extras.view_objectchange %}
|
||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||
<a href="{% url 'dcim:virtualchassis_changelog' pk=virtualchassis.pk %}">Change Log</a>
|
||||
<a href="{% url 'dcim:virtualchassis_changelog' pk=object.pk %}">Change Log</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@ -64,13 +64,13 @@
|
||||
<table class="table table-hover panel-body attr-table">
|
||||
<tr>
|
||||
<td>Domain</td>
|
||||
<td>{{ virtualchassis.domain|placeholder }}</td>
|
||||
<td>{{ object.domain|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Master</td>
|
||||
<td>
|
||||
{% if virtualchassis.master %}
|
||||
<a href="{{ virtualchassis.master.get_absolute_url }}">{{ virtualchassis.master }}</a>
|
||||
{% if object.master %}
|
||||
<a href="{{ object.master.get_absolute_url }}">{{ object.master }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
@ -78,9 +78,9 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% include 'inc/custom_fields_panel.html' with obj=virtualchassis %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=virtualchassis.tags.all url='dcim:virtualchassis_list' %}
|
||||
{% plugin_left_page virtualchassis %}
|
||||
{% include 'inc/custom_fields_panel.html' with obj=object %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='dcim:virtualchassis_list' %}
|
||||
{% plugin_left_page object %}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="panel panel-default">
|
||||
@ -100,25 +100,25 @@
|
||||
<a href="{{ vc_member.get_absolute_url }}">{{ vc_member }}</a>
|
||||
</td>
|
||||
<td><span class="badge badge-default">{{ vc_member.vc_position }}</span></td>
|
||||
<td>{% if virtualchassis.master == vc_member %}<i class="mdi mdi-check-bold text-success"></i>{% endif %}</td>
|
||||
<td>{% if object.master == vc_member %}<i class="mdi mdi-check-bold text-success"></i>{% endif %}</td>
|
||||
<td>{{ vc_member.vc_priority|placeholder }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% if perms.dcim.change_virtualchassis %}
|
||||
<div class="panel-footer text-right noprint">
|
||||
<a href="{% url 'dcim:virtualchassis_add_member' pk=virtualchassis.pk %}?site={{ virtualchassis.master.site.pk }}&rack={{ virtualchassis.master.rack.pk }}" class="btn btn-primary btn-xs">
|
||||
<a href="{% url 'dcim:virtualchassis_add_member' pk=object.pk %}?site={{ object.master.site.pk }}&rack={{ object.master.rack.pk }}" class="btn btn-primary btn-xs">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Member
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% plugin_right_page virtualchassis %}
|
||||
{% plugin_right_page object %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% plugin_full_width_page virtualchassis %}
|
||||
{% plugin_full_width_page object %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -7,7 +7,7 @@
|
||||
<div class="col-sm-8 col-md-9">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'extras:configcontext_list' %}">Config Contexts</a></li>
|
||||
<li>{{ configcontext }}</li>
|
||||
<li>{{ object }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-sm-4 col-md-3">
|
||||
@ -25,7 +25,7 @@
|
||||
</div>
|
||||
<div class="pull-right noprint">
|
||||
{% if perms.extras.change_configcontext %}
|
||||
<a href="{% url 'extras:configcontext_edit' pk=configcontext.pk %}" class="btn btn-warning">
|
||||
<a href="{% url 'extras:configcontext_edit' pk=object.pk %}" class="btn btn-warning">
|
||||
<span class="mdi mdi-pencil" aria-hidden="true"></span>
|
||||
Edit this config context
|
||||
</a>
|
||||
@ -33,15 +33,15 @@
|
||||
</div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||
<a href="{{ configcontext.get_absolute_url }}">Config Context</a>
|
||||
<a href="{{ object.get_absolute_url }}">Config Context</a>
|
||||
</li>
|
||||
{% if perms.extras.view_objectchange %}
|
||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||
<a href="{% url 'extras:configcontext_changelog' pk=configcontext.pk %}">Change Log</a>
|
||||
<a href="{% url 'extras:configcontext_changelog' pk=object.pk %}">Change Log</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<h1>{% block title %}{{ configcontext }}{% endblock %}</h1>
|
||||
<h1>{% block title %}{{ object }}{% endblock %}</h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@ -55,23 +55,23 @@
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>
|
||||
{{ configcontext.name }}
|
||||
{{ object.name }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Weight</td>
|
||||
<td>
|
||||
{{ configcontext.weight }}
|
||||
{{ object.weight }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>{{ configcontext.description|placeholder }}</td>
|
||||
<td>{{ object.description|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Active</td>
|
||||
<td>
|
||||
{% if configcontext.is_active %}
|
||||
{% if object.is_active %}
|
||||
<span class="text-success">
|
||||
<i class="mdi mdi-check-bold"></i>
|
||||
</span>
|
||||
@ -92,9 +92,9 @@
|
||||
<tr>
|
||||
<td>Regions</td>
|
||||
<td>
|
||||
{% if configcontext.regions.all %}
|
||||
{% if object.regions.all %}
|
||||
<ul>
|
||||
{% for region in configcontext.regions.all %}
|
||||
{% for region in object.regions.all %}
|
||||
<li><a href="{{ region.get_absolute_url }}">{{ region }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@ -106,9 +106,9 @@
|
||||
<tr>
|
||||
<td>Sites</td>
|
||||
<td>
|
||||
{% if configcontext.sites.all %}
|
||||
{% if object.sites.all %}
|
||||
<ul>
|
||||
{% for site in configcontext.sites.all %}
|
||||
{% for site in object.sites.all %}
|
||||
<li><a href="{{ site.get_absolute_url }}">{{ site }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@ -120,9 +120,9 @@
|
||||
<tr>
|
||||
<td>Roles</td>
|
||||
<td>
|
||||
{% if configcontext.roles.all %}
|
||||
{% if object.roles.all %}
|
||||
<ul>
|
||||
{% for role in configcontext.roles.all %}
|
||||
{% for role in object.roles.all %}
|
||||
<li><a href="{% url 'dcim:device_list' %}?role={{ role.slug }}">{{ role }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@ -134,9 +134,9 @@
|
||||
<tr>
|
||||
<td>Platforms</td>
|
||||
<td>
|
||||
{% if configcontext.platforms.all %}
|
||||
{% if object.platforms.all %}
|
||||
<ul>
|
||||
{% for platform in configcontext.platforms.all %}
|
||||
{% for platform in object.platforms.all %}
|
||||
<li><a href="{{ platform.get_absolute_url }}">{{ platform }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@ -148,9 +148,9 @@
|
||||
<tr>
|
||||
<td>Cluster Groups</td>
|
||||
<td>
|
||||
{% if configcontext.cluster_groups.all %}
|
||||
{% if object.cluster_groups.all %}
|
||||
<ul>
|
||||
{% for cluster_group in configcontext.cluster_groups.all %}
|
||||
{% for cluster_group in object.cluster_groups.all %}
|
||||
<li><a href="{{ cluster_group.get_absolute_url }}">{{ cluster_group }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@ -162,9 +162,9 @@
|
||||
<tr>
|
||||
<td>Clusters</td>
|
||||
<td>
|
||||
{% if configcontext.clusters.all %}
|
||||
{% if object.clusters.all %}
|
||||
<ul>
|
||||
{% for cluster in configcontext.clusters.all %}
|
||||
{% for cluster in object.clusters.all %}
|
||||
<li><a href="{{ cluster.get_absolute_url }}">{{ cluster }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@ -176,9 +176,9 @@
|
||||
<tr>
|
||||
<td>Tenant Groups</td>
|
||||
<td>
|
||||
{% if configcontext.tenant_groups.all %}
|
||||
{% if object.tenant_groups.all %}
|
||||
<ul>
|
||||
{% for tenant_group in configcontext.tenant_groups.all %}
|
||||
{% for tenant_group in object.tenant_groups.all %}
|
||||
<li><a href="{{ tenant_group.get_absolute_url }}">{{ tenant_group }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@ -190,9 +190,9 @@
|
||||
<tr>
|
||||
<td>Tenants</td>
|
||||
<td>
|
||||
{% if configcontext.tenants.all %}
|
||||
{% if object.tenants.all %}
|
||||
<ul>
|
||||
{% for tenant in configcontext.tenants.all %}
|
||||
{% for tenant in object.tenants.all %}
|
||||
<li><a href="{{ tenant.get_absolute_url }}">{{ tenant }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@ -204,9 +204,9 @@
|
||||
<tr>
|
||||
<td>Tags</td>
|
||||
<td>
|
||||
{% if configcontext.tags.all %}
|
||||
{% if object.tags.all %}
|
||||
<ul>
|
||||
{% for tag in configcontext.tags.all %}
|
||||
{% for tag in object.tags.all %}
|
||||
<li><a href="{{ tag.get_absolute_url }}">{{ tag }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@ -225,7 +225,7 @@
|
||||
{% include 'extras/inc/configcontext_format.html' %}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% include 'extras/inc/configcontext_data.html' with data=configcontext.data format=format %}
|
||||
{% include 'extras/inc/configcontext_data.html' with data=object.data format=format %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,21 +1,21 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load helpers %}
|
||||
|
||||
{% block title %}{{ objectchange }}{% endblock %}
|
||||
{% block title %}{{ object }}{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
<div class="row noprint">
|
||||
<div class="col-sm-8 col-md-9">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'extras:objectchange_list' %}">Change Log</a></li>
|
||||
{% if objectchange.related_object.get_absolute_url %}
|
||||
<li><a href="{{ objectchange.related_object.get_absolute_url }}changelog/">{{ objectchange.related_object }}</a></li>
|
||||
{% elif objectchange.changed_object.get_absolute_url %}
|
||||
<li><a href="{{ objectchange.changed_object.get_absolute_url }}changelog/">{{ objectchange.changed_object }}</a></li>
|
||||
{% elif objectchange.changed_object %}
|
||||
<li>{{ objectchange.changed_object }}</li>
|
||||
{% if object.related_object.get_absolute_url %}
|
||||
<li><a href="{{ object.related_object.get_absolute_url }}changelog/">{{ object.related_object }}</a></li>
|
||||
{% elif object.changed_object.get_absolute_url %}
|
||||
<li><a href="{{ object.changed_object.get_absolute_url }}changelog/">{{ object.changed_object }}</a></li>
|
||||
{% elif object.changed_object %}
|
||||
<li>{{ object.changed_object }}</li>
|
||||
{% endif %}
|
||||
<li>{{ objectchange }}</li>
|
||||
<li>{{ object }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-sm-4 col-md-3">
|
||||
@ -44,41 +44,41 @@
|
||||
<tr>
|
||||
<td>Time</td>
|
||||
<td>
|
||||
{{ objectchange.time }}
|
||||
{{ object.time }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>User</td>
|
||||
<td>
|
||||
{{ objectchange.user|default:objectchange.user_name }}
|
||||
{{ object.user|default:object.user_name }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Action</td>
|
||||
<td>
|
||||
{{ objectchange.get_action_display }}
|
||||
{{ object.get_action_display }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Object Type</td>
|
||||
<td>
|
||||
{{ objectchange.changed_object_type }}
|
||||
{{ object.changed_object_type }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Object</td>
|
||||
<td>
|
||||
{% if objectchange.changed_object.get_absolute_url %}
|
||||
<a href="{{ objectchange.changed_object.get_absolute_url }}">{{ objectchange.changed_object }}</a>
|
||||
{% if object.changed_object.get_absolute_url %}
|
||||
<a href="{{ object.changed_object.get_absolute_url }}">{{ object.changed_object }}</a>
|
||||
{% else %}
|
||||
{{ objectchange.object_repr }}
|
||||
{{ object.object_repr }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Request ID</td>
|
||||
<td>
|
||||
{{ objectchange.request_id }}
|
||||
{{ object.request_id }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -98,9 +98,9 @@
|
||||
<div class="panel-body">
|
||||
{% if diff_added == diff_removed %}
|
||||
<span class="text-muted" style="margin-left: 10px;">
|
||||
{% if objectchange.action == 'create' %}
|
||||
{% if object.action == 'create' %}
|
||||
Object created
|
||||
{% elif objectchange.action == 'delete' %}
|
||||
{% elif object.action == 'delete' %}
|
||||
Object deleted
|
||||
{% else %}
|
||||
No changes
|
||||
@ -119,7 +119,7 @@
|
||||
<strong>Object Data</strong>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<pre>{{ objectchange.object_data|render_json }}</pre>
|
||||
<pre>{{ object.object_data|render_json }}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -129,7 +129,7 @@
|
||||
{% include 'panel_table.html' with table=related_changes_table heading='Related Changes' panel_class='default' %}
|
||||
{% if related_changes_count > related_changes_table.rows|length %}
|
||||
<div class="pull-right">
|
||||
<a href="{% url 'extras:objectchange_list' %}?request_id={{ objectchange.request_id }}" class="btn btn-primary">See all {{ related_changes_count|add:"1" }} changes</a>
|
||||
<a href="{% url 'extras:objectchange_list' %}?request_id={{ object.request_id }}" class="btn btn-primary">See all {{ related_changes_count|add:"1" }} changes</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<div class="col-sm-8 col-md-9">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'extras:tag_list' %}">Tags</a></li>
|
||||
<li>{{ tag }}</li>
|
||||
<li>{{ object }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-sm-4 col-md-3">
|
||||
@ -24,27 +24,27 @@
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
{% if perms.taggit.change_tag %}
|
||||
<a href="{% url 'extras:tag_edit' slug=tag.slug %}" class="btn btn-warning">
|
||||
<a href="{% url 'extras:tag_edit' slug=object.slug %}" class="btn btn-warning">
|
||||
<span class="mdi mdi-pencil" aria-hidden="true"></span>
|
||||
Edit this tag
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.taggit.delete_tag %}
|
||||
<a href="{% url 'extras:tag_delete' slug=tag.slug %}" class="btn btn-danger">
|
||||
<a href="{% url 'extras:tag_delete' slug=object.slug %}" class="btn btn-danger">
|
||||
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span>
|
||||
Delete this tag
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{% block title %}Tag: {{ tag }}{% endblock %}</h1>
|
||||
<h1>{% block title %}Tag: {{ object }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=tag %}
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||
<a href="{{ tag.get_absolute_url }}">Tag</a>
|
||||
<a href="{{ object.get_absolute_url }}">Tag</a>
|
||||
</li>
|
||||
{% if perms.extras.view_objectchange %}
|
||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||
<a href="{% url 'extras:tag_changelog' slug=tag.slug %}">Change Log</a>
|
||||
<a href="{% url 'extras:tag_changelog' slug=object.slug %}">Change Log</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@ -61,13 +61,13 @@
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>
|
||||
{{ tag.name }}
|
||||
{{ object.name }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Slug</td>
|
||||
<td>
|
||||
{{ tag.slug }}
|
||||
{{ object.slug }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -79,13 +79,13 @@
|
||||
<tr>
|
||||
<td>Color</td>
|
||||
<td>
|
||||
<span class="label color-block" style="background-color: #{{ tag.color }}"> </span>
|
||||
<span class="label color-block" style="background-color: #{{ object.color }}"> </span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>
|
||||
{{ tag.description|placeholder }}
|
||||
{{ object.description|placeholder }}
|
||||
</td>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -9,8 +9,8 @@
|
||||
<div class="col-sm-8 col-md-9">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'ipam:aggregate_list' %}">Aggregates</a></li>
|
||||
<li><a href="{% url 'ipam:aggregate_list' %}?rir={{ aggregate.rir.slug }}">{{ aggregate.rir }}</a></li>
|
||||
<li>{{ aggregate }}</li>
|
||||
<li><a href="{% url 'ipam:aggregate_list' %}?rir={{ object.rir.slug }}">{{ object.rir }}</a></li>
|
||||
<li>{{ object }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-sm-4 col-md-3">
|
||||
@ -27,30 +27,30 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right noprint">
|
||||
{% plugin_buttons aggregate %}
|
||||
{% plugin_buttons object %}
|
||||
{% if perms.ipam.add_aggregate %}
|
||||
{% clone_button aggregate %}
|
||||
{% clone_button object %}
|
||||
{% endif %}
|
||||
{% if perms.ipam.change_aggregate %}
|
||||
{% edit_button aggregate %}
|
||||
{% edit_button object %}
|
||||
{% endif %}
|
||||
{% if perms.ipam.delete_aggregate %}
|
||||
{% delete_button aggregate %}
|
||||
{% delete_button object %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{% block title %}{{ aggregate }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=aggregate %}
|
||||
<h1>{% block title %}{{ object }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=object %}
|
||||
{% include 'ipam/inc/toggle_available.html' %}
|
||||
<div class="pull-right noprint">
|
||||
{% custom_links aggregate %}
|
||||
{% custom_links object %}
|
||||
</div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||
<a href="{{ aggregate.get_absolute_url }}">Aggregate</a>
|
||||
<a href="{{ object.get_absolute_url }}">Aggregate</a>
|
||||
</li>
|
||||
{% if perms.extras.view_objectchange %}
|
||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||
<a href="{% url 'ipam:aggregate_changelog' pk=aggregate.pk %}">Change Log</a>
|
||||
<a href="{% url 'ipam:aggregate_changelog' pk=object.pk %}">Change Log</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@ -66,28 +66,28 @@
|
||||
<table class="table table-hover panel-body attr-table">
|
||||
<tr>
|
||||
<td>Family</td>
|
||||
<td>IPv{{ aggregate.family }}</td>
|
||||
<td>IPv{{ object.family }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RIR</td>
|
||||
<td>
|
||||
<a href="{% url 'ipam:aggregate_list' %}?rir={{ aggregate.rir.slug }}">{{ aggregate.rir }}</a>
|
||||
<a href="{% url 'ipam:aggregate_list' %}?rir={{ object.rir.slug }}">{{ object.rir }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Utilization</td>
|
||||
<td>
|
||||
{{ aggregate.get_utilization }}%
|
||||
{{ object.get_utilization }}%
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tenant</td>
|
||||
<td>
|
||||
{% if aggregate.tenant %}
|
||||
{% if prefix.aggregate.group %}
|
||||
<a href="{{ aggregate.tenant.group.get_absolute_url }}">{{ aggregate.tenant.group }}</a> /
|
||||
{% if object.tenant %}
|
||||
{% if prefix.object.group %}
|
||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
||||
{% endif %}
|
||||
<a href="{{ aggregate.tenant.get_absolute_url }}">{{ aggregate.tenant }}</a>
|
||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -95,25 +95,25 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Date Added</td>
|
||||
<td>{{ aggregate.date_added|placeholder }}</td>
|
||||
<td>{{ object.date_added|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>{{ aggregate.description|placeholder }}</td>
|
||||
<td>{{ object.description|placeholder }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% plugin_left_page aggregate %}
|
||||
{% plugin_left_page object %}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{% include 'inc/custom_fields_panel.html' with obj=aggregate %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=aggregate.tags.all url='ipam:aggregate_list' %}
|
||||
{% plugin_right_page aggregate %}
|
||||
{% include 'inc/custom_fields_panel.html' with obj=object %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='ipam:aggregate_list' %}
|
||||
{% plugin_right_page object %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% plugin_full_width_page aggregate %}
|
||||
{% plugin_full_width_page object %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
@ -10,10 +10,10 @@
|
||||
<div class="col-sm-8 col-md-9">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'ipam:ipaddress_list' %}">IP Addresses</a></li>
|
||||
{% if ipaddress.vrf %}
|
||||
<li><a href="{% url 'ipam:vrf' pk=ipaddress.vrf.pk %}">{{ ipaddress.vrf }}</a></li>
|
||||
{% if object.vrf %}
|
||||
<li><a href="{% url 'ipam:vrf' pk=object.vrf.pk %}">{{ object.vrf }}</a></li>
|
||||
{% endif %}
|
||||
<li>{{ ipaddress }}</li>
|
||||
<li>{{ object }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-sm-4 col-md-3">
|
||||
@ -30,29 +30,29 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right noprint">
|
||||
{% plugin_buttons ipaddress %}
|
||||
{% plugin_buttons object %}
|
||||
{% if perms.ipam.add_ipaddress %}
|
||||
{% clone_button ipaddress %}
|
||||
{% clone_button object %}
|
||||
{% endif %}
|
||||
{% if perms.ipam.change_ipaddress %}
|
||||
{%edit_button ipaddress %}
|
||||
{%edit_button object %}
|
||||
{% endif %}
|
||||
{% if perms.ipam.delete_ipaddress %}
|
||||
{% delete_button ipaddress %}
|
||||
{% delete_button object %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{% block title %}{{ ipaddress }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=ipaddress %}
|
||||
<h1>{% block title %}{{ object }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=object %}
|
||||
<div class="pull-right noprint">
|
||||
{% custom_links ipaddress %}
|
||||
{% custom_links object %}
|
||||
</div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||
<a href="{{ ipaddress.get_absolute_url }}">IP Address</a>
|
||||
<a href="{{ object.get_absolute_url }}">IP Address</a>
|
||||
</li>
|
||||
{% if perms.extras.view_objectchange %}
|
||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||
<a href="{% url 'ipam:ipaddress_changelog' pk=ipaddress.pk %}">Change Log</a>
|
||||
<a href="{% url 'ipam:ipaddress_changelog' pk=object.pk %}">Change Log</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@ -68,13 +68,13 @@
|
||||
<table class="table table-hover panel-body attr-table">
|
||||
<tr>
|
||||
<td>Family</td>
|
||||
<td>IPv{{ ipaddress.family }}</td>
|
||||
<td>IPv{{ object.family }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>VRF</td>
|
||||
<td>
|
||||
{% if ipaddress.vrf %}
|
||||
<a href="{% url 'ipam:vrf' pk=ipaddress.vrf.pk %}">{{ ipaddress.vrf }}</a>
|
||||
{% if object.vrf %}
|
||||
<a href="{% url 'ipam:vrf' pk=object.vrf.pk %}">{{ object.vrf }}</a>
|
||||
{% else %}
|
||||
<span>Global</span>
|
||||
{% endif %}
|
||||
@ -83,11 +83,11 @@
|
||||
<tr>
|
||||
<td>Tenant</td>
|
||||
<td>
|
||||
{% if ipaddress.tenant %}
|
||||
{% if ipaddress.tenant.group %}
|
||||
<a href="{{ ipaddress.tenant.group.get_absolute_url }}">{{ ipaddress.tenant.group }}</a> /
|
||||
{% if object.tenant %}
|
||||
{% if object.tenant.group %}
|
||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
||||
{% endif %}
|
||||
<a href="{{ ipaddress.tenant.get_absolute_url }}">{{ ipaddress.tenant }}</a>
|
||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -96,14 +96,14 @@
|
||||
<tr>
|
||||
<td>Status</td>
|
||||
<td>
|
||||
<span class="label label-{{ ipaddress.get_status_class }}">{{ ipaddress.get_status_display }}</span>
|
||||
<span class="label label-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Role</td>
|
||||
<td>
|
||||
{% if ipaddress.role %}
|
||||
<a href="{% url 'ipam:ipaddress_list' %}?role={{ ipaddress.role }}">{{ ipaddress.get_role_display }}</a>
|
||||
{% if object.role %}
|
||||
<a href="{% url 'ipam:ipaddress_list' %}?role={{ object.role }}">{{ object.get_role_display }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -111,17 +111,17 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DNS Name</td>
|
||||
<td>{{ ipaddress.dns_name|placeholder }}</td>
|
||||
<td>{{ object.dns_name|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>{{ ipaddress.description|placeholder }}</td>
|
||||
<td>{{ object.description|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Assignment</td>
|
||||
<td>
|
||||
{% if ipaddress.assigned_object %}
|
||||
<span><a href="{{ ipaddress.assigned_object.parent.get_absolute_url }}">{{ ipaddress.assigned_object.parent }}</a> ({{ ipaddress.assigned_object }})</span>
|
||||
{% if object.assigned_object %}
|
||||
<span><a href="{{ object.assigned_object.parent.get_absolute_url }}">{{ object.assigned_object.parent }}</a> ({{ object.assigned_object }})</span>
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
@ -130,10 +130,10 @@
|
||||
<tr>
|
||||
<td>NAT (inside)</td>
|
||||
<td>
|
||||
{% if ipaddress.nat_inside %}
|
||||
<a href="{% url 'ipam:ipaddress' pk=ipaddress.nat_inside.pk %}">{{ ipaddress.nat_inside }}</a>
|
||||
{% if ipaddress.nat_inside.assigned_object %}
|
||||
(<a href="{{ ipaddress.nat_inside.assigned_object.parent.get_absolute_url }}">{{ ipaddress.nat_inside.assigned_object.parent }}</a>)
|
||||
{% if object.nat_inside %}
|
||||
<a href="{% url 'ipam:ipaddress' pk=object.nat_inside.pk %}">{{ object.nat_inside }}</a>
|
||||
{% if object.nat_inside.assigned_object %}
|
||||
(<a href="{{ object.nat_inside.assigned_object.parent.get_absolute_url }}">{{ object.nat_inside.assigned_object.parent }}</a>)
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
@ -143,8 +143,8 @@
|
||||
<tr>
|
||||
<td>NAT (outside)</td>
|
||||
<td>
|
||||
{% if ipaddress.nat_outside %}
|
||||
<a href="{% url 'ipam:ipaddress' pk=ipaddress.nat_outside.pk %}">{{ ipaddress.nat_outside }}</a>
|
||||
{% if object.nat_outside %}
|
||||
<a href="{% url 'ipam:ipaddress' pk=object.nat_outside.pk %}">{{ object.nat_outside }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -152,9 +152,9 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% include 'inc/custom_fields_panel.html' with obj=ipaddress %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=ipaddress.tags.all url='ipam:ipaddress_list' %}
|
||||
{% plugin_left_page ipaddress %}
|
||||
{% include 'inc/custom_fields_panel.html' with obj=object %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='ipam:ipaddress_list' %}
|
||||
{% plugin_left_page object %}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{% include 'panel_table.html' with table=parent_prefixes_table heading='Parent Prefixes' %}
|
||||
@ -166,10 +166,10 @@
|
||||
{% if more_duplicate_ips %}
|
||||
<div class="pull-right">
|
||||
<a type="button" class="btn btn-primary btn-xs"
|
||||
{% if ipaddress.vrf %}
|
||||
href="{% url 'ipam:ipaddress_list' %}?address={{ ipaddress.address.ip }}&vrf_id={{ ipaddress.vrf.pk }}"
|
||||
{% if object.vrf %}
|
||||
href="{% url 'ipam:ipaddress_list' %}?address={{ object.address.ip }}&vrf_id={{ object.vrf.pk }}"
|
||||
{% else %}
|
||||
href="{% url 'ipam:ipaddress_list' %}?address={{ ipaddress.address.ip }}&vrf_id=null"
|
||||
href="{% url 'ipam:ipaddress_list' %}?address={{ object.address.ip }}&vrf_id=null"
|
||||
{% endif %}
|
||||
>Show all</a>
|
||||
</div>
|
||||
@ -179,12 +179,12 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include 'utilities/obj_table.html' with table=related_ips_table table_template='panel_table.html' heading='Related IP Addresses' panel_class='default noprint' %}
|
||||
{% plugin_right_page ipaddress %}
|
||||
{% plugin_right_page object %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% plugin_full_width_page ipaddress %}
|
||||
{% plugin_full_width_page object %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -9,10 +9,10 @@
|
||||
<div class="col-sm-8 col-md-9">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'ipam:prefix_list' %}">Prefixes</a></li>
|
||||
{% if prefix.vrf %}
|
||||
<li><a href="{% url 'ipam:vrf' pk=prefix.vrf.pk %}">{{ prefix.vrf }}</a></li>
|
||||
{% if object.vrf %}
|
||||
<li><a href="{% url 'ipam:vrf' pk=object.vrf.pk %}">{{ object.vrf }}</a></li>
|
||||
{% endif %}
|
||||
<li>{{ prefix }}</li>
|
||||
<li>{{ object }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-sm-4 col-md-3">
|
||||
@ -29,49 +29,49 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right noprint">
|
||||
{% plugin_buttons prefix %}
|
||||
{% plugin_buttons object %}
|
||||
{% if perms.ipam.add_prefix and active_tab == 'prefixes' and first_available_prefix %}
|
||||
<a href="{% url 'ipam:prefix_add' %}?prefix={{ first_available_prefix }}&vrf={{ prefix.vrf.pk }}&site={{ prefix.site.pk }}&tenant_group={{ prefix.tenant.group.pk }}&tenant={{ prefix.tenant.pk }}" class="btn btn-success">
|
||||
<a href="{% url 'ipam:prefix_add' %}?prefix={{ first_available_prefix }}&vrf={{ object.vrf.pk }}&site={{ object.site.pk }}&tenant_group={{ object.tenant.group.pk }}&tenant={{ object.tenant.pk }}" class="btn btn-success">
|
||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add Child Prefix
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.ipam.add_ipaddress and active_tab == 'ip-addresses' and first_available_ip %}
|
||||
<a href="{% url 'ipam:ipaddress_add' %}?address={{ first_available_ip }}&vrf={{ prefix.vrf.pk }}&tenant_group={{ prefix.tenant.group.pk }}&tenant={{ prefix.tenant.pk }}" class="btn btn-success">
|
||||
<a href="{% url 'ipam:ipaddress_add' %}?address={{ first_available_ip }}&vrf={{ object.vrf.pk }}&tenant_group={{ object.tenant.group.pk }}&tenant={{ object.tenant.pk }}" class="btn btn-success">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span>
|
||||
Add an IP Address
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.ipam.add_prefix %}
|
||||
{% clone_button prefix %}
|
||||
{% clone_button object %}
|
||||
{% endif %}
|
||||
{% if perms.ipam.change_prefix %}
|
||||
{% edit_button prefix %}
|
||||
{% edit_button object %}
|
||||
{% endif %}
|
||||
{% if perms.ipam.delete_prefix %}
|
||||
{% delete_button prefix %}
|
||||
{% delete_button object %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{% block title %}{{ prefix }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=prefix %}
|
||||
<h1>{% block title %}{{ object }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=object %}
|
||||
{% include 'ipam/inc/toggle_available.html' %}
|
||||
<div class="pull-right noprint">
|
||||
{% custom_links prefix %}
|
||||
{% custom_links object %}
|
||||
</div>
|
||||
<ul class="nav nav-tabs" style="margin-bottom: 20px">
|
||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||
<a href="{% url 'ipam:prefix' pk=prefix.pk %}">Prefix</a>
|
||||
<a href="{% url 'ipam:prefix' pk=object.pk %}">Prefix</a>
|
||||
</li>
|
||||
<li role="presentation"{% if active_tab == 'prefixes' %} class="active"{% endif %}>
|
||||
<a href="{% url 'ipam:prefix_prefixes' pk=prefix.pk %}">Child Prefixes <span class="badge">{{ prefix.get_child_prefixes.count }}</span></a>
|
||||
<a href="{% url 'ipam:prefix_prefixes' pk=object.pk %}">Child Prefixes <span class="badge">{{ object.get_child_prefixes.count }}</span></a>
|
||||
</li>
|
||||
{% if perms.ipam.view_ipaddress and prefix.status != 'container' %}
|
||||
{% if perms.ipam.view_ipaddress and object.status != 'container' %}
|
||||
<li role="presentation"{% if active_tab == 'ip-addresses' %} class="active"{% endif %}>
|
||||
<a href="{% url 'ipam:prefix_ipaddresses' pk=prefix.pk %}">IP Addresses <span class="badge">{{ prefix.get_child_ips.count }}</span></a>
|
||||
<a href="{% url 'ipam:prefix_ipaddresses' pk=object.pk %}">IP Addresses <span class="badge">{{ object.get_child_ips.count }}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if perms.extras.view_objectchange %}
|
||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||
<a href="{% url 'ipam:prefix_changelog' pk=prefix.pk %}">Change Log</a>
|
||||
<a href="{% url 'ipam:prefix_changelog' pk=object.pk %}">Change Log</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@ -87,13 +87,13 @@
|
||||
<table class="table table-hover panel-body attr-table">
|
||||
<tr>
|
||||
<td>Family</td>
|
||||
<td>IPv{{ prefix.family }}</td>
|
||||
<td>IPv{{ object.family }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>VRF</td>
|
||||
<td>
|
||||
{% if prefix.vrf %}
|
||||
<a href="{% url 'ipam:vrf' pk=prefix.vrf.pk %}">{{ prefix.vrf }}</a> ({{ prefix.vrf.rd }})
|
||||
{% if object.vrf %}
|
||||
<a href="{% url 'ipam:vrf' pk=object.vrf.pk %}">{{ object.vrf }}</a> ({{ object.vrf.rd }})
|
||||
{% else %}
|
||||
<span>Global</span>
|
||||
{% endif %}
|
||||
@ -102,11 +102,11 @@
|
||||
<tr>
|
||||
<td>Tenant</td>
|
||||
<td>
|
||||
{% if prefix.tenant %}
|
||||
{% if prefix.tenant.group %}
|
||||
<a href="{{ prefix.tenant.group.get_absolute_url }}">{{ prefix.tenant.group }}</a> /
|
||||
{% if object.tenant %}
|
||||
{% if object.tenant.group %}
|
||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
||||
{% endif %}
|
||||
<a href="{{ prefix.tenant.get_absolute_url }}">{{ prefix.tenant }}</a>
|
||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -125,11 +125,11 @@
|
||||
<tr>
|
||||
<td>Site</td>
|
||||
<td>
|
||||
{% if prefix.site %}
|
||||
{% if prefix.site.region %}
|
||||
<a href="{{ prefix.site.region.get_absolute_url }}">{{ prefix.site.region }}</a> /
|
||||
{% if object.site %}
|
||||
{% if object.site.region %}
|
||||
<a href="{{ object.site.region.get_absolute_url }}">{{ object.site.region }}</a> /
|
||||
{% endif %}
|
||||
<a href="{% url 'dcim:site' slug=prefix.site.slug %}">{{ prefix.site }}</a>
|
||||
<a href="{% url 'dcim:site' slug=object.site.slug %}">{{ object.site }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -138,11 +138,11 @@
|
||||
<tr>
|
||||
<td>VLAN</td>
|
||||
<td>
|
||||
{% if prefix.vlan %}
|
||||
{% if prefix.vlan.group %}
|
||||
<a href="{{ prefix.vlan.group.get_absolute_url }}">{{ prefix.vlan.group }}</a> /
|
||||
{% if object.vlan %}
|
||||
{% if object.vlan.group %}
|
||||
<a href="{{ object.vlan.group.get_absolute_url }}">{{ object.vlan.group }}</a> /
|
||||
{% endif %}
|
||||
<a href="{% url 'ipam:vlan' pk=prefix.vlan.pk %}">{{ prefix.vlan.display_name }}</a>
|
||||
<a href="{% url 'ipam:vlan' pk=object.vlan.pk %}">{{ object.vlan.display_name }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -151,14 +151,14 @@
|
||||
<tr>
|
||||
<td>Status</td>
|
||||
<td>
|
||||
<span class="label label-{{ prefix.get_status_class }}">{{ prefix.get_status_display }}</span>
|
||||
<span class="label label-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Role</td>
|
||||
<td>
|
||||
{% if prefix.role %}
|
||||
<a href="{% url 'ipam:prefix_list' %}?role={{ prefix.role.slug }}">{{ prefix.role }}</a>
|
||||
{% if object.role %}
|
||||
<a href="{% url 'ipam:prefix_list' %}?role={{ object.role.slug }}">{{ object.role }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -166,12 +166,12 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>{{ prefix.description|placeholder }}</td>
|
||||
<td>{{ object.description|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Is a pool</td>
|
||||
<td>
|
||||
{% if prefix.is_pool %}
|
||||
{% if object.is_pool %}
|
||||
<i class="mdi mdi-check-bold text-success" title="Yes"></i>
|
||||
{% else %}
|
||||
<i class="mdi mdi-close-thick text-danger" title="No"></i>
|
||||
@ -180,25 +180,25 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Utilization</td>
|
||||
<td>{% utilization_graph prefix.get_utilization %}</td>
|
||||
<td>{% utilization_graph object.get_utilization %}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% include 'inc/custom_fields_panel.html' with obj=prefix %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=prefix.tags.all url='ipam:prefix_list' %}
|
||||
{% plugin_left_page prefix %}
|
||||
{% include 'inc/custom_fields_panel.html' with obj=object %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='ipam:prefix_list' %}
|
||||
{% plugin_left_page object %}
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
{% if duplicate_prefix_table.rows %}
|
||||
{% include 'panel_table.html' with table=duplicate_prefix_table heading='Duplicate Prefixes' panel_class='danger' %}
|
||||
{% endif %}
|
||||
{% include 'panel_table.html' with table=parent_prefix_table heading='Parent Prefixes' panel_class='default' %}
|
||||
{% plugin_right_page prefix %}
|
||||
{% plugin_right_page object %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% plugin_full_width_page prefix %}
|
||||
{% plugin_full_width_page object %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -9,7 +9,7 @@
|
||||
<div class="col-sm-8 col-md-9">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'ipam:routetarget_list' %}">Route Targets</a></li>
|
||||
<li>{{ routetarget }}</li>
|
||||
<li>{{ object }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-sm-4 col-md-3">
|
||||
@ -26,29 +26,29 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right noprint">
|
||||
{% plugin_buttons routetarget %}
|
||||
{% plugin_buttons object %}
|
||||
{% if perms.ipam.add_routetarget %}
|
||||
{% clone_button routetarget %}
|
||||
{% clone_button object %}
|
||||
{% endif %}
|
||||
{% if perms.ipam.change_routetarget %}
|
||||
{% edit_button routetarget %}
|
||||
{% edit_button object %}
|
||||
{% endif %}
|
||||
{% if perms.ipam.delete_routetarget %}
|
||||
{% delete_button routetarget %}
|
||||
{% delete_button object %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{% block title %}Route target {{ routetarget }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=routetarget %}
|
||||
<h1>{% block title %}Route target {{ object }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=object %}
|
||||
<div class="pull-right noprint">
|
||||
{% custom_links routetarget %}
|
||||
{% custom_links object %}
|
||||
</div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||
<a href="{{ routetarget.get_absolute_url }}">Route Target</a>
|
||||
<a href="{{ object.get_absolute_url }}">Route Target</a>
|
||||
</li>
|
||||
{% if perms.extras.view_objectchange %}
|
||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||
<a href="{% url 'ipam:routetarget_changelog' pk=routetarget.pk %}">Change Log</a>
|
||||
<a href="{% url 'ipam:routetarget_changelog' pk=object.pk %}">Change Log</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@ -64,13 +64,13 @@
|
||||
<table class="table table-hover panel-body attr-table">
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>{{ routetarget.name }}</td>
|
||||
<td>{{ object.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tenant</td>
|
||||
<td>
|
||||
{% if routetarget.tenant %}
|
||||
<a href="{{ routetarget.tenant.get_absolute_url }}">{{ routetarget.tenant }}</a>
|
||||
{% if object.tenant %}
|
||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -82,19 +82,19 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% include 'extras/inc/tags_panel.html' with tags=routetarget.tags.all url='ipam:routetarget_list' %}
|
||||
{% include 'inc/custom_fields_panel.html' with obj=routetarget %}
|
||||
{% plugin_left_page routetarget %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='ipam:routetarget_list' %}
|
||||
{% include 'inc/custom_fields_panel.html' with obj=object %}
|
||||
{% plugin_left_page object %}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{% include 'panel_table.html' with table=importing_vrfs_table heading="Importing VRFs" %}
|
||||
{% include 'panel_table.html' with table=exporting_vrfs_table heading="Exporting VRFs" %}
|
||||
{% plugin_right_page routetarget %}
|
||||
{% plugin_right_page object %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% plugin_full_width_page routetarget %}
|
||||
{% plugin_full_width_page object %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -9,13 +9,13 @@
|
||||
<div class="col-sm-8 col-md-9">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'ipam:vlan_list' %}">VLANs</a></li>
|
||||
{% if vlan.site %}
|
||||
<li><a href="{% url 'ipam:vlan_list' %}?site={{ vlan.site.slug }}">{{ vlan.site }}</a></li>
|
||||
{% if object.site %}
|
||||
<li><a href="{% url 'ipam:vlan_list' %}?site={{ object.site.slug }}">{{ object.site }}</a></li>
|
||||
{% endif %}
|
||||
{% if vlan.group %}
|
||||
<li><a href="{% url 'ipam:vlan_list' %}?group={{ vlan.group.slug }}">{{ vlan.group }}</a></li>
|
||||
{% if object.group %}
|
||||
<li><a href="{% url 'ipam:vlan_list' %}?group={{ object.group.slug }}">{{ object.group }}</a></li>
|
||||
{% endif %}
|
||||
<li>{{ vlan }}</li>
|
||||
<li>{{ object }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-sm-4 col-md-3">
|
||||
@ -32,35 +32,35 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right noprint">
|
||||
{% plugin_buttons vlan %}
|
||||
{% plugin_buttons object %}
|
||||
{% if perms.ipam.add_vlan %}
|
||||
{% clone_button vlan %}
|
||||
{% clone_button object %}
|
||||
{% endif %}
|
||||
{% if perms.ipam.change_vlan %}
|
||||
{% edit_button vlan %}
|
||||
{% edit_button object %}
|
||||
{% endif %}
|
||||
{% if perms.ipam.delete_vlan %}
|
||||
{% delete_button vlan %}
|
||||
{% delete_button object %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{% block title %}VLAN {{ vlan.display_name }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=vlan %}
|
||||
<h1>{% block title %}VLAN {{ object.display_name }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=object %}
|
||||
<div class="pull-right noprint">
|
||||
{% custom_links vlan %}
|
||||
{% custom_links object %}
|
||||
</div>
|
||||
<ul class="nav nav-tabs" style="margin-bottom: 20px">
|
||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||
<a href="{% url 'ipam:vlan' pk=vlan.pk %}">VLAN</a>
|
||||
<a href="{% url 'ipam:vlan' pk=object.pk %}">VLAN</a>
|
||||
</li>
|
||||
<li role="presentation"{% if active_tab == 'interfaces' %} class="active"{% endif %}>
|
||||
<a href="{% url 'ipam:vlan_interfaces' pk=vlan.pk %}">Device Interfaces <span class="badge">{{ vlan.get_interfaces.count }}</span></a>
|
||||
<a href="{% url 'ipam:vlan_interfaces' pk=object.pk %}">Device Interfaces <span class="badge">{{ object.get_interfaces.count }}</span></a>
|
||||
</li>
|
||||
<li role="presentation"{% if active_tab == 'vminterfaces' %} class="active"{% endif %}>
|
||||
<a href="{% url 'ipam:vlan_vminterfaces' pk=vlan.pk %}">VM Interfaces <span class="badge">{{ vlan.get_vminterfaces.count }}</span></a>
|
||||
<a href="{% url 'ipam:vlan_vminterfaces' pk=object.pk %}">VM Interfaces <span class="badge">{{ object.get_vminterfaces.count }}</span></a>
|
||||
</li>
|
||||
{% if perms.extras.view_objectchange %}
|
||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||
<a href="{% url 'ipam:vlan_changelog' pk=vlan.pk %}">Change Log</a>
|
||||
<a href="{% url 'ipam:vlan_changelog' pk=object.pk %}">Change Log</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@ -77,11 +77,11 @@
|
||||
<tr>
|
||||
<td>Site</td>
|
||||
<td>
|
||||
{% if vlan.site %}
|
||||
{% if vlan.site.region %}
|
||||
<a href="{{ vlan.site.region.get_absolute_url }}">{{ vlan.site.region }}</a> /
|
||||
{% if object.site %}
|
||||
{% if object.site.region %}
|
||||
<a href="{{ object.site.region.get_absolute_url }}">{{ object.site.region }}</a> /
|
||||
{% endif %}
|
||||
<a href="{% url 'dcim:site' slug=vlan.site.slug %}">{{ vlan.site }}</a>
|
||||
<a href="{% url 'dcim:site' slug=object.site.slug %}">{{ object.site }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -90,8 +90,8 @@
|
||||
<tr>
|
||||
<td>Group</td>
|
||||
<td>
|
||||
{% if vlan.group %}
|
||||
<a href="{{ vlan.group.get_absolute_url }}">{{ vlan.group }}</a>
|
||||
{% if object.group %}
|
||||
<a href="{{ object.group.get_absolute_url }}">{{ object.group }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -99,20 +99,20 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>VLAN ID</td>
|
||||
<td>{{ vlan.vid }}</td>
|
||||
<td>{{ object.vid }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>{{ vlan.name }}</td>
|
||||
<td>{{ object.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tenant</td>
|
||||
<td>
|
||||
{% if vlan.tenant %}
|
||||
{% if vlan.tenant.group %}
|
||||
<a href="{{ vlan.tenant.group.get_absolute_url }}">{{ vlan.tenant.group }}</a> /
|
||||
{% if object.tenant %}
|
||||
{% if object.tenant.group %}
|
||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
||||
{% endif %}
|
||||
<a href="{{ vlan.tenant.get_absolute_url }}">{{ vlan.tenant }}</a>
|
||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -121,14 +121,14 @@
|
||||
<tr>
|
||||
<td>Status</td>
|
||||
<td>
|
||||
<span class="label label-{{ vlan.get_status_class }}">{{ vlan.get_status_display }}</span>
|
||||
<span class="label label-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Role</td>
|
||||
<td>
|
||||
{% if vlan.role %}
|
||||
<a href="{% url 'ipam:vlan_list' %}?role={{ vlan.role.slug }}">{{ vlan.role }}</a>
|
||||
{% if object.role %}
|
||||
<a href="{% url 'ipam:vlan_list' %}?role={{ object.role.slug }}">{{ object.role }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -136,13 +136,13 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>{{ vlan.description|placeholder }}</td>
|
||||
<td>{{ object.description|placeholder }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% include 'inc/custom_fields_panel.html' with obj=vlan %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=vlan.tags.all url='ipam:vlan_list' %}
|
||||
{% plugin_left_page vlan %}
|
||||
{% include 'inc/custom_fields_panel.html' with obj=object %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='ipam:vlan_list' %}
|
||||
{% plugin_left_page object %}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="panel panel-default">
|
||||
@ -152,19 +152,19 @@
|
||||
{% include 'responsive_table.html' with table=prefix_table %}
|
||||
{% if perms.ipam.add_prefix %}
|
||||
<div class="panel-footer text-right noprint">
|
||||
<a href="{% url 'ipam:prefix_add' %}?{% if vlan.tenant %}tenant={{ vlan.tenant.pk }}&{% endif %}site={{ vlan.site.pk }}&vlan={{ vlan.pk }}" class="btn btn-primary btn-xs">
|
||||
<a href="{% url 'ipam:prefix_add' %}?{% if object.tenant %}tenant={{ object.tenant.pk }}&{% endif %}site={{ object.site.pk }}&vlan={{ object.pk }}" class="btn btn-primary btn-xs">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span>
|
||||
Add a prefix
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% plugin_right_page vlan %}
|
||||
{% plugin_right_page object %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% plugin_full_width_page vlan %}
|
||||
{% plugin_full_width_page object %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -9,7 +9,7 @@
|
||||
<div class="col-sm-8 col-md-9">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'ipam:vrf_list' %}">VRFs</a></li>
|
||||
<li>{{ vrf }}</li>
|
||||
<li>{{ object }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-sm-4 col-md-3">
|
||||
@ -26,29 +26,29 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right noprint">
|
||||
{% plugin_buttons vrf %}
|
||||
{% plugin_buttons object %}
|
||||
{% if perms.ipam.add_vrf %}
|
||||
{% clone_button vrf %}
|
||||
{% clone_button object %}
|
||||
{% endif %}
|
||||
{% if perms.ipam.change_vrf %}
|
||||
{% edit_button vrf %}
|
||||
{% edit_button object %}
|
||||
{% endif %}
|
||||
{% if perms.ipam.delete_vrf %}
|
||||
{% delete_button vrf %}
|
||||
{% delete_button object %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{% block title %}VRF {{ vrf }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=vrf %}
|
||||
<h1>{% block title %}VRF {{ object }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=object %}
|
||||
<div class="pull-right noprint">
|
||||
{% custom_links vrf %}
|
||||
{% custom_links object %}
|
||||
</div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||
<a href="{{ vrf.get_absolute_url }}">VRF</a>
|
||||
<a href="{{ object.get_absolute_url }}">VRF</a>
|
||||
</li>
|
||||
{% if perms.extras.view_objectchange %}
|
||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||
<a href="{% url 'ipam:vrf_changelog' pk=vrf.pk %}">Change Log</a>
|
||||
<a href="{% url 'ipam:vrf_changelog' pk=object.pk %}">Change Log</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@ -64,13 +64,13 @@
|
||||
<table class="table table-hover panel-body attr-table">
|
||||
<tr>
|
||||
<td>Route Distinguisher</td>
|
||||
<td>{{ vrf.rd }}</td>
|
||||
<td>{{ object.rd }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tenant</td>
|
||||
<td>
|
||||
{% if vrf.tenant %}
|
||||
<a href="{{ vrf.tenant.get_absolute_url }}">{{ vrf.tenant }}</a>
|
||||
{% if object.tenant %}
|
||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -79,7 +79,7 @@
|
||||
<tr>
|
||||
<td>Unique IP Space</td>
|
||||
<td>
|
||||
{% if vrf.enforce_unique %}
|
||||
{% if object.enforce_unique %}
|
||||
<i class="mdi mdi-check-bold text-success" title="Yes"></i>
|
||||
{% else %}
|
||||
<i class="mdi mdi-close-thick text-danger" title="No"></i>
|
||||
@ -88,29 +88,29 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>{{ vrf.description|placeholder }}</td>
|
||||
<td>{{ object.description|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Prefixes</td>
|
||||
<td>
|
||||
<a href="{% url 'ipam:prefix_list' %}?vrf_id={{ vrf.pk }}">{{ prefix_count }}</a>
|
||||
<a href="{% url 'ipam:prefix_list' %}?vrf_id={{ object.pk }}">{{ prefix_count }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% include 'extras/inc/tags_panel.html' with tags=vrf.tags.all url='ipam:vrf_list' %}
|
||||
{% include 'inc/custom_fields_panel.html' with obj=vrf %}
|
||||
{% plugin_left_page vrf %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='ipam:vrf_list' %}
|
||||
{% include 'inc/custom_fields_panel.html' with obj=object %}
|
||||
{% plugin_left_page object %}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{% include 'panel_table.html' with table=import_targets_table heading="Import Route Targets" %}
|
||||
{% include 'panel_table.html' with table=export_targets_table heading="Export Route Targets" %}
|
||||
{% plugin_right_page vrf %}
|
||||
{% plugin_right_page object %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% plugin_full_width_page vrf %}
|
||||
{% plugin_full_width_page object %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -9,10 +9,10 @@
|
||||
<div class="col-sm-8 col-md-9">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'tenancy:tenant_list' %}">Tenants</a></li>
|
||||
{% if tenant.group %}
|
||||
<li><a href="{% url 'tenancy:tenant_list' %}?group={{ tenant.group.slug }}">{{ tenant.group }}</a></li>
|
||||
{% if object.group %}
|
||||
<li><a href="{% url 'tenancy:tenant_list' %}?group={{ object.group.slug }}">{{ object.group }}</a></li>
|
||||
{% endif %}
|
||||
<li>{{ tenant }}</li>
|
||||
<li>{{ object }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-sm-4 col-md-3">
|
||||
@ -29,29 +29,29 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right noprint">
|
||||
{% plugin_buttons tenant %}
|
||||
{% plugin_buttons object %}
|
||||
{% if perms.tenancy.add_tenant %}
|
||||
{% clone_button tenant %}
|
||||
{% clone_button object %}
|
||||
{% endif %}
|
||||
{% if perms.tenancy.change_tenant %}
|
||||
{% edit_button tenant %}
|
||||
{% edit_button object %}
|
||||
{% endif %}
|
||||
{% if perms.tenancy.delete_tenant %}
|
||||
{% delete_button tenant %}
|
||||
{% delete_button object %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{% block title %}{{ tenant }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=tenant %}
|
||||
<h1>{% block title %}{{ object }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=object %}
|
||||
<div class="pull-right noprint">
|
||||
{% custom_links tenant %}
|
||||
{% custom_links object %}
|
||||
</div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||
<a href="{{ tenant.get_absolute_url }}">Tenant</a>
|
||||
<a href="{{ object.get_absolute_url }}">Tenant</a>
|
||||
</li>
|
||||
{% if perms.extras.view_objectchange %}
|
||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||
<a href="{% url 'tenancy:tenant_changelog' slug=tenant.slug %}">Change Log</a>
|
||||
<a href="{% url 'tenancy:tenant_changelog' slug=object.slug %}">Change Log</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@ -68,8 +68,8 @@
|
||||
<tr>
|
||||
<td>Group</td>
|
||||
<td>
|
||||
{% if tenant.group %}
|
||||
<a href="{{ tenant.group.get_absolute_url }}">{{ tenant.group }}</a>
|
||||
{% if object.group %}
|
||||
<a href="{{ object.group.get_absolute_url }}">{{ object.group }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -77,25 +77,25 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>{{ tenant.description|placeholder }}</td>
|
||||
<td>{{ object.description|placeholder }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% include 'inc/custom_fields_panel.html' with obj=tenant %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=tenant.tags.all url='tenancy:tenant_list' %}
|
||||
{% include 'inc/custom_fields_panel.html' with obj=object %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='tenancy:tenant_list' %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Comments</strong>
|
||||
</div>
|
||||
<div class="panel-body rendered-markdown">
|
||||
{% if tenant.comments %}
|
||||
{{ tenant.comments|render_markdown }}
|
||||
{% if object.comments %}
|
||||
{{ object.comments|render_markdown }}
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% plugin_left_page tenant %}
|
||||
{% plugin_left_page object %}
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="panel panel-default">
|
||||
@ -104,57 +104,57 @@
|
||||
</div>
|
||||
<div class="row panel-body">
|
||||
<div class="col-md-4 text-center">
|
||||
<h2><a href="{% url 'dcim:site_list' %}?tenant={{ tenant.slug }}" class="btn {% if stats.site_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.site_count }}</a></h2>
|
||||
<h2><a href="{% url 'dcim:site_list' %}?tenant={{ object.slug }}" class="btn {% if stats.site_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.site_count }}</a></h2>
|
||||
<p>Sites</p>
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
<h2><a href="{% url 'dcim:rack_list' %}?tenant={{ tenant.slug }}" class="btn {% if stats.rack_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.rack_count }}</a></h2>
|
||||
<h2><a href="{% url 'dcim:rack_list' %}?tenant={{ object.slug }}" class="btn {% if stats.rack_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.rack_count }}</a></h2>
|
||||
<p>Racks</p>
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
<h2><a href="{% url 'dcim:rackreservation_list' %}?tenant={{ tenant.slug }}" class="btn {% if stats.rackreservation_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.rackreservation_count }}</a></h2>
|
||||
<h2><a href="{% url 'dcim:rackreservation_list' %}?tenant={{ object.slug }}" class="btn {% if stats.rackreservation_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.rackreservation_count }}</a></h2>
|
||||
<p>Rack reservations</p>
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
<h2><a href="{% url 'dcim:device_list' %}?tenant={{ tenant.slug }}" class="btn {% if stats.device_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.device_count }}</a></h2>
|
||||
<h2><a href="{% url 'dcim:device_list' %}?tenant={{ object.slug }}" class="btn {% if stats.device_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.device_count }}</a></h2>
|
||||
<p>Devices</p>
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
<h2><a href="{% url 'ipam:vrf_list' %}?tenant={{ tenant.slug }}" class="btn {% if stats.vrf_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.vrf_count }}</a></h2>
|
||||
<h2><a href="{% url 'ipam:vrf_list' %}?tenant={{ object.slug }}" class="btn {% if stats.vrf_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.vrf_count }}</a></h2>
|
||||
<p>VRFs</p>
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
<h2><a href="{% url 'ipam:prefix_list' %}?tenant={{ tenant.slug }}" class="btn {% if stats.prefix_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.prefix_count }}</a></h2>
|
||||
<h2><a href="{% url 'ipam:prefix_list' %}?tenant={{ object.slug }}" class="btn {% if stats.prefix_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.prefix_count }}</a></h2>
|
||||
<p>Prefixes</p>
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
<h2><a href="{% url 'ipam:ipaddress_list' %}?tenant={{ tenant.slug }}" class="btn {% if stats.ipaddress_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.ipaddress_count }}</a></h2>
|
||||
<h2><a href="{% url 'ipam:ipaddress_list' %}?tenant={{ object.slug }}" class="btn {% if stats.ipaddress_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.ipaddress_count }}</a></h2>
|
||||
<p>IP addresses</p>
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
<h2><a href="{% url 'ipam:vlan_list' %}?tenant={{ tenant.slug }}" class="btn {% if stats.vlan_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.vlan_count }}</a></h2>
|
||||
<h2><a href="{% url 'ipam:vlan_list' %}?tenant={{ object.slug }}" class="btn {% if stats.vlan_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.vlan_count }}</a></h2>
|
||||
<p>VLANs</p>
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
<h2><a href="{% url 'circuits:circuit_list' %}?tenant={{ tenant.slug }}" class="btn {% if stats.circuit_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.circuit_count }}</a></h2>
|
||||
<h2><a href="{% url 'circuits:circuit_list' %}?tenant={{ object.slug }}" class="btn {% if stats.circuit_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.circuit_count }}</a></h2>
|
||||
<p>Circuits</p>
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
<h2><a href="{% url 'virtualization:virtualmachine_list' %}?tenant={{ tenant.slug }}" class="btn {% if stats.virtualmachine_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.virtualmachine_count }}</a></h2>
|
||||
<h2><a href="{% url 'virtualization:virtualmachine_list' %}?tenant={{ object.slug }}" class="btn {% if stats.virtualmachine_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.virtualmachine_count }}</a></h2>
|
||||
<p>Virtual machines</p>
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
<h2><a href="{% url 'virtualization:cluster_list' %}?tenant={{ tenant.slug }}" class="btn {% if stats.cluster_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.cluster_count }}</a></h2>
|
||||
<h2><a href="{% url 'virtualization:cluster_list' %}?tenant={{ object.slug }}" class="btn {% if stats.cluster_count %}btn-primary{% else %}btn-default{% endif %} btn-lg">{{ stats.cluster_count }}</a></h2>
|
||||
<p>Clusters</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% plugin_right_page tenant %}
|
||||
{% plugin_right_page object %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% plugin_full_width_page tenant %}
|
||||
{% plugin_full_width_page object %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -8,11 +8,11 @@
|
||||
<div class="row noprint" xmlns="http://www.w3.org/1999/html">
|
||||
<div class="col-sm-8 col-md-9">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ cluster.type.get_absolute_url }}">{{ cluster.type }}</a></li>
|
||||
{% if cluster.group %}
|
||||
<li><a href="{{ cluster.group.get_absolute_url }}">{{ cluster.group }}</a></li>
|
||||
<li><a href="{{ object.type.get_absolute_url }}">{{ object.type }}</a></li>
|
||||
{% if object.group %}
|
||||
<li><a href="{{ object.group.get_absolute_url }}">{{ object.group }}</a></li>
|
||||
{% endif %}
|
||||
<li>{{ cluster }}</li>
|
||||
<li>{{ object }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-sm-4 col-md-3">
|
||||
@ -29,29 +29,29 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right noprint">
|
||||
{% plugin_buttons cluster %}
|
||||
{% plugin_buttons object %}
|
||||
{% if perms.virtualization.add_cluster %}
|
||||
{% clone_button cluster %}
|
||||
{% clone_button object %}
|
||||
{% endif %}
|
||||
{% if perms.virtualization.change_cluster %}
|
||||
{% edit_button cluster %}
|
||||
{% edit_button object %}
|
||||
{% endif %}
|
||||
{% if perms.virtualization.delete_cluster %}
|
||||
{% delete_button cluster %}
|
||||
{% delete_button object %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{% block title %}{{ cluster }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=cluster %}
|
||||
<h1>{% block title %}{{ object }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=object %}
|
||||
<div class="pull-right noprint">
|
||||
{% custom_links cluster %}
|
||||
{% custom_links object %}
|
||||
</div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||
<a href="{{ cluster.get_absolute_url }}">Cluster</a>
|
||||
<a href="{{ object.get_absolute_url }}">Cluster</a>
|
||||
</li>
|
||||
{% if perms.extras.view_objectchange %}
|
||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||
<a href="{% url 'virtualization:cluster_changelog' pk=cluster.pk %}">Change Log</a>
|
||||
<a href="{% url 'virtualization:cluster_changelog' pk=object.pk %}">Change Log</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@ -67,17 +67,17 @@
|
||||
<table class="table table-hover panel-body attr-table">
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>{{ cluster.name }}</td>
|
||||
<td>{{ object.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Type</td>
|
||||
<td><a href="{{ cluster.type.get_absolute_url }}">{{ cluster.type }}</a></td>
|
||||
<td><a href="{{ object.type.get_absolute_url }}">{{ object.type }}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Group</td>
|
||||
<td>
|
||||
{% if cluster.group %}
|
||||
<a href="{{ cluster.group.get_absolute_url }}">{{ cluster.group }}</a>
|
||||
{% if object.group %}
|
||||
<a href="{{ object.group.get_absolute_url }}">{{ object.group }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -86,8 +86,8 @@
|
||||
<tr>
|
||||
<td>Tenant</td>
|
||||
<td>
|
||||
{% if cluster.tenant %}
|
||||
<a href="{{ cluster.tenant.get_absolute_url }}">{{ cluster.tenant }}</a>
|
||||
{% if object.tenant %}
|
||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -96,8 +96,8 @@
|
||||
<tr>
|
||||
<td>Site</td>
|
||||
<td>
|
||||
{% if cluster.site %}
|
||||
<a href="{{ cluster.site.get_absolute_url }}">{{ cluster.site }}</a>
|
||||
{% if object.site %}
|
||||
<a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -105,25 +105,25 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Virtual Machines</td>
|
||||
<td><a href="{% url 'virtualization:virtualmachine_list' %}?cluster_id={{ cluster.pk }}">{{ cluster.virtual_machines.count }}</a></td>
|
||||
<td><a href="{% url 'virtualization:virtualmachine_list' %}?cluster_id={{ object.pk }}">{{ object.virtual_machines.count }}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% include 'inc/custom_fields_panel.html' with obj=cluster %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=cluster.tags.all url='virtualization:cluster_list' %}
|
||||
{% include 'inc/custom_fields_panel.html' with obj=object %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='virtualization:cluster_list' %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Comments</strong>
|
||||
</div>
|
||||
<div class="panel-body rendered-markdown">
|
||||
{% if cluster.comments %}
|
||||
{{ cluster.comments|render_markdown }}
|
||||
{% if object.comments %}
|
||||
{{ object.comments|render_markdown }}
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% plugin_left_page cluster %}
|
||||
{% plugin_left_page object %}
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<div class="panel panel-default">
|
||||
@ -131,14 +131,14 @@
|
||||
<strong>Host Devices</strong>
|
||||
</div>
|
||||
{% if perms.virtualization.change_cluster %}
|
||||
<form action="{% url 'virtualization:cluster_remove_devices' pk=cluster.pk %}" method="post">
|
||||
<form action="{% url 'virtualization:cluster_remove_devices' pk=object.pk %}" method="post">
|
||||
{% csrf_token %}
|
||||
{% endif %}
|
||||
{% include 'responsive_table.html' with table=device_table %}
|
||||
{% if perms.virtualization.change_cluster %}
|
||||
<div class="panel-footer noprint">
|
||||
<div class="pull-right">
|
||||
<a href="{% url 'virtualization:cluster_add_devices' pk=cluster.pk %}?site={{ cluster.site.pk }}" class="btn btn-primary btn-xs">
|
||||
<a href="{% url 'virtualization:cluster_add_devices' pk=object.pk %}?site={{ object.site.pk }}" class="btn btn-primary btn-xs">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span>
|
||||
Add devices
|
||||
</a>
|
||||
@ -151,12 +151,12 @@
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% plugin_right_page cluster %}
|
||||
{% plugin_right_page object %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% plugin_full_width_page cluster %}
|
||||
{% plugin_full_width_page object %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -9,10 +9,10 @@
|
||||
<div class="row noprint">
|
||||
<div class="col-sm-8 col-md-9">
|
||||
<ol class="breadcrumb">
|
||||
{% if virtualmachine.cluster %}
|
||||
<li><a href="{{ virtualmachine.cluster.get_absolute_url }}">{{ virtualmachine.cluster }}</a></li>
|
||||
{% if object.cluster %}
|
||||
<li><a href="{{ object.cluster.get_absolute_url }}">{{ object.cluster }}</a></li>
|
||||
{% endif %}
|
||||
<li>{{ virtualmachine }}</li>
|
||||
<li>{{ object }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-sm-4 col-md-3">
|
||||
@ -30,38 +30,38 @@
|
||||
</div>
|
||||
<div class="pull-right noprint">
|
||||
{% if perms.virtualization.add_vminterface %}
|
||||
<a href="{% url 'virtualization:vminterface_add' %}?virtual_machine={{ virtualmachine.pk }}&return_url={{ virtualmachine.get_absolute_url }}" class="btn btn-primary">
|
||||
<a href="{% url 'virtualization:vminterface_add' %}?virtual_machine={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Interfaces
|
||||
</a>
|
||||
{% endif %}
|
||||
{% plugin_buttons virtualmachine %}
|
||||
{% plugin_buttons object %}
|
||||
{% if perms.virtualization.add_virtualmachine %}
|
||||
{% clone_button virtualmachine %}
|
||||
{% clone_button object %}
|
||||
{% endif %}
|
||||
{% if perms.virtualization.change_virtualmachine %}
|
||||
{% edit_button virtualmachine %}
|
||||
{% edit_button object %}
|
||||
{% endif %}
|
||||
{% if perms.virtualization.delete_virtualmachine %}
|
||||
{% delete_button virtualmachine %}
|
||||
{% delete_button object %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{% block title %}{{ virtualmachine }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=virtualmachine %}
|
||||
<h1>{% block title %}{{ object }}{% endblock %}</h1>
|
||||
{% include 'inc/created_updated.html' with obj=object %}
|
||||
<div class="pull-right noprint">
|
||||
{% custom_links virtualmachine %}
|
||||
{% custom_links object %}
|
||||
</div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||
<a href="{{ virtualmachine.get_absolute_url }}">Virtual Machine</a>
|
||||
<a href="{{ object.get_absolute_url }}">Virtual Machine</a>
|
||||
</li>
|
||||
{% if perms.extras.view_configcontext %}
|
||||
<li role="presentation"{% if active_tab == 'config-context' %} class="active"{% endif %}>
|
||||
<a href="{% url 'virtualization:virtualmachine_configcontext' pk=virtualmachine.pk %}">Config Context</a>
|
||||
<a href="{% url 'virtualization:virtualmachine_configcontext' pk=object.pk %}">Config Context</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if perms.extras.view_objectchange %}
|
||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||
<a href="{% url 'virtualization:virtualmachine_changelog' pk=virtualmachine.pk %}">Change Log</a>
|
||||
<a href="{% url 'virtualization:virtualmachine_changelog' pk=object.pk %}">Change Log</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@ -77,19 +77,19 @@
|
||||
<table class="table table-hover panel-body attr-table">
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>{{ virtualmachine }}</td>
|
||||
<td>{{ object }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Status</td>
|
||||
<td>
|
||||
<span class="label label-{{ virtualmachine.get_status_class }}">{{ virtualmachine.get_status_display }}</span>
|
||||
<span class="label label-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Role</td>
|
||||
<td>
|
||||
{% if virtualmachine.role %}
|
||||
<a href="{% url 'virtualization:virtualmachine_list' %}?role={{ virtualmachine.role.slug }}">{{ virtualmachine.role }}</a>
|
||||
{% if object.role %}
|
||||
<a href="{% url 'virtualization:virtualmachine_list' %}?role={{ object.role.slug }}">{{ object.role }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -98,8 +98,8 @@
|
||||
<tr>
|
||||
<td>Platform</td>
|
||||
<td>
|
||||
{% if virtualmachine.platform %}
|
||||
<a href="{% url 'virtualization:virtualmachine_list' %}?platform={{ virtualmachine.platform.slug }}">{{ virtualmachine.platform }}</a>
|
||||
{% if object.platform %}
|
||||
<a href="{% url 'virtualization:virtualmachine_list' %}?platform={{ object.platform.slug }}">{{ object.platform }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -108,11 +108,11 @@
|
||||
<tr>
|
||||
<td>Tenant</td>
|
||||
<td>
|
||||
{% if virtualmachine.tenant %}
|
||||
{% if virtualmachine.tenant.group %}
|
||||
<a href="{{ virtualmachine.tenant.group.get_absolute_url }}">{{ virtualmachine.tenant.group }}</a> /
|
||||
{% if object.tenant %}
|
||||
{% if object.tenant.group %}
|
||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
||||
{% endif %}
|
||||
<a href="{{ virtualmachine.tenant.get_absolute_url }}">{{ virtualmachine.tenant }}</a>
|
||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
@ -121,12 +121,12 @@
|
||||
<tr>
|
||||
<td>Primary IPv4</td>
|
||||
<td>
|
||||
{% if virtualmachine.primary_ip4 %}
|
||||
<a href="{% url 'ipam:ipaddress' pk=virtualmachine.primary_ip4.pk %}">{{ virtualmachine.primary_ip4.address.ip }}</a>
|
||||
{% if virtualmachine.primary_ip4.nat_inside %}
|
||||
<span>(NAT for {{ virtualmachine.primary_ip4.nat_inside.address.ip }})</span>
|
||||
{% elif virtualmachine.primary_ip4.nat_outside %}
|
||||
<span>(NAT: {{ virtualmachine.primary_ip4.nat_outside.address.ip }})</span>
|
||||
{% if object.primary_ip4 %}
|
||||
<a href="{% url 'ipam:ipaddress' pk=object.primary_ip4.pk %}">{{ object.primary_ip4.address.ip }}</a>
|
||||
{% if object.primary_ip4.nat_inside %}
|
||||
<span>(NAT for {{ object.primary_ip4.nat_inside.address.ip }})</span>
|
||||
{% elif object.primary_ip4.nat_outside %}
|
||||
<span>(NAT: {{ object.primary_ip4.nat_outside.address.ip }})</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
@ -136,12 +136,12 @@
|
||||
<tr>
|
||||
<td>Primary IPv6</td>
|
||||
<td>
|
||||
{% if virtualmachine.primary_ip6 %}
|
||||
<a href="{% url 'ipam:ipaddress' pk=virtualmachine.primary_ip6.pk %}">{{ virtualmachine.primary_ip6.address.ip }}</a>
|
||||
{% if virtualmachine.primary_ip6.nat_inside %}
|
||||
<span>(NAT for {{ virtualmachine.primary_ip6.nat_inside.address.ip }})</span>
|
||||
{% elif virtualmachine.primary_ip6.nat_outside %}
|
||||
<span>(NAT: {{ virtualmachine.primary_ip6.nat_outside.address.ip }})</span>
|
||||
{% if object.primary_ip6 %}
|
||||
<a href="{% url 'ipam:ipaddress' pk=object.primary_ip6.pk %}">{{ object.primary_ip6.address.ip }}</a>
|
||||
{% if object.primary_ip6.nat_inside %}
|
||||
<span>(NAT for {{ object.primary_ip6.nat_inside.address.ip }})</span>
|
||||
{% elif object.primary_ip6.nat_outside %}
|
||||
<span>(NAT: {{ object.primary_ip6.nat_outside.address.ip }})</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
@ -150,21 +150,21 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% include 'inc/custom_fields_panel.html' with obj=virtualmachine %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=virtualmachine.tags.all url='virtualization:virtualmachine_list' %}
|
||||
{% include 'inc/custom_fields_panel.html' with obj=object %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='virtualization:virtualmachine_list' %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Comments</strong>
|
||||
</div>
|
||||
<div class="panel-body rendered-markdown">
|
||||
{% if virtualmachine.comments %}
|
||||
{{ virtualmachine.comments|render_markdown }}
|
||||
{% if object.comments %}
|
||||
{{ object.comments|render_markdown }}
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% plugin_left_page virtualmachine %}
|
||||
{% plugin_left_page object %}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
@ -175,15 +175,15 @@
|
||||
<tr>
|
||||
<td>Cluster</td>
|
||||
<td>
|
||||
{% if virtualmachine.cluster.group %}
|
||||
<a href="{{ virtualmachine.cluster.group.get_absolute_url }}">{{ virtualmachine.cluster.group }}</a> /
|
||||
{% if object.cluster.group %}
|
||||
<a href="{{ object.cluster.group.get_absolute_url }}">{{ object.cluster.group }}</a> /
|
||||
{% endif %}
|
||||
<a href="{{ virtualmachine.cluster.get_absolute_url }}">{{ virtualmachine.cluster }}</a>
|
||||
<a href="{{ object.cluster.get_absolute_url }}">{{ object.cluster }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cluster Type</td>
|
||||
<td>{{ virtualmachine.cluster.type }}</td>
|
||||
<td>{{ object.cluster.type }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@ -194,13 +194,13 @@
|
||||
<table class="table table-hover panel-body attr-table">
|
||||
<tr>
|
||||
<td><i class="mdi mdi-gauge"></i> Virtual CPUs</td>
|
||||
<td>{{ virtualmachine.vcpus|placeholder }}</td>
|
||||
<td>{{ object.vcpus|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><i class="mdi mdi-chip"></i> Memory</td>
|
||||
<td>
|
||||
{% if virtualmachine.memory %}
|
||||
{{ virtualmachine.memory }} MB
|
||||
{% if object.memory %}
|
||||
{{ object.memory }} MB
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
@ -209,8 +209,8 @@
|
||||
<tr>
|
||||
<td><i class="mdi mdi-harddisk"></i> Disk Space</td>
|
||||
<td>
|
||||
{% if virtualmachine.disk %}
|
||||
{{ virtualmachine.disk }} GB
|
||||
{% if object.disk %}
|
||||
{{ object.disk }} GB
|
||||
{% else %}
|
||||
<span class="text-muted">—</span>
|
||||
{% endif %}
|
||||
@ -226,7 +226,7 @@
|
||||
{% include 'secrets/inc/assigned_secrets.html' %}
|
||||
{% if perms.secrets.add_secret %}
|
||||
<div class="panel-footer text-right noprint">
|
||||
<a href="{% url 'secrets:secret_add' %}?virtual_machine={{ virtualmachine.pk }}&return_url={{ virtualmachine.get_absolute_url }}" class="btn btn-xs btn-primary">
|
||||
<a href="{% url 'secrets:secret_add' %}?virtual_machine={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-xs btn-primary">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add secret
|
||||
</a>
|
||||
</div>
|
||||
@ -250,25 +250,25 @@
|
||||
{% endif %}
|
||||
{% if perms.ipam.add_service %}
|
||||
<div class="panel-footer text-right noprint">
|
||||
<a href="{% url 'virtualization:virtualmachine_service_assign' virtualmachine=virtualmachine.pk %}" class="btn btn-xs btn-primary">
|
||||
<a href="{% url 'virtualization:virtualmachine_service_assign' object=object.pk %}" class="btn btn-xs btn-primary">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Assign service
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% plugin_right_page virtualmachine %}
|
||||
{% plugin_right_page object %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% plugin_full_width_page virtualmachine %}
|
||||
{% plugin_full_width_page object %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="virtual_machine" value="{{ virtualmachine.pk }}" />
|
||||
<input type="hidden" name="virtual_machine" value="{{ object.pk }}" />
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>Interfaces</strong>
|
||||
@ -285,21 +285,21 @@
|
||||
{% if perms.virtualization.add_vminterface or perms.virtualization.delete_vminterface %}
|
||||
<div class="panel-footer noprint">
|
||||
{% if interfaces and perms.virtualization.change_vminterface %}
|
||||
<button type="submit" name="_rename" formaction="{% url 'virtualization:vminterface_bulk_rename' %}?return_url={{ virtualmachine.get_absolute_url }}" class="btn btn-warning btn-xs">
|
||||
<button type="submit" name="_rename" formaction="{% url 'virtualization:vminterface_bulk_rename' %}?return_url={{ object.get_absolute_url }}" class="btn btn-warning btn-xs">
|
||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Rename
|
||||
</button>
|
||||
<button type="submit" name="_edit" formaction="{% url 'virtualization:vminterface_bulk_edit' %}?return_url={{ virtualmachine.get_absolute_url }}" class="btn btn-warning btn-xs">
|
||||
<button type="submit" name="_edit" formaction="{% url 'virtualization:vminterface_bulk_edit' %}?return_url={{ object.get_absolute_url }}" class="btn btn-warning btn-xs">
|
||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if interfaces and perms.virtualization.delete_vminterface %}
|
||||
<button type="submit" name="_delete" formaction="{% url 'virtualization:vminterface_bulk_delete' %}?return_url={{ virtualmachine.get_absolute_url }}" class="btn btn-danger btn-xs">
|
||||
<button type="submit" name="_delete" formaction="{% url 'virtualization:vminterface_bulk_delete' %}?return_url={{ object.get_absolute_url }}" class="btn btn-danger btn-xs">
|
||||
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if perms.virtualization.add_vminterface %}
|
||||
<div class="pull-right">
|
||||
<a href="{% url 'virtualization:vminterface_add' %}?virtual_machine={{ virtualmachine.pk }}&return_url={{ virtualmachine.get_absolute_url }}" class="btn btn-primary btn-xs">
|
||||
<a href="{% url 'virtualization:vminterface_add' %}?virtual_machine={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary btn-xs">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add interfaces
|
||||
</a>
|
||||
</div>
|
||||
|
@ -7,32 +7,32 @@
|
||||
<div class="col-md-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'virtualization:virtualmachine_list' %}">Virtual Machines</a></li>
|
||||
<li><a href="{{ vminterface.virtual_machine.get_absolute_url }}">{{ vminterface.virtual_machine }}</a></li>
|
||||
<li>{{ vminterface }}</li>
|
||||
<li><a href="{{ object.virtual_machine.get_absolute_url }}">{{ object.virtual_machine }}</a></li>
|
||||
<li>{{ object }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right noprint">
|
||||
{% plugin_buttons vminterface %}
|
||||
{% plugin_buttons object %}
|
||||
{% if perms.virtualization.change_vminterface %}
|
||||
<a href="{% url 'virtualization:vminterface_edit' pk=vminterface.pk %}" class="btn btn-warning">
|
||||
<a href="{% url 'virtualization:vminterface_edit' pk=object.pk %}" class="btn btn-warning">
|
||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.virtualization.delete_vminterface %}
|
||||
<a href="{% url 'virtualization:vminterface_delete' pk=vminterface.pk %}" class="btn btn-danger">
|
||||
<a href="{% url 'virtualization:vminterface_delete' pk=object.pk %}" class="btn btn-danger">
|
||||
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>{% block title %}{{ vminterface.virtual_machine }} / {{ vminterface.name }}{% endblock %}</h1>
|
||||
<h1>{% block title %}{{ object.virtual_machine }} / {{ object.name }}{% endblock %}</h1>
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
||||
<a href="{{ vminterface.get_absolute_url }}">Interface</a>
|
||||
<a href="{{ object.get_absolute_url }}">Interface</a>
|
||||
</li>
|
||||
{% if perms.extras.view_objectchange %}
|
||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||
<a href="{% url 'virtualization:vminterface_changelog' pk=vminterface.pk %}">Change Log</a>
|
||||
<a href="{% url 'virtualization:vminterface_changelog' pk=object.pk %}">Change Log</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@ -49,17 +49,17 @@
|
||||
<tr>
|
||||
<td>Virtual Machine</td>
|
||||
<td>
|
||||
<a href="{{ vminterface.virtual_machine.get_absolute_url }}">{{ vminterface.virtual_machine }}</a>
|
||||
<a href="{{ object.virtual_machine.get_absolute_url }}">{{ object.virtual_machine }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>{{ vminterface.name }}</td>
|
||||
<td>{{ object.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Enabled</td>
|
||||
<td>
|
||||
{% if vminterface.enabled %}
|
||||
{% if object.enabled %}
|
||||
<span class="text-success"><i class="mdi mdi-check-bold"></i></span>
|
||||
{% else %}
|
||||
<span class="text-danger"><i class="mdi mdi-close"></i></span>
|
||||
@ -68,27 +68,27 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>{{ vminterface.description|placeholder }} </td>
|
||||
<td>{{ object.description|placeholder }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MTU</td>
|
||||
<td>{{ vminterface.mtu|placeholder }}</td>
|
||||
<td>{{ object.mtu|placeholder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MAC Address</td>
|
||||
<td><span class="text-monospace">{{ vminterface.mac_address|placeholder }}</span></td>
|
||||
<td><span class="text-monospace">{{ object.mac_address|placeholder }}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>802.1Q Mode</td>
|
||||
<td>{{ vminterface.get_mode_display }}</td>
|
||||
<td>{{ object.get_mode_display }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% plugin_left_page vminterface %}
|
||||
{% plugin_left_page object %}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{% include 'extras/inc/tags_panel.html' with tags=vminterface.tags.all %}
|
||||
{% plugin_right_page vminterface %}
|
||||
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all %}
|
||||
{% plugin_right_page object %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@ -103,7 +103,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% plugin_full_width_page vminterface %}
|
||||
{% plugin_full_width_page object %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -82,7 +82,7 @@ class TenantView(generic.ObjectView):
|
||||
}
|
||||
|
||||
return render(request, 'tenancy/tenant.html', {
|
||||
'tenant': tenant,
|
||||
'object': tenant,
|
||||
'stats': stats,
|
||||
})
|
||||
|
||||
|
@ -106,7 +106,7 @@ class ClusterView(generic.ObjectView):
|
||||
device_table.columns.show('pk')
|
||||
|
||||
return render(request, 'virtualization/cluster.html', {
|
||||
'cluster': cluster,
|
||||
'object': cluster,
|
||||
'device_table': device_table,
|
||||
})
|
||||
|
||||
@ -262,7 +262,7 @@ class VirtualMachineView(generic.ObjectView):
|
||||
secrets = Secret.objects.restrict(request.user, 'view').filter(virtual_machine=virtualmachine)
|
||||
|
||||
return render(request, 'virtualization/virtualmachine.html', {
|
||||
'virtualmachine': virtualmachine,
|
||||
'object': virtualmachine,
|
||||
'vminterface_table': vminterface_table,
|
||||
'services': services,
|
||||
'secrets': secrets,
|
||||
@ -343,7 +343,7 @@ class VMInterfaceView(generic.ObjectView):
|
||||
)
|
||||
|
||||
return render(request, 'virtualization/vminterface.html', {
|
||||
'vminterface': vminterface,
|
||||
'object': vminterface,
|
||||
'ipaddress_table': ipaddress_table,
|
||||
'vlan_table': vlan_table,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user