mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-27 19:27:33 +02:00
Update templates to use "object" context var
This commit is contained in:
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user