From 7e18e09a8c890489be161867434b6736d89910fc Mon Sep 17 00:00:00 2001 From: Caesar Kabalan Date: Mon, 5 Jun 2023 13:32:06 -0700 Subject: [PATCH] Fix Network Address/Size population from Import JSON --- dist/js/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/js/main.js b/dist/js/main.js index 4e9f179..35c5a8a 100644 --- a/dist/js/main.js +++ b/dist/js/main.js @@ -447,9 +447,6 @@ function processConfigUrl() { renameKey(urlConfig, 'v', 'config_version') renameKey(urlConfig, 's', 'subnets') expandKeys(urlConfig['subnets']) - let subnet_split = Object.keys(urlConfig['subnets'])[0].split('/') - $('#network').val(subnet_split[0]) - $('#netsize').val(subnet_split[1]) importConfig(urlConfig) return true } @@ -506,6 +503,9 @@ function renameKey(obj, oldKey, newKey) { function importConfig(text) { // TODO: Probably need error checking here if (text['config_version'] === '1') { + let subnet_split = Object.keys(text['subnets'])[0].split('/') + $('#network').val(subnet_split[0]) + $('#netsize').val(subnet_split[1]) subnetMap = text['subnets']; renderTable() }