Adding Network and Small corrections
This commit is contained in:
36
templates/createnet.html
Normal file
36
templates/createnet.html
Normal file
@@ -0,0 +1,36 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% block content %}
|
||||
{% include 'menu.html' %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa-solid fa-ethernet"></i> - Build Network
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<form action="/createint" method="post">
|
||||
<label for="net_name">Network name (no space)</label>
|
||||
<input type="text" id="net_name" name="net_name" class="form-control" placeholder="no_net" required><br>
|
||||
<label for="net_int">Interface name (no space)</label>
|
||||
<input type="text" id="net_int" name="net_int" class="form-control" placeholder="example veth0" required><br>
|
||||
<label for="ip_int">Interface IP</label>
|
||||
<input type="text" id="ip_int" name="ip_int" class="form-control" placeholder="example: 10.2.0.1" required><br>
|
||||
<label for="mask_int">Interface mask</label>
|
||||
<input type="text" id="mask_int" name="mask_int" class="form-control" placeholder="example: 255.255.255.0" required><br>
|
||||
<strong>DHCP Configuration</strong>
|
||||
<label for="min_dhcp">DHCP minimum IP</label>
|
||||
<input type="text" id="min_dhcp" name="min_dhcp" class="form-control" placeholder="example: 10.2.0.2" required><br>
|
||||
<label for="max_dhcp">DHCP maximum IP</label>
|
||||
<input type="text" id="max_dhcp" name="max_dhcp" class="form-control" placeholder="example: 10.2.0.254" required><br>
|
||||
<button name="creation" class="btn btn-outline-secondary btn-hype" type="submit" onclick="loading();">Create</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
{% endblock %}
|
||||
36
templates/edit_lxc.html
Normal file
36
templates/edit_lxc.html
Normal file
@@ -0,0 +1,36 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% block content %}
|
||||
{% include 'menu.html' %}
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
Ressources of {{ lxc_name }}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<i class="fa-solid fa-microchip"></i> vCPU : {{ max_vCPU }}</br></br>
|
||||
<i class="fa-solid fa-memory"></i> Memory: {{ actual_ram }}</br></br>
|
||||
<i class="fa-solid fa-memory"></i> Max Memory: {{ max_Mermory }}</br></br>
|
||||
<i class="fa-solid fa-memory"></i> Swap: {{ max_swap }}</br></br>
|
||||
</div>
|
||||
|
||||
<div class="col-sm">
|
||||
<form action="/editressourceslxc" method="post">
|
||||
<input type="hidden" name="lxc_name" value="{{ lxc_name }}"></input>
|
||||
<table><tr><td>CPU :</td><td><input type="text" name="new_cpu" class="form-control form-control-sm" placeholder="{{ max_vCPU }}" value="{{ max_vCPU }}" ></input></td></tr></table><br>
|
||||
<table><tr><td>Memory :</td><td><input type="text" name="new_mem" class="form-control form-control-sm" placeholder="{{ actual_ram }}" value="{{ actual_ram }}" ></input></td></tr></table><br>
|
||||
<table><tr><td>Max Memory :</td><td><input type="text" name="new_max_mem" class="form-control form-control-sm" placeholder="{{ max_Mermory }}" value="{{ max_Mermory }}" ></input></td></tr></table><br>
|
||||
<table><tr><td>Swap :</td><td><input type="text" name="new_max_swap" class="form-control form-control-sm" placeholder="{{ max_swap }}" value="{{ max_swap }}" ></input></td></tr></table><br>
|
||||
<br><br>
|
||||
<button type="submit" class="btn btn-outline-warning btn-hype"><i class="fa-solid fa-pencil"></i></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -22,6 +22,9 @@
|
||||
<li class="nav-link">
|
||||
<a class="nav-link text-body text-decoration-none fw-light" href="/pool"><i class="fa-solid fa-hard-drive"></i> Pools</a>
|
||||
</li>
|
||||
<li class="nav-link">
|
||||
<a class="nav-link text-body text-decoration-none fw-light" href="/network"><i class="fa-solid fa-network-wired"></i> Network</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
51
templates/network.html
Normal file
51
templates/network.html
Normal file
@@ -0,0 +1,51 @@
|
||||
{% 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">
|
||||
<strong><i class="fa-solid fa-ethernet"></i> {{ item[0] }}</strong>
|
||||
<form action="/delnet" method="post">
|
||||
<input type="hidden" id="net_del" name="net_del" class="form-control" value="{{ item[0] }}">
|
||||
<button name="delete" class="btn btn-outline-secondary" type="submit" onclick="loading();">Delete</button>
|
||||
</form><br>
|
||||
<ul class="list-group">
|
||||
{% for sub_item in item[1] %}
|
||||
<li class="list-group-item bg-warning text-dark">
|
||||
<i class="fa-solid fa-desktop"></i> {{ sub_item }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</center>
|
||||
{% endblock %}
|
||||
56
templates/network.html.ori
Normal file
56
templates/network.html.ori
Normal file
@@ -0,0 +1,56 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% block content %}
|
||||
{% include 'menu.html' %}
|
||||
<!--
|
||||
<div class="container">
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item bg-primary text-dark">
|
||||
Physical interface
|
||||
<center>
|
||||
{% for pint in net_hard_int %}
|
||||
<strong><i class="fa-solid fa-ethernet"></i> {{ pint }}</strong><br>
|
||||
{% endfor %}
|
||||
</center></li>
|
||||
{% for item in net_tree %}
|
||||
<li class="list-group-item bg-info text-dark">
|
||||
<center><strong><i class="fa-solid fa-ethernet"></i> {{ item[0] }}</strong></center><br>
|
||||
<ul class="list-group">
|
||||
{% for sub_item in item[1] %}
|
||||
<li class="list-group-item bg-warning text-dark">
|
||||
<center><i class="fa-solid fa-desktop"></i> {{ sub_item }}</center>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<div class="container">
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col">
|
||||
{% for pint in net_hard_int %}
|
||||
<strong><i class="fa-solid fa-ethernet"></i> {{ pint }}</strong><br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col">
|
||||
<div class="mermaid">
|
||||
graph TD
|
||||
{% for item in net_tree %}
|
||||
root[Root] --- {{ item[0] }}[{{ item[0] }}]
|
||||
{% for sub_item in item[1] %}
|
||||
{{ item[0] }}[{{ item[0] }}] --- {{ sub_item }}[{{ sub_item }}]
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>mermaid.initialize({startOnLoad:true});</script>
|
||||
{% endblock %}
|
||||
@@ -20,6 +20,8 @@
|
||||
</td><td>
|
||||
<form action="/snaplxc" method="post"><button type="submit" class="btn btn-outline-secondary btn-hype disabled" value="{{ act_lxc[0] }}" name="snap" onclick="loading();"><i class="fa-solid fa-box-archive"></i></button></form>
|
||||
</td><td>
|
||||
<form action="/editlxc" method="post"><button type="submit" class="btn btn-outline-warning btn-hype" value="{{ act_lxc[0] }}" name="edit" onclick="loading();"><i class="fa-solid fa-wrench"></i></button></form>
|
||||
|
||||
</td><td>
|
||||
</td><td>
|
||||
{{act_lxc[1]}}
|
||||
@@ -42,6 +44,7 @@
|
||||
</td><td>
|
||||
<form action="/snaplxc" method="post"><button type="submit" class="btn btn-outline-secondary btn-hype" value="{{ inact_lxc }}" name="snap" onclick="loading();"><i class="fa-solid fa-box-archive"></i></button></form>
|
||||
</td><td>
|
||||
<form action="/editlxc" method="post"><button type="submit" class="btn btn-outline-warning btn-hype" value="{{ inact_lxc }}" name="edit" onclick="loading();"><i class="fa-solid fa-wrench"></i></button></form>
|
||||
</td><td>
|
||||
</td><td> -
|
||||
</td></tr>
|
||||
@@ -99,7 +102,8 @@
|
||||
</td><td>
|
||||
<form action="/snapvm" method="post"><button type="submit" class="btn btn-outline-secondary btn-hype" value="{{ inact_vm[0] }}" name="snap" onclick="loading();"><i class="fa-solid fa-box-archive"></i></button></form>
|
||||
</td><td>
|
||||
<form action="/editvm" method="post"><button type="submit" class="btn btn-outline-warning btn-hype disabled" value="{{ inact_vm[0] }}" name="edit" onclick="loading();"><i class="fa-solid fa-wrench"></i></button></form>
|
||||
<form action="/editvm" method="post"><button type="submit" class="btn btn-outline-warning btn-hype" value="{{ inact_vm[0] }}" name="edit" onclick="loading();"><i class="fa-solid fa-wrench"></i></button></form>
|
||||
<!-- <form action="/editvm" method="post"><button type="submit" class="btn btn-outline-warning btn-hype disabled" value="{{ inact_vm[0] }}" name="edit" onclick="loading();"><i class="fa-solid fa-wrench"></i></button></form> -->
|
||||
</td><td>
|
||||
{% if inact_vm[1] == 1 %}
|
||||
<table class="table table-borderless"><tr><th>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% block content %}
|
||||
{% include 'menu.html' %}
|
||||
<a href="/ter" target="_blank"><i class="fa-solid fa-expand"></i></a></br>
|
||||
|
||||
<center><a href="/ter" target="_blank" class="btn btn-outline-info"> Full screen <i class="fa-solid fa-expand"></i></a></br>
|
||||
<br>
|
||||
<iframe src="/ter" height=768px width=1024px class="embed-responsive-item" allowfullscreen></iframe>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user