Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b2533695e | ||
|
|
07b53b8002 | ||
|
|
bd8b519753 |
No files matched your search
+52
-3
@@ -140,7 +140,7 @@ try {
|
||||
$installedVerData = file_exists("{$appDir}/version.json")
|
||||
? json_decode((string)file_get_contents("{$appDir}/version.json"), true)
|
||||
: [];
|
||||
$installedVer = $installedVerData['version'] ?? '1.4.2';
|
||||
$installedVer = $installedVerData['version'] ?? '1.4.5';
|
||||
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
@@ -369,6 +369,13 @@ try {
|
||||
// Synchronisation automatique de l'annuaire d'entreprise
|
||||
PhonebookManager::syncExtensions($db);
|
||||
|
||||
// Régénération automatique des fichiers Asterisk et rechargement PJSIP/Dialplan en direct
|
||||
$generator->writeAllConfigs();
|
||||
try {
|
||||
$ami = AmiClient::fromDatabase($db);
|
||||
$ami->reloadPjsipAndDialplan();
|
||||
} catch (\Throwable $e) {}
|
||||
|
||||
$modeBadge = $transport === 'tls' ? 'Distant (TLS + SRTP)' : ($encryption ? 'Interne (UDP + SRTP)' : 'Interne (UDP)');
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
@@ -381,6 +388,13 @@ try {
|
||||
$stmt = $db->prepare('DELETE FROM extensions WHERE id = :id');
|
||||
$stmt->execute([':id' => $id]);
|
||||
PhonebookManager::syncExtensions($db);
|
||||
|
||||
$generator->writeAllConfigs();
|
||||
try {
|
||||
$ami = AmiClient::fromDatabase($db);
|
||||
$ami->reloadPjsipAndDialplan();
|
||||
} catch (\Throwable $e) {}
|
||||
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
'message' => 'Poste téléphonique supprimé de la base SQLite.',
|
||||
@@ -440,6 +454,12 @@ try {
|
||||
]);
|
||||
}
|
||||
|
||||
$generator->writeAllConfigs();
|
||||
try {
|
||||
$ami = AmiClient::fromDatabase($db);
|
||||
$ami->reloadPjsipAndDialplan();
|
||||
} catch (\Throwable $e) {}
|
||||
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
'message' => "Groupe d'appel {$extension} ({$name}) sauvegardé.",
|
||||
@@ -449,6 +469,12 @@ try {
|
||||
case 'delete_group':
|
||||
$id = (int)($payload['id'] ?? 0);
|
||||
$db->prepare('DELETE FROM groups WHERE id = :id')->execute([':id' => $id]);
|
||||
$generator->writeAllConfigs();
|
||||
try {
|
||||
$ami = AmiClient::fromDatabase($db);
|
||||
$ami->reloadPjsipAndDialplan();
|
||||
} catch (\Throwable $e) {}
|
||||
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
'message' => "Groupe de sonnerie supprimé.",
|
||||
@@ -540,6 +566,12 @@ try {
|
||||
]);
|
||||
}
|
||||
|
||||
$generator->writeAllConfigs();
|
||||
try {
|
||||
$ami = AmiClient::fromDatabase($db);
|
||||
$ami->reloadPjsipAndDialplan();
|
||||
} catch (\Throwable $e) {}
|
||||
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
'message' => "Groupe de téléavertissement {$extension} ({$name}) sauvegardé.",
|
||||
@@ -549,6 +581,12 @@ try {
|
||||
case 'delete_paging_group':
|
||||
$id = (int)($payload['id'] ?? 0);
|
||||
$db->prepare('DELETE FROM paging_groups WHERE id = :id')->execute([':id' => $id]);
|
||||
$generator->writeAllConfigs();
|
||||
try {
|
||||
$ami = AmiClient::fromDatabase($db);
|
||||
$ami->reloadPjsipAndDialplan();
|
||||
} catch (\Throwable $e) {}
|
||||
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
'message' => "Groupe de téléavertissement supprimé.",
|
||||
@@ -2311,14 +2349,25 @@ try {
|
||||
|
||||
$newVerJson = file_exists("{$appDir}/version.json")
|
||||
? json_decode((string)file_get_contents("{$appDir}/version.json"), true)
|
||||
: ['version' => '1.3.8'];
|
||||
: ['version' => '1.4.3'];
|
||||
|
||||
while (ob_get_level() > 0) {
|
||||
@ob_end_clean();
|
||||
}
|
||||
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
header('Cache-Control: no-cache, no-store, must-revalidate');
|
||||
|
||||
echo json_encode([
|
||||
'success' => ($code === 0),
|
||||
'new_version' => $newVerJson['version'] ?? '1.3.8',
|
||||
'new_version' => $newVerJson['version'] ?? '1.4.3',
|
||||
'output' => $outputStr,
|
||||
'message' => ($code === 0) ? "Mise à jour réussie !" : "Erreur lors de la mise à jour",
|
||||
]);
|
||||
|
||||
if (function_exists('fastcgi_finish_request')) {
|
||||
fastcgi_finish_request();
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
+144
-49
@@ -5896,14 +5896,57 @@ async function checkSystemUpdate(notify = false) {
|
||||
}
|
||||
}
|
||||
|
||||
async function runSystemUpdate() {
|
||||
if (!confirm("Voulez-vous lancer la mise à jour de NexusPBX ?\n\nUne sauvegarde préventive automatique de vos configurations et de votre base de données sera créée.")) {
|
||||
return;
|
||||
}
|
||||
function openUpdateConfirmModal() {
|
||||
const modal = document.getElementById('modal-confirm-update');
|
||||
if (!modal) return;
|
||||
|
||||
let targetVer = '';
|
||||
let currVer = (appState && appState.version) ? appState.version : (document.querySelector('meta[name="nexus-app-version"]')?.content || '');
|
||||
|
||||
try {
|
||||
const cachedRaw = localStorage.getItem('nexus_update_cached_data');
|
||||
if (cachedRaw) {
|
||||
const cached = JSON.parse(cachedRaw);
|
||||
if (cached.latest_version) targetVer = cached.latest_version;
|
||||
if (cached.current_version) currVer = cached.current_version;
|
||||
}
|
||||
} catch (_) {}
|
||||
|
||||
const elTarget = document.getElementById('update-modal-target-version');
|
||||
const elCurrent = document.getElementById('update-modal-current-version');
|
||||
const elBadge = document.getElementById('update-modal-target-badge');
|
||||
|
||||
if (elTarget) elTarget.textContent = targetVer ? `v${targetVer}` : 'Dernière version';
|
||||
if (elCurrent) elCurrent.textContent = currVer ? `v${currVer}` : 'vActuelle';
|
||||
if (elBadge && targetVer) elBadge.textContent = `v${targetVer} disponible`;
|
||||
|
||||
modal.classList.remove('hidden');
|
||||
modal.classList.add('flex');
|
||||
}
|
||||
|
||||
function closeUpdateConfirmModal() {
|
||||
const modal = document.getElementById('modal-confirm-update');
|
||||
if (modal) {
|
||||
modal.classList.add('hidden');
|
||||
modal.classList.remove('flex');
|
||||
}
|
||||
}
|
||||
|
||||
function runSystemUpdate() {
|
||||
openUpdateConfirmModal();
|
||||
}
|
||||
|
||||
async function executeSystemUpdate() {
|
||||
const btnModalConfirm = document.getElementById('btn-confirm-update-action');
|
||||
const btnRun = document.getElementById('btn-run-update');
|
||||
const statusText = document.getElementById('update-status-text');
|
||||
|
||||
if (btnModalConfirm) {
|
||||
btnModalConfirm.disabled = true;
|
||||
btnModalConfirm.classList.add('opacity-75', 'cursor-not-allowed');
|
||||
btnModalConfirm.innerHTML = '<span class="animate-spin mr-2">↻</span> Déploiement en cours...';
|
||||
}
|
||||
|
||||
if (btnRun) {
|
||||
btnRun.disabled = true;
|
||||
btnRun.innerHTML = '<span class="animate-spin mr-1.5">↻</span> Mise à jour en cours...';
|
||||
@@ -5919,62 +5962,114 @@ async function runSystemUpdate() {
|
||||
localStorage.removeItem('nexus_update_last_check_ts');
|
||||
localStorage.removeItem('nexus_update_cached_data');
|
||||
|
||||
function finalizeUpdateSuccess(newVer) {
|
||||
newVer = String(newVer || '').replace(/^v/, '');
|
||||
localStorage.setItem('nexus_update_last_check_ts', Date.now().toString());
|
||||
localStorage.setItem('nexus_update_cached_data', JSON.stringify({
|
||||
success: true,
|
||||
current_version: newVer,
|
||||
latest_version: newVer,
|
||||
has_update: false,
|
||||
changelog: [],
|
||||
release_date: ''
|
||||
}));
|
||||
|
||||
const verTag = document.getElementById('system-version-tag');
|
||||
const appBadge = document.getElementById('app-version-badge');
|
||||
const headerUpdateBadge = document.getElementById('header-update-badge');
|
||||
const pingDot = document.getElementById('update-ping-dot');
|
||||
|
||||
if (verTag && newVer) verTag.textContent = `v${newVer}`;
|
||||
if (appBadge && newVer) appBadge.textContent = `v${newVer}`;
|
||||
if (headerUpdateBadge) headerUpdateBadge.style.display = 'none';
|
||||
if (btnRun) btnRun.style.display = 'none';
|
||||
if (pingDot) pingDot.classList.add('hidden');
|
||||
|
||||
showToast(`NexusPBX a été mis à jour avec succès en v${newVer} ! Rechargement...`, 'success');
|
||||
if (statusText) {
|
||||
statusText.className = 'text-emerald-400 font-bold';
|
||||
statusText.textContent = `Mise à jour terminée avec succès (v${newVer}) ! Rechargement...`;
|
||||
}
|
||||
if (btnModalConfirm) {
|
||||
btnModalConfirm.className = 'px-5 py-2.5 rounded-xl text-xs font-bold bg-emerald-600 text-white flex items-center gap-2';
|
||||
btnModalConfirm.innerHTML = '✓ Mise à jour terminée ! Rechargement...';
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
closeUpdateConfirmModal();
|
||||
window.location.href = window.location.origin + window.location.pathname + '?_t=' + Date.now();
|
||||
}, 1800);
|
||||
}
|
||||
|
||||
try {
|
||||
const res = await fetch('/api.php?action=run_update&_t=' + Date.now(), {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({})
|
||||
});
|
||||
const data = await res.json();
|
||||
|
||||
if (data.success) {
|
||||
const newVer = data.new_version || '';
|
||||
|
||||
// 1. Mettre à jour immédiatement le cache avec l'état à jour
|
||||
localStorage.setItem('nexus_update_last_check_ts', Date.now().toString());
|
||||
localStorage.setItem('nexus_update_cached_data', JSON.stringify({
|
||||
success: true,
|
||||
current_version: newVer,
|
||||
latest_version: newVer,
|
||||
has_update: false,
|
||||
changelog: [],
|
||||
release_date: ''
|
||||
}));
|
||||
|
||||
// 2. Mettre à jour visuellement les badges immédiatement
|
||||
const verTag = document.getElementById('system-version-tag');
|
||||
const appBadge = document.getElementById('app-version-badge');
|
||||
const headerUpdateBadge = document.getElementById('header-update-badge');
|
||||
const pingDot = document.getElementById('update-ping-dot');
|
||||
|
||||
if (verTag && newVer) verTag.textContent = `v${newVer}`;
|
||||
if (appBadge && newVer) appBadge.textContent = `v${newVer}`;
|
||||
if (headerUpdateBadge) headerUpdateBadge.style.display = 'none';
|
||||
if (btnRun) btnRun.style.display = 'none';
|
||||
if (pingDot) pingDot.classList.add('hidden');
|
||||
|
||||
showToast(`NexusPBX a été mis à jour avec succès en v${newVer} ! Rechargement...`, 'success');
|
||||
if (statusText) {
|
||||
statusText.className = 'text-emerald-400 font-bold';
|
||||
statusText.textContent = `Mise à jour terminée avec succès (v${newVer}) ! Rechargement...`;
|
||||
}
|
||||
|
||||
// 3. Rechargement avec paramètre anti-cache pour forcer le navigateur à récupérer le nouveau DOM
|
||||
setTimeout(() => {
|
||||
window.location.href = window.location.origin + window.location.pathname + '?_t=' + Date.now();
|
||||
}, 2000);
|
||||
} else {
|
||||
alert("Erreur lors de la mise à jour :\n\n" + (data.output || data.message));
|
||||
if (btnRun) {
|
||||
btnRun.disabled = false;
|
||||
btnRun.innerHTML = 'Réessayer la mise à jour';
|
||||
}
|
||||
const rawText = await res.text();
|
||||
let data = null;
|
||||
try {
|
||||
data = JSON.parse(rawText);
|
||||
} catch (_) {
|
||||
data = null;
|
||||
}
|
||||
} catch (e) {
|
||||
alert("Erreur réseau lors de la mise à jour : " + e.message);
|
||||
|
||||
if (data && data.success) {
|
||||
finalizeUpdateSuccess(data.new_version);
|
||||
return;
|
||||
}
|
||||
|
||||
// Si la réponse n'était pas un JSON valide ou a été interrompue par le rechargement de php-fpm/nginx,
|
||||
// on sonde le serveur pour vérifier si la mise à jour a en réalité bien été appliquée sur le disque
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
try {
|
||||
const probeRes = await fetch('/api.php?action=check_update&_t=' + Date.now());
|
||||
const probeData = await probeRes.json();
|
||||
if (probeData && probeData.success && probeData.current_version) {
|
||||
finalizeUpdateSuccess(probeData.current_version);
|
||||
return;
|
||||
}
|
||||
} catch (_) {}
|
||||
|
||||
// En cas d'échec réel avéré
|
||||
closeUpdateConfirmModal();
|
||||
const errMsg = (data && (data.output || data.message)) ? (data.output || data.message) : (rawText.slice(0, 150) || "Erreur inconnue");
|
||||
alert("Erreur lors de la mise à jour :\n\n" + errMsg);
|
||||
if (btnRun) {
|
||||
btnRun.disabled = false;
|
||||
btnRun.innerHTML = 'Réessayer la mise à jour';
|
||||
}
|
||||
if (btnModalConfirm) {
|
||||
btnModalConfirm.disabled = false;
|
||||
btnModalConfirm.classList.remove('opacity-75', 'cursor-not-allowed');
|
||||
btnModalConfirm.innerHTML = '<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/></svg><span>Lancer la mise à jour (1-Clic)</span>';
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
// En cas d'interruption réseau du socket (Safari WebKit DOMException ou timeout),
|
||||
// on vérifie avant d'alerter si le serveur a quand même réussi à déployer les fichiers
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
try {
|
||||
const probeRes = await fetch('/api.php?action=check_update&_t=' + Date.now());
|
||||
const probeData = await probeRes.json();
|
||||
if (probeData && probeData.success && probeData.current_version) {
|
||||
finalizeUpdateSuccess(probeData.current_version);
|
||||
return;
|
||||
}
|
||||
} catch (_) {}
|
||||
|
||||
closeUpdateConfirmModal();
|
||||
alert("Erreur réseau lors de la mise à jour : " + (e.message || "Connexion interrompue"));
|
||||
if (btnRun) {
|
||||
btnRun.disabled = false;
|
||||
btnRun.innerHTML = 'Réessayer la mise à jour';
|
||||
}
|
||||
if (btnModalConfirm) {
|
||||
btnModalConfirm.disabled = false;
|
||||
btnModalConfirm.classList.remove('opacity-75', 'cursor-not-allowed');
|
||||
btnModalConfirm.innerHTML = '<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/></svg><span>Lancer la mise à jour (1-Clic)</span>';
|
||||
}
|
||||
}
|
||||
}
|
||||
+87
-1
@@ -18,7 +18,7 @@ $companyLogo = trim($branding['company_logo'] ?? '');
|
||||
$hasBranding = !empty($companyName) || !empty($companyLogo);
|
||||
|
||||
$appVerData = file_exists(__DIR__ . '/../version.json') ? json_decode((string)file_get_contents(__DIR__ . '/../version.json'), true) : [];
|
||||
$appVersion = $appVerData['version'] ?? '1.4.2';
|
||||
$appVersion = $appVerData['version'] ?? '1.4.5';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr" class="h-full">
|
||||
@@ -4726,6 +4726,92 @@ $appVersion = $appVerData['version'] ?? '1.4.2';
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- MODAL : CONFIRMATION MISE À JOUR SYSTEME (OTA 1-CLIC) -->
|
||||
<!-- ===================================================================== -->
|
||||
<div id="modal-confirm-update" class="fixed inset-0 z-50 hidden items-center justify-center bg-black/80 backdrop-blur-sm p-3 sm:p-4 overflow-y-auto">
|
||||
<div class="bg-anthracite-900 border border-indigo-500/40 rounded-2xl w-full max-w-lg shadow-2xl overflow-hidden my-6 animate-fadeIn">
|
||||
<!-- Entête stylisée -->
|
||||
<div class="px-6 py-5 border-b border-anthracite-800 bg-gradient-to-r from-indigo-950/50 via-anthracite-900 to-anthracite-900 flex items-start justify-between">
|
||||
<div class="flex items-center gap-3.5">
|
||||
<div class="w-11 h-11 rounded-xl bg-indigo-500/15 border border-indigo-500/30 text-indigo-400 flex items-center justify-center shrink-0 shadow-lg shadow-indigo-950/50">
|
||||
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex items-center gap-2">
|
||||
<h3 class="text-base font-bold text-white">Mise à Jour du Système NexusPBX</h3>
|
||||
<span id="update-modal-target-badge" class="px-2 py-0.5 rounded text-[10px] font-bold tracking-wide uppercase bg-indigo-500/20 text-indigo-300 border border-indigo-500/30">OTA 1-Clic</span>
|
||||
</div>
|
||||
<p class="text-xs text-slate-400 mt-0.5">Déploiement officiel et rechargement sans coupure</p>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" onclick="closeUpdateConfirmModal()" class="text-slate-400 hover:text-white p-1.5 rounded-lg hover:bg-anthracite-800 transition">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Corps de la modale -->
|
||||
<div class="p-6 space-y-4">
|
||||
<!-- Info cible -->
|
||||
<div class="p-3.5 rounded-xl bg-anthracite-950/90 border border-anthracite-800 flex items-center justify-between">
|
||||
<div>
|
||||
<div class="text-[11px] font-semibold text-slate-400 uppercase tracking-wider">Version Cible</div>
|
||||
<div id="update-modal-target-version" class="text-base font-bold text-emerald-400 font-mono mt-0.5">v...</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<div class="text-[11px] font-semibold text-slate-400 uppercase tracking-wider">Version Actuelle</div>
|
||||
<div id="update-modal-current-version" class="text-sm font-semibold text-slate-300 font-mono mt-0.5">v...</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Garanties & Sauvegarde automatique -->
|
||||
<div class="p-3.5 rounded-xl bg-emerald-500/10 border border-emerald-500/20 text-xs text-emerald-300 flex items-start gap-3">
|
||||
<svg class="w-5 h-5 text-emerald-400 shrink-0 mt-0.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"/>
|
||||
</svg>
|
||||
<div>
|
||||
<strong class="font-bold text-emerald-200">Sauvegarde préventive automatique incluse :</strong>
|
||||
<p class="mt-0.5 text-emerald-300/90 leading-relaxed">Une sauvegarde complète de votre base SQLite et de vos configurations Asterisk sera créée avant toute modification.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Ce que fait la mise à jour -->
|
||||
<div class="space-y-2">
|
||||
<div class="text-xs font-semibold text-slate-300">Étapes automatiques du déploiement :</div>
|
||||
<ul class="text-xs text-slate-400 space-y-1.5 pl-1">
|
||||
<li class="flex items-center gap-2">
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-cyan-400 shrink-0"></span>
|
||||
<span>Téléchargement des derniers fichiers et correctifs du dépôt officiel.</span>
|
||||
</li>
|
||||
<li class="flex items-center gap-2">
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-indigo-400 shrink-0"></span>
|
||||
<span>Exécution des migrations SQLite et régénération des configurations Asterisk.</span>
|
||||
</li>
|
||||
<li class="flex items-center gap-2">
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-emerald-400 shrink-0"></span>
|
||||
<span>Rechargement à chaud sans interruption des communications actives.</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Boutons d'action -->
|
||||
<div class="px-6 py-4 border-t border-anthracite-800 bg-anthracite-950/80 flex items-center justify-end gap-3">
|
||||
<button type="button" onclick="closeUpdateConfirmModal()"
|
||||
class="px-4 py-2.5 rounded-xl text-xs font-semibold bg-anthracite-800 hover:bg-anthracite-750 text-slate-300 border border-anthracite-700 transition">
|
||||
Annuler
|
||||
</button>
|
||||
<button type="button" id="btn-confirm-update-action" onclick="executeSystemUpdate()"
|
||||
class="px-5 py-2.5 rounded-xl text-xs font-bold bg-gradient-to-r from-indigo-600 to-indigo-500 hover:from-indigo-500 hover:to-indigo-400 text-white shadow-lg shadow-indigo-600/30 transition flex items-center gap-2">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/></svg>
|
||||
<span>Lancer la mise à jour (1-Clic)</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- MODAL : URL XML YEALINK REMOTE PHONEBOOK (cm_to_yl_ab.php) -->
|
||||
<!-- ===================================================================== -->
|
||||
|
||||
+8
-2
@@ -139,8 +139,14 @@ echo -e "${C_GRAY}[6/6] Rechargement à chaud d'Asterisk et des services web...$
|
||||
asterisk -rx "core reload" >/dev/null 2>&1 || true
|
||||
asterisk -rx "pjsip reload" >/dev/null 2>&1 || true
|
||||
asterisk -rx "dialplan reload" >/dev/null 2>&1 || true
|
||||
systemctl reload php8.4-fpm 2>/dev/null || systemctl reload php8.2-fpm 2>/dev/null || systemctl reload php*-fpm 2>/dev/null || true
|
||||
systemctl reload nginx 2>/dev/null || true
|
||||
|
||||
# Rechargement des services web : différé si exécuté depuis l'interface web pour éviter de couper la requête HTTP
|
||||
if [ -t 1 ]; then
|
||||
systemctl reload php8.4-fpm 2>/dev/null || systemctl reload php8.2-fpm 2>/dev/null || systemctl reload php*-fpm 2>/dev/null || true
|
||||
systemctl reload nginx 2>/dev/null || true
|
||||
else
|
||||
(nohup bash -c "sleep 2 && (systemctl reload php8.4-fpm 2>/dev/null || systemctl reload php8.2-fpm 2>/dev/null || systemctl reload php*-fpm 2>/dev/null || true); systemctl reload nginx 2>/dev/null || true" >/dev/null 2>&1 &)
|
||||
fi
|
||||
|
||||
NEW_VER="Inconnue"
|
||||
if [ -f "$APP_DIR/version.json" ]; then
|
||||
|
||||
+5
-5
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"version": "1.4.2",
|
||||
"version": "1.4.5",
|
||||
"codename": "Helios",
|
||||
"release_date": "2026-11-04",
|
||||
"min_php_version": "8.2",
|
||||
"changelog": [
|
||||
"Rendu serveur natif garanti du logo et nom de l'exploitant sur la page de connexion",
|
||||
"Boîte de connexion allégée en style verre dépoli transparent (Glassmorphism backdrop-blur)",
|
||||
"Nouveau fond d'écran immersif haute définition (réseau constellation)",
|
||||
"Lissage élégant des graphiques CPU/RAM et Réseau (splines Bézier cubiques sans angles vifs)"
|
||||
"Application instantanée des mots de passe SIP et configurations des postes dans Asterisk (rechargement PJSIP en temps réel)",
|
||||
"Suppression du délai d'application sur les postes, groupes de sonnerie et groupes de téléavertissement",
|
||||
"Fiabilisation maximale de la mise à jour (rechargement web asynchrone non-bloquant et gestion d'erreurs tolérante)",
|
||||
"Nouvelle boîte modale élégante et personnalisée pour confirmer le lancement des mises à jour"
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user