This commit is contained in:
lizandrogd
2026-01-13 01:03:24 -05:00
parent 83fcabe36f
commit b0d44b0095
3 changed files with 499 additions and 5 deletions
+20 -5
View File
@@ -74,9 +74,10 @@ try {
</small>
</div>
<div class="header-actions">
<span class="status-indicator online">
<i class="fas fa-circle"></i> En línea
</span>
<div class="status-badge">
<span class="status-dot status-online"></span>
<span class="status-text">En línea</span>
</div>
<button class="btn btn-primary me-2" onclick="refreshData()">
<i class="fas fa-sync-alt"></i> Actualizar
</button>
@@ -675,10 +676,24 @@ try {
</div>`;
// API
let apiMessage = '';
if (typeof data.api.message === 'object' && data.api.message !== null) {
// Si el mensaje es un objeto de error
if (data.api.message.message) {
apiMessage = `<strong>Error:</strong> ${data.api.message.message.split(':')[0]}`;
apiMessage += `<br><small class="text-muted">Verifica tu token de acceso y Phone Number ID</small>`;
} else {
apiMessage = 'Error en la conectividad de la API';
}
} else {
// Si el mensaje es un string simple
apiMessage = data.api.message;
}
html += `<div class="mb-3">
<h6><i class="fas fa-plug"></i> Conectividad API</h6>
<div class="alert alert-${data.api.status === 'ready' ? 'success' : 'warning'}">
${data.api.message}
<div class="alert alert-${data.api.status === 'ready' ? 'success' : 'danger'}">
${apiMessage}
</div>
</div>`;