diff --git a/src/components/standalone/monitoring/VpnMonitor.vue b/src/components/standalone/monitoring/VpnMonitor.vue index 43090fe2..edf4993c 100644 --- a/src/components/standalone/monitoring/VpnMonitor.vue +++ b/src/components/standalone/monitoring/VpnMonitor.vue @@ -53,6 +53,7 @@ const allDevices = ref([]) const ovpnUsers = ref>({}) const ovpnConfiguration = ref>({}) const today = formatDateLoc(new Date(), 'yyyy-MM-dd') +const ovpnServerConfigured = ref(false) const loading = ref({ listOvpnInstances: true, @@ -217,6 +218,11 @@ async function getOvpnConfiguration(ovpnInstance: string) { try { const res = await ubusCall('ns.ovpnrw', 'get-configuration', { instance: ovpnInstance }) + + // ensure ovpn server has been configured + if (res.data.ns_description) { + ovpnServerConfigured.value = true + } ovpnConfiguration.value[ovpnInstance] = res.data } catch (err: any) { console.error(err) @@ -336,7 +342,7 @@ function getTunnelName(tunnelId: string) { !loading.listOvpnInstances && !loading.listOvpnTunnels && !loading.listIpsecTunnels && - !ovpnInstances.length && + (!ovpnInstances.length || !ovpnServerConfigured) && !enabledTunnels.length " :title="t('standalone.real_time_monitor.no_vpn_network_configured')" @@ -355,7 +361,11 @@ function getTunnelName(tunnelId: string) { class="sm:col-span-12 md:col-span-12 lg:col-span-12 xl:col-span-6 3xl:col-span-4" > -