fix(cluster): support custom peer port, fix netmask & vrid persistence, and fix static call
This commit is contained in:
1 parent
da0805fd5f
commit
b76490a4dc
4 files changed
+94
-31
No files matched your search
@@ -6376,12 +6376,21 @@ async function refreshClusterStatus() {
|
||||
const vipInput = document.getElementById('cluster-virtual-ip');
|
||||
if (vipInput) vipInput.value = st.virtual_ip || '';
|
||||
|
||||
const vmaskInput = document.getElementById('cluster-virtual-netmask');
|
||||
if (vmaskInput && st.virtual_netmask) vmaskInput.value = st.virtual_netmask;
|
||||
|
||||
const vridInput = document.getElementById('cluster-vrid');
|
||||
if (vridInput && st.vrid) vridInput.value = st.vrid;
|
||||
|
||||
const peerIpInput = document.getElementById('cluster-peer-ip');
|
||||
if (peerIpInput) peerIpInput.value = st.peer_ip || '';
|
||||
|
||||
const peerPortInput = document.getElementById('cluster-peer-port');
|
||||
if (peerPortInput && st.peer_port) peerPortInput.value = st.peer_port;
|
||||
|
||||
const autoSyncChk = document.getElementById('cluster-auto-sync');
|
||||
if (autoSyncChk && st.auto_sync !== undefined) autoSyncChk.checked = Boolean(st.auto_sync);
|
||||
|
||||
const secretInput = document.getElementById('cluster-secret');
|
||||
if (secretInput && st.cluster_secret) secretInput.value = st.cluster_secret;
|
||||
|
||||
@@ -6572,6 +6581,7 @@ async function saveClusterSettings(e) {
|
||||
virtual_ip: form.elements['virtual_ip'].value.trim(),
|
||||
virtual_netmask: form.elements['virtual_netmask'].value.trim() || '24',
|
||||
peer_ip: form.elements['peer_ip'].value.trim(),
|
||||
peer_port: parseInt(form.elements['peer_port'] ? form.elements['peer_port'].value : 8443, 10) || 8443,
|
||||
cluster_secret: form.elements['cluster_secret'].value.trim(),
|
||||
vrid: parseInt(form.elements['vrid'].value, 10) || 51,
|
||||
auto_sync: form.elements['auto_sync'].checked ? 1 : 0
|
||||
|
||||
+8
-3
@@ -2917,9 +2917,14 @@ $isDevEnv = file_exists(__DIR__ . '/../.dev')
|
||||
<!-- IP DU PAIR & JETON SECRET -->
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3">
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-slate-300 uppercase mb-1">IP du Nœud Pair (Peer IP)</label>
|
||||
<input type="text" id="cluster-peer-ip" name="peer_ip" placeholder="ex: 10.10.0.5"
|
||||
class="w-full px-3 py-2 rounded-xl bg-anthracite-900 border border-anthracite-700 text-sm text-white focus:outline-none focus:border-cyan-400 font-mono">
|
||||
<label class="block text-xs font-bold text-slate-300 uppercase mb-1">IP & Port d'Administration du Pair</label>
|
||||
<div class="flex gap-2">
|
||||
<input type="text" id="cluster-peer-ip" name="peer_ip" placeholder="ex: 10.10.0.5"
|
||||
class="flex-1 px-3 py-2 rounded-xl bg-anthracite-900 border border-anthracite-700 text-sm text-white focus:outline-none focus:border-cyan-400 font-mono">
|
||||
<span class="flex items-center text-slate-400 font-mono text-sm">:</span>
|
||||
<input type="number" id="cluster-peer-port" name="peer_port" value="8443" min="1" max="65535" placeholder="8443"
|
||||
class="w-24 px-3 py-2 rounded-xl bg-anthracite-900 border border-anthracite-700 text-sm text-white text-center focus:outline-none focus:border-cyan-400 font-mono" title="Port HTTPS d'administration du serveur distant (ex: 8443 ou 2356)">
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-slate-300 uppercase mb-1">Jeton de Sécurité Cluster (Secret)</label>
|
||||
|
||||
Reference in new issue
Block a user