1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-26 08:05:22 +00:00
webvirtcloud/interfaces/templates/interfaces.html

103 lines
4.5 KiB
HTML
Raw Normal View History

2015-03-03 14:53:10 +00:00
{% extends "base.html" %}
{% load i18n %}
2015-04-06 07:51:50 +00:00
{% load staticfiles %}
2015-03-03 14:53:10 +00:00
{% block title %}{% trans "Interfaces" %} - {{ compute.name }}{% endblock %}
{% block content %}
2020-05-19 16:53:54 +00:00
<!-- Page Heading -->
2019-07-31 08:03:48 +00:00
<div class="row">
<div class="col-lg-12">
{% include 'create_iface_block.html' %}
2020-05-19 16:53:54 +00:00
<h2 class="page-header">{{ compute.name }}</h2>
<nav aria-label="breadcrumb">
<ol class="breadcrumb bg-light shadow-sm">
<li class="breadcrumb-item active">
<a href="{% url 'overview' compute.id %}"><i class="fa fa-dashboard"></i> {% trans "Overview" %}</a>
2019-07-31 08:03:48 +00:00
</li>
2020-05-19 16:53:54 +00:00
<li class="breadcrumb-item">
<a href="{% url 'instances' compute.id %}"><i class="fa fa-server"></i> {% trans "Instances" %}</a>
2019-07-31 08:03:48 +00:00
</li>
2020-05-19 16:53:54 +00:00
<li class="breadcrumb-item">
<a href="{% url 'storages' compute.id %}"><i class="fa fa-hdd-o"></i> {% trans "Storages" %}</a>
2019-07-31 08:03:48 +00:00
</li>
2020-05-19 16:53:54 +00:00
<li class="breadcrumb-item">
<a href="{% url 'networks' compute.id %}"><i class="fa fa-sitemap"></i> {% trans "Networks" %}</a>
2019-07-31 08:03:48 +00:00
</li>
2020-05-19 16:53:54 +00:00
<li class="breadcrumb-item">
<span class="font-weight-bold"><i class="fa fa-wifi"></i> {% trans "Interfaces" %}</span>
2019-07-31 08:03:48 +00:00
</li>
2020-05-19 16:53:54 +00:00
<li class="breadcrumb-item">
<a href="{% url 'nwfilters' compute.id %}"><i class="fa fa-filter"></i> {% trans "NWFilters" %}</a>
2019-07-31 08:03:48 +00:00
</li>
2020-05-19 16:53:54 +00:00
<li class="breadcrumb-item">
<a href="{% url 'secrets' compute.id %}"><i class="fa fa-key"></i> {% trans "Secrets" %}</a>
2019-07-31 08:03:48 +00:00
</li>
</ol>
2020-05-19 16:53:54 +00:00
</nav>
2019-07-31 08:03:48 +00:00
</div>
</div>
<!-- /.row -->
2015-03-03 14:53:10 +00:00
2019-07-31 08:03:48 +00:00
{% include 'errors_block.html' %}
2015-03-03 14:53:10 +00:00
2019-07-31 08:03:48 +00:00
<div class="row">
{% if not ifaces_all %}
<div class="col-lg-12">
<div class="alert alert-warning alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
2020-05-19 16:53:54 +00:00
<i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any Interfaces" %}
2019-07-31 08:03:48 +00:00
</div>
</div>
{% else %}
{% for iface in ifaces_all %}
2020-05-19 16:53:54 +00:00
<div class="col-12 col-sm-4">
<div class="mb-3 card {% if iface.state == 1 %}border-success{% else %}border-danger{% endif %} shadow-sm">
<div class="card-header {% if iface.state == 1 %}bg-success{% else %}bg-danger{% endif %}">
2020-05-19 16:53:54 +00:00
<h6 class="my-0 card-title">
<a class="card-link text-light" href="{% url 'interface' compute.id iface.name %}">{{ iface.name }}</a>
</h6>
2015-03-05 09:55:15 +00:00
</div>
2020-05-19 16:53:54 +00:00
<div class="pl-0 pr-0 card-body">
2019-07-31 08:03:48 +00:00
<div class="row">
2020-05-19 16:53:54 +00:00
<div class="col-4 col-sm-5">
<p><strong>{% trans "Type" %}:</strong></p>
<p><strong>{% trans "MAC" %}:</strong></p>
2015-03-04 13:43:29 +00:00
</div>
2020-05-19 16:53:54 +00:00
<div class="col-6 col-sm-7">
2019-07-31 08:03:48 +00:00
<p>{{ iface.type }}</p>
<p>{{ iface.mac }}</p>
2015-03-04 13:43:29 +00:00
</div>
</div>
</div>
2019-07-31 08:03:48 +00:00
</div>
</div>
{% endfor %}
{% endif %}
</div>
2015-03-06 11:59:27 +00:00
{% endblock %}
{% block script %}
2015-04-06 07:51:50 +00:00
<script>
$(document).ready(function () {
$('#itype').change(function (eventObject) {
if ($(this).val() == 'bridge') {
$('.bridge_name_form_group').show();
} else {
$('.bridge_name_form_group').hide();
}
}).change();
$('#ipv4').change(function (eventObject) {
if ($(this).val() == 'static') {
$('.static_ipv4_form_group').show();
} else {
$('.static_ipv4_form_group').hide();
}
}).change();
$('#ipv6').change(function (eventObject) {
if ($(this).val() == 'static') {
$('.static_ipv6_form_group').show();
} else {
$('.static_ipv6_form_group').hide();
}
}).change();
});
</script>
2015-03-03 14:53:10 +00:00
{% endblock %}