1941 lines
98 KiB
HTML
1941 lines
98 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="es">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0">
|
|
<meta name="description" content="a2host - Panel Web de Gestión Dinámica de Subdominios Apache2 en elingejose.com">
|
|
<meta name="theme-color" content="#080c08">
|
|
<title>a2host — Subdomain Orchestrator | elingejose.com</title>
|
|
<link rel="stylesheet" href="/css/main.css">
|
|
<link rel="stylesheet" href="/css/components.css">
|
|
</head>
|
|
<body>
|
|
<!-- Ambient Glow Blobs de Fondo -->
|
|
<div class="ambient-glow-wrapper" aria-hidden="true">
|
|
<div class="ambient-blob ambient-blob-1"></div>
|
|
<div class="ambient-blob ambient-blob-2"></div>
|
|
<div class="ambient-blob ambient-blob-3"></div>
|
|
</div>
|
|
|
|
<div class="app-shell">
|
|
<!-- Top Header & Telemetría en Vivo -->
|
|
<header class="top-header">
|
|
<div class="header-inner">
|
|
<!-- Logo y Branding -->
|
|
<a href="/" class="brand-section" aria-label="Ir al inicio de a2host">
|
|
<div class="brand-logo-icon" aria-hidden="true">
|
|
<svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" stroke-width="2.2">
|
|
<rect x="2" y="3" width="20" height="14" rx="2"></rect>
|
|
<path stroke-linecap="round" d="M8 21h8M12 17v4"></path>
|
|
<circle cx="6" cy="7" r="1" fill="currentColor"></circle>
|
|
<circle cx="9" cy="7" r="1" fill="currentColor"></circle>
|
|
<circle cx="12" cy="7" r="1" fill="currentColor"></circle>
|
|
</svg>
|
|
</div>
|
|
<div class="brand-info">
|
|
<div class="brand-title-wrap">
|
|
<span class="brand-name">a2host</span>
|
|
<span class="brand-version">v1.0</span>
|
|
</div>
|
|
<span class="brand-subdomain">elingejose.com</span>
|
|
</div>
|
|
</a>
|
|
|
|
<!-- Barra de Telemetría del VPS (RAM PM2, Apache, Host) -->
|
|
<div class="telemetry-bar">
|
|
<!-- Widget RAM PM2 con Barra de Progreso contra límite de 120MB -->
|
|
<div class="telemetry-card" title="Uso de memoria RSS del proceso PM2 frente al límite estricto de 120 MB">
|
|
<svg class="telemetry-icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2">
|
|
<rect x="3" y="4" width="14" height="12" rx="2"></rect>
|
|
<path stroke-linecap="round" d="M6 2v2M14 2v2M6 16v2M14 16v2"></path>
|
|
</svg>
|
|
<div class="telemetry-details">
|
|
<span class="telemetry-label">RAM PM2</span>
|
|
<div class="telemetry-value-wrap">
|
|
<span id="ram-usage-text" class="telemetry-value tabular-nums">-- MB / 120 MB</span>
|
|
<div class="ram-bar-container" aria-label="Barra de uso de memoria PM2">
|
|
<div id="ram-bar-fill" class="ram-bar-fill"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Widget Estado de Apache2 (Pulsante) -->
|
|
<div class="telemetry-card" title="Estado operativo del servidor web Apache2">
|
|
<div id="apache-status-dot" class="status-pulsing-dot" aria-hidden="true"></div>
|
|
<div class="telemetry-details">
|
|
<span class="telemetry-label">Servidor Web</span>
|
|
<span id="apache-status-text" class="telemetry-value">Apache2...</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Widget Sistema & Host -->
|
|
<div class="telemetry-card" title="Hostname y tiempo activo del VPS">
|
|
<svg class="telemetry-icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2">
|
|
<circle cx="10" cy="10" r="7"></circle>
|
|
<path stroke-linecap="round" d="M10 6v4l2.5 2.5"></path>
|
|
</svg>
|
|
<div class="telemetry-details">
|
|
<span class="telemetry-label">Host / Uptime</span>
|
|
<span id="system-uptime-text" class="telemetry-value tabular-nums">vps-jose</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Perfil del Operador y Logout -->
|
|
<div class="user-menu-section">
|
|
<div class="user-badge">
|
|
<span id="user-full-name" style="font-weight: 600;">Usuario</span>
|
|
<span id="user-role-badge" class="user-role-tag role-admin">admin</span>
|
|
</div>
|
|
<button type="button" id="btn-logout" class="btn-logout" title="Cerrar Sesión" aria-label="Cerrar sesión">
|
|
<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M13 3h3a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-3M8 14l4-4-4-4M12 10H3"></path>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- Contenedor Principal -->
|
|
<main class="main-container">
|
|
<!-- Navegación por Pestañas Accesibles -->
|
|
<nav class="tabs-nav-container" aria-label="Pestañas principales">
|
|
<ul class="tabs-list" role="tablist">
|
|
<li role="presentation">
|
|
<button type="button" class="tab-btn active" role="tab" id="tab-btn-subdomains" aria-selected="true" aria-controls="tab-panel-subdomains" data-tab="subdomains">
|
|
<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
<circle cx="10" cy="10" r="8"></circle>
|
|
<path stroke-linecap="round" d="M2 10h16M10 2a14 14 0 0 1 0 16M10 2a14 14 0 0 0 0 16"></path>
|
|
</svg>
|
|
<span>🌐 Subdominios</span>
|
|
<span id="subdomains-count-badge" class="tab-badge tabular-nums">0</span>
|
|
</button>
|
|
</li>
|
|
<li role="presentation">
|
|
<button type="button" class="tab-btn" role="tab" id="tab-btn-projects" aria-selected="false" aria-controls="tab-panel-projects" data-tab="projects">
|
|
<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3 7l7-4 7 4-7 4-7-4zM3 13l7 4 7-4M3 10l7 4 7-4"></path>
|
|
</svg>
|
|
<span>📦 Proyectos</span>
|
|
<span id="projects-count-badge" class="tab-badge tabular-nums">0</span>
|
|
</button>
|
|
</li>
|
|
<li role="presentation">
|
|
<button type="button" class="tab-btn" role="tab" id="tab-btn-folders" aria-selected="false" aria-controls="tab-panel-folders" data-tab="folders">
|
|
<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3 4a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-6l-2-2H3z"></path>
|
|
</svg>
|
|
<span>📁 Carpetas Web</span>
|
|
<span id="folders-count-badge" class="tab-badge tabular-nums">0</span>
|
|
</button>
|
|
</li>
|
|
<li role="presentation">
|
|
<button type="button" class="tab-btn" role="tab" id="tab-btn-ftp" aria-selected="false" aria-controls="tab-panel-ftp" data-tab="ftp">
|
|
<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M12 2a8 8 0 0 0-8 8c0 3 1.5 5.5 3.5 7M8 12a4 4 0 0 1 8 0M10 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"></path>
|
|
</svg>
|
|
<span>📡 Gestión FTP</span>
|
|
</button>
|
|
</li>
|
|
<li role="presentation">
|
|
<button type="button" class="tab-btn" role="tab" id="tab-btn-terminal" aria-selected="false" aria-controls="tab-panel-terminal" data-tab="terminal">
|
|
<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
<polyline points="4 17 10 11 4 5"></polyline>
|
|
<line x1="12" y1="19" x2="20" y2="19"></line>
|
|
</svg>
|
|
<span>🖥️ Terminal</span>
|
|
</button>
|
|
</li>
|
|
<li role="presentation">
|
|
<button type="button" class="tab-btn" role="tab" id="tab-btn-monitor" aria-selected="false" aria-controls="tab-panel-monitor" data-tab="monitor">
|
|
<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3 3v14a1 1 0 0 0 1 1h13"></path>
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="m18 8-5 5-4-4-4 4"></path>
|
|
</svg>
|
|
<span>📊 Monitor</span>
|
|
</button>
|
|
</li>
|
|
<li role="presentation">
|
|
<button type="button" class="tab-btn" role="tab" id="tab-btn-docs" aria-selected="false" aria-controls="tab-panel-docs" data-tab="docs">
|
|
<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M4 3h10a2 2 0 0 1 2 2v12a1 1 0 0 1-1.5.86L10 15l-4.5 2.86A1 1 0 0 1 4 17V3z"></path>
|
|
</svg>
|
|
<span>📚 Docs</span>
|
|
</button>
|
|
</li>
|
|
<li role="presentation">
|
|
<button type="button" class="tab-btn" role="tab" id="tab-btn-settings" aria-selected="false" aria-controls="tab-panel-settings" data-tab="settings">
|
|
<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
<circle cx="10" cy="10" r="3"></circle>
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path>
|
|
</svg>
|
|
<span>⚙️ Configuraciones</span>
|
|
</button>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
|
|
<!-- =====================================================================
|
|
Pestaña 1: Subdominios
|
|
===================================================================== -->
|
|
<section id="tab-panel-subdomains" class="tab-panel active" role="tabpanel" aria-labelledby="tab-btn-subdomains">
|
|
<!-- Toolbar: Búsqueda, Filtros y Creación -->
|
|
<div class="panel-toolbar">
|
|
<div class="toolbar-left">
|
|
<div class="search-input-wrapper">
|
|
<svg class="search-icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2">
|
|
<circle cx="8.5" cy="8.5" r="5.5"></circle>
|
|
<path stroke-linecap="round" d="M13 13l4.5 4.5"></path>
|
|
</svg>
|
|
<input
|
|
type="search"
|
|
id="search-subdomains"
|
|
class="input-search"
|
|
placeholder="Buscar por subdominio o puerto..."
|
|
aria-label="Buscar subdominios"
|
|
>
|
|
</div>
|
|
|
|
<select id="filter-mode" class="select-filter" aria-label="Filtrar por modo de subdominio">
|
|
<option value="all">Todos los Modos</option>
|
|
<option value="static">Modo A (Estático)</option>
|
|
<option value="proxy">Modo B (Proxy Inverso)</option>
|
|
</select>
|
|
|
|
<select id="filter-status" class="select-filter" aria-label="Filtrar por estado">
|
|
<option value="all">Todos los Estados</option>
|
|
<option value="enabled">Habilitados (Activos)</option>
|
|
<option value="disabled">Pausados (Inactivos)</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="toolbar-right">
|
|
<button type="button" id="btn-refresh-subdomains" class="btn btn-secondary" title="Recargar subdominios">
|
|
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M14 8A6 6 0 1 1 9.5 2.5M14 2.5v4h-4"></path>
|
|
</svg>
|
|
<span>Refrescar</span>
|
|
</button>
|
|
|
|
<button type="button" id="btn-open-create-subdomain" class="btn btn-primary">
|
|
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M8 3v10M3 8h10"></path>
|
|
</svg>
|
|
<span>+ Nuevo Subdominio</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Tabla Desktop (Tier 2 Glassmorphism) -->
|
|
<div class="table-glass-card">
|
|
<div class="table-responsive">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Subdominio & Dominio</th>
|
|
<th>Tipo / Modo</th>
|
|
<th>Destino / Puerto</th>
|
|
<th>Estado</th>
|
|
<th>Protección</th>
|
|
<th style="text-align: right;">Acciones</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="subdomains-table-body">
|
|
<!-- Se llena dinámicamente con app.js -->
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Tarjetas en Mobile (< 768px) -->
|
|
<div id="subdomains-mobile-list" class="mobile-cards-grid">
|
|
<!-- Se llena dinámicamente con app.js -->
|
|
</div>
|
|
|
|
<!-- Empty State -->
|
|
<div id="subdomains-empty-state" class="empty-state-card" style="display: none;">
|
|
<div class="empty-state-icon" aria-hidden="true">
|
|
<svg viewBox="0 0 24 24" width="28" height="28" fill="none" stroke="currentColor" stroke-width="2">
|
|
<circle cx="12" cy="12" r="10"></circle>
|
|
<path stroke-linecap="round" d="M12 8v4M12 16v.5"></path>
|
|
</svg>
|
|
</div>
|
|
<h3 class="empty-state-title">No se encontraron subdominios</h3>
|
|
<p class="empty-state-desc">No hay ningún VirtualHost coincidente con los filtros actuales. Crea uno nuevo con el botón superior.</p>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- =====================================================================
|
|
Pestaña Proyectos (/var/www/<proyecto>)
|
|
===================================================================== -->
|
|
<section id="tab-panel-projects" class="tab-panel" role="tabpanel" aria-labelledby="tab-btn-projects">
|
|
<div class="panel-toolbar">
|
|
<div class="toolbar-left">
|
|
<div class="search-input-wrapper">
|
|
<svg class="search-icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2">
|
|
<circle cx="8.5" cy="8.5" r="5.5"></circle>
|
|
<path stroke-linecap="round" d="M13 13l4.5 4.5"></path>
|
|
</svg>
|
|
<input
|
|
type="search"
|
|
id="search-projects"
|
|
class="input-search"
|
|
placeholder="Buscar por proyecto o subdominio..."
|
|
aria-label="Buscar proyectos"
|
|
>
|
|
</div>
|
|
|
|
<select id="filter-project-type" class="select-filter" aria-label="Filtrar por tipo de proyecto">
|
|
<option value="all">Todos los Tipos</option>
|
|
<option value="static">Estático / PHP</option>
|
|
<option value="node">Node.js (SSR / API)</option>
|
|
<option value="python">Python (FastAPI / Flask)</option>
|
|
<option value="custom">Personalizado (Proxy)</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="toolbar-right">
|
|
<button type="button" id="btn-refresh-projects" class="btn btn-secondary" title="Recargar proyectos">
|
|
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M14 8A6 6 0 1 1 9.5 2.5M14 2.5v4h-4"></path>
|
|
</svg>
|
|
<span>Refrescar</span>
|
|
</button>
|
|
|
|
<button type="button" id="btn-open-create-project" class="btn btn-primary">
|
|
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M8 3v10M3 8h10"></path>
|
|
</svg>
|
|
<span>+ Nuevo Proyecto</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Grid de Tarjetas de Proyectos -->
|
|
<div id="projects-grid" class="projects-cards-grid">
|
|
<!-- Se llena dinámicamente -->
|
|
</div>
|
|
|
|
<!-- Empty State -->
|
|
<div id="projects-empty-state" class="empty-state-card" style="display: none;">
|
|
<div class="empty-state-icon" aria-hidden="true">
|
|
<svg viewBox="0 0 24 24" width="28" height="28" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3 7l7-4 7 4-7 4-7-4zM3 13l7 4 7-4M3 10l7 4 7-4"></path>
|
|
</svg>
|
|
</div>
|
|
<h3 class="empty-state-title">No hay proyectos registrados</h3>
|
|
<p class="empty-state-desc">Comienza organizando tus aplicaciones web en proyectos. Cada proyecto puede gestionar su propia subcarpeta pública y múltiples subdominios.</p>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- =====================================================================
|
|
Pestaña 2: Carpetas Web (/var/www)
|
|
===================================================================== -->
|
|
<section id="tab-panel-folders" class="tab-panel" role="tabpanel" aria-labelledby="tab-btn-folders">
|
|
<div class="panel-toolbar">
|
|
<div class="toolbar-left">
|
|
<div>
|
|
<span class="telemetry-label">Raíz Web:</span>
|
|
<strong style="font-family: ui-monospace, monospace; color: var(--accent-lime); font-size: 0.95rem;">/var/www</strong>
|
|
</div>
|
|
</div>
|
|
<div class="toolbar-right">
|
|
<button type="button" id="btn-refresh-folders" class="btn btn-secondary">
|
|
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M14 8A6 6 0 1 1 9.5 2.5M14 2.5v4h-4"></path>
|
|
</svg>
|
|
<span>Escanear /var/www</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="table-glass-card">
|
|
<div class="table-responsive">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Carpeta & Ruta</th>
|
|
<th>Tamaño</th>
|
|
<th>Archivos</th>
|
|
<th>Propietario / Grupo</th>
|
|
<th>Permisos UNIX</th>
|
|
<th>Verificación SGID 2775</th>
|
|
<th style="text-align: right;">Acciones</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="folders-table-body">
|
|
<!-- Se llena dinámicamente con app.js -->
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="folders-mobile-list" class="mobile-cards-grid">
|
|
<!-- Se llena dinámicamente -->
|
|
</div>
|
|
</section>
|
|
|
|
<!-- =====================================================================
|
|
Pestaña Gestión FTP & Carga Masiva (Bulk Upload / ZIP Extractor)
|
|
===================================================================== -->
|
|
<section id="tab-panel-ftp" class="tab-panel" role="tabpanel" aria-labelledby="tab-btn-ftp">
|
|
<!-- Tarjeta de Parámetros de Conexión SFTP y FTP -->
|
|
<div class="ftp-connection-card">
|
|
<div class="ftp-card-header">
|
|
<div class="ftp-header-title-wrap">
|
|
<div class="modal-icon-badge" style="background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald);">
|
|
<svg viewBox="0 0 20 20" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M12 2a8 8 0 0 0-8 8c0 3 1.5 5.5 3.5 7M8 12a4 4 0 0 1 8 0M10 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"></path>
|
|
</svg>
|
|
</div>
|
|
<div>
|
|
<h3 class="ftp-title">Credenciales de Conexión SFTP / FTP</h3>
|
|
<p class="ftp-subtitle">Acceso directo al sistema de archivos del VPS para despliegue por FileZilla, Cyberduck o WinSCP.</p>
|
|
</div>
|
|
</div>
|
|
<div class="ftp-header-badge">
|
|
<span class="badge badge-mode-proxy">SFTP / SSH Activo</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="ftp-credentials-grid">
|
|
<div class="ftp-credential-item">
|
|
<span class="credential-label">Host / Servidor</span>
|
|
<div class="credential-val-wrap">
|
|
<code class="credential-value" id="ftp-info-host">elingejose.com</code>
|
|
<button type="button" class="btn-copy-mini" data-copy="elingejose.com" title="Copiar Host">
|
|
<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2"><rect x="5" y="5" width="8" height="8" rx="1.5"></rect><path d="M3 11V3a1.5 1.5 0 0 1 1.5-1.5H11"></path></svg>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="ftp-credential-item">
|
|
<span class="credential-label">IP Pública del VPS</span>
|
|
<div class="credential-val-wrap">
|
|
<code class="credential-value" id="ftp-info-ip">201.32.134.58</code>
|
|
<button type="button" class="btn-copy-mini" data-copy="201.32.134.58" title="Copiar IP">
|
|
<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2"><rect x="5" y="5" width="8" height="8" rx="1.5"></rect><path d="M3 11V3a1.5 1.5 0 0 1 1.5-1.5H11"></path></svg>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="ftp-credential-item">
|
|
<span class="credential-label">Puerto SFTP (Primario VPS)</span>
|
|
<div class="credential-val-wrap">
|
|
<span class="badge badge-port" style="font-size: 0.9rem; font-weight: 700;">5101</span>
|
|
<span class="text-xs text-muted" style="margin-left: 0.25rem;">(Estándar: 22 · FTP: 21)</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="ftp-credential-item">
|
|
<span class="credential-label">Usuario del Sistema</span>
|
|
<div class="credential-val-wrap">
|
|
<code class="credential-value" id="ftp-info-user">ggc</code>
|
|
<span class="text-xs text-muted" style="margin-left: 0.25rem;">(Grupo: www-data)</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="ftp-credential-item">
|
|
<span class="credential-label">Directorio Raíz Web</span>
|
|
<div class="credential-val-wrap">
|
|
<code class="credential-value" style="color: var(--accent-lime);">/var/www</code>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="ftp-credential-item">
|
|
<span class="credential-label">Permisos Heredados</span>
|
|
<div class="credential-val-wrap">
|
|
<span class="badge badge-mode-static">SGID 2775 (ggc:www-data)</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Herramienta de Carga Masiva (Bulk Upload & ZIP Extractor) -->
|
|
<div class="bulk-upload-card">
|
|
<div class="bulk-upload-header">
|
|
<div class="bulk-upload-title-wrap">
|
|
<svg viewBox="0 0 20 20" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" style="color: var(--accent-lime);">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3 15v2a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-2M10 3v10m-4-4 4-4 4 4"></path>
|
|
</svg>
|
|
<div>
|
|
<h3 class="bulk-title">Carga Masiva de Proyectos (Bulk Upload & ZIP Extractor)</h3>
|
|
<p class="bulk-desc">Sube un archivo comprimido .zip y el sistema lo extraerá en la carpeta del proyecto aplicando automáticamente los permisos UNIX SGID 2775.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<form id="form-bulk-upload" class="bulk-upload-form" novalidate>
|
|
<div class="bulk-form-grid">
|
|
<div class="form-group" style="margin-bottom: 0;">
|
|
<label for="ftp-bulk-project-select" class="form-label">Proyecto Destino</label>
|
|
<select id="ftp-bulk-project-select" class="select-filter" style="width: 100%;" required>
|
|
<option value="">-- Selecciona un Proyecto --</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group" style="margin-bottom: 0;">
|
|
<label for="ftp-bulk-subpath-input" class="form-label">Subcarpeta Opcional</label>
|
|
<input
|
|
type="text"
|
|
id="ftp-bulk-subpath-input"
|
|
class="form-input"
|
|
placeholder="ej: public, dist, o dejar vacío para raíz"
|
|
>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Zona Drag and Drop -->
|
|
<div id="ftp-drop-zone" class="ftp-drop-zone" tabindex="0" role="region" aria-label="Zona de arrastre de archivos ZIP">
|
|
<input type="file" id="ftp-zip-input" accept=".zip,application/zip" style="display: none;">
|
|
<div class="drop-zone-icon">
|
|
<svg viewBox="0 0 24 24" width="36" height="36" fill="none" stroke="currentColor" stroke-width="1.8">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M12 3v12M8 7l4-4 4 4M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"></path>
|
|
</svg>
|
|
</div>
|
|
<div class="drop-zone-text">
|
|
<strong>Arrastra aquí tu archivo .zip</strong> o haz clic para explorarlo
|
|
</div>
|
|
<span class="drop-zone-sub">Descompresión automática con sobreescritura y permisos para Apache</span>
|
|
</div>
|
|
|
|
<!-- Visualizador de Archivo Seleccionado -->
|
|
<div id="ftp-selected-file-wrap" class="selected-file-card" style="display: none;">
|
|
<div class="selected-file-info">
|
|
<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" style="color: var(--accent-lime);">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3 2h7l4 4v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z"></path>
|
|
</svg>
|
|
<span id="ftp-selected-file-name" class="selected-file-name">archivo.zip</span>
|
|
<span id="ftp-selected-file-size" class="selected-file-size tabular-nums">0 KB</span>
|
|
</div>
|
|
<button type="button" id="ftp-btn-remove-file" class="btn-remove-selection" title="Quitar archivo">×</button>
|
|
</div>
|
|
|
|
<div class="bulk-form-actions">
|
|
<button type="submit" id="btn-extract-zip" class="btn btn-primary" disabled>
|
|
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M8 2v10M3 7l5 5 5-5M2 14h12"></path>
|
|
</svg>
|
|
<span>Subir y Descomprimir con Permisos SGID 2775</span>
|
|
</button>
|
|
</div>
|
|
|
|
<div id="ftp-extract-status" class="extract-status-banner" style="display: none;"></div>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- Catálogo de Cuentas FTP Gestionadas -->
|
|
<div class="ftp-accounts-section" style="margin-top: 2rem;">
|
|
<div class="panel-toolbar">
|
|
<div class="toolbar-left">
|
|
<h3 style="font-size: 1.05rem; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 0.5rem;">
|
|
<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
<circle cx="8" cy="8" r="7"></circle>
|
|
<path stroke-linecap="round" d="M8 5v6M5 8h6"></path>
|
|
</svg>
|
|
<span>Cuentas de Acceso FTP & SFTP</span>
|
|
</h3>
|
|
</div>
|
|
<div class="toolbar-right">
|
|
<button type="button" id="btn-open-create-ftp-account" class="btn btn-primary">
|
|
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M8 3v10M3 8h10"></path>
|
|
</svg>
|
|
<span>+ Nueva Cuenta FTP</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="table-glass-card">
|
|
<div class="table-responsive">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Usuario FTP</th>
|
|
<th>Proyecto / Carpeta Asignada</th>
|
|
<th>Permisos</th>
|
|
<th>Estado</th>
|
|
<th>Fecha de Alta</th>
|
|
<th style="text-align: right;">Acciones</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="ftp-accounts-table-body">
|
|
<!-- Se llena dinámicamente -->
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="ftp-accounts-mobile-list" class="mobile-cards-grid">
|
|
<!-- Mobile -->
|
|
</div>
|
|
|
|
<div id="ftp-accounts-empty-state" class="empty-state-card" style="display: none;">
|
|
<div class="empty-state-icon" aria-hidden="true">
|
|
<svg viewBox="0 0 24 24" width="28" height="28" fill="none" stroke="currentColor" stroke-width="2">
|
|
<circle cx="12" cy="12" r="10"></circle>
|
|
<path stroke-linecap="round" d="M12 8v4M12 16v.5"></path>
|
|
</svg>
|
|
</div>
|
|
<h3 class="empty-state-title">No hay cuentas FTP secundarias</h3>
|
|
<p class="empty-state-desc">Puedes crear cuentas FTP dedicadas restringidas a la carpeta de un proyecto específico para desarrolladores externos.</p>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- =====================================================================
|
|
Pestaña 3: 🖥️ Terminal Remota del Sistema (Bash)
|
|
===================================================================== -->
|
|
<section id="tab-panel-terminal" class="tab-panel" role="tabpanel" aria-labelledby="tab-btn-terminal">
|
|
<!-- Bloque 1: Pantalla de Bloqueo por Autenticación de Usuario VPS -->
|
|
<div id="terminal-auth-card" class="terminal-lock-container">
|
|
<div class="terminal-lock-card">
|
|
<div class="terminal-lock-icon-wrap" aria-hidden="true">
|
|
<svg viewBox="0 0 24 24" width="36" height="36" fill="none" stroke="currentColor" stroke-width="2">
|
|
<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect>
|
|
<path d="M7 11V7a5 5 0 0 1 10 0v4"></path>
|
|
</svg>
|
|
</div>
|
|
<h3 class="terminal-lock-title">🔒 Autenticación de Sistema VPS</h3>
|
|
<p class="terminal-lock-desc">
|
|
Por motivos de seguridad, para interactuar con la terminal Bash del servidor debes autenticarte con tus credenciales de usuario del sistema operativo (Linux VPS).
|
|
</p>
|
|
|
|
<form id="form-terminal-login" class="terminal-auth-form" autocomplete="off">
|
|
<div class="form-group text-left" style="width: 100%; text-align: left;">
|
|
<label for="terminal-vps-user-input" class="form-label">Usuario del VPS</label>
|
|
<input
|
|
type="text"
|
|
id="terminal-vps-user-input"
|
|
class="form-input"
|
|
placeholder="ej: ggc o root"
|
|
value="ggc"
|
|
required
|
|
autocomplete="username"
|
|
>
|
|
</div>
|
|
|
|
<div class="form-group text-left" style="width: 100%; text-align: left;">
|
|
<label for="terminal-vps-pass-input" class="form-label">Contraseña del VPS</label>
|
|
<input
|
|
type="password"
|
|
id="terminal-vps-pass-input"
|
|
class="form-input"
|
|
placeholder="••••••••••••"
|
|
required
|
|
autocomplete="current-password"
|
|
>
|
|
</div>
|
|
|
|
<div id="terminal-login-error" class="terminal-auth-error" style="display: none;"></div>
|
|
|
|
<button type="submit" id="btn-terminal-login" class="btn btn-primary" style="width: 100%; justify-content: center; margin-top: 0.5rem;">
|
|
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M10 3.5 14.5 8 10 12.5M14 8H2"></path>
|
|
</svg>
|
|
<span>Iniciar Sesión de Terminal</span>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Bloque 2: Consola Terminal Activa (Visible tras autenticación exitosa) -->
|
|
<div id="terminal-active-view" style="display: none;">
|
|
<div class="panel-toolbar">
|
|
<div class="toolbar-left">
|
|
<div>
|
|
<span class="telemetry-label">Entorno Shell:</span>
|
|
<strong id="terminal-env-badge" style="font-family: ui-monospace, monospace; color: var(--accent-lime); font-size: 0.9rem;">
|
|
ggc@vps-jose (~/var/www)
|
|
</strong>
|
|
</div>
|
|
<span class="badge badge-mode-proxy" id="terminal-status-badge">Sesión VPS Activa</span>
|
|
</div>
|
|
<div class="toolbar-right">
|
|
<button type="button" id="terminal-btn-clear" class="btn btn-secondary" title="Limpiar la salida de la consola">
|
|
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3 4h10M6 4V2.5A1.5 1.5 0 0 1 7.5 1h1A1.5 1.5 0 0 1 10 2.5V4M5 4v9a1.5 1.5 0 0 0 1.5 1.5h3A1.5 1.5 0 0 0 11 13V4"></path>
|
|
</svg>
|
|
<span>Limpiar Consola</span>
|
|
</button>
|
|
<button type="button" id="btn-terminal-logout" class="btn btn-secondary" title="Cerrar sesión de terminal">
|
|
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M10 2h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-3M6 11l3-3-3-3M9 8H2"></path>
|
|
</svg>
|
|
<span id="terminal-logout-label">Cerrar Sesión</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Botones de Acceso Rápido a Comandos Comunes del VPS -->
|
|
<div class="terminal-quick-actions-bar" aria-label="Comandos rápidos del sistema">
|
|
<span class="quick-actions-label">Comandos Rápidos:</span>
|
|
<div class="quick-buttons-wrapper">
|
|
<button type="button" class="btn-quick-cmd" data-cmd="apache2ctl -S">apache2ctl -S</button>
|
|
<button type="button" class="btn-quick-cmd" data-cmd="pm2 list">pm2 list</button>
|
|
<button type="button" class="btn-quick-cmd" data-cmd="free -m">free -m</button>
|
|
<button type="button" class="btn-quick-cmd" data-cmd="df -h">df -h</button>
|
|
<button type="button" class="btn-quick-cmd" data-cmd="systemctl status apache2">systemctl status apache2</button>
|
|
<button type="button" class="btn-quick-cmd" data-cmd="ls -la /var/www">ls -la /var/www</button>
|
|
<button type="button" class="btn-quick-cmd" data-cmd="php -v">php -v</button>
|
|
<button type="button" class="btn-quick-cmd" data-cmd="uptime">uptime</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Ventana de Consola Terminal Negra / Estilo Xterm -->
|
|
<div class="terminal-window-card">
|
|
<div class="terminal-window-topbar">
|
|
<div class="terminal-dots-indicator" aria-hidden="true">
|
|
<span class="dot-circle dot-red"></span>
|
|
<span class="dot-circle dot-yellow"></span>
|
|
<span class="dot-circle dot-green"></span>
|
|
</div>
|
|
<div class="terminal-window-title" id="terminal-topbar-title">
|
|
bash — ggc@vps-jose:/var/www
|
|
</div>
|
|
<div class="terminal-window-meta">
|
|
<span class="terminal-meta-tag">Aislamiento Seguro (Timeout 30s)</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="terminal-screen" class="terminal-screen-body" tabindex="0" role="region" aria-label="Salida de la consola terminal" aria-live="polite">
|
|
<div class="terminal-banner">
|
|
<span class="terminal-banner-brand">a2host Remote Web Terminal v1.0 [Linux 6.x / VPS elingejose.com]</span>
|
|
<span class="terminal-banner-sub">Escribe un comando o selecciona una acción rápida superior. Usa las flechas ↑/↓ para navegar en el historial.</span>
|
|
</div>
|
|
</div>
|
|
|
|
<form id="terminal-command-form" class="terminal-cli-form" autocomplete="off">
|
|
<div class="terminal-prompt-prefix" id="terminal-prompt-label">ggc@vps:~$</div>
|
|
<input
|
|
type="text"
|
|
id="terminal-input"
|
|
class="terminal-cli-input"
|
|
placeholder="Escribe un comando (ej: apache2ctl -S, free -m, ls -la)..."
|
|
autocomplete="off"
|
|
autocorrect="off"
|
|
autocapitalize="off"
|
|
spellcheck="false"
|
|
required
|
|
>
|
|
<button type="submit" id="terminal-btn-execute" class="btn btn-primary btn-sm terminal-execute-btn">
|
|
<span>Ejecutar</span>
|
|
<kbd class="kbd-hint">Enter</kbd>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- =====================================================================
|
|
Pestaña 4: 📊 Monitor del Servidor VPS
|
|
===================================================================== -->
|
|
<section id="tab-panel-monitor" class="tab-panel" role="tabpanel" aria-labelledby="tab-btn-monitor">
|
|
<div class="panel-toolbar">
|
|
<div class="toolbar-left">
|
|
<div>
|
|
<span class="telemetry-label">Monitoreo de Recursos:</span>
|
|
<strong style="color: var(--accent-lime); font-size: 0.95rem;">VPS 1 GB RAM · elingejose.com</strong>
|
|
</div>
|
|
<span id="monitor-last-updated-text" class="text-xs text-muted">Actualizado hace un momento</span>
|
|
</div>
|
|
<div class="toolbar-right">
|
|
<div class="auto-refresh-selector-wrap">
|
|
<label for="monitor-interval-select" class="form-label" style="margin: 0; font-size: 0.78rem;">Auto-refresco:</label>
|
|
<select id="monitor-interval-select" class="select-filter" style="padding-right: 1.8rem; font-size: 0.8rem;">
|
|
<option value="0">Manual (Sin auto-refresco)</option>
|
|
<option value="3000">Cada 3 segundos</option>
|
|
<option value="5000" selected>Cada 5 segundos</option>
|
|
<option value="10000">Cada 10 segundos</option>
|
|
<option value="30000">Cada 30 segundos</option>
|
|
</select>
|
|
</div>
|
|
<button type="button" id="btn-refresh-monitor" class="btn btn-secondary" title="Actualizar métricas del sistema">
|
|
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M14 8A6 6 0 1 1 9.5 2.5M14 2.5v4h-4"></path>
|
|
</svg>
|
|
<span>Refrescar Ahora</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Grid de Tarjetas de Rendimiento con Barras de Progreso -->
|
|
<div class="monitor-cards-grid">
|
|
<!-- Tarjeta 1: CPU & Load Average -->
|
|
<div class="monitor-metric-card">
|
|
<div class="metric-card-header">
|
|
<div class="metric-card-icon-wrap" style="color: #38bdf8; background: rgba(56, 189, 248, 0.12);">
|
|
<svg viewBox="0 0 20 20" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2">
|
|
<rect x="4" y="4" width="12" height="12" rx="2"></rect>
|
|
<path d="M7 1v3M13 1v3M7 16v3M13 16v3M1 7h3M1 13h3M16 7h3M16 13h3"></path>
|
|
</svg>
|
|
</div>
|
|
<div class="metric-card-title-wrap">
|
|
<span class="metric-title">CPU & Carga Promedio</span>
|
|
<span id="monitor-cpu-model-text" class="metric-subtitle">Cores: --</span>
|
|
</div>
|
|
<span id="monitor-cpu-percent" class="metric-percentage tabular-nums">0%</span>
|
|
</div>
|
|
<div class="metric-progress-track" aria-label="Uso de CPU">
|
|
<div id="monitor-cpu-bar" class="metric-progress-fill" style="width: 0%;"></div>
|
|
</div>
|
|
<div class="metric-card-footer">
|
|
<div class="metric-stat-item">
|
|
<span class="stat-name">Load 1m:</span>
|
|
<strong id="monitor-load-1m" class="stat-value tabular-nums">0.00</strong>
|
|
</div>
|
|
<div class="metric-stat-item">
|
|
<span class="stat-name">Load 5m:</span>
|
|
<strong id="monitor-load-5m" class="stat-value tabular-nums">0.00</strong>
|
|
</div>
|
|
<div class="metric-stat-item">
|
|
<span class="stat-name">Load 15m:</span>
|
|
<strong id="monitor-load-15m" class="stat-value tabular-nums">0.00</strong>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Tarjeta 2: RAM Detallada del VPS -->
|
|
<div class="monitor-metric-card">
|
|
<div class="metric-card-header">
|
|
<div class="metric-card-icon-wrap" style="color: #a3e635; background: rgba(163, 230, 53, 0.12);">
|
|
<svg viewBox="0 0 20 20" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2">
|
|
<rect x="3" y="4" width="14" height="12" rx="2"></rect>
|
|
<path stroke-linecap="round" d="M6 2v2M14 2v2M6 16v2M14 16v2"></path>
|
|
</svg>
|
|
</div>
|
|
<div class="metric-card-title-wrap">
|
|
<span class="metric-title">Memoria RAM del VPS</span>
|
|
<span id="monitor-ram-used-text" class="metric-subtitle">-- / --</span>
|
|
</div>
|
|
<span id="monitor-ram-percent" class="metric-percentage tabular-nums">0%</span>
|
|
</div>
|
|
<div class="metric-progress-track" aria-label="Uso de memoria RAM">
|
|
<div id="monitor-ram-bar" class="metric-progress-fill fill-lime" style="width: 0%;"></div>
|
|
</div>
|
|
<div class="metric-card-footer">
|
|
<div class="metric-stat-item">
|
|
<span class="stat-name">Libre:</span>
|
|
<strong id="monitor-ram-free" class="stat-value tabular-nums">--</strong>
|
|
</div>
|
|
<div class="metric-stat-item">
|
|
<span class="stat-name">Buffers/Caché:</span>
|
|
<strong id="monitor-ram-cache" class="stat-value tabular-nums">--</strong>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Tarjeta 3: Memoria Swap -->
|
|
<div class="monitor-metric-card">
|
|
<div class="metric-card-header">
|
|
<div class="metric-card-icon-wrap" style="color: #c084fc; background: rgba(192, 132, 252, 0.12);">
|
|
<svg viewBox="0 0 20 20" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M17 10H3M13 6l4 4-4 4M7 14l-4-4 4-4"></path>
|
|
</svg>
|
|
</div>
|
|
<div class="metric-card-title-wrap">
|
|
<span class="metric-title">Espacio Swap</span>
|
|
<span id="monitor-swap-used-text" class="metric-subtitle">-- / --</span>
|
|
</div>
|
|
<span id="monitor-swap-percent" class="metric-percentage tabular-nums">0%</span>
|
|
</div>
|
|
<div class="metric-progress-track" aria-label="Uso de espacio swap">
|
|
<div id="monitor-swap-bar" class="metric-progress-fill fill-purple" style="width: 0%;"></div>
|
|
</div>
|
|
<div class="metric-card-footer">
|
|
<div class="metric-stat-item">
|
|
<span class="stat-name">Libre:</span>
|
|
<strong id="monitor-swap-free" class="stat-value tabular-nums">--</strong>
|
|
</div>
|
|
<div class="metric-stat-item">
|
|
<span class="stat-name">Total Swap:</span>
|
|
<strong id="monitor-swap-total" class="stat-value tabular-nums">--</strong>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Tarjeta 4: Almacenamiento Raíz / -->
|
|
<div class="monitor-metric-card">
|
|
<div class="metric-card-header">
|
|
<div class="metric-card-icon-wrap" style="color: #fb923c; background: rgba(251, 146, 60, 0.12);">
|
|
<svg viewBox="0 0 20 20" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2">
|
|
<ellipse cx="10" cy="5" rx="7" ry="2.5"></ellipse>
|
|
<path d="M3 5v5c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5V5M3 10v5c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5v-5"></path>
|
|
</svg>
|
|
</div>
|
|
<div class="metric-card-title-wrap">
|
|
<span class="metric-title">Disco Raíz (/)</span>
|
|
<span id="monitor-disk-used-text" class="metric-subtitle">-- / --</span>
|
|
</div>
|
|
<span id="monitor-disk-percent" class="metric-percentage tabular-nums">0%</span>
|
|
</div>
|
|
<div class="metric-progress-track" aria-label="Uso de disco">
|
|
<div id="monitor-disk-bar" class="metric-progress-fill fill-orange" style="width: 0%;"></div>
|
|
</div>
|
|
<div class="metric-card-footer">
|
|
<div class="metric-stat-item">
|
|
<span class="stat-name">Disponible:</span>
|
|
<strong id="monitor-disk-free" class="stat-value tabular-nums">--</strong>
|
|
</div>
|
|
<div class="metric-stat-item">
|
|
<span class="stat-name">Total:</span>
|
|
<strong id="monitor-disk-total" class="stat-value tabular-nums">--</strong>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Tarjeta 5: Proceso a2host (Node/PM2 vs Tope 120M) -->
|
|
<div class="monitor-metric-card">
|
|
<div class="metric-card-header">
|
|
<div class="metric-card-icon-wrap" style="color: #4ade80; background: rgba(74, 222, 128, 0.12);">
|
|
<svg viewBox="0 0 20 20" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2">
|
|
<circle cx="10" cy="10" r="7"></circle>
|
|
<polygon points="9 7 13 10 9 13 9 7" fill="currentColor"></polygon>
|
|
</svg>
|
|
</div>
|
|
<div class="metric-card-title-wrap">
|
|
<span class="metric-title">Proceso a2host (PM2)</span>
|
|
<span id="monitor-pm2-used-text" class="metric-subtitle">-- / 120 MB</span>
|
|
</div>
|
|
<span id="monitor-pm2-percent" class="metric-percentage tabular-nums">0%</span>
|
|
</div>
|
|
<div class="metric-progress-track" aria-label="Memoria RSS frente al límite de 120MB de PM2">
|
|
<div id="monitor-pm2-bar" class="metric-progress-fill fill-lime" style="width: 0%;"></div>
|
|
</div>
|
|
<div class="metric-card-footer">
|
|
<div class="metric-stat-item">
|
|
<span class="stat-name">Heap Usado:</span>
|
|
<strong id="monitor-pm2-heap" class="stat-value tabular-nums">--</strong>
|
|
</div>
|
|
<div class="metric-stat-item">
|
|
<span class="stat-name">Límite Estricto:</span>
|
|
<strong class="stat-value text-accent" style="color: var(--accent-lime);">120.0 MB</strong>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Tabla de Top Procesos del VPS -->
|
|
<div class="processes-section-wrap" style="margin-top: 1.5rem;">
|
|
<div class="panel-toolbar" style="margin-bottom: 0.85rem;">
|
|
<div class="toolbar-left">
|
|
<h3 style="font-size: 1.05rem; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 0.5rem;">
|
|
<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
<rect x="2" y="2" width="12" height="12" rx="2"></rect>
|
|
<path d="M5 8h6M8 5v6"></path>
|
|
</svg>
|
|
<span>Top Procesos Activos en VPS (Ordenados por Consumo)</span>
|
|
</h3>
|
|
</div>
|
|
<div class="toolbar-right">
|
|
<input
|
|
type="search"
|
|
id="search-processes-input"
|
|
class="input-search"
|
|
placeholder="Filtrar por comando o PID..."
|
|
style="max-width: 260px;"
|
|
aria-label="Filtrar procesos"
|
|
>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="table-glass-card">
|
|
<div class="table-responsive">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 80px;">PID</th>
|
|
<th>Usuario</th>
|
|
<th>CPU %</th>
|
|
<th>Memoria %</th>
|
|
<th>Memoria RSS</th>
|
|
<th>Comando / Proceso</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="processes-table-body">
|
|
<!-- Se llena dinámicamente con app.js -->
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="processes-mobile-list" class="mobile-cards-grid">
|
|
<!-- Mobile -->
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- =====================================================================
|
|
Pestaña 7: Documentación Técnica (/docs)
|
|
===================================================================== -->
|
|
<section id="tab-panel-docs" class="tab-panel" role="tabpanel" aria-labelledby="tab-btn-docs">
|
|
<div class="docs-wrapper">
|
|
<!-- Sidebar con Índice de Especificaciones -->
|
|
<aside class="docs-sidebar">
|
|
<div style="font-size: 0.88rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.25rem;">
|
|
Suite de Especificaciones
|
|
</div>
|
|
<div id="docs-sidebar-nav">
|
|
<!-- Se llena dinámicamente -->
|
|
</div>
|
|
</aside>
|
|
|
|
<!-- Visor Markdown Renderizado -->
|
|
<article id="docs-content-viewer" class="docs-content-viewer">
|
|
<div style="text-align: center; color: var(--text-muted); padding: 3rem;">
|
|
Selecciona un documento para visualizar su especificación.
|
|
</div>
|
|
</article>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- =====================================================================
|
|
Pestaña 8: ⚙️ Configuraciones del Sistema (Usuarios, Temas, Identidad)
|
|
===================================================================== -->
|
|
<section id="tab-panel-settings" class="tab-panel" role="tabpanel" aria-labelledby="tab-btn-settings">
|
|
<!-- Subnavegación de Configuraciones -->
|
|
<div class="settings-subnav-bar">
|
|
<button type="button" class="settings-subnav-btn active" id="subtab-btn-users" data-subtab="users">
|
|
<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M16 17v-1.5a3.5 3.5 0 0 0-3.5-3.5h-5A3.5 3.5 0 0 0 4 15.5V17M10 8.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z"></path>
|
|
</svg>
|
|
<span>👥 Gestión de Usuarios</span>
|
|
</button>
|
|
|
|
<button type="button" class="settings-subnav-btn" id="subtab-btn-themes" data-subtab="themes">
|
|
<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
<circle cx="10" cy="10" r="8"></circle>
|
|
<path stroke-linecap="round" d="M10 2a8 8 0 0 1 0 16v-16z"></path>
|
|
</svg>
|
|
<span>🎨 Temas y Fondos</span>
|
|
</button>
|
|
|
|
<button type="button" class="settings-subnav-btn" id="subtab-btn-identity" data-subtab="identity">
|
|
<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
<rect x="3" y="4" width="14" height="12" rx="2"></rect>
|
|
<path d="M7 8h6M7 12h4"></path>
|
|
</svg>
|
|
<span>🏷️ Identidad del Sistema</span>
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Submódulo 1: Gestión de Usuarios -->
|
|
<div id="settings-panel-users" class="settings-panel-sub active">
|
|
<div class="panel-toolbar">
|
|
<div class="toolbar-left">
|
|
<span class="telemetry-label">Cuentas de Operadores y Administradores del Panel</span>
|
|
</div>
|
|
<div class="toolbar-right">
|
|
<button type="button" id="btn-open-create-user" class="btn btn-primary">
|
|
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M8 3v10M3 8h10"></path>
|
|
</svg>
|
|
<span>+ Nuevo Operador</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="table-glass-card">
|
|
<div class="table-responsive">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Nombre Completo / Usuario</th>
|
|
<th>Rol</th>
|
|
<th>Estado</th>
|
|
<th>Último Inicio de Sesión</th>
|
|
<th style="text-align: right;">Acciones</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="users-table-body">
|
|
<!-- Se llena dinámicamente -->
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="users-mobile-list" class="mobile-cards-grid">
|
|
<!-- Mobile -->
|
|
</div>
|
|
|
|
<div id="users-restricted-notice" class="empty-state-card" style="display: none;">
|
|
<div class="empty-state-icon" style="color: var(--color-warning); background: rgba(245, 158, 11, 0.1);">
|
|
<svg viewBox="0 0 24 24" width="28" height="28" fill="none" stroke="currentColor" stroke-width="2">
|
|
<rect x="3" y="11" width="18" height="11" rx="2"></rect>
|
|
<path stroke-linecap="round" d="M7 11V7a5 5 0 0 1 10 0v4"></path>
|
|
</svg>
|
|
</div>
|
|
<h3 class="empty-state-title">Acceso Restringido</h3>
|
|
<p class="empty-state-desc">Tu cuenta actual tiene rol de <strong>Operador</strong>. La gestión y creación de usuarios requiere credenciales de Administrador.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Submódulo 2: Temas y Fondos -->
|
|
<div id="settings-panel-themes" class="settings-panel-sub" style="display: none;">
|
|
<div class="settings-section-header">
|
|
<div>
|
|
<h3 class="settings-section-title">Galería de Temas Visuales</h3>
|
|
<p class="settings-section-desc">Selecciona uno de los temas preconfigurados o personaliza los tokens CSS y expórtalos en JSON.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Grid de Galería de Temas -->
|
|
<div id="themes-gallery-grid" class="themes-gallery-grid">
|
|
<!-- Se puebla dinámicamente -->
|
|
</div>
|
|
|
|
<!-- Editor JSON en Vivo -->
|
|
<div class="theme-json-editor-card" style="margin-top: 2rem;">
|
|
<div class="theme-editor-header">
|
|
<div class="theme-editor-title-wrap">
|
|
<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" style="color: var(--accent-lime);">
|
|
<polyline points="4 6 1 9 4 12"></polyline>
|
|
<polyline points="12 6 15 9 12 12"></polyline>
|
|
<line x1="10" y1="3" x2="6" y2="15"></line>
|
|
</svg>
|
|
<div>
|
|
<h4 class="theme-editor-title">Editor JSON de Tokens del Tema Activo</h4>
|
|
<p class="theme-editor-sub">Modifica valores de color CSS en formato JSON para personalización avanzada en caliente.</p>
|
|
</div>
|
|
</div>
|
|
<div class="theme-editor-actions">
|
|
<input type="file" id="theme-file-input" accept=".json,application/json" style="display: none;">
|
|
<button type="button" id="btn-export-theme-json" class="btn btn-secondary btn-sm" title="Descargar configuración actual en .json">
|
|
<svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2"><path d="M8 2v9M4 7l4 4 4-4M2 13h12"></path></svg>
|
|
<span>📥 Exportar JSON</span>
|
|
</button>
|
|
<button type="button" id="btn-import-theme-json" class="btn btn-secondary btn-sm" title="Cargar archivo .json con tema">
|
|
<svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2"><path d="M8 11V2M4 6l4-4 4 4M2 13h12"></path></svg>
|
|
<span>📤 Importar JSON</span>
|
|
</button>
|
|
<button type="button" id="btn-reset-theme" class="btn btn-secondary btn-sm" title="Restaurar a Obsidian Emerald">
|
|
<svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 8A6 6 0 1 1 9.5 2.5M14 2.5v4h-4"></path></svg>
|
|
<span>🔄 Restaurar Tema</span>
|
|
</button>
|
|
<button type="button" id="btn-save-custom-theme" class="btn btn-primary btn-sm">
|
|
<span>💾 Guardar Personalizado</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<textarea id="theme-json-textarea" class="theme-json-textarea" spellcheck="false" autocomplete="off" rows="12"></textarea>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Submódulo 3: Identidad del Sistema -->
|
|
<div id="settings-panel-identity" class="settings-panel-sub" style="display: none;">
|
|
<div class="settings-section-header">
|
|
<div>
|
|
<h3 class="settings-section-title">Identidad del Sistema & Personalización</h3>
|
|
<p class="settings-section-desc">Personaliza los títulos, marcas, enlaces del servidor y colores que se proyectan en el panel.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="table-glass-card" style="padding: 1.5rem; max-width: 800px;">
|
|
<form id="form-identity" novalidate>
|
|
<div class="identity-form-grid">
|
|
<div class="form-group">
|
|
<label for="identity-app-name" class="form-label">Nombre de la Aplicación</label>
|
|
<input type="text" id="identity-app-name" class="form-input" placeholder="a2host" required>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="identity-panel-title" class="form-label">Título del Panel</label>
|
|
<input type="text" id="identity-panel-title" class="form-input" placeholder="Panel de Subdominios y Proyectos">
|
|
</div>
|
|
|
|
<div class="form-group" style="grid-column: 1 / -1;">
|
|
<label for="identity-slogan" class="form-label">Slogan del Sistema</label>
|
|
<input type="text" id="identity-slogan" class="form-input" placeholder="Apache2 Web & Subdomain Orchestrator">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="identity-base-domain" class="form-label">Dominio Base Wildcard</label>
|
|
<input type="text" id="identity-base-domain" class="form-input" placeholder="elingejose.com" required>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="identity-git-url" class="form-label">URL del Repositorio Git</label>
|
|
<input type="url" id="identity-git-url" class="form-input" placeholder="http://git.elingejose.com/GeronimoGc/a2host.git">
|
|
</div>
|
|
|
|
<div class="form-group" style="grid-column: 1 / -1;">
|
|
<label for="identity-footer-text" class="form-label">Texto del Footer</label>
|
|
<input type="text" id="identity-footer-text" class="form-input" placeholder="© 2026 a2host — Servidor VPS Ubuntu elingejose.com">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="identity-logo-icon" class="form-label">Icono de Logotipo</label>
|
|
<select id="identity-logo-icon" class="select-filter" style="width: 100%;">
|
|
<option value="server">Servidor Rack (server)</option>
|
|
<option value="globe">Globo Terráqueo (globe)</option>
|
|
<option value="terminal">Consola Terminal (terminal)</option>
|
|
<option value="cpu">Microprocesador (cpu)</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label">Color Primario de Acento</label>
|
|
<div class="color-picker-group">
|
|
<input type="color" id="identity-primary-color" class="color-picker-native" value="#10b981">
|
|
<input type="text" id="identity-primary-hex" class="form-input" style="font-family: ui-monospace, monospace; max-width: 120px;" value="#10b981">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="margin-top: 1.5rem; display: flex; justify-content: flex-end;">
|
|
<button type="submit" id="btn-save-identity" class="btn btn-primary">
|
|
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M13 14H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h7l4 4v7a1 1 0 0 1-1 1zM11 2v4H5V2M5 14v-5h6v5"></path>
|
|
</svg>
|
|
<span>Guardar Identidad</span>
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
|
|
<!-- Footer Accesible con Identidad Dinámica -->
|
|
<footer class="app-footer">
|
|
<div class="footer-inner">
|
|
<span id="footer-text-display">© 2026 a2host — Servidor VPS Ubuntu elingejose.com</span>
|
|
<div class="footer-links">
|
|
<a id="footer-git-link" href="http://git.elingejose.com/GeronimoGc/a2host.git" target="_blank" rel="noopener noreferrer">Repositorio Git</a>
|
|
<span aria-hidden="true">·</span>
|
|
<span id="footer-slogan-display" class="footer-slogan">Apache2 Web & Subdomain Orchestrator</span>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
|
|
<!-- =======================================================================
|
|
Modal: Crear / Editar Subdominio con Terminal de Rollback
|
|
======================================================================= -->
|
|
<div id="modal-subdomain" class="modal-backdrop" role="dialog" aria-modal="true" aria-labelledby="modal-subdomain-title">
|
|
<div class="modal-dialog">
|
|
<div class="modal-header">
|
|
<div class="modal-title-wrap">
|
|
<div class="modal-icon-badge" aria-hidden="true">
|
|
<svg viewBox="0 0 20 20" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2">
|
|
<circle cx="10" cy="10" r="8"></circle>
|
|
<path stroke-linecap="round" d="M2 10h16M10 2a14 14 0 0 1 0 16"></path>
|
|
</svg>
|
|
</div>
|
|
<h2 id="modal-subdomain-title" class="modal-title">Crear Nuevo Subdominio</h2>
|
|
</div>
|
|
<button type="button" class="modal-close-btn" aria-label="Cerrar modal">×</button>
|
|
</div>
|
|
|
|
<form id="form-subdomain" novalidate>
|
|
<div class="modal-body">
|
|
<!-- Selector Modo A (Estático) vs Modo B (Proxy Inverso) -->
|
|
<div class="form-group">
|
|
<label class="form-label">Modo Operativo de Apache2</label>
|
|
<div class="mode-selector-grid">
|
|
<button type="button" id="mode-btn-static" class="mode-card-btn active">
|
|
<div class="mode-card-header">
|
|
<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M2 3h12a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"></path>
|
|
</svg>
|
|
<span>Modo A: Estático</span>
|
|
</div>
|
|
<p class="mode-card-desc">Crea /var/www/<subdominio> con index.html inicial y permisos SGID 2775.</p>
|
|
</button>
|
|
|
|
<button type="button" id="mode-btn-proxy" class="mode-card-btn">
|
|
<div class="mode-card-header">
|
|
<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
|
|
<circle cx="4" cy="8" r="2"></circle>
|
|
<circle cx="12" cy="8" r="2"></circle>
|
|
<path stroke-linecap="round" d="M6 8h4"></path>
|
|
</svg>
|
|
<span>Modo B: Proxy</span>
|
|
</div>
|
|
<p class="mode-card-desc">ProxyPass reverso a servicio local (127.0.0.1:<puerto> Node, FastAPI, etc.).</p>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Nombre del Subdominio -->
|
|
<div class="form-group">
|
|
<label for="subdomain-name-input" class="form-label">
|
|
<span>Nombre del Subdominio</span>
|
|
<span style="font-size: 0.72rem; color: var(--text-muted);">Solo a-z, 0-9 y guiones</span>
|
|
</label>
|
|
<input
|
|
type="text"
|
|
id="subdomain-name-input"
|
|
class="form-input"
|
|
placeholder="ejemplo-app"
|
|
required
|
|
maxlength="63"
|
|
autocomplete="off"
|
|
>
|
|
<div id="subdomain-name-feedback" class="input-feedback"></div>
|
|
</div>
|
|
|
|
<!-- Vista Previa de URL en Vivo -->
|
|
<div class="url-preview-card">
|
|
<span>URL Resultante:</span>
|
|
<strong id="preview-url-domain">subdominio.elingejose.com</strong>
|
|
</div>
|
|
|
|
<!-- Puerto para Modo Proxy (Modo B) -->
|
|
<div id="form-group-port" class="form-group" style="display: none;">
|
|
<label for="subdomain-port-input" class="form-label">
|
|
<span>Puerto TCP Local (1024 - 65535)</span>
|
|
<span style="font-size: 0.72rem; color: var(--text-muted);">Redirige a http://127.0.0.1:<puerto></span>
|
|
</label>
|
|
<input
|
|
type="number"
|
|
id="subdomain-port-input"
|
|
class="form-input"
|
|
placeholder="8080"
|
|
min="1024"
|
|
max="65535"
|
|
>
|
|
<div id="subdomain-port-feedback" class="input-feedback"></div>
|
|
</div>
|
|
|
|
<!-- Caja de Alerta de Riesgo Dinámico (Site Risk Assessment) -->
|
|
<div id="subdomain-risk-container" class="risk-alert-container" style="display: none;">
|
|
<div class="risk-alert-header">
|
|
<div class="risk-alert-badge" id="subdomain-risk-level-badge">CRÍTICO</div>
|
|
<strong class="risk-alert-title">Riesgo de Reconfiguración Detectado</strong>
|
|
</div>
|
|
<div id="subdomain-risk-list" class="risk-alert-list">
|
|
<!-- Se puebla dinámicamente al validar riesgos -->
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Checkbox Obligatorio para Confirmar Impacto de Riesgo -->
|
|
<div id="subdomain-risk-confirmation" class="risk-confirmation-box" style="display: none;">
|
|
<input type="checkbox" id="chk-confirm-subdomain-risk" class="risk-checkbox">
|
|
<label for="chk-confirm-subdomain-risk" class="risk-checkbox-label">
|
|
<strong>Comprendo el impacto y confirmo que deseo aplicar esta reconfiguración</strong>
|
|
<span class="risk-checkbox-sub">Esta acción reconfigurará Apache2 y validará la sintaxis antes del reload.</span>
|
|
</label>
|
|
</div>
|
|
|
|
<!-- Terminal de Diagnóstico de Rollback (RFC 7807 Stderr) -->
|
|
<div id="rollback-terminal" class="rollback-terminal-container">
|
|
<div class="terminal-header">
|
|
<div class="terminal-title-wrap">
|
|
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M10 3.5 2 16.5h16L10 3.5zM10 8.5v4M10 14.5v.5"></path>
|
|
</svg>
|
|
<span>Diagnóstico de Fallo en Apache2</span>
|
|
<span class="terminal-badge">Rollback Atómico OK</span>
|
|
</div>
|
|
<button type="button" id="btn-copy-terminal-stderr" class="btn-copy-code" title="Copiar log">
|
|
Copiar Log
|
|
</button>
|
|
</div>
|
|
<pre id="terminal-stderr-text" class="terminal-body"></pre>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary btn-modal-cancel">Cancelar</button>
|
|
<button type="submit" id="btn-submit-subdomain" class="btn btn-primary" disabled>
|
|
Crear Subdominio
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- =======================================================================
|
|
Modal: Eliminar Subdominio con Checkbox de Purga Física
|
|
======================================================================= -->
|
|
<div id="modal-delete-subdomain" class="modal-backdrop" role="dialog" aria-modal="true" aria-labelledby="modal-delete-title">
|
|
<div class="modal-dialog">
|
|
<div class="modal-header">
|
|
<div class="modal-title-wrap">
|
|
<div class="modal-icon-badge" style="background: rgba(239, 68, 68, 0.15); color: #f87171; border-color: rgba(239, 68, 68, 0.3);">
|
|
<svg viewBox="0 0 20 20" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3 4h14M7 4V2.5A1.5 1.5 0 0 1 8.5 1h3A1.5 1.5 0 0 1 13 2.5V4M5 4v11a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V4"></path>
|
|
</svg>
|
|
</div>
|
|
<h2 id="modal-delete-title" class="modal-title">Eliminar Subdominio</h2>
|
|
</div>
|
|
<button type="button" class="modal-close-btn" aria-label="Cerrar modal">×</button>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
<p style="font-size: 0.9rem; color: var(--text-secondary);">
|
|
¿Estás seguro de que deseas eliminar el subdominio <strong id="delete-subdomain-target-text" style="color: #f87171;">subdominio.elingejose.com</strong>?
|
|
</p>
|
|
<p style="font-size: 0.8rem; color: var(--text-muted); line-height: 1.5;">
|
|
Esta acción ejecutará <code>a2dissite</code>, eliminará el archivo de configuración en <code>/etc/apache2/sites-available/</code> y recargará Apache2.
|
|
</p>
|
|
|
|
<!-- Checkbox Purga Física -->
|
|
<div id="delete-files-checkbox-container" style="display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.85rem; background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.25); border-radius: var(--radius-md);">
|
|
<input type="checkbox" id="chk-delete-files" style="margin-top: 0.25rem; cursor: pointer;">
|
|
<label for="chk-delete-files" style="font-size: 0.82rem; cursor: pointer; color: var(--text-primary);">
|
|
<strong>Purgar físicamente los archivos web del disco</strong>
|
|
<span style="display: block; font-size: 0.74rem; color: var(--text-muted); margin-top: 0.15rem;">
|
|
Elimina de forma irreversible la carpeta asociada en <code>/var/www/<subdominio></code>. Si no se marca, los archivos se preservarán intactos.
|
|
</span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary btn-modal-cancel">Cancelar</button>
|
|
<button type="button" id="btn-confirm-delete-subdomain" class="btn btn-danger">
|
|
Confirmar Eliminación
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- =======================================================================
|
|
Modal: Gestor de Archivos (File Manager) para /var/www/<subdominio>
|
|
======================================================================= -->
|
|
<div id="modal-file-manager" class="modal-backdrop" role="dialog" aria-modal="true" aria-labelledby="fm-modal-title">
|
|
<div class="modal-dialog modal-dialog-xl">
|
|
<div class="modal-header">
|
|
<div class="modal-title-wrap">
|
|
<div class="modal-icon-badge" style="background: rgba(163, 230, 53, 0.12); color: var(--accent-lime); border-color: rgba(163, 230, 53, 0.25);">
|
|
<svg viewBox="0 0 20 20" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3 4a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-6l-2-2H3z"></path>
|
|
</svg>
|
|
</div>
|
|
<div>
|
|
<h2 id="fm-modal-title" class="modal-title">Gestor de Archivos</h2>
|
|
<div id="fm-current-path-display" class="fm-path-subtitle">/var/www/subdominio</div>
|
|
</div>
|
|
</div>
|
|
<button type="button" class="modal-close-btn" aria-label="Cerrar modal">×</button>
|
|
</div>
|
|
|
|
<!-- Breadcrumbs de Navegación Interactiva -->
|
|
<nav id="fm-breadcrumbs" class="fm-breadcrumbs-bar" aria-label="Ruta de carpetas">
|
|
<!-- Generado dinámicamente -->
|
|
</nav>
|
|
|
|
<!-- Barra de Herramientas del File Manager -->
|
|
<div class="fm-toolbar-container">
|
|
<div class="fm-toolbar-left">
|
|
<!-- Input oculto para subida de archivos -->
|
|
<input type="file" id="fm-file-input" style="display: none;">
|
|
|
|
<button type="button" id="fm-btn-upload" class="btn btn-primary btn-sm">
|
|
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M8 12V2M4 6l4-4 4 4M2 14h12"></path>
|
|
</svg>
|
|
<span>Subir Archivo</span>
|
|
</button>
|
|
|
|
<button type="button" id="fm-btn-new-file" class="btn btn-secondary btn-sm">
|
|
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M8 3v10M3 8h10"></path>
|
|
</svg>
|
|
<span>Nuevo Archivo</span>
|
|
</button>
|
|
|
|
<button type="button" id="fm-btn-new-folder" class="btn btn-secondary btn-sm">
|
|
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M2 3h4l2 2h6v8H2zM8 7v4M6 9h4"></path>
|
|
</svg>
|
|
<span>Nueva Carpeta</span>
|
|
</button>
|
|
|
|
<button type="button" id="fm-btn-up-dir" class="btn btn-secondary btn-sm" title="Subir un nivel de carpeta">
|
|
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M8 13V3M4 7l4-4 4 4"></path>
|
|
</svg>
|
|
<span>Subir Nivel</span>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="fm-toolbar-right">
|
|
<span id="fm-items-count-text" class="text-xs text-muted">0 elementos</span>
|
|
<button type="button" id="fm-btn-refresh" class="btn btn-secondary btn-sm" title="Refrescar contenido">
|
|
<svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M14 8A6 6 0 1 1 9.5 2.5M14 2.5v4h-4"></path>
|
|
</svg>
|
|
<span>Refrescar</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Fila de creación de nuevo elemento (archivo o carpeta) -->
|
|
<div id="fm-new-item-row" class="fm-create-item-panel" style="display: none;">
|
|
<div class="fm-create-item-form">
|
|
<span id="fm-create-type-label" class="badge badge-mode-static">Archivo</span>
|
|
<input
|
|
type="text"
|
|
id="fm-new-item-name-input"
|
|
class="form-input fm-create-input"
|
|
placeholder="nombre-archivo.php"
|
|
autocomplete="off"
|
|
>
|
|
<button type="button" id="fm-btn-confirm-create-item" class="btn btn-primary btn-sm">Crear</button>
|
|
<button type="button" id="fm-btn-cancel-create-item" class="btn btn-secondary btn-sm">Cancelar</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-body fm-modal-body">
|
|
<div class="table-responsive fm-table-wrap">
|
|
<table class="data-table fm-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Nombre</th>
|
|
<th>Tipo</th>
|
|
<th>Tamaño</th>
|
|
<th>Permisos</th>
|
|
<th>Última Modificación</th>
|
|
<th style="text-align: right;">Acciones</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="fm-files-table-body">
|
|
<!-- Se puebla dinámicamente -->
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary btn-modal-cancel">Cerrar</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- =======================================================================
|
|
Modal: Editor de Código para Archivos Web (.php, .html, .css, .js, etc.)
|
|
======================================================================= -->
|
|
<div id="modal-code-editor" class="modal-backdrop" role="dialog" aria-modal="true" aria-labelledby="code-editor-file-title">
|
|
<div class="modal-dialog modal-dialog-xl code-editor-dialog">
|
|
<div class="modal-header code-editor-header">
|
|
<div class="modal-title-wrap">
|
|
<div class="modal-icon-badge" style="background: rgba(56, 189, 248, 0.12); color: #38bdf8; border-color: rgba(56, 189, 248, 0.25);">
|
|
<svg viewBox="0 0 20 20" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2">
|
|
<polyline points="14 4 18 8 14 12"></polyline>
|
|
<polyline points="6 16 2 12 6 8"></polyline>
|
|
<line x1="12" y1="2" x2="8" y2="18"></line>
|
|
</svg>
|
|
</div>
|
|
<div>
|
|
<h2 id="code-editor-file-title" class="modal-title">index.php</h2>
|
|
<div id="code-editor-file-path" class="code-editor-path">/var/www/app/index.php</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="code-editor-header-actions">
|
|
<div id="code-editor-save-status" class="code-editor-status-tag status-clean">Sin cambios</div>
|
|
<button type="button" id="code-editor-btn-save" class="btn btn-primary btn-sm">
|
|
<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M13 14H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h7l4 4v7a1 1 0 0 1-1 1zM11 2v4H5V2M5 14v-5h6v5"></path>
|
|
</svg>
|
|
<span>Guardar Archivo</span>
|
|
</button>
|
|
<button type="button" id="code-editor-btn-close" class="modal-close-btn" aria-label="Cerrar editor">×</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-body code-editor-body">
|
|
<div class="code-editor-workspace">
|
|
<!-- Columna Izquierda: Números de Línea Sincronizados -->
|
|
<div id="code-editor-linenumbers" class="code-editor-gutter" aria-hidden="true">
|
|
1
|
|
</div>
|
|
<!-- Área de Código -->
|
|
<textarea
|
|
id="code-editor-textarea"
|
|
class="code-editor-textarea"
|
|
placeholder="Contenido del archivo..."
|
|
spellcheck="false"
|
|
autocomplete="off"
|
|
autocorrect="off"
|
|
autocapitalize="off"
|
|
wrap="off"
|
|
></textarea>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer code-editor-footer">
|
|
<div class="code-editor-footer-left">
|
|
<span id="code-editor-cursor-pos" class="text-xs text-muted tabular-nums">Línea 1, Col 1</span>
|
|
<span id="code-editor-char-count" class="text-xs text-muted tabular-nums">0 caracteres</span>
|
|
<span class="code-editor-shortcut-hint"><kbd>Ctrl + S</kbd> para guardar rápidamente</span>
|
|
</div>
|
|
<div class="code-editor-footer-right">
|
|
<button type="button" class="btn btn-secondary btn-modal-cancel">Cerrar</button>
|
|
<button type="button" id="code-editor-btn-save-bottom" class="btn btn-primary">
|
|
Guardar Cambios
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- =======================================================================
|
|
Modal: Crear / Editar Usuario
|
|
======================================================================= -->
|
|
<div id="modal-user" class="modal-backdrop" role="dialog" aria-modal="true" aria-labelledby="modal-user-title">
|
|
<div class="modal-dialog">
|
|
<div class="modal-header">
|
|
<div class="modal-title-wrap">
|
|
<div class="modal-icon-badge">
|
|
<svg viewBox="0 0 20 20" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M16 17v-1.5a3.5 3.5 0 0 0-3.5-3.5h-5A3.5 3.5 0 0 0 4 15.5V17M10 8.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z"></path>
|
|
</svg>
|
|
</div>
|
|
<h2 id="modal-user-title" class="modal-title">Gestión de Usuario</h2>
|
|
</div>
|
|
<button type="button" class="modal-close-btn" aria-label="Cerrar modal">×</button>
|
|
</div>
|
|
|
|
<form id="form-user" novalidate>
|
|
<input type="hidden" id="user-id-hidden">
|
|
<div class="modal-body">
|
|
<div class="form-group">
|
|
<label for="user-username-input" class="form-label">Nombre de Usuario</label>
|
|
<input type="text" id="user-username-input" class="form-input" placeholder="ej: operador1" required>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="user-fullname-input" class="form-label">Nombre Completo</label>
|
|
<input type="text" id="user-fullname-input" class="form-input" placeholder="ej: Juan Pérez">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="user-password-input" class="form-label">Contraseña</label>
|
|
<input type="password" id="user-password-input" class="form-input" placeholder="••••••••••••">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="user-role-select" class="form-label">Rol del Sistema</label>
|
|
<select id="user-role-select" class="select-filter" style="width: 100%;">
|
|
<option value="operator">Operador (Gestionar subdominios y ver estadísticas)</option>
|
|
<option value="admin">Administrador (Control total y gestión de usuarios)</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary btn-modal-cancel">Cancelar</button>
|
|
<button type="submit" id="btn-submit-user" class="btn btn-primary">Guardar Usuario</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- =======================================================================
|
|
Modal: Crear / Editar Proyecto
|
|
======================================================================= -->
|
|
<div id="modal-project" class="modal-backdrop" role="dialog" aria-modal="true" aria-labelledby="modal-project-title">
|
|
<div class="modal-dialog">
|
|
<div class="modal-header">
|
|
<div class="modal-title-wrap">
|
|
<div class="modal-icon-badge" style="background: rgba(163, 230, 53, 0.12); color: var(--accent-lime); border-color: rgba(163, 230, 53, 0.25);">
|
|
<svg viewBox="0 0 20 20" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3 7l7-4 7 4-7 4-7-4zM3 13l7 4 7-4M3 10l7 4 7-4"></path>
|
|
</svg>
|
|
</div>
|
|
<h2 id="modal-project-title" class="modal-title">Crear Nuevo Proyecto</h2>
|
|
</div>
|
|
<button type="button" class="modal-close-btn" aria-label="Cerrar modal">×</button>
|
|
</div>
|
|
|
|
<form id="form-project" novalidate>
|
|
<input type="hidden" id="project-id-hidden">
|
|
<div class="modal-body">
|
|
<div class="form-group">
|
|
<label class="form-label">Tipo de Aplicación / Arquitectura</label>
|
|
<div class="project-type-selector-grid">
|
|
<label class="project-type-option active">
|
|
<input type="radio" name="project-type" value="static" checked>
|
|
<span class="project-type-box">
|
|
<strong>📁 Estático / PHP</strong>
|
|
<span class="text-xs text-muted">HTML/CSS/JS, PHP, WordPress</span>
|
|
</span>
|
|
</label>
|
|
|
|
<label class="project-type-option">
|
|
<input type="radio" name="project-type" value="node">
|
|
<span class="project-type-box">
|
|
<strong>⚡ Node.js</strong>
|
|
<span class="text-xs text-muted">Express, Nest, Astro, PM2</span>
|
|
</span>
|
|
</label>
|
|
|
|
<label class="project-type-option">
|
|
<input type="radio" name="project-type" value="python">
|
|
<span class="project-type-box">
|
|
<strong>🐍 Python</strong>
|
|
<span class="text-xs text-muted">FastAPI, Flask, Django</span>
|
|
</span>
|
|
</label>
|
|
|
|
<label class="project-type-option">
|
|
<input type="radio" name="project-type" value="custom">
|
|
<span class="project-type-box">
|
|
<strong>🔌 Proxy Inverso</strong>
|
|
<span class="text-xs text-muted">Go, Rust, Docker, Servicio local</span>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="project-name-input" class="form-label">
|
|
<span>Nombre del Proyecto</span>
|
|
<span style="font-size: 0.72rem; color: var(--text-muted);">Directorio en /var/www/<nombre></span>
|
|
</label>
|
|
<input
|
|
type="text"
|
|
id="project-name-input"
|
|
class="form-input"
|
|
placeholder="mi-super-app"
|
|
required
|
|
maxlength="63"
|
|
autocomplete="off"
|
|
>
|
|
<div id="project-name-feedback" class="input-feedback"></div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="project-public-folder-input" class="form-label">
|
|
<span>Subcarpeta Pública del DocumentRoot</span>
|
|
<span style="font-size: 0.72rem; color: var(--text-muted);">(Opcional: public, dist, build o vacío)</span>
|
|
</label>
|
|
<input
|
|
type="text"
|
|
id="project-public-folder-input"
|
|
class="form-input"
|
|
placeholder="public"
|
|
autocomplete="off"
|
|
>
|
|
<div class="url-preview-card" style="margin-top: 0.4rem;">
|
|
<span>Ruta Apache Final:</span>
|
|
<strong id="preview-project-docroot" style="color: var(--accent-lime); font-family: ui-monospace, monospace; font-size: 0.8rem;">
|
|
/var/www/mi-super-app/public
|
|
</strong>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Puerto (Visible para Node, Python o Custom) -->
|
|
<div id="form-group-project-port" class="form-group" style="display: none;">
|
|
<label for="project-port-input" class="form-label">
|
|
<span>Puerto Local (1024 - 65535)</span>
|
|
<span style="font-size: 0.72rem; color: var(--text-muted);">Proxy a http://127.0.0.1:<puerto></span>
|
|
</label>
|
|
<input
|
|
type="number"
|
|
id="project-port-input"
|
|
class="form-input"
|
|
placeholder="3000"
|
|
min="1024"
|
|
max="65535"
|
|
>
|
|
</div>
|
|
|
|
<div id="form-group-project-subdomains" class="form-group">
|
|
<label for="project-subdomains-input" class="form-label">
|
|
<span>Subdominio Inicial Vinculado</span>
|
|
<span style="font-size: 0.72rem; color: var(--text-muted);">(Opcional: puedes agregar más después)</span>
|
|
</label>
|
|
<input
|
|
type="text"
|
|
id="project-subdomains-input"
|
|
class="form-input"
|
|
placeholder="app"
|
|
autocomplete="off"
|
|
>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary btn-modal-cancel">Cancelar</button>
|
|
<button type="submit" id="btn-submit-project" class="btn btn-primary">
|
|
Guardar Proyecto
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- =======================================================================
|
|
Modal: Vincular Subdominio a Proyecto
|
|
======================================================================= -->
|
|
<div id="modal-link-subdomain" class="modal-backdrop" role="dialog" aria-modal="true" aria-labelledby="modal-link-subdomain-title">
|
|
<div class="modal-dialog">
|
|
<div class="modal-header">
|
|
<div class="modal-title-wrap">
|
|
<div class="modal-icon-badge" style="background: rgba(56, 189, 248, 0.12); color: #38bdf8;">
|
|
<svg viewBox="0 0 20 20" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path>
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
|
</svg>
|
|
</div>
|
|
<h2 id="modal-link-subdomain-title" class="modal-title">Vincular Subdominio al Proyecto</h2>
|
|
</div>
|
|
<button type="button" class="modal-close-btn" aria-label="Cerrar modal">×</button>
|
|
</div>
|
|
|
|
<form id="form-link-subdomain" novalidate>
|
|
<input type="hidden" id="link-project-id-hidden">
|
|
<div class="modal-body">
|
|
<p style="font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 1rem;">
|
|
Se creará un nuevo VirtualHost Apache2 apuntando a la subcarpeta pública o puerto de este proyecto.
|
|
</p>
|
|
|
|
<div class="form-group">
|
|
<label for="link-subdomain-name-input" class="form-label">Nuevo Subdominio</label>
|
|
<input
|
|
type="text"
|
|
id="link-subdomain-name-input"
|
|
class="form-input"
|
|
placeholder="ej: api, staging, panel"
|
|
required
|
|
maxlength="63"
|
|
autocomplete="off"
|
|
>
|
|
</div>
|
|
|
|
<div class="url-preview-card">
|
|
<span>URL Resultante:</span>
|
|
<strong id="link-subdomain-preview-url">subdominio.elingejose.com</strong>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary btn-modal-cancel">Cancelar</button>
|
|
<button type="submit" id="btn-submit-link-subdomain" class="btn btn-primary">
|
|
Vincular Subdominio
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- =======================================================================
|
|
Modal: Crear / Editar Cuenta FTP
|
|
======================================================================= -->
|
|
<div id="modal-ftp-account" class="modal-backdrop" role="dialog" aria-modal="true" aria-labelledby="modal-ftp-title">
|
|
<div class="modal-dialog">
|
|
<div class="modal-header">
|
|
<div class="modal-title-wrap">
|
|
<div class="modal-icon-badge" style="background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald);">
|
|
<svg viewBox="0 0 20 20" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M12 2a8 8 0 0 0-8 8c0 3 1.5 5.5 3.5 7M8 12a4 4 0 0 1 8 0M10 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"></path>
|
|
</svg>
|
|
</div>
|
|
<h2 id="modal-ftp-title" class="modal-title">Nueva Cuenta FTP / SFTP</h2>
|
|
</div>
|
|
<button type="button" class="modal-close-btn" aria-label="Cerrar modal">×</button>
|
|
</div>
|
|
|
|
<form id="form-ftp-account" novalidate>
|
|
<input type="hidden" id="ftp-account-id-hidden">
|
|
<div class="modal-body">
|
|
<div class="form-group">
|
|
<label for="ftp-username-input" class="form-label">Nombre de Usuario FTP</label>
|
|
<input
|
|
type="text"
|
|
id="ftp-username-input"
|
|
class="form-input"
|
|
placeholder="ej: dev_externo"
|
|
required
|
|
autocomplete="off"
|
|
>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="ftp-password-input" class="form-label">Contraseña FTP</label>
|
|
<input
|
|
type="password"
|
|
id="ftp-password-input"
|
|
class="form-input"
|
|
placeholder="Mínimo 6 caracteres"
|
|
required
|
|
autocomplete="new-password"
|
|
>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="ftp-project-select" class="form-label">Proyecto / Carpeta Asignada</label>
|
|
<select id="ftp-project-select" class="select-filter" style="width: 100%;">
|
|
<option value="">Todos los Proyectos (/var/www)</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="ftp-permission-select" class="form-label">Nivel de Permisos</label>
|
|
<select id="ftp-permission-select" class="select-filter" style="width: 100%;">
|
|
<option value="rw">Lectura y Escritura (Subir, editar y borrar archivos)</option>
|
|
<option value="ro">Solo Lectura (Descargar archivos únicamente)</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary btn-modal-cancel">Cancelar</button>
|
|
<button type="submit" id="btn-submit-ftp-account" class="btn btn-primary">
|
|
Guardar Cuenta FTP
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- =======================================================================
|
|
Modal: Eliminar Proyecto
|
|
======================================================================= -->
|
|
<div id="modal-delete-project" class="modal-backdrop" role="dialog" aria-modal="true" aria-labelledby="modal-delete-project-title">
|
|
<div class="modal-dialog">
|
|
<div class="modal-header">
|
|
<div class="modal-title-wrap">
|
|
<div class="modal-icon-badge" style="background: rgba(239, 68, 68, 0.15); color: #f87171;">
|
|
<svg viewBox="0 0 20 20" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3 4h14M7 4V2.5A1.5 1.5 0 0 1 8.5 1h3A1.5 1.5 0 0 1 13 2.5V4M5 4v11a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V4"></path>
|
|
</svg>
|
|
</div>
|
|
<h2 id="modal-delete-project-title" class="modal-title">Eliminar Proyecto</h2>
|
|
</div>
|
|
<button type="button" class="modal-close-btn" aria-label="Cerrar modal">×</button>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
<p style="font-size: 0.9rem; color: var(--text-secondary);">
|
|
¿Estás seguro de que deseas eliminar el proyecto <strong id="delete-project-name-display" style="color: #f87171;">mi-proyecto</strong>?
|
|
</p>
|
|
<p style="font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; margin-top: 0.35rem;">
|
|
Esta acción deshabilitará y eliminará automáticamente todos los subdominios y VirtualHosts asociados a este proyecto en Apache2.
|
|
</p>
|
|
|
|
<div style="display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.85rem; background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.25); border-radius: var(--radius-md); margin-top: 1rem;">
|
|
<input type="checkbox" id="chk-delete-project-files" style="margin-top: 0.25rem; cursor: pointer;">
|
|
<label for="chk-delete-project-files" style="font-size: 0.82rem; cursor: pointer; color: var(--text-primary);">
|
|
<strong>Purgar físicamente los archivos del disco</strong>
|
|
<span style="display: block; font-size: 0.74rem; color: var(--text-muted); margin-top: 0.15rem;">
|
|
Elimina de forma irreversible el directorio en <code>/var/www/<proyecto></code>. Si no se marca, los archivos se preservarán.
|
|
</span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary btn-modal-cancel">Cancelar</button>
|
|
<button type="button" id="btn-confirm-delete-project" class="btn btn-danger">
|
|
Confirmar Eliminación
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Contenedor Global de Toasts Flotantes -->
|
|
<div id="toast-container" class="toast-container" aria-live="polite" aria-atomic="true"></div>
|
|
|
|
<!-- Script Principal de la SPA (Zero-Build ES Module) -->
|
|
<script type="module" src="/js/app.js"></script>
|
|
</body>
|
|
</html>
|