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
|
||||
|
||||
Reference in new issue
Block a user