commit
d4856d12aa
|
@ -7,6 +7,16 @@ server {
|
|||
ssl_certificate /opt/opengnsys/ogcore/etc/nginx/certs/ogcore.uds-test.net.crt.pem;
|
||||
ssl_certificate_key /opt/opengnsys/ogcore/etc/nginx/certs/ogcore.uds-test.net.key.pem;
|
||||
|
||||
location ~ ^/pcclients/([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)(/.*)?$ {
|
||||
set $target_ip $1;
|
||||
set $rest $2;
|
||||
|
||||
proxy_pass http://$target_ip$rest;
|
||||
proxy_set_header Host $target_ip;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
location /opengnsys/rest/ous// {
|
||||
rewrite ^/opengnsys/rest/ous//([0-9]+)/images /opengnsys/rest/ous/$1/images;
|
||||
rewrite ^/opengnsys/rest/ous//([0-9]+)/labs /opengnsys/rest/ous/$1/labs;
|
||||
|
|
|
@ -4,197 +4,565 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Menú de Opciones</title>
|
||||
<meta name="description" content="Panel de control de OpenGnsys">
|
||||
<title>Panel de Control - OpenGnsys</title>
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
|
||||
<style>
|
||||
.navbar {
|
||||
color: white;
|
||||
padding: 15px 30px;
|
||||
text-align: center;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
:root {
|
||||
--primary-color: #2563eb;
|
||||
--primary-light: #3b82f6;
|
||||
--secondary-color: #1e40af;
|
||||
--success-color: #059669;
|
||||
--success-light: #10b981;
|
||||
--warning-color: #d97706;
|
||||
--danger-color: #dc2626;
|
||||
--danger-light: #ef4444;
|
||||
--background-color: #f8fafc;
|
||||
--text-color: #1e293b;
|
||||
--border-radius: 0.5rem;
|
||||
--transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.navbar img {
|
||||
width: auto;
|
||||
position: absolute; /* Logo en la izquierda */
|
||||
left: 30px; /* Ajuste de la distancia desde la izquierda */
|
||||
}
|
||||
|
||||
.navbar h1 {
|
||||
* {
|
||||
margin: 0;
|
||||
font-size: 1.8em;
|
||||
}
|
||||
|
||||
.navbar a {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
padding: 5px 10px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.container {
|
||||
margin: 80px auto 0; /* Deja espacio para la barra de navegación */
|
||||
width: 90%;
|
||||
max-width: 1000px;
|
||||
text-align: center; /* Centra los elementos en navegadores básicos */
|
||||
}
|
||||
|
||||
.menu-container {
|
||||
display: block;
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 8px;
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
background-color: #f0f8ff; /* Fondo suave */
|
||||
padding: 15px;
|
||||
margin: 15px 0; /* Espaciado entre cajas */
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 5px;
|
||||
display: inline-block;
|
||||
width: 45%; /* Dos elementos por fila */
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Inter', system-ui, -apple-system, sans-serif;
|
||||
background-color: var(--background-color);
|
||||
color: var(--text-color);
|
||||
line-height: 1.5;
|
||||
background-image:
|
||||
radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.1) 0px, transparent 50%),
|
||||
radial-gradient(at 100% 100%, rgba(5, 150, 105, 0.1) 0px, transparent 50%);
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
background: #1e293b;
|
||||
padding: 2rem 2rem;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
.main-container {
|
||||
margin-top: 7rem;
|
||||
padding: 2rem;
|
||||
max-width: 1200px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.welcome-section {
|
||||
text-align: center;
|
||||
margin-bottom: 3rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.welcome-section h1 {
|
||||
font-size: 2.5rem;
|
||||
color: var(--text-color);
|
||||
margin-bottom: 1rem;
|
||||
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.menu-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
|
||||
gap: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
background: white;
|
||||
border-radius: var(--border-radius);
|
||||
padding: 2.5rem;
|
||||
transition: var(--transition);
|
||||
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
|
||||
min-height: 200px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.menu-item::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0.1;
|
||||
transition: var(--transition);
|
||||
}
|
||||
|
||||
.windows::before {
|
||||
background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
|
||||
}
|
||||
|
||||
.linux::before {
|
||||
background: linear-gradient(135deg, var(--success-color), var(--success-light));
|
||||
}
|
||||
|
||||
.apagar::before {
|
||||
background: linear-gradient(135deg, var(--danger-color), var(--danger-light));
|
||||
}
|
||||
|
||||
.menu-item:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.menu-item:hover::before {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
.menu-item a {
|
||||
font-size: 1.2em;
|
||||
color: #007bff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
color: var(--text-color);
|
||||
font-weight: 600;
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 1rem;
|
||||
padding: 1rem 2rem;
|
||||
border-radius: var(--border-radius);
|
||||
transition: var(--transition);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.menu-item i {
|
||||
font-size: 1.8rem;
|
||||
}
|
||||
|
||||
.windows i { color: var(--primary-color); }
|
||||
.linux i { color: var(--success-color); }
|
||||
.apagar i { color: var(--danger-color); }
|
||||
|
||||
.windows a:hover {
|
||||
background-color: rgba(37, 99, 235, 0.1);
|
||||
color: var(--primary-color);
|
||||
}
|
||||
.linux a:hover {
|
||||
background-color: rgba(5, 150, 105, 0.1);
|
||||
color: var(--success-color);
|
||||
}
|
||||
.apagar a:hover {
|
||||
background-color: rgba(220, 38, 38, 0.1);
|
||||
color: var(--danger-color);
|
||||
}
|
||||
|
||||
.menu-item p {
|
||||
font-size: 0.9em;
|
||||
color: #555;
|
||||
color: #64748b;
|
||||
font-size: 1rem;
|
||||
max-width: 80%;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.menu-item {
|
||||
width: 100%; /* En pantallas pequeñas, las cajas ocupan todo el ancho */
|
||||
}
|
||||
.partitions-section {
|
||||
background: white;
|
||||
border-radius: var(--border-radius);
|
||||
padding: 2rem;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
|
||||
backdrop-filter: blur(10px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.windows {
|
||||
background-color: #e0f7fa; /* Azul suave para Windows */
|
||||
}
|
||||
|
||||
.linux {
|
||||
background-color: #c8e6c9; /* Verde suave para Linux */
|
||||
}
|
||||
|
||||
.apagar {
|
||||
background-color: #ffccbc; /* Naranja suave para Apagar */
|
||||
}
|
||||
.partition-container {
|
||||
margin-top: 20px;
|
||||
padding: 20px;
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.partition-header {
|
||||
font-size: 1.5em;
|
||||
margin-bottom: 15px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.partition-item {
|
||||
.partitions-section h2 {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 1.5rem;
|
||||
color: var(--text-color);
|
||||
display: flex;
|
||||
flex-wrap: wrap; /* Permite adaptarse a pantallas pequeñas */
|
||||
align-items: center;
|
||||
text-align: left; /* Asegura que el contenido está alineado a la izquierda */
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
gap: 0.5rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.partition-item span {
|
||||
margin-right: 15px;
|
||||
font-size: 1em;
|
||||
color: #555;
|
||||
.partitions-table {
|
||||
width: 100%;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
background: white;
|
||||
border-radius: var(--border-radius);
|
||||
overflow: hidden;
|
||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.partition-link {
|
||||
font-size: 0.9em;
|
||||
color: #007bff;
|
||||
.partitions-table table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.partitions-table thead {
|
||||
background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
|
||||
color: white;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.partitions-table thead::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 2px;
|
||||
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
|
||||
}
|
||||
|
||||
.partitions-table th {
|
||||
padding: 1.25rem 1rem;
|
||||
text-align: left;
|
||||
font-weight: 600;
|
||||
font-size: 0.85rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.partitions-table th:not(:last-child)::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 25%;
|
||||
height: 50%;
|
||||
width: 1px;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.partitions-table td {
|
||||
padding: 1.25rem 1rem;
|
||||
border-bottom: 1px solid #f1f5f9;
|
||||
vertical-align: middle;
|
||||
font-weight: 500;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.partitions-table td:last-child {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.partitions-table tbody tr {
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.partitions-table tbody tr:hover {
|
||||
background: linear-gradient(135deg, #f8fafc, #f1f5f9);
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.partitions-table tbody tr:hover td {
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
|
||||
.partitions-table tbody tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.partition-boot-btn {
|
||||
background: linear-gradient(135deg, var(--success-color), var(--success-light));
|
||||
color: white;
|
||||
padding: 0.75rem 1.25rem;
|
||||
border-radius: 25px;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
font-weight: 600;
|
||||
font-size: 0.85rem;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.partition-link:hover {
|
||||
text-decoration: underline;
|
||||
color: #0056b3;
|
||||
.partition-boot-btn::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
|
||||
transition: left 0.5s;
|
||||
}
|
||||
|
||||
.partition-boot-btn:hover {
|
||||
background: linear-gradient(135deg, var(--success-light), var(--success-color));
|
||||
transform: translateY(-3px);
|
||||
box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
|
||||
}
|
||||
|
||||
.partition-boot-btn:hover::before {
|
||||
left: 100%;
|
||||
}
|
||||
|
||||
.partition-boot-btn i {
|
||||
font-size: 0.9rem;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.partition-boot-btn:hover i {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.no-partitions {
|
||||
text-align: center;
|
||||
padding: 3rem 2rem;
|
||||
color: #64748b;
|
||||
font-style: italic;
|
||||
background: linear-gradient(135deg, #f8fafc, #f1f5f9);
|
||||
border-radius: var(--border-radius);
|
||||
border: 2px dashed #cbd5e1;
|
||||
}
|
||||
|
||||
/* Estados especiales para diferentes tipos de particiones */
|
||||
.partition-os {
|
||||
font-weight: 600;
|
||||
color: var(--success-color);
|
||||
}
|
||||
|
||||
.partition-no-os {
|
||||
color: #94a3b8;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.partition-size {
|
||||
font-family: 'Monaco', 'Menlo', monospace;
|
||||
color: var(--primary-color);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.partition-type {
|
||||
text-transform: uppercase;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
padding: 0.25rem 0.75rem;
|
||||
border-radius: 12px;
|
||||
background: #f1f5f9;
|
||||
color: #475569;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.partition-item {
|
||||
flex-direction: column;
|
||||
.main-container {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.partition-item span {
|
||||
margin-bottom: 5px;
|
||||
.menu-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.partition-link {
|
||||
margin-top: 10px;
|
||||
.partitions-table {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.partitions-table th,
|
||||
.partitions-table td {
|
||||
padding: 0.75rem 0.5rem;
|
||||
}
|
||||
|
||||
.partition-boot-btn {
|
||||
padding: 0.6rem 1rem;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Barra de navegación superior -->
|
||||
<div class="navbar">
|
||||
<img src="{{ asset('assets/img.png') }}" alt="Logo">
|
||||
</div>
|
||||
<nav class="navbar" role="navigation" aria-label="Navegación principal">
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
<div class="menu-container">
|
||||
<h1>Bienvenido {{ ip }}</h1>
|
||||
<div class="menu-item windows">
|
||||
<a href="command+confirm:restoreImage REPO windows 1 1">Instalar Windows</a>
|
||||
<p>El proceso de instalación tardará unos minutos.</p>
|
||||
</div>
|
||||
<div class="menu-item linux">
|
||||
<a href="command+output+confirm:restoreImage REPO linux 1 2">Instalar GNU/Linux</a>
|
||||
<p>El proceso de instalación tardará unos minutos.</p>
|
||||
</div>
|
||||
<main class="main-container">
|
||||
<section class="welcome-section">
|
||||
<img src="{{ asset('assets/img.png') }}" alt="Logo OpenGnsys">
|
||||
<h1>Bienvenido {{ ip }}</h1>
|
||||
</section>
|
||||
|
||||
<div class="menu-item apagar">
|
||||
<a href="command:poweroff">Apagar</a>
|
||||
<p>Apagar el ordenador.</p>
|
||||
</div>
|
||||
<div class="menu-item apagar">
|
||||
<a href="command:reboot">Reiniciar</a>
|
||||
<p>Reiniciar el ordenador.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="partition-container">
|
||||
<h2 class="partition-header">Particiones del sistema</h2>
|
||||
{% if partitions|length > 0 %}
|
||||
{% for partition in partitions %}
|
||||
<div class="partition-item">
|
||||
<span><strong>Disco:</strong> {{ partition.diskNumber }} </span>
|
||||
<span><strong>Partición:</strong> {{ partition.partitionNumber }}</span>
|
||||
<span>Tamaño: {{ (partition.size / 1024)|number_format(2) }} MB</span>
|
||||
<span>Tipo: {{ partition.filesystem }}</span>
|
||||
<span><strong>SO:</strong> {{ partition.operativeSystem ? partition.operativeSystem.name : '-' }}</span>
|
||||
{% if partition.operativeSystem %}
|
||||
<a href="command+output:/opt/opengnsys/scripts/bootOs.py {{ partition.diskNumber }} {{ partition.partitionNumber }}" class="partition-link">Arrancar {{ partition.operativeSystem.name }}</a>
|
||||
{% endif %}
|
||||
<section class="menu-grid">
|
||||
<article class="menu-item windows">
|
||||
<a href="command+confirm:restoreImage REPO windows 1 1">
|
||||
<i class="fab fa-windows"></i>
|
||||
Instalar Windows
|
||||
</a>
|
||||
<p>El proceso de instalación tardará unos minutos.</p>
|
||||
</article>
|
||||
|
||||
<article class="menu-item linux">
|
||||
<a href="command+output+confirm:restoreImage REPO linux 1 2">
|
||||
<i class="fab fa-linux"></i>
|
||||
Instalar GNU/Linux
|
||||
</a>
|
||||
<p>El proceso de instalación tardará unos minutos.</p>
|
||||
</article>
|
||||
|
||||
<article class="menu-item apagar">
|
||||
<a href="command:poweroff">
|
||||
<i class="fas fa-power-off"></i>
|
||||
Apagar
|
||||
</a>
|
||||
<p>Apagar el ordenador.</p>
|
||||
</article>
|
||||
|
||||
<article class="menu-item apagar">
|
||||
<a href="command:reboot">
|
||||
<i class="fas fa-sync"></i>
|
||||
Reiniciar
|
||||
</a>
|
||||
<p>Reiniciar el ordenador.</p>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<section class="partitions-section">
|
||||
<h2><i class="fas fa-hdd"></i> Particiones del sistema</h2>
|
||||
|
||||
<!-- VERSIÓN CON DATOS SIMULADOS PARA VISUALIZACIÓN -->
|
||||
<div class="partitions-table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Disco</th>
|
||||
<th>Partición</th>
|
||||
<th>Tamaño</th>
|
||||
<th>Tipo</th>
|
||||
<th>SO</th>
|
||||
<th>Acciones</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>sda</strong></td>
|
||||
<td><span class="partition-type">1</span></td>
|
||||
<td class="partition-size">512.00 MB</td>
|
||||
<td><span class="partition-type">ext4</span></td>
|
||||
<td class="partition-os">Ubuntu 22.04</td>
|
||||
<td>
|
||||
<a href="command+output:/opt/opengnsys/scripts/bootOs.py sda 1"
|
||||
class="partition-boot-btn"
|
||||
role="button">
|
||||
<i class="fas fa-play"></i>
|
||||
Arrancar Ubuntu 22.04
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>sda</strong></td>
|
||||
<td><span class="partition-type">2</span></td>
|
||||
<td class="partition-size">1024.00 MB</td>
|
||||
<td><span class="partition-type">ntfs</span></td>
|
||||
<td class="partition-os">Windows 11</td>
|
||||
<td>
|
||||
<a href="command+output:/opt/opengnsys/scripts/bootOs.py sda 2"
|
||||
class="partition-boot-btn"
|
||||
role="button">
|
||||
<i class="fas fa-play"></i>
|
||||
Arrancar Windows 11
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>sda</strong></td>
|
||||
<td><span class="partition-type">3</span></td>
|
||||
<td class="partition-size">256.00 MB</td>
|
||||
<td><span class="partition-type">swap</span></td>
|
||||
<td class="partition-no-os">-</td>
|
||||
<td>
|
||||
<!-- Sin botón porque no tiene SO -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>sdb</strong></td>
|
||||
<td><span class="partition-type">1</span></td>
|
||||
<td class="partition-size">2048.00 MB</td>
|
||||
<td><span class="partition-type">ext4</span></td>
|
||||
<td class="partition-os">Debian 12</td>
|
||||
<td>
|
||||
<a href="command+output:/opt/opengnsys/scripts/bootOs.py sdb 1"
|
||||
class="partition-boot-btn"
|
||||
role="button">
|
||||
<i class="fas fa-play"></i>
|
||||
Arrancar Debian 12
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>sdb</strong></td>
|
||||
<td><span class="partition-type">2</span></td>
|
||||
<td class="partition-size">512.00 MB</td>
|
||||
<td><span class="partition-type">fat32</span></td>
|
||||
<td class="partition-no-os">-</td>
|
||||
<td>
|
||||
<!-- Sin botón porque no tiene SO -->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- VERSIÓN ORIGINAL (COMENTADA) -->
|
||||
{#
|
||||
{% if partitions|length > 0 %}
|
||||
<div class="partitions-table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Disco</th>
|
||||
<th>Partición</th>
|
||||
<th>Tamaño</th>
|
||||
<th>Tipo</th>
|
||||
<th>SO</th>
|
||||
<th>Acciones</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for partition in partitions %}
|
||||
<tr>
|
||||
<td>{{ partition.diskNumber }}</td>
|
||||
<td>{{ partition.partitionNumber }}</td>
|
||||
<td>{{ (partition.size / 1024)|number_format(2) }} MB</td>
|
||||
<td>{{ partition.filesystem }}</td>
|
||||
<td>{{ partition.operativeSystem ? partition.operativeSystem.name : '-' }}</td>
|
||||
<td>
|
||||
{% if partition.operativeSystem %}
|
||||
<a href="command+output:/opt/opengnsys/scripts/bootOs.py {{ partition.diskNumber }} {{ partition.partitionNumber }}"
|
||||
class="partition-boot-btn"
|
||||
role="button">
|
||||
<i class="fas fa-play"></i>
|
||||
Arrancar {{ partition.operativeSystem.name }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<p>No hay particiones disponibles.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="no-partitions">No hay particiones disponibles.</p>
|
||||
{% endif %}
|
||||
#}
|
||||
</section>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue