mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
migrate virtual machine & vm interface to bootstrap 5
This commit is contained in:
@ -6,95 +6,97 @@
|
|||||||
{% load plugins %}
|
{% load plugins %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row">
|
<div class="row my-3">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="panel panel-default">
|
<div class="card">
|
||||||
<div class="panel-heading">
|
<h5 class="card-header">
|
||||||
<strong>Virtual Machine</strong>
|
Virtual Machine
|
||||||
|
</h5>
|
||||||
|
<div class="card-body">
|
||||||
|
<table class="table table-hover attr-table">
|
||||||
|
<tr>
|
||||||
|
<th scope="row">Name</th>
|
||||||
|
<td>{{ object }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">Status</th>
|
||||||
|
<td>
|
||||||
|
<span class="badge bg-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">Role</th>
|
||||||
|
<td>
|
||||||
|
{% if object.role %}
|
||||||
|
<a href="{{ object.role.get_absolute_url }}">{{ object.role }}</a>
|
||||||
|
{% else %}
|
||||||
|
<span class="text-muted">None</span>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">Platform</th>
|
||||||
|
<td>
|
||||||
|
{% if object.platform %}
|
||||||
|
<a href="{{ object.platform.get_absolute_url }}">{{ object.platform }}</a>
|
||||||
|
{% else %}
|
||||||
|
<span class="text-muted">None</span>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">Tenant</th>
|
||||||
|
<td>
|
||||||
|
{% if object.tenant %}
|
||||||
|
{% if object.tenant.group %}
|
||||||
|
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
||||||
|
{% endif %}
|
||||||
|
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
||||||
|
{% else %}
|
||||||
|
<span class="text-muted">None</span>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">Primary IPv4</th>
|
||||||
|
<td>
|
||||||
|
{% 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>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">Primary IPv6</th>
|
||||||
|
<td>
|
||||||
|
{% 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>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<table class="table table-hover panel-body attr-table">
|
|
||||||
<tr>
|
|
||||||
<td>Name</td>
|
|
||||||
<td>{{ object }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Status</td>
|
|
||||||
<td>
|
|
||||||
<span class="badge bg-{{ object.get_status_class }}">{{ object.get_status_display }}</span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Role</td>
|
|
||||||
<td>
|
|
||||||
{% if object.role %}
|
|
||||||
<a href="{{ object.role.get_absolute_url }}">{{ object.role }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Platform</td>
|
|
||||||
<td>
|
|
||||||
{% if object.platform %}
|
|
||||||
<a href="{{ object.platform.get_absolute_url }}">{{ object.platform }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Tenant</td>
|
|
||||||
<td>
|
|
||||||
{% if object.tenant %}
|
|
||||||
{% if object.tenant.group %}
|
|
||||||
<a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
|
|
||||||
{% endif %}
|
|
||||||
<a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">None</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Primary IPv4</td>
|
|
||||||
<td>
|
|
||||||
{% 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>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Primary IPv6</td>
|
|
||||||
<td>
|
|
||||||
{% 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>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
{% include 'inc/custom_fields_panel.html' %}
|
{% include 'inc/custom_fields_panel.html' %}
|
||||||
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='virtualization:virtualmachine_list' %}
|
{% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='virtualization:virtualmachine_list' %}
|
||||||
<div class="panel panel-default">
|
<div class="card">
|
||||||
<div class="panel-heading">
|
<h5 class="card-header">
|
||||||
<strong>Comments</strong>
|
Comments
|
||||||
</div>
|
</h5>
|
||||||
<div class="panel-body rendered-markdown">
|
<div class="card-body rendered-markdown">
|
||||||
{% if object.comments %}
|
{% if object.comments %}
|
||||||
{{ object.comments|render_markdown }}
|
{{ object.comments|render_markdown }}
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -105,91 +107,97 @@
|
|||||||
{% plugin_left_page object %}
|
{% plugin_left_page object %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="panel panel-default">
|
<div class="card">
|
||||||
<div class="panel-heading">
|
<h5 class="card-header">
|
||||||
<strong>Cluster</strong>
|
Cluster
|
||||||
|
</h5>
|
||||||
|
<div class="card-body">
|
||||||
|
<table class="table table-hover attr-table">
|
||||||
|
<tr>
|
||||||
|
<th scope="row">Cluster</th>
|
||||||
|
<td>
|
||||||
|
{% if object.cluster.group %}
|
||||||
|
<a href="{{ object.cluster.group.get_absolute_url }}">{{ object.cluster.group }}</a> /
|
||||||
|
{% endif %}
|
||||||
|
<a href="{{ object.cluster.get_absolute_url }}">{{ object.cluster }}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">Cluster Type</th>
|
||||||
|
<td>{{ object.cluster.type }}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<table class="table table-hover panel-body attr-table">
|
|
||||||
<tr>
|
|
||||||
<td>Cluster</td>
|
|
||||||
<td>
|
|
||||||
{% if object.cluster.group %}
|
|
||||||
<a href="{{ object.cluster.group.get_absolute_url }}">{{ object.cluster.group }}</a> /
|
|
||||||
{% endif %}
|
|
||||||
<a href="{{ object.cluster.get_absolute_url }}">{{ object.cluster }}</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Cluster Type</td>
|
|
||||||
<td>{{ object.cluster.type }}</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="panel panel-default">
|
<div class="card">
|
||||||
<div class="panel-heading">
|
<h5 class="card-header">
|
||||||
<strong>Resources</strong>
|
Resources
|
||||||
|
</h5>
|
||||||
|
<div class="card-body">
|
||||||
|
<table class="table table-hover attr-table">
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><i class="mdi mdi-gauge"></i> Virtual CPUs</th>
|
||||||
|
<td>{{ object.vcpus|placeholder }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><i class="mdi mdi-chip"></i> Memory</th>
|
||||||
|
<td>
|
||||||
|
{% if object.memory %}
|
||||||
|
{{ object.memory }} MB
|
||||||
|
{% else %}
|
||||||
|
<span class="text-muted">—</span>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><i class="mdi mdi-harddisk"></i> Disk Space</th>
|
||||||
|
<td>
|
||||||
|
{% if object.disk %}
|
||||||
|
{{ object.disk }} GB
|
||||||
|
{% else %}
|
||||||
|
<span class="text-muted">—</span>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<table class="table table-hover panel-body attr-table">
|
|
||||||
<tr>
|
|
||||||
<td><i class="mdi mdi-gauge"></i> Virtual CPUs</td>
|
|
||||||
<td>{{ object.vcpus|placeholder }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><i class="mdi mdi-chip"></i> Memory</td>
|
|
||||||
<td>
|
|
||||||
{% if object.memory %}
|
|
||||||
{{ object.memory }} MB
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">—</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><i class="mdi mdi-harddisk"></i> Disk Space</td>
|
|
||||||
<td>
|
|
||||||
{% if object.disk %}
|
|
||||||
{{ object.disk }} GB
|
|
||||||
{% else %}
|
|
||||||
<span class="text-muted">—</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
{% if perms.secrets.view_secret %}
|
{% if perms.secrets.view_secret %}
|
||||||
<div class="panel panel-default">
|
<div class="card">
|
||||||
<div class="panel-heading">
|
<h5 class="card-header">
|
||||||
<strong>Secrets</strong>
|
Secrets
|
||||||
|
</h5>
|
||||||
|
<div class="card-body">
|
||||||
|
{% include 'secrets/inc/assigned_secrets.html' %}
|
||||||
</div>
|
</div>
|
||||||
{% include 'secrets/inc/assigned_secrets.html' %}
|
|
||||||
{% if perms.secrets.add_secret %}
|
{% if perms.secrets.add_secret %}
|
||||||
<div class="panel-footer text-right noprint">
|
<div class="card-footer text-end noprint">
|
||||||
<a href="{% url 'secrets:secret_add' %}?virtual_machine={{ object.pk }}&return_url={{ object.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-sm btn-primary">
|
||||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add secret
|
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Secret
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="panel panel-default">
|
<div class="card">
|
||||||
<div class="panel-heading">
|
<h5 class="card-header">
|
||||||
<strong>Services</strong>
|
Services
|
||||||
</div>
|
</h5>
|
||||||
|
<div class="card-body">
|
||||||
{% if services %}
|
{% if services %}
|
||||||
<table class="table table-hover panel-body">
|
<table class="table table-hover">
|
||||||
{% for service in services %}
|
{% for service in services %}
|
||||||
{% include 'ipam/inc/service.html' %}
|
{% include 'ipam/inc/service.html' %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="panel-body text-muted">
|
<span class="text-muted">None</span>
|
||||||
None
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
{% if perms.ipam.add_service %}
|
{% if perms.ipam.add_service %}
|
||||||
<div class="panel-footer text-right noprint">
|
<div class="card-footer text-end noprint">
|
||||||
<a href="{% url 'virtualization:virtualmachine_service_assign' virtualmachine=object.pk %}" class="btn btn-xs btn-primary">
|
<a href="{% url 'virtualization:virtualmachine_service_assign' virtualmachine=object.pk %}" class="btn btn-sm btn-primary">
|
||||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Assign service
|
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Assign Service
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -206,7 +214,6 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block javascript %}
|
{% block javascript %}
|
||||||
<script src="{% static 'js/interface_filtering.js' %}?v{{ settings.VERSION }}"></script>
|
|
||||||
<script src="{% static 'js/secrets.js' %}?v{{ settings.VERSION }}"></script>
|
<script src="{% static 'js/secrets.js' %}?v{{ settings.VERSION }}"></script>
|
||||||
<script src="{% static 'js/tableconfig.js' %}?v{{ settings.VERSION }}"></script>
|
<script src="{% static 'js/tableconfig.js' %}?v{{ settings.VERSION }}"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -5,45 +5,44 @@
|
|||||||
{% load plugins %}
|
{% load plugins %}
|
||||||
|
|
||||||
{% block breadcrumbs %}
|
{% block breadcrumbs %}
|
||||||
<li><a href="{% url 'virtualization:virtualmachine_list' %}">Virtual Machines</a></li>
|
<li class="breadcrumb-item"><a href="{% url 'virtualization:virtualmachine_list' %}">Virtual Machines</a></li>
|
||||||
<li><a href="{% url 'virtualization:virtualmachine_list' %}?cluster_id={{ object.cluster.pk }}">{{ object.cluster }}</a></li>
|
<li class="breadcrumb-item"><a href="{% url 'virtualization:virtualmachine_list' %}?cluster_id={{ object.cluster.pk }}">{{ object.cluster }}</a></li>
|
||||||
<li>{{ object }}</li>
|
<li class="breadcrumb-item">{{ object }}</li>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block buttons %}
|
{% block extra_controls %}
|
||||||
{% if perms.virtualization.add_vminterface %}
|
{% if perms.virtualization.add_vminterface %}
|
||||||
<a href="{% url 'virtualization:vminterface_add' %}?virtual_machine={{ object.pk }}&return_url={% url 'virtualization:virtualmachine_interfaces' pk=object.pk %}" class="btn btn-primary">
|
<a href="{% url 'virtualization:vminterface_add' %}?virtual_machine={{ object.pk }}&return_url={% url 'virtualization:virtualmachine_interfaces' pk=object.pk %}" class="btn btn-sm btn-primary m-1">
|
||||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Interfaces
|
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Interfaces
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ block.super }}
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block tabs %}
|
{% block tabs %}
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
<li class="nav-item" role="presentation">
|
||||||
<a href="{{ object.get_absolute_url }}">Virtual Machine</a>
|
<a class="nav-link{% if not active_tab %} active{% endif %}" href="{{ object.get_absolute_url }}">Virtual Machine</a>
|
||||||
</li>
|
</li>
|
||||||
{% with interface_count=object.interfaces.count %}
|
{% with interface_count=object.interfaces.count %}
|
||||||
{% if interface_count %}
|
{% if interface_count %}
|
||||||
<li role="presentation" {% if active_tab == 'interfaces' %} class="active"{% endif %}>
|
<li class="nav-item" role="presentation">
|
||||||
<a href="{% url 'virtualization:virtualmachine_interfaces' pk=object.pk %}">Interfaces {% badge interface_count %}</a>
|
<a class="nav-link{% if active_tab == 'interfaces' %} active{% endif %}" href="{% url 'virtualization:virtualmachine_interfaces' pk=object.pk %}">Interfaces {% badge interface_count %}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% if perms.extras.view_configcontext %}
|
{% if perms.extras.view_configcontext %}
|
||||||
<li role="presentation"{% if active_tab == 'config-context' %} class="active"{% endif %}>
|
<li class="nav-item" role="presentation">
|
||||||
<a href="{% url 'virtualization:virtualmachine_configcontext' pk=object.pk %}">Config Context</a>
|
<a class="nav-link{% if active_tab == 'config-context' %} active{% endif %}" href="{% url 'virtualization:virtualmachine_configcontext' pk=object.pk %}">Config Context</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.extras.view_journalentry %}
|
{% if perms.extras.view_journalentry %}
|
||||||
<li role="presentation"{% if active_tab == 'journal' %} class="active"{% endif %}>
|
<li class="nav-item" role="presentation">
|
||||||
<a href="{% url 'virtualization:virtualmachine_journal' pk=object.pk %}">Journal</a>
|
<a class="nav-link{% if active_tab == 'journal' %} active{% endif %}" href="{% url 'virtualization:virtualmachine_journal' pk=object.pk %}">Journal</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.extras.view_objectchange %}
|
{% if perms.extras.view_objectchange %}
|
||||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
<li class="nav-item" role="presentation">
|
||||||
<a href="{% url 'virtualization:virtualmachine_changelog' pk=object.pk %}">Change Log</a>
|
<a class="nav-link{% if active_tab == 'changelog' %} active{% endif %}" href="{% url 'virtualization:virtualmachine_changelog' pk=object.pk %}">Change Log</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -6,36 +6,38 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<form method="post">
|
<form method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div class="panel panel-default">
|
<div class="card my-3">
|
||||||
<div class="panel-heading">
|
<div class="card-header">
|
||||||
<strong>Interfaces</strong>
|
<h5>Interfaces</h5>
|
||||||
<div class="pull-right noprint">
|
<div class="float-end col-md-2 noprint">
|
||||||
{% if request.user.is_authenticated %}
|
<div class="input-group input-group-sm">
|
||||||
<button type="button" class="btn btn-default btn-xs" data-toggle="modal" data-target="#VirtualMachineVMInterfaceTable_config" title="Configure table"><i class="mdi mdi-cog"></i> Configure</button>
|
<input type="text" class="form-control interface-filter" placeholder="Filter" title="Filter text (regular expressions supported)" />
|
||||||
{% endif %}
|
{% if request.user.is_authenticated %}
|
||||||
</div>
|
<button type="button" class="btn btn-outline-dark btn-sm" data-bs-toggle="modal" data-bs-target="#VirtualMachineVMInterfaceTable_config" title="Configure Table"><i class="mdi mdi-cog"></i> Configure</button>
|
||||||
<div class="pull-right col-md-2 noprint">
|
{% endif %}
|
||||||
<input class="form-control interface-filter" type="text" placeholder="Filter" title="Filter text (regular expressions supported)" style="height: 23px" />
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% render_table interface_table 'inc/table.html' %}
|
<div class="card-body">
|
||||||
<div class="panel-footer noprint">
|
{% render_table interface_table 'inc/table.html' %}
|
||||||
|
</div>
|
||||||
|
<div class="card-footer noprint">
|
||||||
{% if perms.virtualization.change_vminterface %}
|
{% if perms.virtualization.change_vminterface %}
|
||||||
<button type="submit" name="_rename" formaction="{% url 'virtualization:vminterface_bulk_rename' %}?return_url={% url 'virtualization:virtualmachine_interfaces' pk=object.pk %}" class="btn btn-warning btn-xs">
|
<button type="submit" name="_rename" formaction="{% url 'virtualization:vminterface_bulk_rename' %}?return_url={% url 'virtualization:virtualmachine_interfaces' pk=object.pk %}" class="btn btn-warning btn-sm">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Rename
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> Rename
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" name="_edit" formaction="{% url 'virtualization:vminterface_bulk_edit' %}?virtualmachine={{ object.pk }}&return_url={% url 'virtualization:virtualmachine_interfaces' pk=object.pk %}" class="btn btn-warning btn-xs">
|
<button type="submit" name="_edit" formaction="{% url 'virtualization:vminterface_bulk_edit' %}?virtualmachine={{ object.pk }}&return_url={% url 'virtualization:virtualmachine_interfaces' pk=object.pk %}" class="btn btn-warning btn-sm">
|
||||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.virtualization.delete_vminterface %}
|
{% if perms.virtualization.delete_vminterface %}
|
||||||
<button type="submit" name="_delete" formaction="{% url 'virtualization:vminterface_bulk_delete' %}?return_url={% url 'virtualization:virtualmachine_interfaces' pk=object.pk %}" class="btn btn-danger btn-xs">
|
<button type="submit" name="_delete" formaction="{% url 'virtualization:vminterface_bulk_delete' %}?return_url={% url 'virtualization:virtualmachine_interfaces' pk=object.pk %}" class="btn btn-danger btn-sm">
|
||||||
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if perms.virtualization.add_vminterface %}
|
{% if perms.virtualization.add_vminterface %}
|
||||||
<div class="pull-right">
|
<div class="float-end">
|
||||||
<a href="{% url 'virtualization:vminterface_add' %}?virtual_machine={{ object.pk }}&return_url={% url 'virtualization:virtualmachine_interfaces' pk=object.pk %}" class="btn btn-primary btn-xs">
|
<a href="{% url 'virtualization:vminterface_add' %}?virtual_machine={{ object.pk }}&return_url={% url 'virtualization:virtualmachine_interfaces' pk=object.pk %}" class="btn btn-primary btn-sm">
|
||||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add interfaces
|
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add interfaces
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -49,6 +51,5 @@
|
|||||||
|
|
||||||
{% block javascript %}
|
{% block javascript %}
|
||||||
<script src="{% static 'js/connection_toggles.js' %}?v{{ settings.VERSION }}"></script>
|
<script src="{% static 'js/connection_toggles.js' %}?v{{ settings.VERSION }}"></script>
|
||||||
<script src="{% static 'js/interface_filtering.js' %}?v{{ settings.VERSION }}"></script>
|
|
||||||
<script src="{% static 'js/tableconfig.js' %}?v{{ settings.VERSION }}"></script>
|
<script src="{% static 'js/tableconfig.js' %}?v{{ settings.VERSION }}"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -19,7 +19,7 @@ __all__ = (
|
|||||||
|
|
||||||
VMINTERFACE_BUTTONS = """
|
VMINTERFACE_BUTTONS = """
|
||||||
{% if perms.ipam.add_ipaddress %}
|
{% if perms.ipam.add_ipaddress %}
|
||||||
<a href="{% url 'ipam:ipaddress_add' %}?vminterface={{ record.pk }}&return_url={{ virtualmachine.get_absolute_url }}" class="btn btn-xs btn-success" title="Add IP address">
|
<a href="{% url 'ipam:ipaddress_add' %}?vminterface={{ record.pk }}&return_url={{ virtualmachine.get_absolute_url }}" class="btn btn-sm btn-success" title="Add IP Address">
|
||||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i>
|
<i class="mdi mdi-plus-thick" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Reference in New Issue
Block a user