sdwan: add hub node selection and auto fallback to mesh
This commit is contained in:
@@ -124,11 +124,16 @@
|
||||
<input class="ipt max-w-xs" v-model="sd.name" placeholder="名称">
|
||||
<input class="ipt max-w-xs" v-model="sd.gatewayCIDR" placeholder="网段,如 10.10.0.0/24">
|
||||
<select class="ipt max-w-[140px]" v-model="sd.mode"><option value="mesh">mesh</option><option value="hub">hub</option></select>
|
||||
<select v-if="sd.mode==='hub'" class="ipt max-w-[220px]" v-model="sd.hubNode">
|
||||
<option value="">选择 Hub 节点</option>
|
||||
<option v-for="n in nodes" :key="'hub'+n.name" :value="n.name">{{ n.alias || n.name }}</option>
|
||||
</select>
|
||||
<input class="ipt max-w-[120px]" type="number" min="1200" max="9000" v-model.number="sd.mtu" placeholder="MTU">
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<button class="btn2" @click="autoAssignIPs">自动分配 IP</button>
|
||||
<button class="btn" :disabled="busy" @click="saveSDWAN">保存 SDWAN</button>
|
||||
<div v-if="sd.mode==='hub'" class="text-xs text-slate-400">Hub 离线将自动回 Mesh</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -286,7 +291,7 @@ createApp({
|
||||
const refreshSec = ref(15), timer = ref(null);
|
||||
|
||||
const health = ref({}), stats = ref({}), nodes = ref([]), nodeKeyword = ref('');
|
||||
const sd = ref({ enabled:false, name:'sdwan-main', gatewayCIDR:'10.10.0.0/24', mode:'mesh', mtu:1420, nodes:[], routes:['10.10.0.0/24'] });
|
||||
const sd = ref({ enabled:false, name:'sdwan-main', gatewayCIDR:'10.10.0.0/24', mode:'mesh', hubNode:'', mtu:1420, nodes:[], routes:['10.10.0.0/24'] });
|
||||
const connectForm = ref({ from:'', to:'', srcPort:80, dstPort:80, appName:'manual-connect' });
|
||||
|
||||
const tenants = ref([]), activeTenant = ref(1), keys = ref([]), users = ref([]), enrolls = ref([]);
|
||||
|
||||
Reference in New Issue
Block a user