Hype-2/templates/network.html

70 lines
3.6 KiB
HTML

{% extends 'layout.html' %}
{% block content %}
{% include 'menu.html' %}
<center>
<a href="/createnet" class="btn btn-outline-danger"><i class="fa-solid fa-plus"></i> Add Network</a></br></br></br>
<div class="container">
Physical Interfaces:
<div class="row justify-content-md-center">
<div class="col-md-6">
<ul class="list-group">
<li class="list-group-item bg-primary text-dark">
{% for pint in net_hard_int %}
<strong><i class="fa-solid fa-ethernet"></i> {{ pint }}</strong><br>
{% endfor %}
</li>
</ul>
</div>
</div>
</div></br>
<div class="container">
Virtual Interfaces:
<div class="row justify-content-md-center">
<div class="col-md-6">
<ul class="list-group">
{% for noac in net_na %}
<li class="list-group-item bg-secondary text-dark">
<strong><i class="fa-solid fa-ethernet"></i> {{ noac }} Not active</strong><br>
</li>
{% endfor %}
{% for item in net_tree %}
<li class="list-group-item bg-info text-dark">
<table class="table table-sm text-dark table-borderless"><tr><td>
<strong><i class="fa-solid fa-network-wired"></i> {{ item[0][0][0] }} - <i class="fa-solid fa-ethernet"></i> {{ item[0][0][1] }} - {{ item[0][0][2] }}</strong>
</td><td>
<form action="/delnet" method="post">
<input type="hidden" id="net_del" name="net_del" class="form-control" value="{{ item[0][0][0] }}">
<button name="delete" class="btn btn-outline-danger btn-sm" type="submit" onclick="loading();"><i class="fa fa-trash" aria-hidden="true"></i></button>
</form>
</td></tr></table>
<ul class="list-group">
{% for sub_item in item[1] %}
<li class="list-group-item bg-warning text-dark">
<p class="text-start"><i class="fa-solid fa-desktop"></i> {{ sub_item[0] }}<br></p>
{% for pitem in sub_item[1] %}
<table class="table table-sm text-dark table-responsive table-borderless"><tr><td>
<center><i class="fa-solid fa-ethernet"></i> {{ pitem[0] }} - <i class="fa-solid fa-at"></i> {{ pitem[1] }} - {{ pitem[2] }}<br></center>
</td><td>
</td><td>
<form action="/delnetvm" method="post">
<input type="hidden" id="vm_name" name="vm_name" class="form-control" value="{{ sub_item[0] }}">
<input type="hidden" id="del_net_vm" name="del_net_vm" class="form-control" value="{{ item[0][0][0] }}">
<input type="hidden" id="del_mac_vm" name="del_mac_vm" class="form-control" value="{{ pitem[1] }}">
<input type="hidden" id="del_net_int" name="del_net_int" class="form-control" value="{{ item[0][0][1] }}">
<button name="delete" class="btn btn-outline-danger btn-sm" type="submit" onclick="loading();"><i class="fa fa-trash" aria-hidden="true"></i></button>
</form>
</td></tr></table>
{% endfor %}
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</center>
{% endblock %}