|
@@ -2045,6 +2045,9 @@ async function addInterfaceIP() {
|
|
|
await fetchData(false);
|
|
await fetchData(false);
|
|
|
const iface = (state.interfaces || []).find(i => i.name === state.currentModalIface);
|
|
const iface = (state.interfaces || []).find(i => i.name === state.currentModalIface);
|
|
|
if (iface) renderModalIPs(iface);
|
|
if (iface) renderModalIPs(iface);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ const err = await res.json();
|
|
|
|
|
+ showToast('Error', err.error || err.message || 'Failed to add IP address', 'error');
|
|
|
}
|
|
}
|
|
|
} catch (err) {
|
|
} catch (err) {
|
|
|
showToast('Error', err.message, 'error');
|
|
showToast('Error', err.message, 'error');
|
|
@@ -3500,6 +3503,7 @@ function renderEoIPTunnels() {
|
|
|
<td class="py-2.5 px-3 text-center">${renderMikroTikFlag(t.running, t.disabled)}</td>
|
|
<td class="py-2.5 px-3 text-center">${renderMikroTikFlag(t.running, t.disabled)}</td>
|
|
|
<td class="py-2.5 px-3 font-bold text-white font-mono">${t.name}</td>
|
|
<td class="py-2.5 px-3 font-bold text-white font-mono">${t.name}</td>
|
|
|
<td class="py-2.5 px-3 font-bold text-emerald-400 font-mono">${t.tunnel_id}</td>
|
|
<td class="py-2.5 px-3 font-bold text-emerald-400 font-mono">${t.tunnel_id}</td>
|
|
|
|
|
+ <td class="py-2.5 px-3 font-semibold text-emerald-400 font-mono">${t.ip_address || '<span class="text-slate-500 font-normal">Unassigned</span>'}</td>
|
|
|
<td class="py-2.5 px-3 text-cyan-300 font-mono">${t.remote_address}</td>
|
|
<td class="py-2.5 px-3 text-cyan-300 font-mono">${t.remote_address}</td>
|
|
|
<td class="py-2.5 px-3 text-slate-400 font-mono">${t.local_address || '(any)'}</td>
|
|
<td class="py-2.5 px-3 text-slate-400 font-mono">${t.local_address || '(any)'}</td>
|
|
|
<td class="py-2.5 px-3 text-slate-300 font-mono text-[11px]">${t.mac_address || '-'}</td>
|
|
<td class="py-2.5 px-3 text-slate-300 font-mono text-[11px]">${t.mac_address || '-'}</td>
|
|
@@ -3525,6 +3529,7 @@ function openAddEoIPModal() {
|
|
|
document.getElementById('eoip-modal-name').value = `eoip-tunnel${(state.eoipTunnels || []).length + 1}`;
|
|
document.getElementById('eoip-modal-name').value = `eoip-tunnel${(state.eoipTunnels || []).length + 1}`;
|
|
|
document.getElementById('eoip-modal-tunnelid').value = (state.eoipTunnels || []).length + 10;
|
|
document.getElementById('eoip-modal-tunnelid').value = (state.eoipTunnels || []).length + 10;
|
|
|
document.getElementById('eoip-modal-remote').value = '';
|
|
document.getElementById('eoip-modal-remote').value = '';
|
|
|
|
|
+ document.getElementById('eoip-modal-ip').value = '';
|
|
|
document.getElementById('eoip-modal-local').value = '';
|
|
document.getElementById('eoip-modal-local').value = '';
|
|
|
document.getElementById('eoip-modal-mac').value = '';
|
|
document.getElementById('eoip-modal-mac').value = '';
|
|
|
document.getElementById('eoip-modal-mtu').value = '1500';
|
|
document.getElementById('eoip-modal-mtu').value = '1500';
|
|
@@ -3542,6 +3547,7 @@ function openEditEoIPModal(id) {
|
|
|
document.getElementById('eoip-modal-name').value = t.name;
|
|
document.getElementById('eoip-modal-name').value = t.name;
|
|
|
document.getElementById('eoip-modal-tunnelid').value = t.tunnel_id;
|
|
document.getElementById('eoip-modal-tunnelid').value = t.tunnel_id;
|
|
|
document.getElementById('eoip-modal-remote').value = t.remote_address;
|
|
document.getElementById('eoip-modal-remote').value = t.remote_address;
|
|
|
|
|
+ document.getElementById('eoip-modal-ip').value = t.ip_address || '';
|
|
|
document.getElementById('eoip-modal-local').value = t.local_address || '';
|
|
document.getElementById('eoip-modal-local').value = t.local_address || '';
|
|
|
document.getElementById('eoip-modal-mac').value = t.mac_address || '';
|
|
document.getElementById('eoip-modal-mac').value = t.mac_address || '';
|
|
|
document.getElementById('eoip-modal-mtu').value = t.mtu || 1500;
|
|
document.getElementById('eoip-modal-mtu').value = t.mtu || 1500;
|
|
@@ -3561,6 +3567,7 @@ async function submitSaveEoIP(e) {
|
|
|
const name = document.getElementById('eoip-modal-name').value.trim();
|
|
const name = document.getElementById('eoip-modal-name').value.trim();
|
|
|
const tunnelId = parseInt(document.getElementById('eoip-modal-tunnelid').value);
|
|
const tunnelId = parseInt(document.getElementById('eoip-modal-tunnelid').value);
|
|
|
const remote = document.getElementById('eoip-modal-remote').value.trim();
|
|
const remote = document.getElementById('eoip-modal-remote').value.trim();
|
|
|
|
|
+ const ipAddress = document.getElementById('eoip-modal-ip').value.trim();
|
|
|
const local = document.getElementById('eoip-modal-local').value.trim();
|
|
const local = document.getElementById('eoip-modal-local').value.trim();
|
|
|
const mac = document.getElementById('eoip-modal-mac').value.trim();
|
|
const mac = document.getElementById('eoip-modal-mac').value.trim();
|
|
|
const mtu = parseInt(document.getElementById('eoip-modal-mtu').value) || 1500;
|
|
const mtu = parseInt(document.getElementById('eoip-modal-mtu').value) || 1500;
|
|
@@ -3577,6 +3584,7 @@ async function submitSaveEoIP(e) {
|
|
|
name,
|
|
name,
|
|
|
tunnel_id: tunnelId,
|
|
tunnel_id: tunnelId,
|
|
|
remote_address: remote,
|
|
remote_address: remote,
|
|
|
|
|
+ ip_address: ipAddress,
|
|
|
local_address: local,
|
|
local_address: local,
|
|
|
mac_address: mac,
|
|
mac_address: mac,
|
|
|
mtu,
|
|
mtu,
|