Add read-only support and UI indicators for MikroTik dynamic peers (#733)
Docker / Build and Push (push) Canceled after 0s
github-pages / deploy (push) Canceled after 0s
Test / make test (push) Canceled after 0s
Docker / release (push) Canceled after 0s

* Add dynamic Mikrotik peer support & UI/i18n

Introduce handling for dynamically created Mikrotik peers: add Dynamic/IsDynamic fields to domain, peer and interface models and API models; include "dynamic" in Mikrotik queries; skip updates/deletes for dynamic peers; sync dynamic flag when restoring state. Prevent modifying/deleting dynamic peers in manager. UI: disable selection/edit for dynamic peers and show badge. Implement Mikrotik interface hook execution. Add i18n keys/translations for dynamic-peer messages across languages.

* Fix Mikrotik hooks implementation and UI visibility
This commit is contained in:
Ondřej Zmatlík
2026-08-27 09:47:23 +02:00
committed by GitHub
parent 4a9bcd1b82
commit 87aef1c8ff
25 changed files with 1121 additions and 990 deletions
@@ -72,6 +72,14 @@ const isBackendValid = computed(() => {
return valid
})
const isHookSupported = computed(() => {
if (!formData.value.Backend) return false;
let availableBackends = settings.Setting('AvailableBackends') || [];
let backend = availableBackends.find(b => b.Id === formData.value.Backend);
if (!backend) return false;
return backend.Type === 'local' || backend.Type === 'mikrotik';
})
// functions
watch(() => props.visible, async (newValue, oldValue) => {
@@ -499,7 +507,7 @@ async function del() {
</div>
</div>
</fieldset>
<fieldset v-if="formData.Backend==='local'">
<fieldset v-if="isHookSupported">
<legend class="mt-4">{{ $t('modals.interface-edit.header-hooks') }}</legend>
<div class="form-group">
<label class="form-label mt-4">{{ $t('modals.interface-edit.pre-up.label') }}</label>