|
|
@@ -522,79 +522,13 @@ const defaultConfigJson = ref('')
|
|
|
const savingDefaultConfig = ref(false)
|
|
|
const jsonError = ref(null)
|
|
|
const defaultNtpServersText = ref('')
|
|
|
-const defaultConfig = ref({
|
|
|
- force_cloud: false,
|
|
|
- cfg_polling_timeout: 30,
|
|
|
- ble: {
|
|
|
- enabled: true,
|
|
|
- batch_interval_ms: 2500,
|
|
|
- uuid_filter_hex: '',
|
|
|
- upload_endpoint: ''
|
|
|
- },
|
|
|
- wifi: {
|
|
|
- client_enabled: false,
|
|
|
- ssid: '',
|
|
|
- psk: '',
|
|
|
- monitor_enabled: true,
|
|
|
- batch_interval_ms: 10000,
|
|
|
- upload_endpoint: ''
|
|
|
- },
|
|
|
- ssh_tunnel: {
|
|
|
- enabled: false,
|
|
|
- server: 'ms.e-bash.ru',
|
|
|
- port: 2223,
|
|
|
- user: 'tunnel',
|
|
|
- remote_port: 0,
|
|
|
- keepalive_interval: 30
|
|
|
- },
|
|
|
- dashboard_tunnel: {
|
|
|
- enabled: false,
|
|
|
- server: 'ms.e-bash.ru',
|
|
|
- port: 2223,
|
|
|
- user: 'tunnel',
|
|
|
- remote_port: 0,
|
|
|
- keepalive_interval: 30
|
|
|
- },
|
|
|
- dashboard: {
|
|
|
- enabled: true
|
|
|
- },
|
|
|
- net: {
|
|
|
- ntp: {
|
|
|
- servers: ['pool.ntp.org', 'time.google.com']
|
|
|
- }
|
|
|
- },
|
|
|
- debug: false
|
|
|
-})
|
|
|
+// Default config is loaded from backend API, no hardcoded values
|
|
|
+const defaultConfig = ref({})
|
|
|
let searchDebounceTimer = null
|
|
|
let pollingInterval = null
|
|
|
|
|
|
-const config = ref({
|
|
|
- force_cloud: false,
|
|
|
- cfg_polling_timeout: 30,
|
|
|
- ble: {
|
|
|
- enabled: true,
|
|
|
- batch_interval_ms: 2500,
|
|
|
- uuid_filter_hex: '',
|
|
|
- upload_endpoint: ''
|
|
|
- },
|
|
|
- wifi: {
|
|
|
- client_enabled: false,
|
|
|
- ssid: '',
|
|
|
- psk: '',
|
|
|
- monitor_enabled: true,
|
|
|
- batch_interval_ms: 10000,
|
|
|
- upload_endpoint: ''
|
|
|
- },
|
|
|
- dashboard: {
|
|
|
- enabled: true
|
|
|
- },
|
|
|
- net: {
|
|
|
- ntp: {
|
|
|
- servers: ['pool.ntp.org', 'time.google.com']
|
|
|
- }
|
|
|
- },
|
|
|
- debug: false
|
|
|
-})
|
|
|
+// Device config is loaded from device data, no hardcoded values
|
|
|
+const config = ref({})
|
|
|
|
|
|
const sortedDevices = computed(() => {
|
|
|
let result = [...devices.value]
|
|
|
@@ -978,22 +912,8 @@ async function showDefaultConfigModal() {
|
|
|
batch_interval_ms: configData.wifi?.batch_interval_ms ?? 10000,
|
|
|
upload_endpoint: configData.wifi?.upload_endpoint ?? ''
|
|
|
},
|
|
|
- ssh_tunnel: configData.ssh_tunnel || {
|
|
|
- enabled: false,
|
|
|
- server: '192.168.5.4',
|
|
|
- port: 22,
|
|
|
- user: 'tunnel',
|
|
|
- remote_port: 0,
|
|
|
- keepalive_interval: 30
|
|
|
- },
|
|
|
- dashboard_tunnel: configData.dashboard_tunnel || {
|
|
|
- enabled: false,
|
|
|
- server: '192.168.5.4',
|
|
|
- port: 22,
|
|
|
- user: 'tunnel',
|
|
|
- remote_port: 0,
|
|
|
- keepalive_interval: 30
|
|
|
- },
|
|
|
+ ssh_tunnel: configData.ssh_tunnel || {},
|
|
|
+ dashboard_tunnel: configData.dashboard_tunnel || {},
|
|
|
dashboard: {
|
|
|
enabled: configData.dashboard?.enabled ?? true
|
|
|
},
|