|
|
@@ -1,44 +1,10 @@
|
|
|
-{% extends 'generic/object.html' %}
|
|
|
+{% extends 'virtualization/virtualmachine/base.html' %}
|
|
|
{% load buttons %}
|
|
|
{% load custom_links %}
|
|
|
{% load static %}
|
|
|
{% load helpers %}
|
|
|
{% load plugins %}
|
|
|
|
|
|
-{% block breadcrumbs %}
|
|
|
- {% if object.cluster %}
|
|
|
- <li><a href="{{ object.cluster.get_absolute_url }}">{{ object.cluster }}</a></li>
|
|
|
- {% endif %}
|
|
|
- <li>{{ object }}</li>
|
|
|
-{% endblock %}
|
|
|
-
|
|
|
-{% block buttons %}
|
|
|
- {% if perms.virtualization.add_vminterface %}
|
|
|
- <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 %}
|
|
|
- {{ block.super }}
|
|
|
-{% endblock %}
|
|
|
-
|
|
|
-{% block tabs %}
|
|
|
- <ul class="nav nav-tabs">
|
|
|
- <li role="presentation"{% if not active_tab %} class="active"{% endif %}>
|
|
|
- <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=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=object.pk %}">Change Log</a>
|
|
|
- </li>
|
|
|
- {% endif %}
|
|
|
- </ul>
|
|
|
-{% endblock %}
|
|
|
-
|
|
|
{% block content %}
|
|
|
<div class="row">
|
|
|
<div class="col-md-6">
|
|
|
@@ -236,54 +202,6 @@
|
|
|
{% 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="{{ object.pk }}" />
|
|
|
- <div class="panel panel-default">
|
|
|
- <div class="panel-heading">
|
|
|
- <strong>Interfaces</strong>
|
|
|
- <div class="pull-right noprint">
|
|
|
- {% if request.user.is_authenticated %}
|
|
|
- <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>
|
|
|
- {% endif %}
|
|
|
- </div>
|
|
|
- <div class="pull-right col-md-2 noprint">
|
|
|
- <input class="form-control interface-filter" type="text" placeholder="Filter" title="Filter text (regular expressions supported)" style="height: 23px" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- {% include 'responsive_table.html' with table=vminterface_table %}
|
|
|
- {% 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={{ 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={{ 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={{ 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={{ 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>
|
|
|
- <div class="clearfix"></div>
|
|
|
- {% endif %}
|
|
|
- </div>
|
|
|
- {% endif %}
|
|
|
- </div>
|
|
|
- </form>
|
|
|
- {% table_config_form vminterface_table %}
|
|
|
- </div>
|
|
|
-</div>
|
|
|
{% include 'secrets/inc/private_key_modal.html' %}
|
|
|
{% endblock %}
|
|
|
|